generated-configure.sh revision 1900:082dc16cb0e5
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691STRIP_POLICY
692DEBUG_BINARIES
693ZIP_EXTERNAL_DEBUG_SYMBOLS
694COPY_DEBUG_SYMBOLS
695COMPILE_WITH_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787ac_ct_CXX
788CXXFLAGS
789CXX
790ac_ct_PROPER_COMPILER_CXX
791PROPER_COMPILER_CXX
792TOOLCHAIN_PATH_CXX
793POTENTIAL_CXX
794OBJEXT
795EXEEXT
796ac_ct_CC
797CPPFLAGS
798LDFLAGS
799CFLAGS
800CC
801ac_ct_PROPER_COMPILER_CC
802PROPER_COMPILER_CC
803TOOLCHAIN_PATH_CC
804POTENTIAL_CC
805TOOLCHAIN_VERSION
806VS_LIB
807VS_INCLUDE
808VS_PATH
809CYGWIN_LINK
810SYSROOT_LDFLAGS
811SYSROOT_CFLAGS
812LEGACY_EXTRA_LDFLAGS
813LEGACY_EXTRA_CXXFLAGS
814LEGACY_EXTRA_CFLAGS
815EXE_SUFFIX
816OBJ_SUFFIX
817STATIC_LIBRARY
818SHARED_LIBRARY
819STATIC_LIBRARY_SUFFIX
820SHARED_LIBRARY_SUFFIX
821LIBRARY_PREFIX
822TOOLCHAIN_TYPE
823STATIC_BUILD
824BUILD_HOTSPOT
825HOTSPOT_DIST
826BUILD_OUTPUT
827JDK_TOPDIR
828NASHORN_TOPDIR
829HOTSPOT_TOPDIR
830JAXWS_TOPDIR
831JAXP_TOPDIR
832CORBA_TOPDIR
833LANGTOOLS_TOPDIR
834BOOT_JDK_BITS
835JAVAC_FLAGS
836BOOT_JDK_SOURCETARGET
837JARSIGNER
838JAR
839JAVAH
840JAVAC
841JAVA
842BOOT_JDK
843JAVA_CHECK
844JAVAC_CHECK
845VERSION_IS_GA
846VERSION_SHORT
847VERSION_STRING
848VERSION_NUMBER_FOUR_POSITIONS
849VERSION_NUMBER
850VERSION_OPT
851VERSION_BUILD
852VERSION_PRE
853VERSION_PATCH
854VERSION_SECURITY
855VERSION_MINOR
856VERSION_MAJOR
857MACOSX_BUNDLE_ID_BASE
858MACOSX_BUNDLE_NAME_BASE
859COMPANY_NAME
860JDK_RC_PLATFORM_NAME
861PRODUCT_SUFFIX
862PRODUCT_NAME
863LAUNCHER_NAME
864TEST_IN_BUILD
865COPYRIGHT_YEAR
866COMPRESS_JARS
867UNLIMITED_CRYPTO
868CACERTS_FILE
869BUILD_HEADLESS
870SUPPORT_HEADFUL
871SUPPORT_HEADLESS
872DEFAULT_MAKE_TARGET
873OS_VERSION_MICRO
874OS_VERSION_MINOR
875OS_VERSION_MAJOR
876PKG_CONFIG
877BASH_ARGS
878SETFILE
879CODESIGN
880XATTR
881DSYMUTIL
882IS_GNU_TIME
883PATCH
884TIME
885STAT
886HG
887READELF
888OTOOL
889LDD
890ZIP
891UNZIP
892FIND_DELETE
893OUTPUT_SYNC
894OUTPUT_SYNC_SUPPORTED
895CHECK_TOOLSDIR_MAKE
896CHECK_TOOLSDIR_GMAKE
897CHECK_MAKE
898CHECK_GMAKE
899MAKE
900PKGHANDLER
901CONFIGURESUPPORT_OUTPUTDIR
902OUTPUT_ROOT
903CONF_NAME
904SPEC
905SDKROOT
906XCODEBUILD
907BUILD_VARIANT_RELEASE
908DEBUG_CLASSFILES
909FASTDEBUG
910VARIANT
911DEBUG_LEVEL
912MACOSX_UNIVERSAL
913INCLUDE_SA
914JVM_VARIANT_CORE
915JVM_VARIANT_ZEROSHARK
916JVM_VARIANT_ZERO
917JVM_VARIANT_MINIMAL1
918JVM_VARIANT_CLIENT
919JVM_VARIANT_SERVER
920JVM_VARIANTS
921JVM_INTERPRETER
922JDK_VARIANT
923SET_OPENJDK
924CANONICAL_TOPDIR
925ORIGINAL_TOPDIR
926TOPDIR
927PATH_SEP
928ZERO_ARCHDEF
929DEFINE_CROSS_COMPILE_ARCH
930LP64
931OPENJDK_TARGET_OS_EXPORT_DIR
932OPENJDK_TARGET_CPU_JLI_CFLAGS
933OPENJDK_TARGET_CPU_OSARCH
934OPENJDK_TARGET_CPU_ISADIR
935OPENJDK_TARGET_CPU_LIBDIR
936OPENJDK_TARGET_CPU_LEGACY_LIB
937OPENJDK_TARGET_CPU_LEGACY
938REQUIRED_OS_VERSION
939REQUIRED_OS_NAME
940COMPILE_TYPE
941OPENJDK_TARGET_CPU_ENDIAN
942OPENJDK_TARGET_CPU_BITS
943OPENJDK_TARGET_CPU_ARCH
944OPENJDK_TARGET_CPU
945OPENJDK_TARGET_OS_ENV
946OPENJDK_TARGET_OS_TYPE
947OPENJDK_TARGET_OS
948OPENJDK_BUILD_CPU_ENDIAN
949OPENJDK_BUILD_CPU_BITS
950OPENJDK_BUILD_CPU_ARCH
951OPENJDK_BUILD_CPU
952OPENJDK_BUILD_OS_ENV
953OPENJDK_BUILD_OS_TYPE
954OPENJDK_BUILD_OS
955OPENJDK_BUILD_AUTOCONF_NAME
956OPENJDK_TARGET_AUTOCONF_NAME
957target_os
958target_vendor
959target_cpu
960target
961host_os
962host_vendor
963host_cpu
964host
965build_os
966build_vendor
967build_cpu
968build
969NICE
970CPIO
971DF
972READLINK
973CYGPATH
974SED
975FGREP
976EGREP
977GREP
978AWK
979XARGS
980WHICH
981WC
982UNIQ
983UNAME
984TR
985TOUCH
986TEE
987TAR
988TAIL
989SORT
990SH
991RMDIR
992RM
993PRINTF
994NAWK
995MV
996MKTEMP
997MKDIR
998LS
999LN
1000HEAD
1001FIND
1002FILE
1003EXPR
1004ECHO
1005DIRNAME
1006DIFF
1007DATE
1008CUT
1009CP
1010COMM
1011CMP
1012CHMOD
1013CAT
1014BASH
1015BASENAME
1016DATE_WHEN_CONFIGURED
1017ORIGINAL_PATH
1018CONFIGURE_COMMAND_LINE
1019target_alias
1020host_alias
1021build_alias
1022LIBS
1023ECHO_T
1024ECHO_N
1025ECHO_C
1026DEFS
1027mandir
1028localedir
1029libdir
1030psdir
1031pdfdir
1032dvidir
1033htmldir
1034infodir
1035docdir
1036oldincludedir
1037includedir
1038localstatedir
1039sharedstatedir
1040sysconfdir
1041datadir
1042datarootdir
1043libexecdir
1044sbindir
1045bindir
1046program_transform_name
1047prefix
1048exec_prefix
1049PACKAGE_URL
1050PACKAGE_BUGREPORT
1051PACKAGE_STRING
1052PACKAGE_VERSION
1053PACKAGE_TARNAME
1054PACKAGE_NAME
1055PATH_SEPARATOR
1056SHELL'
1057ac_subst_files=''
1058ac_user_opts='
1059enable_option_checking
1060with_target_bits
1061enable_openjdk_only
1062with_custom_make_dir
1063with_jdk_variant
1064with_jvm_interpreter
1065with_jvm_variants
1066enable_debug
1067with_debug_level
1068with_devkit
1069with_sys_root
1070with_sysroot
1071with_tools_dir
1072with_toolchain_path
1073with_extra_path
1074with_sdk_name
1075with_conf_name
1076with_output_sync
1077with_default_make_target
1078enable_headful
1079with_cacerts_file
1080enable_unlimited_crypto
1081with_copyright_year
1082enable_hotspot_test_in_build
1083with_milestone
1084with_update_version
1085with_user_release_suffix
1086with_build_number
1087with_version_string
1088with_version_pre
1089with_version_opt
1090with_version_build
1091with_version_major
1092with_version_minor
1093with_version_security
1094with_version_patch
1095with_boot_jdk
1096with_add_source_root
1097with_override_source_root
1098with_adds_and_overrides
1099with_override_langtools
1100with_override_corba
1101with_override_jaxp
1102with_override_jaxws
1103with_override_hotspot
1104with_override_nashorn
1105with_override_jdk
1106with_import_hotspot
1107enable_static_build
1108with_toolchain_type
1109with_extra_cflags
1110with_extra_cxxflags
1111with_extra_ldflags
1112with_toolchain_version
1113with_build_devkit
1114with_jtreg
1115enable_warnings_as_errors
1116with_native_debug_symbols
1117enable_debug_symbols
1118enable_zip_debug_info
1119enable_native_coverage
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_x
1124with_cups
1125with_cups_include
1126with_freetype
1127with_freetype_include
1128with_freetype_lib
1129with_freetype_src
1130enable_freetype_bundling
1131with_alsa
1132with_alsa_include
1133with_alsa_lib
1134with_libffi
1135with_libffi_include
1136with_libffi_lib
1137with_libjpeg
1138with_giflib
1139with_libpng
1140with_zlib
1141with_lcms
1142with_dxsdk
1143with_dxsdk_lib
1144with_dxsdk_include
1145with_num_cores
1146with_memory_size
1147with_jobs
1148with_test_jobs
1149with_boot_jdk_jvmargs
1150with_sjavac_server_java
1151enable_sjavac
1152enable_javac_server
1153enable_icecc
1154enable_precompiled_headers
1155enable_ccache
1156with_ccache_dir
1157'
1158      ac_precious_vars='build_alias
1159host_alias
1160target_alias
1161BASENAME
1162BASH
1163CAT
1164CHMOD
1165CMP
1166COMM
1167CP
1168CUT
1169DATE
1170DIFF
1171DIRNAME
1172ECHO
1173EXPR
1174FILE
1175FIND
1176HEAD
1177LN
1178LS
1179MKDIR
1180MKTEMP
1181MV
1182NAWK
1183PRINTF
1184RM
1185RMDIR
1186SH
1187SORT
1188TAIL
1189TAR
1190TEE
1191TOUCH
1192TR
1193UNAME
1194UNIQ
1195WC
1196WHICH
1197XARGS
1198AWK
1199GREP
1200EGREP
1201FGREP
1202SED
1203CYGPATH
1204READLINK
1205DF
1206CPIO
1207NICE
1208MAKE
1209UNZIP
1210ZIP
1211LDD
1212OTOOL
1213READELF
1214HG
1215STAT
1216TIME
1217PATCH
1218DSYMUTIL
1219XATTR
1220CODESIGN
1221SETFILE
1222PKG_CONFIG
1223JAVA
1224JAVAC
1225JAVAH
1226JAR
1227JARSIGNER
1228CC
1229CFLAGS
1230LDFLAGS
1231LIBS
1232CPPFLAGS
1233CXX
1234CXXFLAGS
1235CCC
1236CPP
1237CXXCPP
1238AS
1239AR
1240LIPO
1241STRIP
1242NM
1243GNM
1244OBJCOPY
1245OBJDUMP
1246BUILD_CC
1247BUILD_CXX
1248BUILD_NM
1249BUILD_AR
1250JTREGEXE
1251XMKMF
1252FREETYPE_CFLAGS
1253FREETYPE_LIBS
1254ALSA_CFLAGS
1255ALSA_LIBS
1256LIBFFI_CFLAGS
1257LIBFFI_LIBS
1258PNG_CFLAGS
1259PNG_LIBS
1260LCMS_CFLAGS
1261LCMS_LIBS
1262ICECC_CMD
1263ICECC_CREATE_ENV
1264ICECC_WRAPPER
1265CCACHE'
1266
1267
1268# Initialize some variables set by options.
1269ac_init_help=
1270ac_init_version=false
1271ac_unrecognized_opts=
1272ac_unrecognized_sep=
1273# The variables have the same names as the options, with
1274# dashes changed to underlines.
1275cache_file=/dev/null
1276exec_prefix=NONE
1277no_create=
1278no_recursion=
1279prefix=NONE
1280program_prefix=NONE
1281program_suffix=NONE
1282program_transform_name=s,x,x,
1283silent=
1284site=
1285srcdir=
1286verbose=
1287x_includes=NONE
1288x_libraries=NONE
1289
1290# Installation directory options.
1291# These are left unexpanded so users can "make install exec_prefix=/foo"
1292# and all the variables that are supposed to be based on exec_prefix
1293# by default will actually change.
1294# Use braces instead of parens because sh, perl, etc. also accept them.
1295# (The list follows the same order as the GNU Coding Standards.)
1296bindir='${exec_prefix}/bin'
1297sbindir='${exec_prefix}/sbin'
1298libexecdir='${exec_prefix}/libexec'
1299datarootdir='${prefix}/share'
1300datadir='${datarootdir}'
1301sysconfdir='${prefix}/etc'
1302sharedstatedir='${prefix}/com'
1303localstatedir='${prefix}/var'
1304includedir='${prefix}/include'
1305oldincludedir='/usr/include'
1306docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1307infodir='${datarootdir}/info'
1308htmldir='${docdir}'
1309dvidir='${docdir}'
1310pdfdir='${docdir}'
1311psdir='${docdir}'
1312libdir='${exec_prefix}/lib'
1313localedir='${datarootdir}/locale'
1314mandir='${datarootdir}/man'
1315
1316ac_prev=
1317ac_dashdash=
1318for ac_option
1319do
1320  # If the previous option needs an argument, assign it.
1321  if test -n "$ac_prev"; then
1322    eval $ac_prev=\$ac_option
1323    ac_prev=
1324    continue
1325  fi
1326
1327  case $ac_option in
1328  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1329  *=)   ac_optarg= ;;
1330  *)    ac_optarg=yes ;;
1331  esac
1332
1333  # Accept the important Cygnus configure options, so we can diagnose typos.
1334
1335  case $ac_dashdash$ac_option in
1336  --)
1337    ac_dashdash=yes ;;
1338
1339  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1340    ac_prev=bindir ;;
1341  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1342    bindir=$ac_optarg ;;
1343
1344  -build | --build | --buil | --bui | --bu)
1345    ac_prev=build_alias ;;
1346  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1347    build_alias=$ac_optarg ;;
1348
1349  -cache-file | --cache-file | --cache-fil | --cache-fi \
1350  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1351    ac_prev=cache_file ;;
1352  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1353  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1354    cache_file=$ac_optarg ;;
1355
1356  --config-cache | -C)
1357    cache_file=config.cache ;;
1358
1359  -datadir | --datadir | --datadi | --datad)
1360    ac_prev=datadir ;;
1361  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1362    datadir=$ac_optarg ;;
1363
1364  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1365  | --dataroo | --dataro | --datar)
1366    ac_prev=datarootdir ;;
1367  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1368  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1369    datarootdir=$ac_optarg ;;
1370
1371  -disable-* | --disable-*)
1372    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1373    # Reject names that are not valid shell variable names.
1374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375      as_fn_error $? "invalid feature name: $ac_useropt"
1376    ac_useropt_orig=$ac_useropt
1377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378    case $ac_user_opts in
1379      *"
1380"enable_$ac_useropt"
1381"*) ;;
1382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1383	 ac_unrecognized_sep=', ';;
1384    esac
1385    eval enable_$ac_useropt=no ;;
1386
1387  -docdir | --docdir | --docdi | --doc | --do)
1388    ac_prev=docdir ;;
1389  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1390    docdir=$ac_optarg ;;
1391
1392  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1393    ac_prev=dvidir ;;
1394  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1395    dvidir=$ac_optarg ;;
1396
1397  -enable-* | --enable-*)
1398    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1399    # Reject names that are not valid shell variable names.
1400    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1401      as_fn_error $? "invalid feature name: $ac_useropt"
1402    ac_useropt_orig=$ac_useropt
1403    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1404    case $ac_user_opts in
1405      *"
1406"enable_$ac_useropt"
1407"*) ;;
1408      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1409	 ac_unrecognized_sep=', ';;
1410    esac
1411    eval enable_$ac_useropt=\$ac_optarg ;;
1412
1413  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1414  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1415  | --exec | --exe | --ex)
1416    ac_prev=exec_prefix ;;
1417  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1418  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1419  | --exec=* | --exe=* | --ex=*)
1420    exec_prefix=$ac_optarg ;;
1421
1422  -gas | --gas | --ga | --g)
1423    # Obsolete; use --with-gas.
1424    with_gas=yes ;;
1425
1426  -help | --help | --hel | --he | -h)
1427    ac_init_help=long ;;
1428  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1429    ac_init_help=recursive ;;
1430  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1431    ac_init_help=short ;;
1432
1433  -host | --host | --hos | --ho)
1434    ac_prev=host_alias ;;
1435  -host=* | --host=* | --hos=* | --ho=*)
1436    host_alias=$ac_optarg ;;
1437
1438  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1439    ac_prev=htmldir ;;
1440  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1441  | --ht=*)
1442    htmldir=$ac_optarg ;;
1443
1444  -includedir | --includedir | --includedi | --included | --include \
1445  | --includ | --inclu | --incl | --inc)
1446    ac_prev=includedir ;;
1447  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1448  | --includ=* | --inclu=* | --incl=* | --inc=*)
1449    includedir=$ac_optarg ;;
1450
1451  -infodir | --infodir | --infodi | --infod | --info | --inf)
1452    ac_prev=infodir ;;
1453  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1454    infodir=$ac_optarg ;;
1455
1456  -libdir | --libdir | --libdi | --libd)
1457    ac_prev=libdir ;;
1458  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1459    libdir=$ac_optarg ;;
1460
1461  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1462  | --libexe | --libex | --libe)
1463    ac_prev=libexecdir ;;
1464  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1465  | --libexe=* | --libex=* | --libe=*)
1466    libexecdir=$ac_optarg ;;
1467
1468  -localedir | --localedir | --localedi | --localed | --locale)
1469    ac_prev=localedir ;;
1470  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1471    localedir=$ac_optarg ;;
1472
1473  -localstatedir | --localstatedir | --localstatedi | --localstated \
1474  | --localstate | --localstat | --localsta | --localst | --locals)
1475    ac_prev=localstatedir ;;
1476  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1477  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1478    localstatedir=$ac_optarg ;;
1479
1480  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1481    ac_prev=mandir ;;
1482  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1483    mandir=$ac_optarg ;;
1484
1485  -nfp | --nfp | --nf)
1486    # Obsolete; use --without-fp.
1487    with_fp=no ;;
1488
1489  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1490  | --no-cr | --no-c | -n)
1491    no_create=yes ;;
1492
1493  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1494  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1495    no_recursion=yes ;;
1496
1497  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1498  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1499  | --oldin | --oldi | --old | --ol | --o)
1500    ac_prev=oldincludedir ;;
1501  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1502  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1503  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1504    oldincludedir=$ac_optarg ;;
1505
1506  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1507    ac_prev=prefix ;;
1508  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1509    prefix=$ac_optarg ;;
1510
1511  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1512  | --program-pre | --program-pr | --program-p)
1513    ac_prev=program_prefix ;;
1514  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1515  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1516    program_prefix=$ac_optarg ;;
1517
1518  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1519  | --program-suf | --program-su | --program-s)
1520    ac_prev=program_suffix ;;
1521  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1522  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1523    program_suffix=$ac_optarg ;;
1524
1525  -program-transform-name | --program-transform-name \
1526  | --program-transform-nam | --program-transform-na \
1527  | --program-transform-n | --program-transform- \
1528  | --program-transform | --program-transfor \
1529  | --program-transfo | --program-transf \
1530  | --program-trans | --program-tran \
1531  | --progr-tra | --program-tr | --program-t)
1532    ac_prev=program_transform_name ;;
1533  -program-transform-name=* | --program-transform-name=* \
1534  | --program-transform-nam=* | --program-transform-na=* \
1535  | --program-transform-n=* | --program-transform-=* \
1536  | --program-transform=* | --program-transfor=* \
1537  | --program-transfo=* | --program-transf=* \
1538  | --program-trans=* | --program-tran=* \
1539  | --progr-tra=* | --program-tr=* | --program-t=*)
1540    program_transform_name=$ac_optarg ;;
1541
1542  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1543    ac_prev=pdfdir ;;
1544  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1545    pdfdir=$ac_optarg ;;
1546
1547  -psdir | --psdir | --psdi | --psd | --ps)
1548    ac_prev=psdir ;;
1549  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1550    psdir=$ac_optarg ;;
1551
1552  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1553  | -silent | --silent | --silen | --sile | --sil)
1554    silent=yes ;;
1555
1556  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1557    ac_prev=sbindir ;;
1558  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1559  | --sbi=* | --sb=*)
1560    sbindir=$ac_optarg ;;
1561
1562  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1563  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1564  | --sharedst | --shareds | --shared | --share | --shar \
1565  | --sha | --sh)
1566    ac_prev=sharedstatedir ;;
1567  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1568  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1569  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1570  | --sha=* | --sh=*)
1571    sharedstatedir=$ac_optarg ;;
1572
1573  -site | --site | --sit)
1574    ac_prev=site ;;
1575  -site=* | --site=* | --sit=*)
1576    site=$ac_optarg ;;
1577
1578  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1579    ac_prev=srcdir ;;
1580  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1581    srcdir=$ac_optarg ;;
1582
1583  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1584  | --syscon | --sysco | --sysc | --sys | --sy)
1585    ac_prev=sysconfdir ;;
1586  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1587  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1588    sysconfdir=$ac_optarg ;;
1589
1590  -target | --target | --targe | --targ | --tar | --ta | --t)
1591    ac_prev=target_alias ;;
1592  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1593    target_alias=$ac_optarg ;;
1594
1595  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1596    verbose=yes ;;
1597
1598  -version | --version | --versio | --versi | --vers | -V)
1599    ac_init_version=: ;;
1600
1601  -with-* | --with-*)
1602    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1603    # Reject names that are not valid shell variable names.
1604    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1605      as_fn_error $? "invalid package name: $ac_useropt"
1606    ac_useropt_orig=$ac_useropt
1607    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1608    case $ac_user_opts in
1609      *"
1610"with_$ac_useropt"
1611"*) ;;
1612      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1613	 ac_unrecognized_sep=', ';;
1614    esac
1615    eval with_$ac_useropt=\$ac_optarg ;;
1616
1617  -without-* | --without-*)
1618    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1619    # Reject names that are not valid shell variable names.
1620    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1621      as_fn_error $? "invalid package name: $ac_useropt"
1622    ac_useropt_orig=$ac_useropt
1623    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1624    case $ac_user_opts in
1625      *"
1626"with_$ac_useropt"
1627"*) ;;
1628      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1629	 ac_unrecognized_sep=', ';;
1630    esac
1631    eval with_$ac_useropt=no ;;
1632
1633  --x)
1634    # Obsolete; use --with-x.
1635    with_x=yes ;;
1636
1637  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1638  | --x-incl | --x-inc | --x-in | --x-i)
1639    ac_prev=x_includes ;;
1640  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1641  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1642    x_includes=$ac_optarg ;;
1643
1644  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1645  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1646    ac_prev=x_libraries ;;
1647  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1648  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1649    x_libraries=$ac_optarg ;;
1650
1651  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1652Try \`$0 --help' for more information"
1653    ;;
1654
1655  *=*)
1656    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1657    # Reject names that are not valid shell variable names.
1658    case $ac_envvar in #(
1659      '' | [0-9]* | *[!_$as_cr_alnum]* )
1660      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1661    esac
1662    eval $ac_envvar=\$ac_optarg
1663    export $ac_envvar ;;
1664
1665  *)
1666    # FIXME: should be removed in autoconf 3.0.
1667    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1668    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1669      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1670    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1671    ;;
1672
1673  esac
1674done
1675
1676if test -n "$ac_prev"; then
1677  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1678  as_fn_error $? "missing argument to $ac_option"
1679fi
1680
1681if test -n "$ac_unrecognized_opts"; then
1682  case $enable_option_checking in
1683    no) ;;
1684    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1685    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1686  esac
1687fi
1688
1689# Check all directory arguments for consistency.
1690for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1691		datadir sysconfdir sharedstatedir localstatedir includedir \
1692		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1693		libdir localedir mandir
1694do
1695  eval ac_val=\$$ac_var
1696  # Remove trailing slashes.
1697  case $ac_val in
1698    */ )
1699      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1700      eval $ac_var=\$ac_val;;
1701  esac
1702  # Be sure to have absolute directory names.
1703  case $ac_val in
1704    [\\/$]* | ?:[\\/]* )  continue;;
1705    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1706  esac
1707  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1708done
1709
1710# There might be people who depend on the old broken behavior: `$host'
1711# used to hold the argument of --host etc.
1712# FIXME: To remove some day.
1713build=$build_alias
1714host=$host_alias
1715target=$target_alias
1716
1717# FIXME: To remove some day.
1718if test "x$host_alias" != x; then
1719  if test "x$build_alias" = x; then
1720    cross_compiling=maybe
1721  elif test "x$build_alias" != "x$host_alias"; then
1722    cross_compiling=yes
1723  fi
1724fi
1725
1726ac_tool_prefix=
1727test -n "$host_alias" && ac_tool_prefix=$host_alias-
1728
1729test "$silent" = yes && exec 6>/dev/null
1730
1731
1732ac_pwd=`pwd` && test -n "$ac_pwd" &&
1733ac_ls_di=`ls -di .` &&
1734ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1735  as_fn_error $? "working directory cannot be determined"
1736test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1737  as_fn_error $? "pwd does not report name of working directory"
1738
1739
1740# Find the source files, if location was not specified.
1741if test -z "$srcdir"; then
1742  ac_srcdir_defaulted=yes
1743  # Try the directory containing this script, then the parent directory.
1744  ac_confdir=`$as_dirname -- "$as_myself" ||
1745$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1746	 X"$as_myself" : 'X\(//\)[^/]' \| \
1747	 X"$as_myself" : 'X\(//\)$' \| \
1748	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1749$as_echo X"$as_myself" |
1750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)[^/].*/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\/\)$/{
1759	    s//\1/
1760	    q
1761	  }
1762	  /^X\(\/\).*/{
1763	    s//\1/
1764	    q
1765	  }
1766	  s/.*/./; q'`
1767  srcdir=$ac_confdir
1768  if test ! -r "$srcdir/$ac_unique_file"; then
1769    srcdir=..
1770  fi
1771else
1772  ac_srcdir_defaulted=no
1773fi
1774if test ! -r "$srcdir/$ac_unique_file"; then
1775  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1776  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1777fi
1778ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1779ac_abs_confdir=`(
1780	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1781	pwd)`
1782# When building in place, set srcdir=.
1783if test "$ac_abs_confdir" = "$ac_pwd"; then
1784  srcdir=.
1785fi
1786# Remove unnecessary trailing slashes from srcdir.
1787# Double slashes in file names in object file debugging info
1788# mess up M-x gdb in Emacs.
1789case $srcdir in
1790*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1791esac
1792for ac_var in $ac_precious_vars; do
1793  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1794  eval ac_env_${ac_var}_value=\$${ac_var}
1795  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1796  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1797done
1798
1799#
1800# Report the --help message.
1801#
1802if test "$ac_init_help" = "long"; then
1803  # Omit some internal or obsolete options to make the list less imposing.
1804  # This message is too long to be a string in the A/UX 3.1 sh.
1805  cat <<_ACEOF
1806\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1807
1808Usage: $0 [OPTION]... [VAR=VALUE]...
1809
1810To assign environment variables (e.g., CC, CFLAGS...), specify them as
1811VAR=VALUE.  See below for descriptions of some of the useful variables.
1812
1813Defaults for the options are specified in brackets.
1814
1815Configuration:
1816  -h, --help              display this help and exit
1817      --help=short        display options specific to this package
1818      --help=recursive    display the short help of all the included packages
1819  -V, --version           display version information and exit
1820  -q, --quiet, --silent   do not print \`checking ...' messages
1821      --cache-file=FILE   cache test results in FILE [disabled]
1822  -C, --config-cache      alias for \`--cache-file=config.cache'
1823  -n, --no-create         do not create output files
1824      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1825
1826Installation directories:
1827  --prefix=PREFIX         install architecture-independent files in PREFIX
1828                          [$ac_default_prefix]
1829  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1830                          [PREFIX]
1831
1832By default, \`make install' will install all the files in
1833\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1834an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1835for instance \`--prefix=\$HOME'.
1836
1837For better control, use the options below.
1838
1839Fine tuning of the installation directories:
1840  --bindir=DIR            user executables [EPREFIX/bin]
1841  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1842  --libexecdir=DIR        program executables [EPREFIX/libexec]
1843  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1844  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1845  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1846  --libdir=DIR            object code libraries [EPREFIX/lib]
1847  --includedir=DIR        C header files [PREFIX/include]
1848  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1849  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1850  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1851  --infodir=DIR           info documentation [DATAROOTDIR/info]
1852  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1853  --mandir=DIR            man documentation [DATAROOTDIR/man]
1854  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1855  --htmldir=DIR           html documentation [DOCDIR]
1856  --dvidir=DIR            dvi documentation [DOCDIR]
1857  --pdfdir=DIR            pdf documentation [DOCDIR]
1858  --psdir=DIR             ps documentation [DOCDIR]
1859_ACEOF
1860
1861  cat <<\_ACEOF
1862
1863X features:
1864  --x-includes=DIR    X include files are in DIR
1865  --x-libraries=DIR   X library files are in DIR
1866
1867System types:
1868  --build=BUILD     configure for building on BUILD [guessed]
1869  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1870  --target=TARGET   configure for building compilers for TARGET [HOST]
1871_ACEOF
1872fi
1873
1874if test -n "$ac_init_help"; then
1875  case $ac_init_help in
1876     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1877   esac
1878  cat <<\_ACEOF
1879
1880Optional Features:
1881  --disable-option-checking  ignore unrecognized --enable/--with options
1882  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1883  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1884  --enable-openjdk-only   suppress building custom source even if present
1885                          [disabled]
1886  --enable-debug          set the debug level to fastdebug (shorthand for
1887                          --with-debug-level=fastdebug) [disabled]
1888  --disable-headful       disable building headful support (graphical UI
1889                          support) [enabled]
1890  --enable-unlimited-crypto
1891                          Enable unlimited crypto policy [disabled]
1892  --enable-hotspot-test-in-build
1893                          run the Queens test after Hotspot build [disabled]
1894  --enable-static-build   enable static library build [disabled]
1895  --disable-warnings-as-errors
1896                          do not consider native warnings to be an error
1897                          [enabled]
1898  --enable-debug-symbols  Deprecated. Option is kept for backwards
1899                          compatibility and is ignored
1900  --enable-zip-debug-info Deprecated. Option is kept for backwards
1901                          compatibility and is ignored
1902  --enable-native-coverage
1903                          enable native compilation with code coverage
1904                          data[disabled]
1905  --disable-freetype-bundling
1906                          disable bundling of the freetype library with the
1907                          build result [enabled on Windows or when using
1908                          --with-freetype, disabled otherwise]
1909  --enable-sjavac         use sjavac to do fast incremental compiles
1910                          [disabled]
1911  --disable-javac-server  disable javac server [enabled]
1912  --enable-icecc          enable distribted compilation of native code using
1913                          icecc/icecream [disabled]
1914  --disable-precompiled-headers
1915                          disable using precompiled headers when compiling C++
1916                          [enabled]
1917  --enable-ccache         enable using ccache to speed up recompilations
1918                          [disabled]
1919
1920Optional Packages:
1921  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1922  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1923  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1924                          support it), e.g. --with-target-bits=32 [guessed]
1925  --with-custom-make-dir  Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-jdk-variant      JDK variant to build (normal) [normal]
1928  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1929  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1930                          client, minimal1, zero, zeroshark, core) [server]
1931  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1932                          optimized (HotSpot build only)) [release]
1933  --with-devkit           use this devkit for compilers, tools and resources
1934  --with-sys-root         alias for --with-sysroot for backwards compatability
1935  --with-sysroot          use this directory as sysroot
1936  --with-tools-dir        alias for --with-toolchain-path for backwards
1937                          compatibility
1938  --with-toolchain-path   prepend these directories when searching for
1939                          toolchain binaries (compilers etc)
1940  --with-extra-path       prepend these directories to the default path
1941  --with-sdk-name         use the platform SDK of the given name. [macosx]
1942  --with-conf-name        use this as the name of the configuration [generated
1943                          from important configuration options]
1944  --with-output-sync      set make output sync type if supported by make.
1945                          [recurse]
1946  --with-default-make-target
1947                          set the default make target [exploded-image]
1948  --with-cacerts-file     specify alternative cacerts file
1949  --with-copyright-year   Set copyright year value for build [current year]
1950  --with-milestone        Deprecated. Option is kept for backwards
1951                          compatibility and is ignored
1952  --with-update-version   Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-user-release-suffix
1955                          Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-build-number     Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-version-string   Set version string [calculated]
1960  --with-version-pre      Set the base part of the version 'PRE' field
1961                          (pre-release identifier) ['internal']
1962  --with-version-opt      Set version 'OPT' field (build metadata)
1963                          [<timestamp>.<user>.<dirname>]
1964  --with-version-build    Set version 'BUILD' field (build number) [not
1965                          specified]
1966  --with-version-major    Set version 'MAJOR' field (first number) [current
1967                          source value]
1968  --with-version-minor    Set version 'MINOR' field (second number) [current
1969                          source value]
1970  --with-version-security Set version 'SECURITY' field (third number) [current
1971                          source value]
1972  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1973                          specified]
1974  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1975  --with-add-source-root  Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-override-source-root
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-adds-and-overrides
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-langtools
1984                          Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-corba   Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-jaxp    Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-override-jaxws   Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-override-hotspot Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-override-nashorn Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-override-jdk     Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-import-hotspot   import hotspot binaries from this jdk image or
1999                          hotspot build dist dir instead of building from
2000                          source
2001  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2002                          to show possible values [platform dependent]
2003  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2004  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2005  --with-extra-ldflags    extra flags to be used when linking jdk
2006  --with-toolchain-version
2007                          the version of the toolchain to look for, use
2008                          '--help' to show possible values [platform
2009                          dependent]
2010  --with-build-devkit     Devkit to use for the build platform toolchain
2011  --with-jtreg            Regression Test Harness [probed]
2012  --with-native-debug-symbols
2013                          set the native debug symbol configuration (none,
2014                          internal, external, zipped) [zipped]
2015  --with-stdc++lib=<static>,<dynamic>,<default>
2016                          force linking of the C++ runtime on Linux to either
2017                          static or dynamic, default is static with dynamic as
2018                          fallback
2019  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2020                          (Windows only) [probed]
2021  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2022                          (Windows only) [probed]
2023  --with-x                use the X Window System
2024  --with-cups             specify prefix directory for the cups package
2025                          (expecting the headers under PATH/include)
2026  --with-cups-include     specify directory for the cups include files
2027  --with-freetype         specify prefix directory for the freetype package
2028                          (expecting the libraries under PATH/lib and the
2029                          headers under PATH/include)
2030  --with-freetype-include specify directory for the freetype include files
2031  --with-freetype-lib     specify directory for the freetype library
2032  --with-freetype-src     specify directory with freetype sources to
2033                          automatically build the library (experimental,
2034                          Windows-only)
2035  --with-alsa             specify prefix directory for the alsa package
2036                          (expecting the libraries under PATH/lib and the
2037                          headers under PATH/include)
2038  --with-alsa-include     specify directory for the alsa include files
2039  --with-alsa-lib         specify directory for the alsa library
2040  --with-libffi           specify prefix directory for the libffi package
2041                          (expecting the libraries under PATH/lib and the
2042                          headers under PATH/include)
2043  --with-libffi-include   specify directory for the libffi include files
2044  --with-libffi-lib       specify directory for the libffi library
2045  --with-libjpeg          use libjpeg from build system or OpenJDK source
2046                          (system, bundled) [bundled]
2047  --with-giflib           use giflib from build system or OpenJDK source
2048                          (system, bundled) [bundled]
2049  --with-libpng           use libpng from build system or OpenJDK source
2050                          (system, bundled) [bundled]
2051  --with-zlib             use zlib from build system or OpenJDK source
2052                          (system, bundled) [bundled]
2053  --with-lcms             use lcms2 from build system or OpenJDK source
2054                          (system, bundled) [bundled]
2055  --with-dxsdk            Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-dxsdk-include    Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-num-cores        number of cores in the build system, e.g.
2062                          --with-num-cores=8 [probed]
2063  --with-memory-size      memory (in MB) available in the build system, e.g.
2064                          --with-memory-size=1024 [probed]
2065  --with-jobs             number of parallel jobs to let make run [calculated
2066                          based on cores and memory]
2067  --with-test-jobs        number of parallel tests jobs to run [based on build
2068                          jobs]
2069  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2070                          invocations of boot JDK, overriding the default
2071                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2072                          -enableassertions"
2073  --with-sjavac-server-java
2074                          use this java binary for running the sjavac
2075                          background server [Boot JDK java]
2076  --with-ccache-dir       where to store ccache files [~/.ccache]
2077
2078Some influential environment variables:
2079  BASENAME    Override default value for BASENAME
2080  BASH        Override default value for BASH
2081  CAT         Override default value for CAT
2082  CHMOD       Override default value for CHMOD
2083  CMP         Override default value for CMP
2084  COMM        Override default value for COMM
2085  CP          Override default value for CP
2086  CUT         Override default value for CUT
2087  DATE        Override default value for DATE
2088  DIFF        Override default value for DIFF
2089  DIRNAME     Override default value for DIRNAME
2090  ECHO        Override default value for ECHO
2091  EXPR        Override default value for EXPR
2092  FILE        Override default value for FILE
2093  FIND        Override default value for FIND
2094  HEAD        Override default value for HEAD
2095  LN          Override default value for LN
2096  LS          Override default value for LS
2097  MKDIR       Override default value for MKDIR
2098  MKTEMP      Override default value for MKTEMP
2099  MV          Override default value for MV
2100  NAWK        Override default value for NAWK
2101  PRINTF      Override default value for PRINTF
2102  RM          Override default value for RM
2103  RMDIR       Override default value for RMDIR
2104  SH          Override default value for SH
2105  SORT        Override default value for SORT
2106  TAIL        Override default value for TAIL
2107  TAR         Override default value for TAR
2108  TEE         Override default value for TEE
2109  TOUCH       Override default value for TOUCH
2110  TR          Override default value for TR
2111  UNAME       Override default value for UNAME
2112  UNIQ        Override default value for UNIQ
2113  WC          Override default value for WC
2114  WHICH       Override default value for WHICH
2115  XARGS       Override default value for XARGS
2116  AWK         Override default value for AWK
2117  GREP        Override default value for GREP
2118  EGREP       Override default value for EGREP
2119  FGREP       Override default value for FGREP
2120  SED         Override default value for SED
2121  CYGPATH     Override default value for CYGPATH
2122  READLINK    Override default value for READLINK
2123  DF          Override default value for DF
2124  CPIO        Override default value for CPIO
2125  NICE        Override default value for NICE
2126  MAKE        Override default value for MAKE
2127  UNZIP       Override default value for UNZIP
2128  ZIP         Override default value for ZIP
2129  LDD         Override default value for LDD
2130  OTOOL       Override default value for OTOOL
2131  READELF     Override default value for READELF
2132  HG          Override default value for HG
2133  STAT        Override default value for STAT
2134  TIME        Override default value for TIME
2135  PATCH       Override default value for PATCH
2136  DSYMUTIL    Override default value for DSYMUTIL
2137  XATTR       Override default value for XATTR
2138  CODESIGN    Override default value for CODESIGN
2139  SETFILE     Override default value for SETFILE
2140  PKG_CONFIG  path to pkg-config utility
2141  JAVA        Override default value for JAVA
2142  JAVAC       Override default value for JAVAC
2143  JAVAH       Override default value for JAVAH
2144  JAR         Override default value for JAR
2145  JARSIGNER   Override default value for JARSIGNER
2146  CC          C compiler command
2147  CFLAGS      C compiler flags
2148  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2149              nonstandard directory <lib dir>
2150  LIBS        libraries to pass to the linker, e.g. -l<library>
2151  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2152              you have headers in a nonstandard directory <include dir>
2153  CXX         C++ compiler command
2154  CXXFLAGS    C++ compiler flags
2155  CPP         C preprocessor
2156  CXXCPP      C++ preprocessor
2157  AS          Override default value for AS
2158  AR          Override default value for AR
2159  LIPO        Override default value for LIPO
2160  STRIP       Override default value for STRIP
2161  NM          Override default value for NM
2162  GNM         Override default value for GNM
2163  OBJCOPY     Override default value for OBJCOPY
2164  OBJDUMP     Override default value for OBJDUMP
2165  BUILD_CC    Override default value for BUILD_CC
2166  BUILD_CXX   Override default value for BUILD_CXX
2167  BUILD_NM    Override default value for BUILD_NM
2168  BUILD_AR    Override default value for BUILD_AR
2169  JTREGEXE    Override default value for JTREGEXE
2170  XMKMF       Path to xmkmf, Makefile generator for X Window System
2171  FREETYPE_CFLAGS
2172              C compiler flags for FREETYPE, overriding pkg-config
2173  FREETYPE_LIBS
2174              linker flags for FREETYPE, overriding pkg-config
2175  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2176  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2177  LIBFFI_CFLAGS
2178              C compiler flags for LIBFFI, overriding pkg-config
2179  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2180  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2181  PNG_LIBS    linker flags for PNG, overriding pkg-config
2182  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2183  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2184  ICECC_CMD   Override default value for ICECC_CMD
2185  ICECC_CREATE_ENV
2186              Override default value for ICECC_CREATE_ENV
2187  ICECC_WRAPPER
2188              Override default value for ICECC_WRAPPER
2189  CCACHE      Override default value for CCACHE
2190
2191Use these variables to override the choices made by `configure' or to help
2192it to find libraries and programs with nonstandard names/locations.
2193
2194Report bugs to <build-dev@openjdk.java.net>.
2195OpenJDK home page: <http://openjdk.java.net>.
2196_ACEOF
2197ac_status=$?
2198fi
2199
2200if test "$ac_init_help" = "recursive"; then
2201  # If there are subdirs, report their specific --help.
2202  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2203    test -d "$ac_dir" ||
2204      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2205      continue
2206    ac_builddir=.
2207
2208case "$ac_dir" in
2209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2210*)
2211  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2212  # A ".." for each directory in $ac_dir_suffix.
2213  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2214  case $ac_top_builddir_sub in
2215  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2216  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2217  esac ;;
2218esac
2219ac_abs_top_builddir=$ac_pwd
2220ac_abs_builddir=$ac_pwd$ac_dir_suffix
2221# for backward compatibility:
2222ac_top_builddir=$ac_top_build_prefix
2223
2224case $srcdir in
2225  .)  # We are building in place.
2226    ac_srcdir=.
2227    ac_top_srcdir=$ac_top_builddir_sub
2228    ac_abs_top_srcdir=$ac_pwd ;;
2229  [\\/]* | ?:[\\/]* )  # Absolute name.
2230    ac_srcdir=$srcdir$ac_dir_suffix;
2231    ac_top_srcdir=$srcdir
2232    ac_abs_top_srcdir=$srcdir ;;
2233  *) # Relative name.
2234    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2235    ac_top_srcdir=$ac_top_build_prefix$srcdir
2236    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2237esac
2238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2239
2240    cd "$ac_dir" || { ac_status=$?; continue; }
2241    # Check for guested configure.
2242    if test -f "$ac_srcdir/configure.gnu"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2245    elif test -f "$ac_srcdir/configure"; then
2246      echo &&
2247      $SHELL "$ac_srcdir/configure" --help=recursive
2248    else
2249      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2250    fi || ac_status=$?
2251    cd "$ac_pwd" || { ac_status=$?; break; }
2252  done
2253fi
2254
2255test -n "$ac_init_help" && exit $ac_status
2256if $ac_init_version; then
2257  cat <<\_ACEOF
2258OpenJDK configure jdk9
2259generated by GNU Autoconf 2.69
2260
2261Copyright (C) 2012 Free Software Foundation, Inc.
2262This configure script is free software; the Free Software Foundation
2263gives unlimited permission to copy, distribute and modify it.
2264_ACEOF
2265  exit
2266fi
2267
2268## ------------------------ ##
2269## Autoconf initialization. ##
2270## ------------------------ ##
2271
2272# ac_fn_c_try_compile LINENO
2273# --------------------------
2274# Try to compile conftest.$ac_ext, and return whether this succeeded.
2275ac_fn_c_try_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  rm -f conftest.$ac_objext
2279  if { { ac_try="$ac_compile"
2280case "(($ac_try" in
2281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282  *) ac_try_echo=$ac_try;;
2283esac
2284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285$as_echo "$ac_try_echo"; } >&5
2286  (eval "$ac_compile") 2>conftest.err
2287  ac_status=$?
2288  if test -s conftest.err; then
2289    grep -v '^ *+' conftest.err >conftest.er1
2290    cat conftest.er1 >&5
2291    mv -f conftest.er1 conftest.err
2292  fi
2293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294  test $ac_status = 0; } && {
2295	 test -z "$ac_c_werror_flag" ||
2296	 test ! -s conftest.err
2297       } && test -s conftest.$ac_objext; then :
2298  ac_retval=0
2299else
2300  $as_echo "$as_me: failed program was:" >&5
2301sed 's/^/| /' conftest.$ac_ext >&5
2302
2303	ac_retval=1
2304fi
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306  as_fn_set_status $ac_retval
2307
2308} # ac_fn_c_try_compile
2309
2310# ac_fn_cxx_try_compile LINENO
2311# ----------------------------
2312# Try to compile conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_cxx_try_compile ()
2314{
2315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316  rm -f conftest.$ac_objext
2317  if { { ac_try="$ac_compile"
2318case "(($ac_try" in
2319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2320  *) ac_try_echo=$ac_try;;
2321esac
2322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2323$as_echo "$ac_try_echo"; } >&5
2324  (eval "$ac_compile") 2>conftest.err
2325  ac_status=$?
2326  if test -s conftest.err; then
2327    grep -v '^ *+' conftest.err >conftest.er1
2328    cat conftest.er1 >&5
2329    mv -f conftest.er1 conftest.err
2330  fi
2331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2332  test $ac_status = 0; } && {
2333	 test -z "$ac_cxx_werror_flag" ||
2334	 test ! -s conftest.err
2335       } && test -s conftest.$ac_objext; then :
2336  ac_retval=0
2337else
2338  $as_echo "$as_me: failed program was:" >&5
2339sed 's/^/| /' conftest.$ac_ext >&5
2340
2341	ac_retval=1
2342fi
2343  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2344  as_fn_set_status $ac_retval
2345
2346} # ac_fn_cxx_try_compile
2347
2348# ac_fn_c_try_cpp LINENO
2349# ----------------------
2350# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2351ac_fn_c_try_cpp ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  if { { ac_try="$ac_cpp conftest.$ac_ext"
2355case "(($ac_try" in
2356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357  *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2362  ac_status=$?
2363  if test -s conftest.err; then
2364    grep -v '^ *+' conftest.err >conftest.er1
2365    cat conftest.er1 >&5
2366    mv -f conftest.er1 conftest.err
2367  fi
2368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369  test $ac_status = 0; } > conftest.i && {
2370	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2371	 test ! -s conftest.err
2372       }; then :
2373  ac_retval=0
2374else
2375  $as_echo "$as_me: failed program was:" >&5
2376sed 's/^/| /' conftest.$ac_ext >&5
2377
2378    ac_retval=1
2379fi
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_cpp
2384
2385# ac_fn_cxx_try_cpp LINENO
2386# ------------------------
2387# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388ac_fn_cxx_try_cpp ()
2389{
2390  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391  if { { ac_try="$ac_cpp conftest.$ac_ext"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } > conftest.i && {
2407	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2408	 test ! -s conftest.err
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415    ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_cxx_try_cpp
2421
2422# ac_fn_c_try_link LINENO
2423# -----------------------
2424# Try to link conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_c_try_link ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext conftest$ac_exeext
2429  if { { ac_try="$ac_link"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_link") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_c_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest$ac_exeext && {
2448	 test "$cross_compiling" = yes ||
2449	 test -x conftest$ac_exeext
2450       }; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2459  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2460  # interfere with the next link command; also delete a directory that is
2461  # left behind by Apple's compiler.  We do this before executing the actions.
2462  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2463  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464  as_fn_set_status $ac_retval
2465
2466} # ac_fn_c_try_link
2467
2468# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2469# ---------------------------------------------------------
2470# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2471# the include files in INCLUDES and setting the cache variable VAR
2472# accordingly.
2473ac_fn_cxx_check_header_mongrel ()
2474{
2475  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476  if eval \${$3+:} false; then :
2477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
2479if eval \${$3+:} false; then :
2480  $as_echo_n "(cached) " >&6
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485else
2486  # Is the header compilable?
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2488$as_echo_n "checking $2 usability... " >&6; }
2489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h.  */
2491$4
2492#include <$2>
2493_ACEOF
2494if ac_fn_cxx_try_compile "$LINENO"; then :
2495  ac_header_compiler=yes
2496else
2497  ac_header_compiler=no
2498fi
2499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2501$as_echo "$ac_header_compiler" >&6; }
2502
2503# Is the header present?
2504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2505$as_echo_n "checking $2 presence... " >&6; }
2506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508#include <$2>
2509_ACEOF
2510if ac_fn_cxx_try_cpp "$LINENO"; then :
2511  ac_header_preproc=yes
2512else
2513  ac_header_preproc=no
2514fi
2515rm -f conftest.err conftest.i conftest.$ac_ext
2516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2517$as_echo "$ac_header_preproc" >&6; }
2518
2519# So?  What about this header?
2520case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2521  yes:no: )
2522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2523$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2525$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2526    ;;
2527  no:yes:* )
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2529$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2531$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2533$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2535$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2537$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2538( $as_echo "## ----------------------------------------- ##
2539## Report this to build-dev@openjdk.java.net ##
2540## ----------------------------------------- ##"
2541     ) | sed "s/^/$as_me: WARNING:     /" >&2
2542    ;;
2543esac
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  eval "$3=\$ac_header_compiler"
2550fi
2551eval ac_res=\$$3
2552	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2553$as_echo "$ac_res" >&6; }
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_mongrel
2558
2559# ac_fn_cxx_try_run LINENO
2560# ------------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2562# that executables *can* be run.
2563ac_fn_cxx_try_run ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>&5
2574  ac_status=$?
2575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2576  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2577  { { case "(($ac_try" in
2578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579  *) ac_try_echo=$ac_try;;
2580esac
2581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582$as_echo "$ac_try_echo"; } >&5
2583  (eval "$ac_try") 2>&5
2584  ac_status=$?
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; }; }; then :
2587  ac_retval=0
2588else
2589  $as_echo "$as_me: program exited with status $ac_status" >&5
2590       $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593       ac_retval=$ac_status
2594fi
2595  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597  as_fn_set_status $ac_retval
2598
2599} # ac_fn_cxx_try_run
2600
2601# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2602# ---------------------------------------------------------
2603# Tests whether HEADER exists and can be compiled using the include files in
2604# INCLUDES, setting the cache variable VAR accordingly.
2605ac_fn_cxx_check_header_compile ()
2606{
2607  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2609$as_echo_n "checking for $2... " >&6; }
2610if eval \${$3+:} false; then :
2611  $as_echo_n "(cached) " >&6
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  eval "$3=yes"
2620else
2621  eval "$3=no"
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_header_compile
2631
2632# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2633# ----------------------------------------------
2634# Tries to find the compile-time value of EXPR in a program that includes
2635# INCLUDES, setting VAR accordingly. Returns whether the value could be
2636# computed
2637ac_fn_cxx_compute_int ()
2638{
2639  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2640  if test "$cross_compiling" = yes; then
2641    # Depending upon the size, compute the lo and hi bounds.
2642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) >= 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_lo=0 ac_mid=0
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid; break
2675else
2676  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2677			if test $ac_lo -le $ac_mid; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) < 0)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=-1 ac_mid=-1
2702  while :; do
2703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2704/* end confdefs.h.  */
2705$4
2706int
2707main ()
2708{
2709static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2710test_array [0] = 0;
2711return test_array [0];
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_compile "$LINENO"; then :
2718  ac_lo=$ac_mid; break
2719else
2720  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2721			if test $ac_mid -le $ac_hi; then
2722			  ac_lo= ac_hi=
2723			  break
2724			fi
2725			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728  done
2729else
2730  ac_lo= ac_hi=
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2735# Binary search between lo and hi bounds.
2736while test "x$ac_lo" != "x$ac_hi"; do
2737  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740$4
2741int
2742main ()
2743{
2744static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2745test_array [0] = 0;
2746return test_array [0];
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  ac_hi=$ac_mid
2754else
2755  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2756fi
2757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758done
2759case $ac_lo in #((
2760?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2761'') ac_retval=1 ;;
2762esac
2763  else
2764    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765/* end confdefs.h.  */
2766$4
2767static long int longval () { return $2; }
2768static unsigned long int ulongval () { return $2; }
2769#include <stdio.h>
2770#include <stdlib.h>
2771int
2772main ()
2773{
2774
2775  FILE *f = fopen ("conftest.val", "w");
2776  if (! f)
2777    return 1;
2778  if (($2) < 0)
2779    {
2780      long int i = longval ();
2781      if (i != ($2))
2782	return 1;
2783      fprintf (f, "%ld", i);
2784    }
2785  else
2786    {
2787      unsigned long int i = ulongval ();
2788      if (i != ($2))
2789	return 1;
2790      fprintf (f, "%lu", i);
2791    }
2792  /* Do not output a trailing newline, as this causes \r\n confusion
2793     on some platforms.  */
2794  return ferror (f) || fclose (f) != 0;
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_run "$LINENO"; then :
2801  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2802else
2803  ac_retval=1
2804fi
2805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2806  conftest.$ac_objext conftest.beam conftest.$ac_ext
2807rm -f conftest.val
2808
2809  fi
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_compute_int
2814
2815# ac_fn_cxx_try_link LINENO
2816# -------------------------
2817# Try to link conftest.$ac_ext, and return whether this succeeded.
2818ac_fn_cxx_try_link ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  rm -f conftest.$ac_objext conftest$ac_exeext
2822  if { { ac_try="$ac_link"
2823case "(($ac_try" in
2824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825  *) ac_try_echo=$ac_try;;
2826esac
2827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2828$as_echo "$ac_try_echo"; } >&5
2829  (eval "$ac_link") 2>conftest.err
2830  ac_status=$?
2831  if test -s conftest.err; then
2832    grep -v '^ *+' conftest.err >conftest.er1
2833    cat conftest.er1 >&5
2834    mv -f conftest.er1 conftest.err
2835  fi
2836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2837  test $ac_status = 0; } && {
2838	 test -z "$ac_cxx_werror_flag" ||
2839	 test ! -s conftest.err
2840       } && test -s conftest$ac_exeext && {
2841	 test "$cross_compiling" = yes ||
2842	 test -x conftest$ac_exeext
2843       }; then :
2844  ac_retval=0
2845else
2846  $as_echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849	ac_retval=1
2850fi
2851  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2852  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2853  # interfere with the next link command; also delete a directory that is
2854  # left behind by Apple's compiler.  We do this before executing the actions.
2855  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857  as_fn_set_status $ac_retval
2858
2859} # ac_fn_cxx_try_link
2860
2861# ac_fn_cxx_check_func LINENO FUNC VAR
2862# ------------------------------------
2863# Tests whether FUNC exists, setting the cache variable VAR accordingly
2864ac_fn_cxx_check_func ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2875   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2876#define $2 innocuous_$2
2877
2878/* System header to define __stub macros and hopefully few prototypes,
2879    which can conflict with char $2 (); below.
2880    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2881    <limits.h> exists even on freestanding compilers.  */
2882
2883#ifdef __STDC__
2884# include <limits.h>
2885#else
2886# include <assert.h>
2887#endif
2888
2889#undef $2
2890
2891/* Override any GCC internal prototype to avoid an error.
2892   Use char because int might match the return type of a GCC
2893   builtin and then its argument prototype would still apply.  */
2894#ifdef __cplusplus
2895extern "C"
2896#endif
2897char $2 ();
2898/* The GNU C library defines this for functions which it implements
2899    to always fail with ENOSYS.  Some functions are actually named
2900    something starting with __ and the normal name is an alias.  */
2901#if defined __stub_$2 || defined __stub___$2
2902choke me
2903#endif
2904
2905int
2906main ()
2907{
2908return $2 ();
2909  ;
2910  return 0;
2911}
2912_ACEOF
2913if ac_fn_cxx_try_link "$LINENO"; then :
2914  eval "$3=yes"
2915else
2916  eval "$3=no"
2917fi
2918rm -f core conftest.err conftest.$ac_objext \
2919    conftest$ac_exeext conftest.$ac_ext
2920fi
2921eval ac_res=\$$3
2922	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2923$as_echo "$ac_res" >&6; }
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925
2926} # ac_fn_cxx_check_func
2927
2928# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2929# -------------------------------------------------------
2930# Tests whether HEADER exists and can be compiled using the include files in
2931# INCLUDES, setting the cache variable VAR accordingly.
2932ac_fn_c_check_header_compile ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936$as_echo_n "checking for $2... " >&6; }
2937if eval \${$3+:} false; then :
2938  $as_echo_n "(cached) " >&6
2939else
2940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h.  */
2942$4
2943#include <$2>
2944_ACEOF
2945if ac_fn_c_try_compile "$LINENO"; then :
2946  eval "$3=yes"
2947else
2948  eval "$3=no"
2949fi
2950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951fi
2952eval ac_res=\$$3
2953	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2954$as_echo "$ac_res" >&6; }
2955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2956
2957} # ac_fn_c_check_header_compile
2958cat >config.log <<_ACEOF
2959This file contains any messages produced by compilers while
2960running configure, to aid debugging if configure makes a mistake.
2961
2962It was created by OpenJDK $as_me jdk9, which was
2963generated by GNU Autoconf 2.69.  Invocation command line was
2964
2965  $ $0 $@
2966
2967_ACEOF
2968exec 5>>config.log
2969{
2970cat <<_ASUNAME
2971## --------- ##
2972## Platform. ##
2973## --------- ##
2974
2975hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2976uname -m = `(uname -m) 2>/dev/null || echo unknown`
2977uname -r = `(uname -r) 2>/dev/null || echo unknown`
2978uname -s = `(uname -s) 2>/dev/null || echo unknown`
2979uname -v = `(uname -v) 2>/dev/null || echo unknown`
2980
2981/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2982/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2983
2984/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2985/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2986/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2987/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2988/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2989/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2990/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2991
2992_ASUNAME
2993
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997  IFS=$as_save_IFS
2998  test -z "$as_dir" && as_dir=.
2999    $as_echo "PATH: $as_dir"
3000  done
3001IFS=$as_save_IFS
3002
3003} >&5
3004
3005cat >&5 <<_ACEOF
3006
3007
3008## ----------- ##
3009## Core tests. ##
3010## ----------- ##
3011
3012_ACEOF
3013
3014
3015# Keep a trace of the command line.
3016# Strip out --no-create and --no-recursion so they do not pile up.
3017# Strip out --silent because we don't want to record it for future runs.
3018# Also quote any args containing shell meta-characters.
3019# Make two passes to allow for proper duplicate-argument suppression.
3020ac_configure_args=
3021ac_configure_args0=
3022ac_configure_args1=
3023ac_must_keep_next=false
3024for ac_pass in 1 2
3025do
3026  for ac_arg
3027  do
3028    case $ac_arg in
3029    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3030    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3031    | -silent | --silent | --silen | --sile | --sil)
3032      continue ;;
3033    *\'*)
3034      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3035    esac
3036    case $ac_pass in
3037    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3038    2)
3039      as_fn_append ac_configure_args1 " '$ac_arg'"
3040      if test $ac_must_keep_next = true; then
3041	ac_must_keep_next=false # Got value, back to normal.
3042      else
3043	case $ac_arg in
3044	  *=* | --config-cache | -C | -disable-* | --disable-* \
3045	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3046	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3047	  | -with-* | --with-* | -without-* | --without-* | --x)
3048	    case "$ac_configure_args0 " in
3049	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3050	    esac
3051	    ;;
3052	  -* ) ac_must_keep_next=true ;;
3053	esac
3054      fi
3055      as_fn_append ac_configure_args " '$ac_arg'"
3056      ;;
3057    esac
3058  done
3059done
3060{ ac_configure_args0=; unset ac_configure_args0;}
3061{ ac_configure_args1=; unset ac_configure_args1;}
3062
3063# When interrupted or exit'd, cleanup temporary files, and complete
3064# config.log.  We remove comments because anyway the quotes in there
3065# would cause problems or look ugly.
3066# WARNING: Use '\'' to represent an apostrophe within the trap.
3067# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3068trap 'exit_status=$?
3069  # Save into config.log some information that might help in debugging.
3070  {
3071    echo
3072
3073    $as_echo "## ---------------- ##
3074## Cache variables. ##
3075## ---------------- ##"
3076    echo
3077    # The following way of writing the cache mishandles newlines in values,
3078(
3079  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3080    eval ac_val=\$$ac_var
3081    case $ac_val in #(
3082    *${as_nl}*)
3083      case $ac_var in #(
3084      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3085$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3086      esac
3087      case $ac_var in #(
3088      _ | IFS | as_nl) ;; #(
3089      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3090      *) { eval $ac_var=; unset $ac_var;} ;;
3091      esac ;;
3092    esac
3093  done
3094  (set) 2>&1 |
3095    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3096    *${as_nl}ac_space=\ *)
3097      sed -n \
3098	"s/'\''/'\''\\\\'\'''\''/g;
3099	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3100      ;; #(
3101    *)
3102      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3103      ;;
3104    esac |
3105    sort
3106)
3107    echo
3108
3109    $as_echo "## ----------------- ##
3110## Output variables. ##
3111## ----------------- ##"
3112    echo
3113    for ac_var in $ac_subst_vars
3114    do
3115      eval ac_val=\$$ac_var
3116      case $ac_val in
3117      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3118      esac
3119      $as_echo "$ac_var='\''$ac_val'\''"
3120    done | sort
3121    echo
3122
3123    if test -n "$ac_subst_files"; then
3124      $as_echo "## ------------------- ##
3125## File substitutions. ##
3126## ------------------- ##"
3127      echo
3128      for ac_var in $ac_subst_files
3129      do
3130	eval ac_val=\$$ac_var
3131	case $ac_val in
3132	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3133	esac
3134	$as_echo "$ac_var='\''$ac_val'\''"
3135      done | sort
3136      echo
3137    fi
3138
3139    if test -s confdefs.h; then
3140      $as_echo "## ----------- ##
3141## confdefs.h. ##
3142## ----------- ##"
3143      echo
3144      cat confdefs.h
3145      echo
3146    fi
3147    test "$ac_signal" != 0 &&
3148      $as_echo "$as_me: caught signal $ac_signal"
3149    $as_echo "$as_me: exit $exit_status"
3150  } >&5
3151  rm -f core *.core core.conftest.* &&
3152    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3153    exit $exit_status
3154' 0
3155for ac_signal in 1 2 13 15; do
3156  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3157done
3158ac_signal=0
3159
3160# confdefs.h avoids OS command line length limits that DEFS can exceed.
3161rm -f -r conftest* confdefs.h
3162
3163$as_echo "/* confdefs.h */" > confdefs.h
3164
3165# Predefined preprocessor variables.
3166
3167cat >>confdefs.h <<_ACEOF
3168#define PACKAGE_NAME "$PACKAGE_NAME"
3169_ACEOF
3170
3171cat >>confdefs.h <<_ACEOF
3172#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3173_ACEOF
3174
3175cat >>confdefs.h <<_ACEOF
3176#define PACKAGE_VERSION "$PACKAGE_VERSION"
3177_ACEOF
3178
3179cat >>confdefs.h <<_ACEOF
3180#define PACKAGE_STRING "$PACKAGE_STRING"
3181_ACEOF
3182
3183cat >>confdefs.h <<_ACEOF
3184#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3185_ACEOF
3186
3187cat >>confdefs.h <<_ACEOF
3188#define PACKAGE_URL "$PACKAGE_URL"
3189_ACEOF
3190
3191
3192# Let the site file select an alternate cache file if it wants to.
3193# Prefer an explicitly selected file to automatically selected ones.
3194ac_site_file1=NONE
3195ac_site_file2=NONE
3196if test -n "$CONFIG_SITE"; then
3197  # We do not want a PATH search for config.site.
3198  case $CONFIG_SITE in #((
3199    -*)  ac_site_file1=./$CONFIG_SITE;;
3200    */*) ac_site_file1=$CONFIG_SITE;;
3201    *)   ac_site_file1=./$CONFIG_SITE;;
3202  esac
3203elif test "x$prefix" != xNONE; then
3204  ac_site_file1=$prefix/share/config.site
3205  ac_site_file2=$prefix/etc/config.site
3206else
3207  ac_site_file1=$ac_default_prefix/share/config.site
3208  ac_site_file2=$ac_default_prefix/etc/config.site
3209fi
3210for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3211do
3212  test "x$ac_site_file" = xNONE && continue
3213  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3214    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3215$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3216    sed 's/^/| /' "$ac_site_file" >&5
3217    . "$ac_site_file" \
3218      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error $? "failed to load site script $ac_site_file
3221See \`config.log' for more details" "$LINENO" 5; }
3222  fi
3223done
3224
3225if test -r "$cache_file"; then
3226  # Some versions of bash will fail to source /dev/null (special files
3227  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3228  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3229    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3230$as_echo "$as_me: loading cache $cache_file" >&6;}
3231    case $cache_file in
3232      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3233      *)                      . "./$cache_file";;
3234    esac
3235  fi
3236else
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3238$as_echo "$as_me: creating cache $cache_file" >&6;}
3239  >$cache_file
3240fi
3241
3242# Check that the precious variables saved in the cache have kept the same
3243# value.
3244ac_cache_corrupted=false
3245for ac_var in $ac_precious_vars; do
3246  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3247  eval ac_new_set=\$ac_env_${ac_var}_set
3248  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3249  eval ac_new_val=\$ac_env_${ac_var}_value
3250  case $ac_old_set,$ac_new_set in
3251    set,)
3252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3253$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3254      ac_cache_corrupted=: ;;
3255    ,set)
3256      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3257$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3258      ac_cache_corrupted=: ;;
3259    ,);;
3260    *)
3261      if test "x$ac_old_val" != "x$ac_new_val"; then
3262	# differences in whitespace do not lead to failure.
3263	ac_old_val_w=`echo x $ac_old_val`
3264	ac_new_val_w=`echo x $ac_new_val`
3265	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3266	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3267$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3268	  ac_cache_corrupted=:
3269	else
3270	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3271$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3272	  eval $ac_var=\$ac_old_val
3273	fi
3274	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3275$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3276	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3277$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3278      fi;;
3279  esac
3280  # Pass precious variables to config.status.
3281  if test "$ac_new_set" = set; then
3282    case $ac_new_val in
3283    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3284    *) ac_arg=$ac_var=$ac_new_val ;;
3285    esac
3286    case " $ac_configure_args " in
3287      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3288      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3289    esac
3290  fi
3291done
3292if $ac_cache_corrupted; then
3293  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3295  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3296$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3297  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3298fi
3299## -------------------- ##
3300## Main body of script. ##
3301## -------------------- ##
3302
3303ac_ext=c
3304ac_cpp='$CPP $CPPFLAGS'
3305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3307ac_compiler_gnu=$ac_cv_c_compiler_gnu
3308
3309
3310
3311ac_aux_dir=
3312for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3313  if test -f "$ac_dir/install-sh"; then
3314    ac_aux_dir=$ac_dir
3315    ac_install_sh="$ac_aux_dir/install-sh -c"
3316    break
3317  elif test -f "$ac_dir/install.sh"; then
3318    ac_aux_dir=$ac_dir
3319    ac_install_sh="$ac_aux_dir/install.sh -c"
3320    break
3321  elif test -f "$ac_dir/shtool"; then
3322    ac_aux_dir=$ac_dir
3323    ac_install_sh="$ac_aux_dir/shtool install -c"
3324    break
3325  fi
3326done
3327if test -z "$ac_aux_dir"; then
3328  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
3329fi
3330
3331# These three variables are undocumented and unsupported,
3332# and are intended to be withdrawn in a future Autoconf release.
3333# They can cause serious problems if a builder's source tree is in a directory
3334# whose full name contains unusual characters.
3335ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3336ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3337ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3338
3339
3340# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3341
3342#
3343# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3344# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3345#
3346# This code is free software; you can redistribute it and/or modify it
3347# under the terms of the GNU General Public License version 2 only, as
3348# published by the Free Software Foundation.  Oracle designates this
3349# particular file as subject to the "Classpath" exception as provided
3350# by Oracle in the LICENSE file that accompanied this code.
3351#
3352# This code is distributed in the hope that it will be useful, but WITHOUT
3353# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3354# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3355# version 2 for more details (a copy is included in the LICENSE file that
3356# accompanied this code).
3357#
3358# You should have received a copy of the GNU General Public License version
3359# 2 along with this work; if not, write to the Free Software Foundation,
3360# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3361#
3362# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3363# or visit www.oracle.com if you need additional information or have any
3364# questions.
3365#
3366
3367#
3368# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3369#
3370# This program is free software; you can redistribute it and/or modify
3371# it under the terms of the GNU General Public License as published by
3372# the Free Software Foundation; either version 2 of the License, or
3373# (at your option) any later version.
3374#
3375# This program is distributed in the hope that it will be useful, but
3376# WITHOUT ANY WARRANTY; without even the implied warranty of
3377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3378# General Public License for more details.
3379#
3380# You should have received a copy of the GNU General Public License
3381# along with this program; if not, write to the Free Software
3382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3383#
3384# As a special exception to the GNU General Public License, if you
3385# distribute this file as part of a program that contains a
3386# configuration script generated by Autoconf, you may include it under
3387# the same distribution terms that you use for the rest of that program.
3388
3389# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3390# ----------------------------------
3391# PKG_PROG_PKG_CONFIG
3392
3393# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3394#
3395# Check to see whether a particular set of modules exists.  Similar
3396# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3397#
3398#
3399# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3400# this or PKG_CHECK_MODULES is called, or make sure to call
3401# PKG_CHECK_EXISTS manually
3402# --------------------------------------------------------------
3403
3404
3405
3406# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3407# ---------------------------------------------
3408# _PKG_CONFIG
3409
3410# _PKG_SHORT_ERRORS_SUPPORTED
3411# -----------------------------
3412# _PKG_SHORT_ERRORS_SUPPORTED
3413
3414
3415# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3416# [ACTION-IF-NOT-FOUND])
3417#
3418#
3419# Note that if there is a possibility the first call to
3420# PKG_CHECK_MODULES might not happen, you should be sure to include an
3421# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3422#
3423#
3424# --------------------------------------------------------------
3425# PKG_CHECK_MODULES
3426
3427
3428# Include these first...
3429#
3430# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454# Create a function/macro that takes a series of named arguments. The call is
3455# similar to AC_DEFUN, but the setup of the function looks like this:
3456# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3457# ... do something
3458#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3459# ])
3460# A star (*) in front of a named argument means that it is required and it's
3461# presence will be verified. To pass e.g. the first value as a normal indexed
3462# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3463# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3464# "ARG_FOO".
3465#
3466# The generated function can be called like this:
3467# MYFUNC(FOO: [foo-val], BAR:
3468#     [
3469#         $ECHO hello world
3470#     ])
3471#
3472#
3473# Argument 1: Name of the function to define
3474# Argument 2: List of legal named arguments, with a * prefix for required arguments
3475# Argument 3: Argument array to treat as named, typically $@
3476# Argument 4: The main function body
3477
3478
3479# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3480# If so, then append $1 to $2 \
3481# Also set JVM_ARG_OK to true/false depending on outcome.
3482
3483
3484# Appends a string to a path variable, only adding the : when needed.
3485
3486
3487# Prepends a string to a path variable, only adding the : when needed.
3488
3489
3490# This will make sure the given variable points to a full and proper
3491# path. This means:
3492# 1) There will be no spaces in the path. On unix platforms,
3493#    spaces in the path will result in an error. On Windows,
3494#    the path will be rewritten using short-style to be space-free.
3495# 2) The path will be absolute, and it will be in unix-style (on
3496#     cygwin).
3497# $1: The name of the variable to fix
3498
3499
3500# This will make sure the given variable points to a executable
3501# with a full and proper path. This means:
3502# 1) There will be no spaces in the path. On unix platforms,
3503#    spaces in the path will result in an error. On Windows,
3504#    the path will be rewritten using short-style to be space-free.
3505# 2) The path will be absolute, and it will be in unix-style (on
3506#     cygwin).
3507# Any arguments given to the executable is preserved.
3508# If the input variable does not have a directory specification, then
3509# it need to be in the PATH.
3510# $1: The name of the variable to fix
3511
3512
3513
3514
3515# Register a --with argument but mark it as deprecated
3516# $1: The name of the with argument to deprecate, not including --with-
3517
3518
3519# Register a --enable argument but mark it as deprecated
3520# $1: The name of the with argument to deprecate, not including --enable-
3521# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3522# $3: Messages to user.
3523
3524
3525
3526
3527# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3528# $1: variable to check
3529
3530
3531# Check that there are no unprocessed overridden variables left.
3532# If so, they are an incorrect argument and we will exit with an error.
3533
3534
3535# Setup a tool for the given variable. If correctly specified by the user,
3536# use that value, otherwise search for the tool using the supplied code snippet.
3537# $1: variable to set
3538# $2: code snippet to call to look for the tool
3539# $3: code snippet to call if variable was used to find tool
3540
3541
3542# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3543# $1: variable to set
3544# $2: executable name (or list of names) to look for
3545
3546
3547# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3548# $1: variable to set
3549# $2: executable name (or list of names) to look for
3550
3551
3552# Like BASIC_PATH_PROGS but fails if no tool was found.
3553# $1: variable to set
3554# $2: executable name (or list of names) to look for
3555
3556
3557# Like BASIC_SETUP_TOOL but fails if no tool was found.
3558# $1: variable to set
3559# $2: autoconf macro to call to look for the special tool
3560
3561
3562# Setup the most fundamental tools that relies on not much else to set up,
3563# but is used by much of the early bootstrap code.
3564
3565
3566# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3567
3568
3569# Evaluates platform specific overrides for devkit variables.
3570# $1: Name of variable
3571
3572
3573
3574
3575
3576
3577#%%% Simple tools %%%
3578
3579# Check if we have found a usable version of make
3580# $1: the path to a potential make binary (or empty)
3581# $2: the description on how we found this
3582
3583
3584
3585
3586# Goes looking for a usable version of GNU make.
3587
3588
3589
3590
3591
3592
3593# Check if build directory is on local disk. If not possible to determine,
3594# we prefer to claim it's local.
3595# Argument 1: directory to test
3596# Argument 2: what to do if it is on local disk
3597# Argument 3: what to do otherwise (remote disk or failure)
3598
3599
3600# Check that source files have basic read permissions set. This might
3601# not be the case in cygwin in certain conditions.
3602
3603
3604
3605
3606# Check for support for specific options in bash
3607
3608
3609################################################################################
3610#
3611# Default make target
3612#
3613
3614
3615# Code to run after AC_OUTPUT
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643
3644
3645
3646
3647# Helper function which possibly converts a path using DOS-style short mode.
3648# If so, the updated path is stored in $new_path.
3649# $1: The path to check
3650
3651
3652# Helper function which possibly converts a path using DOS-style short mode.
3653# If so, the updated path is stored in $new_path.
3654# $1: The path to check
3655
3656
3657# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3658# and could probably be heavily simplified. However, all changes in this
3659# area tend to need lot of testing in different scenarios, and in lack of
3660# proper unit testing, cleaning this up has not been deemed worth the effort
3661# at the moment.
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3672
3673
3674
3675
3676# ... then the rest
3677#
3678# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3679# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3680#
3681# This code is free software; you can redistribute it and/or modify it
3682# under the terms of the GNU General Public License version 2 only, as
3683# published by the Free Software Foundation.  Oracle designates this
3684# particular file as subject to the "Classpath" exception as provided
3685# by Oracle in the LICENSE file that accompanied this code.
3686#
3687# This code is distributed in the hope that it will be useful, but WITHOUT
3688# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3689# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3690# version 2 for more details (a copy is included in the LICENSE file that
3691# accompanied this code).
3692#
3693# You should have received a copy of the GNU General Public License version
3694# 2 along with this work; if not, write to the Free Software Foundation,
3695# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3696#
3697# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3698# or visit www.oracle.com if you need additional information or have any
3699# questions.
3700#
3701
3702########################################################################
3703# This file handles detection of the Boot JDK. The Boot JDK detection
3704# process has been developed as a response to solve a complex real-world
3705# problem. Initially, it was simple, but it has grown as platform after
3706# platform, idiosyncracy after idiosyncracy has been supported.
3707#
3708# The basic idea is this:
3709# 1) You need an acceptable *) JDK to use as a Boot JDK
3710# 2) There are several ways to locate a JDK, that are mostly platform
3711#    dependent **)
3712# 3) You can have multiple JDKs installed
3713# 4) If possible, configure should try to dig out an acceptable JDK
3714#    automatically, without having to resort to command-line options
3715#
3716# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3717#     javac) and not a JRE, etc.
3718#
3719# **) On Windows we typically use a well-known path.
3720#     On MacOSX we typically use the tool java_home.
3721#     On Linux we typically find javac in the $PATH, and then follow a
3722#     chain of symlinks that often ends up in a real JDK.
3723#
3724# This leads to the code where we check in different ways to locate a
3725# JDK, and if one is found, check if it is acceptable. If not, we print
3726# our reasons for rejecting it (useful when debugging non-working
3727# configure situations) and continue checking the next one.
3728########################################################################
3729
3730# Execute the check given as argument, and verify the result
3731# If the Boot JDK was previously found, do nothing
3732# $1 A command line (typically autoconf macro) to execute
3733
3734
3735# Test: Is bootjdk explicitely set by command line arguments?
3736
3737
3738# Test: Is $JAVA_HOME set?
3739
3740
3741# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3742
3743
3744# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3745# $1: Argument to the java_home binary (optional)
3746
3747
3748# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3749
3750
3751# Look for a jdk in the given path. If there are multiple, try to select the newest.
3752# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3753# $1 = Path to directory containing jdk installations.
3754# $2 = String to append to the found JDK directory to get the proper JDK home
3755
3756
3757# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3758# environmental variable as base for where to look.
3759# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3760
3761
3762# Test: Is there a JDK installed in default, well-known locations?
3763
3764
3765# Check that a command-line tool in the Boot JDK is correct
3766# $1 = name of variable to assign
3767# $2 = name of binary
3768
3769
3770###############################################################################
3771#
3772# We need a Boot JDK to bootstrap the build.
3773#
3774
3775
3776
3777
3778
3779#
3780# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3781# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3782#
3783# This code is free software; you can redistribute it and/or modify it
3784# under the terms of the GNU General Public License version 2 only, as
3785# published by the Free Software Foundation.  Oracle designates this
3786# particular file as subject to the "Classpath" exception as provided
3787# by Oracle in the LICENSE file that accompanied this code.
3788#
3789# This code is distributed in the hope that it will be useful, but WITHOUT
3790# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3791# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3792# version 2 for more details (a copy is included in the LICENSE file that
3793# accompanied this code).
3794#
3795# You should have received a copy of the GNU General Public License version
3796# 2 along with this work; if not, write to the Free Software Foundation,
3797# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3798#
3799# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3800# or visit www.oracle.com if you need additional information or have any
3801# questions.
3802#
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820################################################################################
3821#
3822# Runs icecc-create-env once and prints the error if it fails
3823#
3824# $1: arguments to icecc-create-env
3825# $2: log file
3826#
3827
3828
3829################################################################################
3830#
3831# Optionally enable distributed compilation of native code using icecc/icecream
3832#
3833
3834
3835
3836
3837
3838
3839
3840#
3841# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3843#
3844# This code is free software; you can redistribute it and/or modify it
3845# under the terms of the GNU General Public License version 2 only, as
3846# published by the Free Software Foundation.  Oracle designates this
3847# particular file as subject to the "Classpath" exception as provided
3848# by Oracle in the LICENSE file that accompanied this code.
3849#
3850# This code is distributed in the hope that it will be useful, but WITHOUT
3851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3853# version 2 for more details (a copy is included in the LICENSE file that
3854# accompanied this code).
3855#
3856# You should have received a copy of the GNU General Public License version
3857# 2 along with this work; if not, write to the Free Software Foundation,
3858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3859#
3860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3861# or visit www.oracle.com if you need additional information or have any
3862# questions.
3863#
3864
3865# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3866# corresponding configure arguments instead
3867
3868
3869# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3870# that configure can use them while detecting compilers.
3871# TOOLCHAIN_TYPE is available here.
3872# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3873
3874
3875
3876
3877
3878
3879# Documentation on common flags used for solstudio in HIGHEST.
3880#
3881# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3882#          done with care, there are some assumptions below that need to
3883#          be understood about the use of pointers, and IEEE behavior.
3884#
3885# -fns: Use non-standard floating point mode (not IEEE 754)
3886# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3887# -fsingle: Use single precision floating point with 'float'
3888# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3889#   (Source with excessing pointer casting and data access with mixed
3890#    pointer types are not recommended)
3891# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3892#   (If you expect perfect errno behavior, do not use this)
3893# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3894# -xrestrict: Pointer parameters to functions do not overlap
3895#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3896#    If you pass in multiple pointers to the same data, do not use this)
3897# -xlibmil: Inline some library routines
3898#   (If you expect perfect errno behavior, do not use this)
3899# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3900#   (If you expect perfect errno behavior, do not use this)
3901#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3902
3903    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3904    # Bug?
3905    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3906    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3907    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3908    #fi
3909
3910
3911
3912
3913
3914# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3915#                                   IF_FALSE: [RUN-IF-FALSE])
3916# ------------------------------------------------------------
3917# Check that the c and c++ compilers support an argument
3918
3919
3920
3921
3922# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3923#                                   IF_FALSE: [RUN-IF-FALSE])
3924# ------------------------------------------------------------
3925# Check that the linker support an argument
3926
3927
3928
3929
3930
3931
3932#
3933# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961cygwin_help() {
3962  case $1 in
3963    unzip)
3964      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3965      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3966      ;;
3967    zip)
3968      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3970      ;;
3971    make)
3972      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3973      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3974      ;;
3975    freetype)
3976      HELP_MSG="
3977The freetype library can now be build during the configure process.
3978Download the freetype sources and unpack them into an arbitrary directory:
3979
3980wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3981tar -xzf freetype-2.5.3.tar.gz
3982
3983Then run configure with '--with-freetype-src=<freetype_src>'. This will
3984automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3985builds or into '<freetype_src>/lib32' for 32-bit builds.
3986Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3987and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3988
3989Alternatively you can unpack the sources like this to use the default directory:
3990
3991tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3992      ;;
3993  esac
3994}
3995
3996msys_help() {
3997  PKGHANDLER_COMMAND=""
3998}
3999
4000apt_help() {
4001  case $1 in
4002    reduced)
4003      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4004    devkit)
4005      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4006    openjdk)
4007      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4008    alsa)
4009      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4010    cups)
4011      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4012    freetype)
4013      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4014    ffi)
4015      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4016    x11)
4017      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4018    ccache)
4019      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4020  esac
4021}
4022
4023yum_help() {
4024  case $1 in
4025    devkit)
4026      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4027    openjdk)
4028      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4029    alsa)
4030      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4031    cups)
4032      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4033    freetype)
4034      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4035    x11)
4036      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4037    ccache)
4038      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4039  esac
4040}
4041
4042port_help() {
4043  PKGHANDLER_COMMAND=""
4044}
4045
4046pkgutil_help() {
4047  PKGHANDLER_COMMAND=""
4048}
4049
4050pkgadd_help() {
4051  PKGHANDLER_COMMAND=""
4052}
4053
4054# This function will check if we're called from the "configure" wrapper while
4055# printing --help. If so, we will print out additional information that can
4056# only be extracted within the autoconf script, and then exit. This must be
4057# called at the very beginning in configure.ac.
4058
4059
4060
4061
4062
4063
4064#
4065# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4066# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067#
4068# This code is free software; you can redistribute it and/or modify it
4069# under the terms of the GNU General Public License version 2 only, as
4070# published by the Free Software Foundation.  Oracle designates this
4071# particular file as subject to the "Classpath" exception as provided
4072# by Oracle in the LICENSE file that accompanied this code.
4073#
4074# This code is distributed in the hope that it will be useful, but WITHOUT
4075# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077# version 2 for more details (a copy is included in the LICENSE file that
4078# accompanied this code).
4079#
4080# You should have received a copy of the GNU General Public License version
4081# 2 along with this work; if not, write to the Free Software Foundation,
4082# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083#
4084# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085# or visit www.oracle.com if you need additional information or have any
4086# questions.
4087#
4088
4089###############################################################################
4090# Check which interpreter of the JVM we want to build.
4091# Currently we have:
4092#    template: Template interpreter (the default)
4093#    cpp     : C++ interpreter
4094
4095
4096###############################################################################
4097# Check which variants of the JVM that we want to build.
4098# Currently we have:
4099#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4100#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4101#    minimal1: reduced form of client with optional VM services and features stripped out
4102#    zero: no machine code interpreter, no compiler
4103#    zeroshark: zero interpreter and shark/llvm compiler backend
4104#    core: interpreter only, no compiler (only works on some platforms)
4105
4106
4107
4108###############################################################################
4109# Setup legacy vars/targets and new vars to deal with different debug levels.
4110#
4111#    release: no debug information, all optimizations, no asserts.
4112#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4113#    fastdebug: debug information (-g), all optimizations, all asserts
4114#    slowdebug: debug information (-g), no optimizations, all asserts
4115#
4116
4117
4118
4119
4120
4121
4122#
4123# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125#
4126# This code is free software; you can redistribute it and/or modify it
4127# under the terms of the GNU General Public License version 2 only, as
4128# published by the Free Software Foundation.  Oracle designates this
4129# particular file as subject to the "Classpath" exception as provided
4130# by Oracle in the LICENSE file that accompanied this code.
4131#
4132# This code is distributed in the hope that it will be useful, but WITHOUT
4133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135# version 2 for more details (a copy is included in the LICENSE file that
4136# accompanied this code).
4137#
4138# You should have received a copy of the GNU General Public License version
4139# 2 along with this work; if not, write to the Free Software Foundation,
4140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141#
4142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143# or visit www.oracle.com if you need additional information or have any
4144# questions.
4145#
4146
4147###############################################################################
4148# Check which variant of the JDK that we want to build.
4149# Currently we have:
4150#    normal:   standard edition
4151# but the custom make system may add other variants
4152#
4153# Effectively the JDK variant gives a name to a specific set of
4154# modules to compile into the JDK.
4155
4156
4157###############################################################################
4158# Set the debug level
4159#    release: no debug information, all optimizations, no asserts.
4160#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4161#    fastdebug: debug information (-g), all optimizations, all asserts
4162#    slowdebug: debug information (-g), no optimizations, all asserts
4163
4164
4165###############################################################################
4166#
4167# Should we build only OpenJDK even if closed sources are present?
4168#
4169
4170
4171
4172
4173###############################################################################
4174#
4175# Enable or disable the elliptic curve crypto implementation
4176#
4177
4178
4179
4180
4181################################################################################
4182#
4183# Gcov coverage data for hotspot
4184#
4185
4186
4187################################################################################
4188#
4189# Static build support.  When enabled will generate static
4190# libraries instead of shared libraries for all JDK libs.
4191#
4192
4193
4194#
4195# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4196# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4197#
4198# This code is free software; you can redistribute it and/or modify it
4199# under the terms of the GNU General Public License version 2 only, as
4200# published by the Free Software Foundation.  Oracle designates this
4201# particular file as subject to the "Classpath" exception as provided
4202# by Oracle in the LICENSE file that accompanied this code.
4203#
4204# This code is distributed in the hope that it will be useful, but WITHOUT
4205# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4206# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4207# version 2 for more details (a copy is included in the LICENSE file that
4208# accompanied this code).
4209#
4210# You should have received a copy of the GNU General Public License version
4211# 2 along with this work; if not, write to the Free Software Foundation,
4212# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4213#
4214# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4215# or visit www.oracle.com if you need additional information or have any
4216# questions.
4217#
4218
4219###############################################################################
4220#
4221# Setup version numbers
4222#
4223
4224# Verify that a given string represents a valid version number, and assign it
4225# to a variable.
4226
4227# Argument 1: the variable to assign to
4228# Argument 2: the value given by the user
4229
4230
4231
4232
4233#
4234# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4235# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4236#
4237# This code is free software; you can redistribute it and/or modify it
4238# under the terms of the GNU General Public License version 2 only, as
4239# published by the Free Software Foundation.  Oracle designates this
4240# particular file as subject to the "Classpath" exception as provided
4241# by Oracle in the LICENSE file that accompanied this code.
4242#
4243# This code is distributed in the hope that it will be useful, but WITHOUT
4244# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4245# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4246# version 2 for more details (a copy is included in the LICENSE file that
4247# accompanied this code).
4248#
4249# You should have received a copy of the GNU General Public License version
4250# 2 along with this work; if not, write to the Free Software Foundation,
4251# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4252#
4253# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4254# or visit www.oracle.com if you need additional information or have any
4255# questions.
4256#
4257
4258# Major library component reside in separate files.
4259#
4260# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4262#
4263# This code is free software; you can redistribute it and/or modify it
4264# under the terms of the GNU General Public License version 2 only, as
4265# published by the Free Software Foundation.  Oracle designates this
4266# particular file as subject to the "Classpath" exception as provided
4267# by Oracle in the LICENSE file that accompanied this code.
4268#
4269# This code is distributed in the hope that it will be useful, but WITHOUT
4270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4272# version 2 for more details (a copy is included in the LICENSE file that
4273# accompanied this code).
4274#
4275# You should have received a copy of the GNU General Public License version
4276# 2 along with this work; if not, write to the Free Software Foundation,
4277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4278#
4279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4280# or visit www.oracle.com if you need additional information or have any
4281# questions.
4282#
4283
4284################################################################################
4285# Setup alsa (Advanced Linux Sound Architecture)
4286################################################################################
4287
4288
4289#
4290# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4292#
4293# This code is free software; you can redistribute it and/or modify it
4294# under the terms of the GNU General Public License version 2 only, as
4295# published by the Free Software Foundation.  Oracle designates this
4296# particular file as subject to the "Classpath" exception as provided
4297# by Oracle in the LICENSE file that accompanied this code.
4298#
4299# This code is distributed in the hope that it will be useful, but WITHOUT
4300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4302# version 2 for more details (a copy is included in the LICENSE file that
4303# accompanied this code).
4304#
4305# You should have received a copy of the GNU General Public License version
4306# 2 along with this work; if not, write to the Free Software Foundation,
4307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4308#
4309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4310# or visit www.oracle.com if you need additional information or have any
4311# questions.
4312#
4313
4314################################################################################
4315# Setup bundled libraries.
4316#
4317# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4318# OpenJDK repository. Default is to use these libraries as bundled, but they
4319# might be replaced by en external version by the user.
4320################################################################################
4321
4322
4323################################################################################
4324# Setup libjpeg
4325################################################################################
4326
4327
4328################################################################################
4329# Setup giflib
4330################################################################################
4331
4332
4333################################################################################
4334# Setup libpng
4335################################################################################
4336
4337
4338################################################################################
4339# Setup zlib
4340################################################################################
4341
4342
4343################################################################################
4344# Setup lcms (Little CMS)
4345################################################################################
4346
4347
4348#
4349# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4350# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4351#
4352# This code is free software; you can redistribute it and/or modify it
4353# under the terms of the GNU General Public License version 2 only, as
4354# published by the Free Software Foundation.  Oracle designates this
4355# particular file as subject to the "Classpath" exception as provided
4356# by Oracle in the LICENSE file that accompanied this code.
4357#
4358# This code is distributed in the hope that it will be useful, but WITHOUT
4359# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4360# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4361# version 2 for more details (a copy is included in the LICENSE file that
4362# accompanied this code).
4363#
4364# You should have received a copy of the GNU General Public License version
4365# 2 along with this work; if not, write to the Free Software Foundation,
4366# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4367#
4368# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4369# or visit www.oracle.com if you need additional information or have any
4370# questions.
4371#
4372
4373################################################################################
4374# Setup cups (Common Unix Printing System)
4375################################################################################
4376
4377
4378#
4379# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4381#
4382# This code is free software; you can redistribute it and/or modify it
4383# under the terms of the GNU General Public License version 2 only, as
4384# published by the Free Software Foundation.  Oracle designates this
4385# particular file as subject to the "Classpath" exception as provided
4386# by Oracle in the LICENSE file that accompanied this code.
4387#
4388# This code is distributed in the hope that it will be useful, but WITHOUT
4389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4391# version 2 for more details (a copy is included in the LICENSE file that
4392# accompanied this code).
4393#
4394# You should have received a copy of the GNU General Public License version
4395# 2 along with this work; if not, write to the Free Software Foundation,
4396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4397#
4398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4399# or visit www.oracle.com if you need additional information or have any
4400# questions.
4401#
4402
4403################################################################################
4404# Setup libffi (Foreign Function Interface)
4405################################################################################
4406
4407
4408#
4409# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411#
4412# This code is free software; you can redistribute it and/or modify it
4413# under the terms of the GNU General Public License version 2 only, as
4414# published by the Free Software Foundation.  Oracle designates this
4415# particular file as subject to the "Classpath" exception as provided
4416# by Oracle in the LICENSE file that accompanied this code.
4417#
4418# This code is distributed in the hope that it will be useful, but WITHOUT
4419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421# version 2 for more details (a copy is included in the LICENSE file that
4422# accompanied this code).
4423#
4424# You should have received a copy of the GNU General Public License version
4425# 2 along with this work; if not, write to the Free Software Foundation,
4426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427#
4428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429# or visit www.oracle.com if you need additional information or have any
4430# questions.
4431#
4432
4433################################################################################
4434# Build the freetype lib from source
4435################################################################################
4436
4437
4438################################################################################
4439# Check if a potential freeype library match is correct and usable
4440################################################################################
4441
4442
4443################################################################################
4444# Setup freetype (The FreeType2 font rendering library)
4445################################################################################
4446
4447
4448#
4449# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4451#
4452# This code is free software; you can redistribute it and/or modify it
4453# under the terms of the GNU General Public License version 2 only, as
4454# published by the Free Software Foundation.  Oracle designates this
4455# particular file as subject to the "Classpath" exception as provided
4456# by Oracle in the LICENSE file that accompanied this code.
4457#
4458# This code is distributed in the hope that it will be useful, but WITHOUT
4459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4461# version 2 for more details (a copy is included in the LICENSE file that
4462# accompanied this code).
4463#
4464# You should have received a copy of the GNU General Public License version
4465# 2 along with this work; if not, write to the Free Software Foundation,
4466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4467#
4468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4469# or visit www.oracle.com if you need additional information or have any
4470# questions.
4471#
4472
4473################################################################################
4474# Setup the standard C/C++ runtime libraries.
4475#
4476# Most importantly, determine if stdc++ should be linked statically or
4477# dynamically.
4478################################################################################
4479
4480
4481#
4482# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4483# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4484#
4485# This code is free software; you can redistribute it and/or modify it
4486# under the terms of the GNU General Public License version 2 only, as
4487# published by the Free Software Foundation.  Oracle designates this
4488# particular file as subject to the "Classpath" exception as provided
4489# by Oracle in the LICENSE file that accompanied this code.
4490#
4491# This code is distributed in the hope that it will be useful, but WITHOUT
4492# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4493# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4494# version 2 for more details (a copy is included in the LICENSE file that
4495# accompanied this code).
4496#
4497# You should have received a copy of the GNU General Public License version
4498# 2 along with this work; if not, write to the Free Software Foundation,
4499# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4500#
4501# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4502# or visit www.oracle.com if you need additional information or have any
4503# questions.
4504#
4505
4506################################################################################
4507# Setup X11 Windows system
4508################################################################################
4509
4510
4511
4512################################################################################
4513# Determine which libraries are needed for this configuration
4514################################################################################
4515
4516
4517################################################################################
4518# Parse library options, and setup needed libraries
4519################################################################################
4520
4521
4522################################################################################
4523# Setup llvm (Low-Level VM)
4524################################################################################
4525
4526
4527################################################################################
4528# Setup various libraries, typically small system libraries
4529################################################################################
4530
4531
4532#
4533# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4534# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4535#
4536# This code is free software; you can redistribute it and/or modify it
4537# under the terms of the GNU General Public License version 2 only, as
4538# published by the Free Software Foundation.  Oracle designates this
4539# particular file as subject to the "Classpath" exception as provided
4540# by Oracle in the LICENSE file that accompanied this code.
4541#
4542# This code is distributed in the hope that it will be useful, but WITHOUT
4543# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4544# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4545# version 2 for more details (a copy is included in the LICENSE file that
4546# accompanied this code).
4547#
4548# You should have received a copy of the GNU General Public License version
4549# 2 along with this work; if not, write to the Free Software Foundation,
4550# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4551#
4552# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4553# or visit www.oracle.com if you need additional information or have any
4554# questions.
4555#
4556
4557# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4558# Converts autoconf style CPU name to OpenJDK style, into
4559# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4560
4561
4562# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4563# Converts autoconf style OS name to OpenJDK style, into
4564# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4565
4566
4567# Expects $host_os $host_cpu $build_os and $build_cpu
4568# and $with_target_bits to have been setup!
4569#
4570# Translate the standard triplet(quadruplet) definition
4571# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4572# OPENJDK_BUILD_OS, etc.
4573
4574
4575# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4576# accordingly. Must be done after setting up build and target system, but before
4577# doing anything else with these values.
4578
4579
4580# Setup the legacy variables, for controlling the old makefiles.
4581#
4582
4583
4584
4585
4586#%%% Build and target systems %%%
4587
4588
4589
4590
4591# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4592# Add -mX to various FLAGS variables.
4593
4594
4595
4596
4597
4598
4599#
4600# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4601# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4602#
4603# This code is free software; you can redistribute it and/or modify it
4604# under the terms of the GNU General Public License version 2 only, as
4605# published by the Free Software Foundation.  Oracle designates this
4606# particular file as subject to the "Classpath" exception as provided
4607# by Oracle in the LICENSE file that accompanied this code.
4608#
4609# This code is distributed in the hope that it will be useful, but WITHOUT
4610# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4611# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4612# version 2 for more details (a copy is included in the LICENSE file that
4613# accompanied this code).
4614#
4615# You should have received a copy of the GNU General Public License version
4616# 2 along with this work; if not, write to the Free Software Foundation,
4617# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4618#
4619# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4620# or visit www.oracle.com if you need additional information or have any
4621# questions.
4622#
4623
4624
4625
4626
4627
4628
4629
4630#
4631# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4632# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4633#
4634# This code is free software; you can redistribute it and/or modify it
4635# under the terms of the GNU General Public License version 2 only, as
4636# published by the Free Software Foundation.  Oracle designates this
4637# particular file as subject to the "Classpath" exception as provided
4638# by Oracle in the LICENSE file that accompanied this code.
4639#
4640# This code is distributed in the hope that it will be useful, but WITHOUT
4641# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4642# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4643# version 2 for more details (a copy is included in the LICENSE file that
4644# accompanied this code).
4645#
4646# You should have received a copy of the GNU General Public License version
4647# 2 along with this work; if not, write to the Free Software Foundation,
4648# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4649#
4650# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4651# or visit www.oracle.com if you need additional information or have any
4652# questions.
4653#
4654
4655########################################################################
4656# This file is responsible for detecting, verifying and setting up the
4657# toolchain, i.e. the compiler, linker and related utilities. It will setup
4658# proper paths to the binaries, but it will not setup any flags.
4659#
4660# The binaries used is determined by the toolchain type, which is the family of
4661# compilers and related tools that are used.
4662########################################################################
4663
4664
4665# All valid toolchains, regardless of platform (used by help.m4)
4666VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4667
4668# These toolchains are valid on different platforms
4669VALID_TOOLCHAINS_linux="gcc clang"
4670VALID_TOOLCHAINS_solaris="solstudio"
4671VALID_TOOLCHAINS_macosx="gcc clang"
4672VALID_TOOLCHAINS_aix="xlc"
4673VALID_TOOLCHAINS_windows="microsoft"
4674
4675# Toolchain descriptions
4676TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4677TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4678TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4679TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4680TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4681
4682# Setup a number of variables describing how native output files are
4683# named on this platform/toolchain.
4684
4685
4686# Determine which toolchain type to use, and make sure it is valid for this
4687# platform. Setup various information about the selected toolchain.
4688
4689
4690# Before we start detecting the toolchain executables, we might need some
4691# special setup, e.g. additional paths etc.
4692
4693
4694# Restore path, etc
4695
4696
4697# Check if a compiler is of the toolchain type we expect, and save the version
4698# information from it. If the compiler does not match the expected type,
4699# this function will abort using AC_MSG_ERROR. If it matches, the version will
4700# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4701# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4702#
4703# $1 = compiler to test (CC or CXX)
4704# $2 = human readable name of compiler (C or C++)
4705
4706
4707# Try to locate the given C or C++ compiler in the path, or otherwise.
4708#
4709# $1 = compiler to test (CC or CXX)
4710# $2 = human readable name of compiler (C or C++)
4711# $3 = list of compiler names to search for
4712
4713
4714# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4715# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4716# archiver (AR). Verify that the compilers are correct according to the
4717# toolchain type.
4718
4719
4720# Setup additional tools that is considered a part of the toolchain, but not the
4721# core part. Many of these are highly platform-specific and do not exist,
4722# and/or are not needed on all platforms.
4723
4724
4725# Setup the build tools (i.e, the compiler and linker used to build programs
4726# that should be run on the build platform, not the target platform, as a build
4727# helper). Since the non-cross-compile case uses the normal, target compilers
4728# for this, we can only do this after these have been setup.
4729
4730
4731# Setup legacy variables that are still needed as alternative ways to refer to
4732# parts of the toolchain.
4733
4734
4735# Do some additional checks on the detected tools.
4736
4737
4738# Setup the JTReg Regression Test Harness.
4739
4740
4741#
4742# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4744#
4745# This code is free software; you can redistribute it and/or modify it
4746# under the terms of the GNU General Public License version 2 only, as
4747# published by the Free Software Foundation.  Oracle designates this
4748# particular file as subject to the "Classpath" exception as provided
4749# by Oracle in the LICENSE file that accompanied this code.
4750#
4751# This code is distributed in the hope that it will be useful, but WITHOUT
4752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4754# version 2 for more details (a copy is included in the LICENSE file that
4755# accompanied this code).
4756#
4757# You should have received a copy of the GNU General Public License version
4758# 2 along with this work; if not, write to the Free Software Foundation,
4759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4760#
4761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4762# or visit www.oracle.com if you need additional information or have any
4763# questions.
4764#
4765
4766################################################################################
4767# The order of these defines the priority by which we try to find them.
4768VALID_VS_VERSIONS="2013 2012 2010"
4769
4770VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4771VS_VERSION_INTERNAL_2010=100
4772VS_MSVCR_2010=msvcr100.dll
4773# We don't use msvcp on Visual Studio 2010
4774#VS_MSVCP_2010=msvcp100.dll
4775VS_ENVVAR_2010="VS100COMNTOOLS"
4776VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4777VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4778VS_VS_PLATFORM_NAME_2010="v100"
4779VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4780
4781VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4782VS_VERSION_INTERNAL_2012=110
4783VS_MSVCR_2012=msvcr110.dll
4784VS_MSVCP_2012=msvcp110.dll
4785VS_ENVVAR_2012="VS110COMNTOOLS"
4786VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4787VS_SDK_INSTALLDIR_2012=
4788VS_VS_PLATFORM_NAME_2012="v110"
4789VS_SDK_PLATFORM_NAME_2012=
4790
4791VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4792VS_VERSION_INTERNAL_2013=120
4793VS_MSVCR_2013=msvcr120.dll
4794VS_MSVCP_2013=msvcp120.dll
4795VS_ENVVAR_2013="VS120COMNTOOLS"
4796VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4797VS_SDK_INSTALLDIR_2013=
4798VS_VS_PLATFORM_NAME_2013="v120"
4799VS_SDK_PLATFORM_NAME_2013=
4800
4801################################################################################
4802
4803
4804
4805################################################################################
4806
4807
4808
4809################################################################################
4810# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4811# build environment and assigns it to VS_ENV_CMD
4812
4813
4814################################################################################
4815
4816
4817
4818################################################################################
4819# Check if the VS env variables were setup prior to running configure.
4820# If not, then find vcvarsall.bat and run it automatically, and integrate
4821# the set env variables into the spec file.
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836# This line needs to be here, verbatim, after all includes and the dummy hook
4837# definitions. It is replaced with custom functionality when building
4838# custom sources.
4839#CUSTOM_AUTOCONF_INCLUDE
4840
4841# Do not change or remove the following line, it is needed for consistency checks:
4842DATE_WHEN_GENERATED=1454145906
4843
4844###############################################################################
4845#
4846# Initialization / Boot-strapping
4847#
4848# The bootstrapping process needs to solve the "chicken or the egg" problem,
4849# thus it jumps back and forth, each time gaining something needed later on.
4850#
4851###############################################################################
4852
4853# If we are requested to print additional help, do that and then exit.
4854# This must be the very first call.
4855
4856  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4857    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4858    $PRINTF "Which are valid to use depends on the build platform.\n"
4859    for toolchain in $VALID_TOOLCHAINS_all; do
4860      # Use indirect variable referencing
4861      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4862      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4863      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4864    done
4865
4866    # And now exit directly
4867    exit 0
4868  fi
4869
4870
4871# Basic initialization that must happen first of all in the normal process.
4872
4873  # Save the original command line. This is passed to us by the wrapper configure script.
4874
4875  # Save the path variable before it gets changed
4876  ORIGINAL_PATH="$PATH"
4877
4878  DATE_WHEN_CONFIGURED=`LANG=C date`
4879
4880  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4881$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4882  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4883$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4884
4885
4886  # Start with tools that do not need have cross compilation support
4887  # and can be expected to be found in the default PATH. These tools are
4888  # used by configure.
4889
4890  # First are all the simple required tools.
4891
4892
4893
4894  # Publish this variable in the help.
4895
4896
4897  if [ -z "${BASENAME+x}" ]; then
4898    # The variable is not set by user, try to locate tool using the code snippet
4899    for ac_prog in basename
4900do
4901  # Extract the first word of "$ac_prog", so it can be a program name with args.
4902set dummy $ac_prog; ac_word=$2
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if ${ac_cv_path_BASENAME+:} false; then :
4906  $as_echo_n "(cached) " >&6
4907else
4908  case $BASENAME in
4909  [\\/]* | ?:[\\/]*)
4910  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4911  ;;
4912  *)
4913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in $PATH
4915do
4916  IFS=$as_save_IFS
4917  test -z "$as_dir" && as_dir=.
4918    for ac_exec_ext in '' $ac_executable_extensions; do
4919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4920    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922    break 2
4923  fi
4924done
4925  done
4926IFS=$as_save_IFS
4927
4928  ;;
4929esac
4930fi
4931BASENAME=$ac_cv_path_BASENAME
4932if test -n "$BASENAME"; then
4933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4934$as_echo "$BASENAME" >&6; }
4935else
4936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
4940
4941  test -n "$BASENAME" && break
4942done
4943
4944  else
4945    # The variable is set, but is it from the command line or the environment?
4946
4947    # Try to remove the string !BASENAME! from our list.
4948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4950      # If it failed, the variable was not from the command line. Ignore it,
4951      # but warn the user (except for BASH, which is always set by the calling BASH).
4952      if test "xBASENAME" != xBASH; then
4953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4954$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4955      fi
4956      # Try to locate tool using the code snippet
4957      for ac_prog in basename
4958do
4959  # Extract the first word of "$ac_prog", so it can be a program name with args.
4960set dummy $ac_prog; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_BASENAME+:} false; then :
4964  $as_echo_n "(cached) " >&6
4965else
4966  case $BASENAME in
4967  [\\/]* | ?:[\\/]*)
4968  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4969  ;;
4970  *)
4971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in $PATH
4973do
4974  IFS=$as_save_IFS
4975  test -z "$as_dir" && as_dir=.
4976    for ac_exec_ext in '' $ac_executable_extensions; do
4977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980    break 2
4981  fi
4982done
4983  done
4984IFS=$as_save_IFS
4985
4986  ;;
4987esac
4988fi
4989BASENAME=$ac_cv_path_BASENAME
4990if test -n "$BASENAME"; then
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4992$as_echo "$BASENAME" >&6; }
4993else
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999  test -n "$BASENAME" && break
5000done
5001
5002    else
5003      # If it succeeded, then it was overridden by the user. We will use it
5004      # for the tool.
5005
5006      # First remove it from the list of overridden variables, so we can test
5007      # for unknown variables in the end.
5008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5009
5010      # Check if we try to supply an empty value
5011      if test "x$BASENAME" = x; then
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5013$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5015$as_echo_n "checking for BASENAME... " >&6; }
5016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5017$as_echo "disabled" >&6; }
5018      else
5019        # Check if the provided tool contains a complete path.
5020        tool_specified="$BASENAME"
5021        tool_basename="${tool_specified##*/}"
5022        if test "x$tool_basename" = "x$tool_specified"; then
5023          # A command without a complete path is provided, search $PATH.
5024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5025$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5026          # Extract the first word of "$tool_basename", so it can be a program name with args.
5027set dummy $tool_basename; ac_word=$2
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if ${ac_cv_path_BASENAME+:} false; then :
5031  $as_echo_n "(cached) " >&6
5032else
5033  case $BASENAME in
5034  [\\/]* | ?:[\\/]*)
5035  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5036  ;;
5037  *)
5038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041  IFS=$as_save_IFS
5042  test -z "$as_dir" && as_dir=.
5043    for ac_exec_ext in '' $ac_executable_extensions; do
5044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047    break 2
5048  fi
5049done
5050  done
5051IFS=$as_save_IFS
5052
5053  ;;
5054esac
5055fi
5056BASENAME=$ac_cv_path_BASENAME
5057if test -n "$BASENAME"; then
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5059$as_echo "$BASENAME" >&6; }
5060else
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065
5066          if test "x$BASENAME" = x; then
5067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5068          fi
5069        else
5070          # Otherwise we believe it is a complete path. Use it as it is.
5071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5072$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5074$as_echo_n "checking for BASENAME... " >&6; }
5075          if test ! -x "$tool_specified"; then
5076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5077$as_echo "not found" >&6; }
5078            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5079          fi
5080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5081$as_echo "$tool_specified" >&6; }
5082        fi
5083      fi
5084    fi
5085
5086  fi
5087
5088
5089
5090  if test "x$BASENAME" = x; then
5091    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5092  fi
5093
5094
5095
5096
5097
5098  # Publish this variable in the help.
5099
5100
5101  if [ -z "${BASH+x}" ]; then
5102    # The variable is not set by user, try to locate tool using the code snippet
5103    for ac_prog in bash
5104do
5105  # Extract the first word of "$ac_prog", so it can be a program name with args.
5106set dummy $ac_prog; ac_word=$2
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5108$as_echo_n "checking for $ac_word... " >&6; }
5109if ${ac_cv_path_BASH+:} false; then :
5110  $as_echo_n "(cached) " >&6
5111else
5112  case $BASH in
5113  [\\/]* | ?:[\\/]*)
5114  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5115  ;;
5116  *)
5117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120  IFS=$as_save_IFS
5121  test -z "$as_dir" && as_dir=.
5122    for ac_exec_ext in '' $ac_executable_extensions; do
5123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5124    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5126    break 2
5127  fi
5128done
5129  done
5130IFS=$as_save_IFS
5131
5132  ;;
5133esac
5134fi
5135BASH=$ac_cv_path_BASH
5136if test -n "$BASH"; then
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5138$as_echo "$BASH" >&6; }
5139else
5140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
5142fi
5143
5144
5145  test -n "$BASH" && break
5146done
5147
5148  else
5149    # The variable is set, but is it from the command line or the environment?
5150
5151    # Try to remove the string !BASH! from our list.
5152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5154      # If it failed, the variable was not from the command line. Ignore it,
5155      # but warn the user (except for BASH, which is always set by the calling BASH).
5156      if test "xBASH" != xBASH; then
5157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5158$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5159      fi
5160      # Try to locate tool using the code snippet
5161      for ac_prog in bash
5162do
5163  # Extract the first word of "$ac_prog", so it can be a program name with args.
5164set dummy $ac_prog; ac_word=$2
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166$as_echo_n "checking for $ac_word... " >&6; }
5167if ${ac_cv_path_BASH+:} false; then :
5168  $as_echo_n "(cached) " >&6
5169else
5170  case $BASH in
5171  [\\/]* | ?:[\\/]*)
5172  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5173  ;;
5174  *)
5175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176for as_dir in $PATH
5177do
5178  IFS=$as_save_IFS
5179  test -z "$as_dir" && as_dir=.
5180    for ac_exec_ext in '' $ac_executable_extensions; do
5181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5182    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5184    break 2
5185  fi
5186done
5187  done
5188IFS=$as_save_IFS
5189
5190  ;;
5191esac
5192fi
5193BASH=$ac_cv_path_BASH
5194if test -n "$BASH"; then
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5196$as_echo "$BASH" >&6; }
5197else
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199$as_echo "no" >&6; }
5200fi
5201
5202
5203  test -n "$BASH" && break
5204done
5205
5206    else
5207      # If it succeeded, then it was overridden by the user. We will use it
5208      # for the tool.
5209
5210      # First remove it from the list of overridden variables, so we can test
5211      # for unknown variables in the end.
5212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5213
5214      # Check if we try to supply an empty value
5215      if test "x$BASH" = x; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5217$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5219$as_echo_n "checking for BASH... " >&6; }
5220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5221$as_echo "disabled" >&6; }
5222      else
5223        # Check if the provided tool contains a complete path.
5224        tool_specified="$BASH"
5225        tool_basename="${tool_specified##*/}"
5226        if test "x$tool_basename" = "x$tool_specified"; then
5227          # A command without a complete path is provided, search $PATH.
5228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5229$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5230          # Extract the first word of "$tool_basename", so it can be a program name with args.
5231set dummy $tool_basename; ac_word=$2
5232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5233$as_echo_n "checking for $ac_word... " >&6; }
5234if ${ac_cv_path_BASH+:} false; then :
5235  $as_echo_n "(cached) " >&6
5236else
5237  case $BASH in
5238  [\\/]* | ?:[\\/]*)
5239  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5240  ;;
5241  *)
5242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5243for as_dir in $PATH
5244do
5245  IFS=$as_save_IFS
5246  test -z "$as_dir" && as_dir=.
5247    for ac_exec_ext in '' $ac_executable_extensions; do
5248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5249    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5251    break 2
5252  fi
5253done
5254  done
5255IFS=$as_save_IFS
5256
5257  ;;
5258esac
5259fi
5260BASH=$ac_cv_path_BASH
5261if test -n "$BASH"; then
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5263$as_echo "$BASH" >&6; }
5264else
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266$as_echo "no" >&6; }
5267fi
5268
5269
5270          if test "x$BASH" = x; then
5271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5272          fi
5273        else
5274          # Otherwise we believe it is a complete path. Use it as it is.
5275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5276$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5278$as_echo_n "checking for BASH... " >&6; }
5279          if test ! -x "$tool_specified"; then
5280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5281$as_echo "not found" >&6; }
5282            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5283          fi
5284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5285$as_echo "$tool_specified" >&6; }
5286        fi
5287      fi
5288    fi
5289
5290  fi
5291
5292
5293
5294  if test "x$BASH" = x; then
5295    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5296  fi
5297
5298
5299
5300
5301
5302  # Publish this variable in the help.
5303
5304
5305  if [ -z "${CAT+x}" ]; then
5306    # The variable is not set by user, try to locate tool using the code snippet
5307    for ac_prog in cat
5308do
5309  # Extract the first word of "$ac_prog", so it can be a program name with args.
5310set dummy $ac_prog; ac_word=$2
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312$as_echo_n "checking for $ac_word... " >&6; }
5313if ${ac_cv_path_CAT+:} false; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  case $CAT in
5317  [\\/]* | ?:[\\/]*)
5318  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5319  ;;
5320  *)
5321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  test -z "$as_dir" && as_dir=.
5326    for ac_exec_ext in '' $ac_executable_extensions; do
5327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5328    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330    break 2
5331  fi
5332done
5333  done
5334IFS=$as_save_IFS
5335
5336  ;;
5337esac
5338fi
5339CAT=$ac_cv_path_CAT
5340if test -n "$CAT"; then
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5342$as_echo "$CAT" >&6; }
5343else
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347
5348
5349  test -n "$CAT" && break
5350done
5351
5352  else
5353    # The variable is set, but is it from the command line or the environment?
5354
5355    # Try to remove the string !CAT! from our list.
5356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5358      # If it failed, the variable was not from the command line. Ignore it,
5359      # but warn the user (except for BASH, which is always set by the calling BASH).
5360      if test "xCAT" != xBASH; then
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5362$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5363      fi
5364      # Try to locate tool using the code snippet
5365      for ac_prog in cat
5366do
5367  # Extract the first word of "$ac_prog", so it can be a program name with args.
5368set dummy $ac_prog; ac_word=$2
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5370$as_echo_n "checking for $ac_word... " >&6; }
5371if ${ac_cv_path_CAT+:} false; then :
5372  $as_echo_n "(cached) " >&6
5373else
5374  case $CAT in
5375  [\\/]* | ?:[\\/]*)
5376  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5377  ;;
5378  *)
5379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5380for as_dir in $PATH
5381do
5382  IFS=$as_save_IFS
5383  test -z "$as_dir" && as_dir=.
5384    for ac_exec_ext in '' $ac_executable_extensions; do
5385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5386    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5388    break 2
5389  fi
5390done
5391  done
5392IFS=$as_save_IFS
5393
5394  ;;
5395esac
5396fi
5397CAT=$ac_cv_path_CAT
5398if test -n "$CAT"; then
5399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5400$as_echo "$CAT" >&6; }
5401else
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5403$as_echo "no" >&6; }
5404fi
5405
5406
5407  test -n "$CAT" && break
5408done
5409
5410    else
5411      # If it succeeded, then it was overridden by the user. We will use it
5412      # for the tool.
5413
5414      # First remove it from the list of overridden variables, so we can test
5415      # for unknown variables in the end.
5416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5417
5418      # Check if we try to supply an empty value
5419      if test "x$CAT" = x; then
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5421$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5423$as_echo_n "checking for CAT... " >&6; }
5424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5425$as_echo "disabled" >&6; }
5426      else
5427        # Check if the provided tool contains a complete path.
5428        tool_specified="$CAT"
5429        tool_basename="${tool_specified##*/}"
5430        if test "x$tool_basename" = "x$tool_specified"; then
5431          # A command without a complete path is provided, search $PATH.
5432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5433$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5434          # Extract the first word of "$tool_basename", so it can be a program name with args.
5435set dummy $tool_basename; ac_word=$2
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5437$as_echo_n "checking for $ac_word... " >&6; }
5438if ${ac_cv_path_CAT+:} false; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441  case $CAT in
5442  [\\/]* | ?:[\\/]*)
5443  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5444  ;;
5445  *)
5446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449  IFS=$as_save_IFS
5450  test -z "$as_dir" && as_dir=.
5451    for ac_exec_ext in '' $ac_executable_extensions; do
5452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5453    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455    break 2
5456  fi
5457done
5458  done
5459IFS=$as_save_IFS
5460
5461  ;;
5462esac
5463fi
5464CAT=$ac_cv_path_CAT
5465if test -n "$CAT"; then
5466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5467$as_echo "$CAT" >&6; }
5468else
5469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5470$as_echo "no" >&6; }
5471fi
5472
5473
5474          if test "x$CAT" = x; then
5475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5476          fi
5477        else
5478          # Otherwise we believe it is a complete path. Use it as it is.
5479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5480$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5482$as_echo_n "checking for CAT... " >&6; }
5483          if test ! -x "$tool_specified"; then
5484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5485$as_echo "not found" >&6; }
5486            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5487          fi
5488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5489$as_echo "$tool_specified" >&6; }
5490        fi
5491      fi
5492    fi
5493
5494  fi
5495
5496
5497
5498  if test "x$CAT" = x; then
5499    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5500  fi
5501
5502
5503
5504
5505
5506  # Publish this variable in the help.
5507
5508
5509  if [ -z "${CHMOD+x}" ]; then
5510    # The variable is not set by user, try to locate tool using the code snippet
5511    for ac_prog in chmod
5512do
5513  # Extract the first word of "$ac_prog", so it can be a program name with args.
5514set dummy $ac_prog; ac_word=$2
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
5517if ${ac_cv_path_CHMOD+:} false; then :
5518  $as_echo_n "(cached) " >&6
5519else
5520  case $CHMOD in
5521  [\\/]* | ?:[\\/]*)
5522  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5523  ;;
5524  *)
5525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in $PATH
5527do
5528  IFS=$as_save_IFS
5529  test -z "$as_dir" && as_dir=.
5530    for ac_exec_ext in '' $ac_executable_extensions; do
5531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5532    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5534    break 2
5535  fi
5536done
5537  done
5538IFS=$as_save_IFS
5539
5540  ;;
5541esac
5542fi
5543CHMOD=$ac_cv_path_CHMOD
5544if test -n "$CHMOD"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5546$as_echo "$CHMOD" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553  test -n "$CHMOD" && break
5554done
5555
5556  else
5557    # The variable is set, but is it from the command line or the environment?
5558
5559    # Try to remove the string !CHMOD! from our list.
5560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5562      # If it failed, the variable was not from the command line. Ignore it,
5563      # but warn the user (except for BASH, which is always set by the calling BASH).
5564      if test "xCHMOD" != xBASH; then
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5566$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5567      fi
5568      # Try to locate tool using the code snippet
5569      for ac_prog in chmod
5570do
5571  # Extract the first word of "$ac_prog", so it can be a program name with args.
5572set dummy $ac_prog; ac_word=$2
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5574$as_echo_n "checking for $ac_word... " >&6; }
5575if ${ac_cv_path_CHMOD+:} false; then :
5576  $as_echo_n "(cached) " >&6
5577else
5578  case $CHMOD in
5579  [\\/]* | ?:[\\/]*)
5580  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5581  ;;
5582  *)
5583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5584for as_dir in $PATH
5585do
5586  IFS=$as_save_IFS
5587  test -z "$as_dir" && as_dir=.
5588    for ac_exec_ext in '' $ac_executable_extensions; do
5589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5590    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5592    break 2
5593  fi
5594done
5595  done
5596IFS=$as_save_IFS
5597
5598  ;;
5599esac
5600fi
5601CHMOD=$ac_cv_path_CHMOD
5602if test -n "$CHMOD"; then
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5604$as_echo "$CHMOD" >&6; }
5605else
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5607$as_echo "no" >&6; }
5608fi
5609
5610
5611  test -n "$CHMOD" && break
5612done
5613
5614    else
5615      # If it succeeded, then it was overridden by the user. We will use it
5616      # for the tool.
5617
5618      # First remove it from the list of overridden variables, so we can test
5619      # for unknown variables in the end.
5620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5621
5622      # Check if we try to supply an empty value
5623      if test "x$CHMOD" = x; then
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5625$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5627$as_echo_n "checking for CHMOD... " >&6; }
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5629$as_echo "disabled" >&6; }
5630      else
5631        # Check if the provided tool contains a complete path.
5632        tool_specified="$CHMOD"
5633        tool_basename="${tool_specified##*/}"
5634        if test "x$tool_basename" = "x$tool_specified"; then
5635          # A command without a complete path is provided, search $PATH.
5636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5637$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5638          # Extract the first word of "$tool_basename", so it can be a program name with args.
5639set dummy $tool_basename; ac_word=$2
5640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5641$as_echo_n "checking for $ac_word... " >&6; }
5642if ${ac_cv_path_CHMOD+:} false; then :
5643  $as_echo_n "(cached) " >&6
5644else
5645  case $CHMOD in
5646  [\\/]* | ?:[\\/]*)
5647  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5648  ;;
5649  *)
5650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5651for as_dir in $PATH
5652do
5653  IFS=$as_save_IFS
5654  test -z "$as_dir" && as_dir=.
5655    for ac_exec_ext in '' $ac_executable_extensions; do
5656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5657    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5659    break 2
5660  fi
5661done
5662  done
5663IFS=$as_save_IFS
5664
5665  ;;
5666esac
5667fi
5668CHMOD=$ac_cv_path_CHMOD
5669if test -n "$CHMOD"; then
5670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5671$as_echo "$CHMOD" >&6; }
5672else
5673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5674$as_echo "no" >&6; }
5675fi
5676
5677
5678          if test "x$CHMOD" = x; then
5679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5680          fi
5681        else
5682          # Otherwise we believe it is a complete path. Use it as it is.
5683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5684$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5686$as_echo_n "checking for CHMOD... " >&6; }
5687          if test ! -x "$tool_specified"; then
5688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5689$as_echo "not found" >&6; }
5690            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5691          fi
5692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5693$as_echo "$tool_specified" >&6; }
5694        fi
5695      fi
5696    fi
5697
5698  fi
5699
5700
5701
5702  if test "x$CHMOD" = x; then
5703    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5704  fi
5705
5706
5707
5708
5709
5710  # Publish this variable in the help.
5711
5712
5713  if [ -z "${CMP+x}" ]; then
5714    # The variable is not set by user, try to locate tool using the code snippet
5715    for ac_prog in cmp
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_CMP+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $CMP in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747CMP=$ac_cv_path_CMP
5748if test -n "$CMP"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5750$as_echo "$CMP" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$CMP" && break
5758done
5759
5760  else
5761    # The variable is set, but is it from the command line or the environment?
5762
5763    # Try to remove the string !CMP! from our list.
5764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5766      # If it failed, the variable was not from the command line. Ignore it,
5767      # but warn the user (except for BASH, which is always set by the calling BASH).
5768      if test "xCMP" != xBASH; then
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5770$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5771      fi
5772      # Try to locate tool using the code snippet
5773      for ac_prog in cmp
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if ${ac_cv_path_CMP+:} false; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  case $CMP in
5783  [\\/]* | ?:[\\/]*)
5784  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5785  ;;
5786  *)
5787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5794    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802  ;;
5803esac
5804fi
5805CMP=$ac_cv_path_CMP
5806if test -n "$CMP"; then
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5808$as_echo "$CMP" >&6; }
5809else
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811$as_echo "no" >&6; }
5812fi
5813
5814
5815  test -n "$CMP" && break
5816done
5817
5818    else
5819      # If it succeeded, then it was overridden by the user. We will use it
5820      # for the tool.
5821
5822      # First remove it from the list of overridden variables, so we can test
5823      # for unknown variables in the end.
5824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5825
5826      # Check if we try to supply an empty value
5827      if test "x$CMP" = x; then
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5829$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5831$as_echo_n "checking for CMP... " >&6; }
5832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5833$as_echo "disabled" >&6; }
5834      else
5835        # Check if the provided tool contains a complete path.
5836        tool_specified="$CMP"
5837        tool_basename="${tool_specified##*/}"
5838        if test "x$tool_basename" = "x$tool_specified"; then
5839          # A command without a complete path is provided, search $PATH.
5840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5841$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5842          # Extract the first word of "$tool_basename", so it can be a program name with args.
5843set dummy $tool_basename; ac_word=$2
5844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5845$as_echo_n "checking for $ac_word... " >&6; }
5846if ${ac_cv_path_CMP+:} false; then :
5847  $as_echo_n "(cached) " >&6
5848else
5849  case $CMP in
5850  [\\/]* | ?:[\\/]*)
5851  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5852  ;;
5853  *)
5854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857  IFS=$as_save_IFS
5858  test -z "$as_dir" && as_dir=.
5859    for ac_exec_ext in '' $ac_executable_extensions; do
5860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5861    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863    break 2
5864  fi
5865done
5866  done
5867IFS=$as_save_IFS
5868
5869  ;;
5870esac
5871fi
5872CMP=$ac_cv_path_CMP
5873if test -n "$CMP"; then
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5875$as_echo "$CMP" >&6; }
5876else
5877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5878$as_echo "no" >&6; }
5879fi
5880
5881
5882          if test "x$CMP" = x; then
5883            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5884          fi
5885        else
5886          # Otherwise we believe it is a complete path. Use it as it is.
5887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5888$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5889          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5890$as_echo_n "checking for CMP... " >&6; }
5891          if test ! -x "$tool_specified"; then
5892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5893$as_echo "not found" >&6; }
5894            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5895          fi
5896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5897$as_echo "$tool_specified" >&6; }
5898        fi
5899      fi
5900    fi
5901
5902  fi
5903
5904
5905
5906  if test "x$CMP" = x; then
5907    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5908  fi
5909
5910
5911
5912
5913
5914  # Publish this variable in the help.
5915
5916
5917  if [ -z "${COMM+x}" ]; then
5918    # The variable is not set by user, try to locate tool using the code snippet
5919    for ac_prog in comm
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_COMM+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $COMM in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951COMM=$ac_cv_path_COMM
5952if test -n "$COMM"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5954$as_echo "$COMM" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$COMM" && break
5962done
5963
5964  else
5965    # The variable is set, but is it from the command line or the environment?
5966
5967    # Try to remove the string !COMM! from our list.
5968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5970      # If it failed, the variable was not from the command line. Ignore it,
5971      # but warn the user (except for BASH, which is always set by the calling BASH).
5972      if test "xCOMM" != xBASH; then
5973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5974$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5975      fi
5976      # Try to locate tool using the code snippet
5977      for ac_prog in comm
5978do
5979  # Extract the first word of "$ac_prog", so it can be a program name with args.
5980set dummy $ac_prog; ac_word=$2
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5982$as_echo_n "checking for $ac_word... " >&6; }
5983if ${ac_cv_path_COMM+:} false; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  case $COMM in
5987  [\\/]* | ?:[\\/]*)
5988  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5989  ;;
5990  *)
5991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994  IFS=$as_save_IFS
5995  test -z "$as_dir" && as_dir=.
5996    for ac_exec_ext in '' $ac_executable_extensions; do
5997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000    break 2
6001  fi
6002done
6003  done
6004IFS=$as_save_IFS
6005
6006  ;;
6007esac
6008fi
6009COMM=$ac_cv_path_COMM
6010if test -n "$COMM"; then
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6012$as_echo "$COMM" >&6; }
6013else
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019  test -n "$COMM" && break
6020done
6021
6022    else
6023      # If it succeeded, then it was overridden by the user. We will use it
6024      # for the tool.
6025
6026      # First remove it from the list of overridden variables, so we can test
6027      # for unknown variables in the end.
6028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6029
6030      # Check if we try to supply an empty value
6031      if test "x$COMM" = x; then
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6033$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6035$as_echo_n "checking for COMM... " >&6; }
6036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6037$as_echo "disabled" >&6; }
6038      else
6039        # Check if the provided tool contains a complete path.
6040        tool_specified="$COMM"
6041        tool_basename="${tool_specified##*/}"
6042        if test "x$tool_basename" = "x$tool_specified"; then
6043          # A command without a complete path is provided, search $PATH.
6044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6045$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6046          # Extract the first word of "$tool_basename", so it can be a program name with args.
6047set dummy $tool_basename; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_path_COMM+:} false; then :
6051  $as_echo_n "(cached) " >&6
6052else
6053  case $COMM in
6054  [\\/]* | ?:[\\/]*)
6055  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6056  ;;
6057  *)
6058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059for as_dir in $PATH
6060do
6061  IFS=$as_save_IFS
6062  test -z "$as_dir" && as_dir=.
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6065    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067    break 2
6068  fi
6069done
6070  done
6071IFS=$as_save_IFS
6072
6073  ;;
6074esac
6075fi
6076COMM=$ac_cv_path_COMM
6077if test -n "$COMM"; then
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6079$as_echo "$COMM" >&6; }
6080else
6081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086          if test "x$COMM" = x; then
6087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6088          fi
6089        else
6090          # Otherwise we believe it is a complete path. Use it as it is.
6091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6092$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6094$as_echo_n "checking for COMM... " >&6; }
6095          if test ! -x "$tool_specified"; then
6096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6097$as_echo "not found" >&6; }
6098            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6099          fi
6100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6101$as_echo "$tool_specified" >&6; }
6102        fi
6103      fi
6104    fi
6105
6106  fi
6107
6108
6109
6110  if test "x$COMM" = x; then
6111    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6112  fi
6113
6114
6115
6116
6117
6118  # Publish this variable in the help.
6119
6120
6121  if [ -z "${CP+x}" ]; then
6122    # The variable is not set by user, try to locate tool using the code snippet
6123    for ac_prog in cp
6124do
6125  # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_CP+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $CP in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155CP=$ac_cv_path_CP
6156if test -n "$CP"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6158$as_echo "$CP" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165  test -n "$CP" && break
6166done
6167
6168  else
6169    # The variable is set, but is it from the command line or the environment?
6170
6171    # Try to remove the string !CP! from our list.
6172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6174      # If it failed, the variable was not from the command line. Ignore it,
6175      # but warn the user (except for BASH, which is always set by the calling BASH).
6176      if test "xCP" != xBASH; then
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6178$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6179      fi
6180      # Try to locate tool using the code snippet
6181      for ac_prog in cp
6182do
6183  # Extract the first word of "$ac_prog", so it can be a program name with args.
6184set dummy $ac_prog; ac_word=$2
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6186$as_echo_n "checking for $ac_word... " >&6; }
6187if ${ac_cv_path_CP+:} false; then :
6188  $as_echo_n "(cached) " >&6
6189else
6190  case $CP in
6191  [\\/]* | ?:[\\/]*)
6192  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6193  ;;
6194  *)
6195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196for as_dir in $PATH
6197do
6198  IFS=$as_save_IFS
6199  test -z "$as_dir" && as_dir=.
6200    for ac_exec_ext in '' $ac_executable_extensions; do
6201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6202    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6204    break 2
6205  fi
6206done
6207  done
6208IFS=$as_save_IFS
6209
6210  ;;
6211esac
6212fi
6213CP=$ac_cv_path_CP
6214if test -n "$CP"; then
6215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6216$as_echo "$CP" >&6; }
6217else
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6219$as_echo "no" >&6; }
6220fi
6221
6222
6223  test -n "$CP" && break
6224done
6225
6226    else
6227      # If it succeeded, then it was overridden by the user. We will use it
6228      # for the tool.
6229
6230      # First remove it from the list of overridden variables, so we can test
6231      # for unknown variables in the end.
6232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6233
6234      # Check if we try to supply an empty value
6235      if test "x$CP" = x; then
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6237$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6239$as_echo_n "checking for CP... " >&6; }
6240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6241$as_echo "disabled" >&6; }
6242      else
6243        # Check if the provided tool contains a complete path.
6244        tool_specified="$CP"
6245        tool_basename="${tool_specified##*/}"
6246        if test "x$tool_basename" = "x$tool_specified"; then
6247          # A command without a complete path is provided, search $PATH.
6248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6249$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6250          # Extract the first word of "$tool_basename", so it can be a program name with args.
6251set dummy $tool_basename; ac_word=$2
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6253$as_echo_n "checking for $ac_word... " >&6; }
6254if ${ac_cv_path_CP+:} false; then :
6255  $as_echo_n "(cached) " >&6
6256else
6257  case $CP in
6258  [\\/]* | ?:[\\/]*)
6259  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6260  ;;
6261  *)
6262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6263for as_dir in $PATH
6264do
6265  IFS=$as_save_IFS
6266  test -z "$as_dir" && as_dir=.
6267    for ac_exec_ext in '' $ac_executable_extensions; do
6268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6269    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6271    break 2
6272  fi
6273done
6274  done
6275IFS=$as_save_IFS
6276
6277  ;;
6278esac
6279fi
6280CP=$ac_cv_path_CP
6281if test -n "$CP"; then
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6283$as_echo "$CP" >&6; }
6284else
6285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6286$as_echo "no" >&6; }
6287fi
6288
6289
6290          if test "x$CP" = x; then
6291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6292          fi
6293        else
6294          # Otherwise we believe it is a complete path. Use it as it is.
6295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6296$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6298$as_echo_n "checking for CP... " >&6; }
6299          if test ! -x "$tool_specified"; then
6300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6301$as_echo "not found" >&6; }
6302            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6303          fi
6304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6305$as_echo "$tool_specified" >&6; }
6306        fi
6307      fi
6308    fi
6309
6310  fi
6311
6312
6313
6314  if test "x$CP" = x; then
6315    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6316  fi
6317
6318
6319
6320
6321
6322  # Publish this variable in the help.
6323
6324
6325  if [ -z "${CUT+x}" ]; then
6326    # The variable is not set by user, try to locate tool using the code snippet
6327    for ac_prog in cut
6328do
6329  # Extract the first word of "$ac_prog", so it can be a program name with args.
6330set dummy $ac_prog; ac_word=$2
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332$as_echo_n "checking for $ac_word... " >&6; }
6333if ${ac_cv_path_CUT+:} false; then :
6334  $as_echo_n "(cached) " >&6
6335else
6336  case $CUT in
6337  [\\/]* | ?:[\\/]*)
6338  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6339  ;;
6340  *)
6341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6342for as_dir in $PATH
6343do
6344  IFS=$as_save_IFS
6345  test -z "$as_dir" && as_dir=.
6346    for ac_exec_ext in '' $ac_executable_extensions; do
6347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6348    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6350    break 2
6351  fi
6352done
6353  done
6354IFS=$as_save_IFS
6355
6356  ;;
6357esac
6358fi
6359CUT=$ac_cv_path_CUT
6360if test -n "$CUT"; then
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6362$as_echo "$CUT" >&6; }
6363else
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; }
6366fi
6367
6368
6369  test -n "$CUT" && break
6370done
6371
6372  else
6373    # The variable is set, but is it from the command line or the environment?
6374
6375    # Try to remove the string !CUT! from our list.
6376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6378      # If it failed, the variable was not from the command line. Ignore it,
6379      # but warn the user (except for BASH, which is always set by the calling BASH).
6380      if test "xCUT" != xBASH; then
6381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6382$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6383      fi
6384      # Try to locate tool using the code snippet
6385      for ac_prog in cut
6386do
6387  # Extract the first word of "$ac_prog", so it can be a program name with args.
6388set dummy $ac_prog; ac_word=$2
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390$as_echo_n "checking for $ac_word... " >&6; }
6391if ${ac_cv_path_CUT+:} false; then :
6392  $as_echo_n "(cached) " >&6
6393else
6394  case $CUT in
6395  [\\/]* | ?:[\\/]*)
6396  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6397  ;;
6398  *)
6399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400for as_dir in $PATH
6401do
6402  IFS=$as_save_IFS
6403  test -z "$as_dir" && as_dir=.
6404    for ac_exec_ext in '' $ac_executable_extensions; do
6405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6406    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408    break 2
6409  fi
6410done
6411  done
6412IFS=$as_save_IFS
6413
6414  ;;
6415esac
6416fi
6417CUT=$ac_cv_path_CUT
6418if test -n "$CUT"; then
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6420$as_echo "$CUT" >&6; }
6421else
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426
6427  test -n "$CUT" && break
6428done
6429
6430    else
6431      # If it succeeded, then it was overridden by the user. We will use it
6432      # for the tool.
6433
6434      # First remove it from the list of overridden variables, so we can test
6435      # for unknown variables in the end.
6436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6437
6438      # Check if we try to supply an empty value
6439      if test "x$CUT" = x; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6441$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6443$as_echo_n "checking for CUT... " >&6; }
6444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6445$as_echo "disabled" >&6; }
6446      else
6447        # Check if the provided tool contains a complete path.
6448        tool_specified="$CUT"
6449        tool_basename="${tool_specified##*/}"
6450        if test "x$tool_basename" = "x$tool_specified"; then
6451          # A command without a complete path is provided, search $PATH.
6452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6453$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6454          # Extract the first word of "$tool_basename", so it can be a program name with args.
6455set dummy $tool_basename; ac_word=$2
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6457$as_echo_n "checking for $ac_word... " >&6; }
6458if ${ac_cv_path_CUT+:} false; then :
6459  $as_echo_n "(cached) " >&6
6460else
6461  case $CUT in
6462  [\\/]* | ?:[\\/]*)
6463  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6464  ;;
6465  *)
6466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6467for as_dir in $PATH
6468do
6469  IFS=$as_save_IFS
6470  test -z "$as_dir" && as_dir=.
6471    for ac_exec_ext in '' $ac_executable_extensions; do
6472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6473    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6475    break 2
6476  fi
6477done
6478  done
6479IFS=$as_save_IFS
6480
6481  ;;
6482esac
6483fi
6484CUT=$ac_cv_path_CUT
6485if test -n "$CUT"; then
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6487$as_echo "$CUT" >&6; }
6488else
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
6491fi
6492
6493
6494          if test "x$CUT" = x; then
6495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6496          fi
6497        else
6498          # Otherwise we believe it is a complete path. Use it as it is.
6499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6500$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6502$as_echo_n "checking for CUT... " >&6; }
6503          if test ! -x "$tool_specified"; then
6504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6505$as_echo "not found" >&6; }
6506            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6507          fi
6508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6509$as_echo "$tool_specified" >&6; }
6510        fi
6511      fi
6512    fi
6513
6514  fi
6515
6516
6517
6518  if test "x$CUT" = x; then
6519    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6520  fi
6521
6522
6523
6524
6525
6526  # Publish this variable in the help.
6527
6528
6529  if [ -z "${DATE+x}" ]; then
6530    # The variable is not set by user, try to locate tool using the code snippet
6531    for ac_prog in date
6532do
6533  # Extract the first word of "$ac_prog", so it can be a program name with args.
6534set dummy $ac_prog; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_DATE+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $DATE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563DATE=$ac_cv_path_DATE
6564if test -n "$DATE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6566$as_echo "$DATE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573  test -n "$DATE" && break
6574done
6575
6576  else
6577    # The variable is set, but is it from the command line or the environment?
6578
6579    # Try to remove the string !DATE! from our list.
6580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6582      # If it failed, the variable was not from the command line. Ignore it,
6583      # but warn the user (except for BASH, which is always set by the calling BASH).
6584      if test "xDATE" != xBASH; then
6585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6586$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6587      fi
6588      # Try to locate tool using the code snippet
6589      for ac_prog in date
6590do
6591  # Extract the first word of "$ac_prog", so it can be a program name with args.
6592set dummy $ac_prog; ac_word=$2
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6594$as_echo_n "checking for $ac_word... " >&6; }
6595if ${ac_cv_path_DATE+:} false; then :
6596  $as_echo_n "(cached) " >&6
6597else
6598  case $DATE in
6599  [\\/]* | ?:[\\/]*)
6600  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6601  ;;
6602  *)
6603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604for as_dir in $PATH
6605do
6606  IFS=$as_save_IFS
6607  test -z "$as_dir" && as_dir=.
6608    for ac_exec_ext in '' $ac_executable_extensions; do
6609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6610    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6612    break 2
6613  fi
6614done
6615  done
6616IFS=$as_save_IFS
6617
6618  ;;
6619esac
6620fi
6621DATE=$ac_cv_path_DATE
6622if test -n "$DATE"; then
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6624$as_echo "$DATE" >&6; }
6625else
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627$as_echo "no" >&6; }
6628fi
6629
6630
6631  test -n "$DATE" && break
6632done
6633
6634    else
6635      # If it succeeded, then it was overridden by the user. We will use it
6636      # for the tool.
6637
6638      # First remove it from the list of overridden variables, so we can test
6639      # for unknown variables in the end.
6640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6641
6642      # Check if we try to supply an empty value
6643      if test "x$DATE" = x; then
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6645$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6647$as_echo_n "checking for DATE... " >&6; }
6648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6649$as_echo "disabled" >&6; }
6650      else
6651        # Check if the provided tool contains a complete path.
6652        tool_specified="$DATE"
6653        tool_basename="${tool_specified##*/}"
6654        if test "x$tool_basename" = "x$tool_specified"; then
6655          # A command without a complete path is provided, search $PATH.
6656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6657$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6658          # Extract the first word of "$tool_basename", so it can be a program name with args.
6659set dummy $tool_basename; ac_word=$2
6660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6661$as_echo_n "checking for $ac_word... " >&6; }
6662if ${ac_cv_path_DATE+:} false; then :
6663  $as_echo_n "(cached) " >&6
6664else
6665  case $DATE in
6666  [\\/]* | ?:[\\/]*)
6667  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6668  ;;
6669  *)
6670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6671for as_dir in $PATH
6672do
6673  IFS=$as_save_IFS
6674  test -z "$as_dir" && as_dir=.
6675    for ac_exec_ext in '' $ac_executable_extensions; do
6676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6677    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6679    break 2
6680  fi
6681done
6682  done
6683IFS=$as_save_IFS
6684
6685  ;;
6686esac
6687fi
6688DATE=$ac_cv_path_DATE
6689if test -n "$DATE"; then
6690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6691$as_echo "$DATE" >&6; }
6692else
6693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6694$as_echo "no" >&6; }
6695fi
6696
6697
6698          if test "x$DATE" = x; then
6699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6700          fi
6701        else
6702          # Otherwise we believe it is a complete path. Use it as it is.
6703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6704$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6706$as_echo_n "checking for DATE... " >&6; }
6707          if test ! -x "$tool_specified"; then
6708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6709$as_echo "not found" >&6; }
6710            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6711          fi
6712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6713$as_echo "$tool_specified" >&6; }
6714        fi
6715      fi
6716    fi
6717
6718  fi
6719
6720
6721
6722  if test "x$DATE" = x; then
6723    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6724  fi
6725
6726
6727
6728
6729
6730  # Publish this variable in the help.
6731
6732
6733  if [ -z "${DIFF+x}" ]; then
6734    # The variable is not set by user, try to locate tool using the code snippet
6735    for ac_prog in gdiff diff
6736do
6737  # Extract the first word of "$ac_prog", so it can be a program name with args.
6738set dummy $ac_prog; ac_word=$2
6739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740$as_echo_n "checking for $ac_word... " >&6; }
6741if ${ac_cv_path_DIFF+:} false; then :
6742  $as_echo_n "(cached) " >&6
6743else
6744  case $DIFF in
6745  [\\/]* | ?:[\\/]*)
6746  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6747  ;;
6748  *)
6749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752  IFS=$as_save_IFS
6753  test -z "$as_dir" && as_dir=.
6754    for ac_exec_ext in '' $ac_executable_extensions; do
6755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758    break 2
6759  fi
6760done
6761  done
6762IFS=$as_save_IFS
6763
6764  ;;
6765esac
6766fi
6767DIFF=$ac_cv_path_DIFF
6768if test -n "$DIFF"; then
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6770$as_echo "$DIFF" >&6; }
6771else
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6773$as_echo "no" >&6; }
6774fi
6775
6776
6777  test -n "$DIFF" && break
6778done
6779
6780  else
6781    # The variable is set, but is it from the command line or the environment?
6782
6783    # Try to remove the string !DIFF! from our list.
6784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6786      # If it failed, the variable was not from the command line. Ignore it,
6787      # but warn the user (except for BASH, which is always set by the calling BASH).
6788      if test "xDIFF" != xBASH; then
6789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6790$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6791      fi
6792      # Try to locate tool using the code snippet
6793      for ac_prog in gdiff diff
6794do
6795  # Extract the first word of "$ac_prog", so it can be a program name with args.
6796set dummy $ac_prog; ac_word=$2
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6798$as_echo_n "checking for $ac_word... " >&6; }
6799if ${ac_cv_path_DIFF+:} false; then :
6800  $as_echo_n "(cached) " >&6
6801else
6802  case $DIFF in
6803  [\\/]* | ?:[\\/]*)
6804  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6805  ;;
6806  *)
6807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6808for as_dir in $PATH
6809do
6810  IFS=$as_save_IFS
6811  test -z "$as_dir" && as_dir=.
6812    for ac_exec_ext in '' $ac_executable_extensions; do
6813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6814    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6816    break 2
6817  fi
6818done
6819  done
6820IFS=$as_save_IFS
6821
6822  ;;
6823esac
6824fi
6825DIFF=$ac_cv_path_DIFF
6826if test -n "$DIFF"; then
6827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6828$as_echo "$DIFF" >&6; }
6829else
6830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6831$as_echo "no" >&6; }
6832fi
6833
6834
6835  test -n "$DIFF" && break
6836done
6837
6838    else
6839      # If it succeeded, then it was overridden by the user. We will use it
6840      # for the tool.
6841
6842      # First remove it from the list of overridden variables, so we can test
6843      # for unknown variables in the end.
6844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6845
6846      # Check if we try to supply an empty value
6847      if test "x$DIFF" = x; then
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6849$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6851$as_echo_n "checking for DIFF... " >&6; }
6852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6853$as_echo "disabled" >&6; }
6854      else
6855        # Check if the provided tool contains a complete path.
6856        tool_specified="$DIFF"
6857        tool_basename="${tool_specified##*/}"
6858        if test "x$tool_basename" = "x$tool_specified"; then
6859          # A command without a complete path is provided, search $PATH.
6860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6861$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6862          # Extract the first word of "$tool_basename", so it can be a program name with args.
6863set dummy $tool_basename; ac_word=$2
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6865$as_echo_n "checking for $ac_word... " >&6; }
6866if ${ac_cv_path_DIFF+:} false; then :
6867  $as_echo_n "(cached) " >&6
6868else
6869  case $DIFF in
6870  [\\/]* | ?:[\\/]*)
6871  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6872  ;;
6873  *)
6874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6875for as_dir in $PATH
6876do
6877  IFS=$as_save_IFS
6878  test -z "$as_dir" && as_dir=.
6879    for ac_exec_ext in '' $ac_executable_extensions; do
6880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6881    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883    break 2
6884  fi
6885done
6886  done
6887IFS=$as_save_IFS
6888
6889  ;;
6890esac
6891fi
6892DIFF=$ac_cv_path_DIFF
6893if test -n "$DIFF"; then
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6895$as_echo "$DIFF" >&6; }
6896else
6897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6898$as_echo "no" >&6; }
6899fi
6900
6901
6902          if test "x$DIFF" = x; then
6903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6904          fi
6905        else
6906          # Otherwise we believe it is a complete path. Use it as it is.
6907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6908$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6910$as_echo_n "checking for DIFF... " >&6; }
6911          if test ! -x "$tool_specified"; then
6912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6913$as_echo "not found" >&6; }
6914            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6915          fi
6916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6917$as_echo "$tool_specified" >&6; }
6918        fi
6919      fi
6920    fi
6921
6922  fi
6923
6924
6925
6926  if test "x$DIFF" = x; then
6927    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6928  fi
6929
6930
6931
6932
6933
6934  # Publish this variable in the help.
6935
6936
6937  if [ -z "${DIRNAME+x}" ]; then
6938    # The variable is not set by user, try to locate tool using the code snippet
6939    for ac_prog in dirname
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_DIRNAME+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $DIRNAME in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971DIRNAME=$ac_cv_path_DIRNAME
6972if test -n "$DIRNAME"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6974$as_echo "$DIRNAME" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$DIRNAME" && break
6982done
6983
6984  else
6985    # The variable is set, but is it from the command line or the environment?
6986
6987    # Try to remove the string !DIRNAME! from our list.
6988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6990      # If it failed, the variable was not from the command line. Ignore it,
6991      # but warn the user (except for BASH, which is always set by the calling BASH).
6992      if test "xDIRNAME" != xBASH; then
6993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6994$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6995      fi
6996      # Try to locate tool using the code snippet
6997      for ac_prog in dirname
6998do
6999  # Extract the first word of "$ac_prog", so it can be a program name with args.
7000set dummy $ac_prog; ac_word=$2
7001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7002$as_echo_n "checking for $ac_word... " >&6; }
7003if ${ac_cv_path_DIRNAME+:} false; then :
7004  $as_echo_n "(cached) " >&6
7005else
7006  case $DIRNAME in
7007  [\\/]* | ?:[\\/]*)
7008  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7009  ;;
7010  *)
7011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7012for as_dir in $PATH
7013do
7014  IFS=$as_save_IFS
7015  test -z "$as_dir" && as_dir=.
7016    for ac_exec_ext in '' $ac_executable_extensions; do
7017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7018    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7020    break 2
7021  fi
7022done
7023  done
7024IFS=$as_save_IFS
7025
7026  ;;
7027esac
7028fi
7029DIRNAME=$ac_cv_path_DIRNAME
7030if test -n "$DIRNAME"; then
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7032$as_echo "$DIRNAME" >&6; }
7033else
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035$as_echo "no" >&6; }
7036fi
7037
7038
7039  test -n "$DIRNAME" && break
7040done
7041
7042    else
7043      # If it succeeded, then it was overridden by the user. We will use it
7044      # for the tool.
7045
7046      # First remove it from the list of overridden variables, so we can test
7047      # for unknown variables in the end.
7048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7049
7050      # Check if we try to supply an empty value
7051      if test "x$DIRNAME" = x; then
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7053$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7055$as_echo_n "checking for DIRNAME... " >&6; }
7056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7057$as_echo "disabled" >&6; }
7058      else
7059        # Check if the provided tool contains a complete path.
7060        tool_specified="$DIRNAME"
7061        tool_basename="${tool_specified##*/}"
7062        if test "x$tool_basename" = "x$tool_specified"; then
7063          # A command without a complete path is provided, search $PATH.
7064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7065$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7066          # Extract the first word of "$tool_basename", so it can be a program name with args.
7067set dummy $tool_basename; ac_word=$2
7068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7069$as_echo_n "checking for $ac_word... " >&6; }
7070if ${ac_cv_path_DIRNAME+:} false; then :
7071  $as_echo_n "(cached) " >&6
7072else
7073  case $DIRNAME in
7074  [\\/]* | ?:[\\/]*)
7075  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7076  ;;
7077  *)
7078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7079for as_dir in $PATH
7080do
7081  IFS=$as_save_IFS
7082  test -z "$as_dir" && as_dir=.
7083    for ac_exec_ext in '' $ac_executable_extensions; do
7084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7085    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7087    break 2
7088  fi
7089done
7090  done
7091IFS=$as_save_IFS
7092
7093  ;;
7094esac
7095fi
7096DIRNAME=$ac_cv_path_DIRNAME
7097if test -n "$DIRNAME"; then
7098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7099$as_echo "$DIRNAME" >&6; }
7100else
7101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7102$as_echo "no" >&6; }
7103fi
7104
7105
7106          if test "x$DIRNAME" = x; then
7107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7108          fi
7109        else
7110          # Otherwise we believe it is a complete path. Use it as it is.
7111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7112$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7114$as_echo_n "checking for DIRNAME... " >&6; }
7115          if test ! -x "$tool_specified"; then
7116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7117$as_echo "not found" >&6; }
7118            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7119          fi
7120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7121$as_echo "$tool_specified" >&6; }
7122        fi
7123      fi
7124    fi
7125
7126  fi
7127
7128
7129
7130  if test "x$DIRNAME" = x; then
7131    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7132  fi
7133
7134
7135
7136
7137
7138  # Publish this variable in the help.
7139
7140
7141  if [ -z "${ECHO+x}" ]; then
7142    # The variable is not set by user, try to locate tool using the code snippet
7143    for ac_prog in echo
7144do
7145  # Extract the first word of "$ac_prog", so it can be a program name with args.
7146set dummy $ac_prog; ac_word=$2
7147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7148$as_echo_n "checking for $ac_word... " >&6; }
7149if ${ac_cv_path_ECHO+:} false; then :
7150  $as_echo_n "(cached) " >&6
7151else
7152  case $ECHO in
7153  [\\/]* | ?:[\\/]*)
7154  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7155  ;;
7156  *)
7157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7158for as_dir in $PATH
7159do
7160  IFS=$as_save_IFS
7161  test -z "$as_dir" && as_dir=.
7162    for ac_exec_ext in '' $ac_executable_extensions; do
7163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7164    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7166    break 2
7167  fi
7168done
7169  done
7170IFS=$as_save_IFS
7171
7172  ;;
7173esac
7174fi
7175ECHO=$ac_cv_path_ECHO
7176if test -n "$ECHO"; then
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7178$as_echo "$ECHO" >&6; }
7179else
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181$as_echo "no" >&6; }
7182fi
7183
7184
7185  test -n "$ECHO" && break
7186done
7187
7188  else
7189    # The variable is set, but is it from the command line or the environment?
7190
7191    # Try to remove the string !ECHO! from our list.
7192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7194      # If it failed, the variable was not from the command line. Ignore it,
7195      # but warn the user (except for BASH, which is always set by the calling BASH).
7196      if test "xECHO" != xBASH; then
7197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7198$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7199      fi
7200      # Try to locate tool using the code snippet
7201      for ac_prog in echo
7202do
7203  # Extract the first word of "$ac_prog", so it can be a program name with args.
7204set dummy $ac_prog; ac_word=$2
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7206$as_echo_n "checking for $ac_word... " >&6; }
7207if ${ac_cv_path_ECHO+:} false; then :
7208  $as_echo_n "(cached) " >&6
7209else
7210  case $ECHO in
7211  [\\/]* | ?:[\\/]*)
7212  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7213  ;;
7214  *)
7215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7216for as_dir in $PATH
7217do
7218  IFS=$as_save_IFS
7219  test -z "$as_dir" && as_dir=.
7220    for ac_exec_ext in '' $ac_executable_extensions; do
7221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7222    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7224    break 2
7225  fi
7226done
7227  done
7228IFS=$as_save_IFS
7229
7230  ;;
7231esac
7232fi
7233ECHO=$ac_cv_path_ECHO
7234if test -n "$ECHO"; then
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7236$as_echo "$ECHO" >&6; }
7237else
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
7240fi
7241
7242
7243  test -n "$ECHO" && break
7244done
7245
7246    else
7247      # If it succeeded, then it was overridden by the user. We will use it
7248      # for the tool.
7249
7250      # First remove it from the list of overridden variables, so we can test
7251      # for unknown variables in the end.
7252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7253
7254      # Check if we try to supply an empty value
7255      if test "x$ECHO" = x; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7257$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7259$as_echo_n "checking for ECHO... " >&6; }
7260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7261$as_echo "disabled" >&6; }
7262      else
7263        # Check if the provided tool contains a complete path.
7264        tool_specified="$ECHO"
7265        tool_basename="${tool_specified##*/}"
7266        if test "x$tool_basename" = "x$tool_specified"; then
7267          # A command without a complete path is provided, search $PATH.
7268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7269$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7270          # Extract the first word of "$tool_basename", so it can be a program name with args.
7271set dummy $tool_basename; ac_word=$2
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7273$as_echo_n "checking for $ac_word... " >&6; }
7274if ${ac_cv_path_ECHO+:} false; then :
7275  $as_echo_n "(cached) " >&6
7276else
7277  case $ECHO in
7278  [\\/]* | ?:[\\/]*)
7279  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7280  ;;
7281  *)
7282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7283for as_dir in $PATH
7284do
7285  IFS=$as_save_IFS
7286  test -z "$as_dir" && as_dir=.
7287    for ac_exec_ext in '' $ac_executable_extensions; do
7288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7289    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7291    break 2
7292  fi
7293done
7294  done
7295IFS=$as_save_IFS
7296
7297  ;;
7298esac
7299fi
7300ECHO=$ac_cv_path_ECHO
7301if test -n "$ECHO"; then
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7303$as_echo "$ECHO" >&6; }
7304else
7305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
7307fi
7308
7309
7310          if test "x$ECHO" = x; then
7311            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7312          fi
7313        else
7314          # Otherwise we believe it is a complete path. Use it as it is.
7315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7316$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7317          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7318$as_echo_n "checking for ECHO... " >&6; }
7319          if test ! -x "$tool_specified"; then
7320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7321$as_echo "not found" >&6; }
7322            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7323          fi
7324          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7325$as_echo "$tool_specified" >&6; }
7326        fi
7327      fi
7328    fi
7329
7330  fi
7331
7332
7333
7334  if test "x$ECHO" = x; then
7335    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7336  fi
7337
7338
7339
7340
7341
7342  # Publish this variable in the help.
7343
7344
7345  if [ -z "${EXPR+x}" ]; then
7346    # The variable is not set by user, try to locate tool using the code snippet
7347    for ac_prog in expr
7348do
7349  # Extract the first word of "$ac_prog", so it can be a program name with args.
7350set dummy $ac_prog; ac_word=$2
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7352$as_echo_n "checking for $ac_word... " >&6; }
7353if ${ac_cv_path_EXPR+:} false; then :
7354  $as_echo_n "(cached) " >&6
7355else
7356  case $EXPR in
7357  [\\/]* | ?:[\\/]*)
7358  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7359  ;;
7360  *)
7361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7362for as_dir in $PATH
7363do
7364  IFS=$as_save_IFS
7365  test -z "$as_dir" && as_dir=.
7366    for ac_exec_ext in '' $ac_executable_extensions; do
7367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7368    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7370    break 2
7371  fi
7372done
7373  done
7374IFS=$as_save_IFS
7375
7376  ;;
7377esac
7378fi
7379EXPR=$ac_cv_path_EXPR
7380if test -n "$EXPR"; then
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7382$as_echo "$EXPR" >&6; }
7383else
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
7386fi
7387
7388
7389  test -n "$EXPR" && break
7390done
7391
7392  else
7393    # The variable is set, but is it from the command line or the environment?
7394
7395    # Try to remove the string !EXPR! from our list.
7396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7398      # If it failed, the variable was not from the command line. Ignore it,
7399      # but warn the user (except for BASH, which is always set by the calling BASH).
7400      if test "xEXPR" != xBASH; then
7401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7402$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7403      fi
7404      # Try to locate tool using the code snippet
7405      for ac_prog in expr
7406do
7407  # Extract the first word of "$ac_prog", so it can be a program name with args.
7408set dummy $ac_prog; ac_word=$2
7409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7410$as_echo_n "checking for $ac_word... " >&6; }
7411if ${ac_cv_path_EXPR+:} false; then :
7412  $as_echo_n "(cached) " >&6
7413else
7414  case $EXPR in
7415  [\\/]* | ?:[\\/]*)
7416  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7417  ;;
7418  *)
7419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7420for as_dir in $PATH
7421do
7422  IFS=$as_save_IFS
7423  test -z "$as_dir" && as_dir=.
7424    for ac_exec_ext in '' $ac_executable_extensions; do
7425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7426    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7428    break 2
7429  fi
7430done
7431  done
7432IFS=$as_save_IFS
7433
7434  ;;
7435esac
7436fi
7437EXPR=$ac_cv_path_EXPR
7438if test -n "$EXPR"; then
7439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7440$as_echo "$EXPR" >&6; }
7441else
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7443$as_echo "no" >&6; }
7444fi
7445
7446
7447  test -n "$EXPR" && break
7448done
7449
7450    else
7451      # If it succeeded, then it was overridden by the user. We will use it
7452      # for the tool.
7453
7454      # First remove it from the list of overridden variables, so we can test
7455      # for unknown variables in the end.
7456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7457
7458      # Check if we try to supply an empty value
7459      if test "x$EXPR" = x; then
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7461$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7463$as_echo_n "checking for EXPR... " >&6; }
7464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7465$as_echo "disabled" >&6; }
7466      else
7467        # Check if the provided tool contains a complete path.
7468        tool_specified="$EXPR"
7469        tool_basename="${tool_specified##*/}"
7470        if test "x$tool_basename" = "x$tool_specified"; then
7471          # A command without a complete path is provided, search $PATH.
7472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7473$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7474          # Extract the first word of "$tool_basename", so it can be a program name with args.
7475set dummy $tool_basename; ac_word=$2
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7477$as_echo_n "checking for $ac_word... " >&6; }
7478if ${ac_cv_path_EXPR+:} false; then :
7479  $as_echo_n "(cached) " >&6
7480else
7481  case $EXPR in
7482  [\\/]* | ?:[\\/]*)
7483  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7484  ;;
7485  *)
7486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7487for as_dir in $PATH
7488do
7489  IFS=$as_save_IFS
7490  test -z "$as_dir" && as_dir=.
7491    for ac_exec_ext in '' $ac_executable_extensions; do
7492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7493    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7495    break 2
7496  fi
7497done
7498  done
7499IFS=$as_save_IFS
7500
7501  ;;
7502esac
7503fi
7504EXPR=$ac_cv_path_EXPR
7505if test -n "$EXPR"; then
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7507$as_echo "$EXPR" >&6; }
7508else
7509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7510$as_echo "no" >&6; }
7511fi
7512
7513
7514          if test "x$EXPR" = x; then
7515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7516          fi
7517        else
7518          # Otherwise we believe it is a complete path. Use it as it is.
7519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7520$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7522$as_echo_n "checking for EXPR... " >&6; }
7523          if test ! -x "$tool_specified"; then
7524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7525$as_echo "not found" >&6; }
7526            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7527          fi
7528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7529$as_echo "$tool_specified" >&6; }
7530        fi
7531      fi
7532    fi
7533
7534  fi
7535
7536
7537
7538  if test "x$EXPR" = x; then
7539    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7540  fi
7541
7542
7543
7544
7545
7546  # Publish this variable in the help.
7547
7548
7549  if [ -z "${FILE+x}" ]; then
7550    # The variable is not set by user, try to locate tool using the code snippet
7551    for ac_prog in file
7552do
7553  # Extract the first word of "$ac_prog", so it can be a program name with args.
7554set dummy $ac_prog; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if ${ac_cv_path_FILE+:} false; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $FILE in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7572    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583FILE=$ac_cv_path_FILE
7584if test -n "$FILE"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7586$as_echo "$FILE" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593  test -n "$FILE" && break
7594done
7595
7596  else
7597    # The variable is set, but is it from the command line or the environment?
7598
7599    # Try to remove the string !FILE! from our list.
7600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7602      # If it failed, the variable was not from the command line. Ignore it,
7603      # but warn the user (except for BASH, which is always set by the calling BASH).
7604      if test "xFILE" != xBASH; then
7605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7606$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7607      fi
7608      # Try to locate tool using the code snippet
7609      for ac_prog in file
7610do
7611  # Extract the first word of "$ac_prog", so it can be a program name with args.
7612set dummy $ac_prog; ac_word=$2
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614$as_echo_n "checking for $ac_word... " >&6; }
7615if ${ac_cv_path_FILE+:} false; then :
7616  $as_echo_n "(cached) " >&6
7617else
7618  case $FILE in
7619  [\\/]* | ?:[\\/]*)
7620  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7621  ;;
7622  *)
7623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626  IFS=$as_save_IFS
7627  test -z "$as_dir" && as_dir=.
7628    for ac_exec_ext in '' $ac_executable_extensions; do
7629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7632    break 2
7633  fi
7634done
7635  done
7636IFS=$as_save_IFS
7637
7638  ;;
7639esac
7640fi
7641FILE=$ac_cv_path_FILE
7642if test -n "$FILE"; then
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7644$as_echo "$FILE" >&6; }
7645else
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7647$as_echo "no" >&6; }
7648fi
7649
7650
7651  test -n "$FILE" && break
7652done
7653
7654    else
7655      # If it succeeded, then it was overridden by the user. We will use it
7656      # for the tool.
7657
7658      # First remove it from the list of overridden variables, so we can test
7659      # for unknown variables in the end.
7660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7661
7662      # Check if we try to supply an empty value
7663      if test "x$FILE" = x; then
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7665$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7667$as_echo_n "checking for FILE... " >&6; }
7668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7669$as_echo "disabled" >&6; }
7670      else
7671        # Check if the provided tool contains a complete path.
7672        tool_specified="$FILE"
7673        tool_basename="${tool_specified##*/}"
7674        if test "x$tool_basename" = "x$tool_specified"; then
7675          # A command without a complete path is provided, search $PATH.
7676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7677$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7678          # Extract the first word of "$tool_basename", so it can be a program name with args.
7679set dummy $tool_basename; ac_word=$2
7680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7681$as_echo_n "checking for $ac_word... " >&6; }
7682if ${ac_cv_path_FILE+:} false; then :
7683  $as_echo_n "(cached) " >&6
7684else
7685  case $FILE in
7686  [\\/]* | ?:[\\/]*)
7687  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7688  ;;
7689  *)
7690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7691for as_dir in $PATH
7692do
7693  IFS=$as_save_IFS
7694  test -z "$as_dir" && as_dir=.
7695    for ac_exec_ext in '' $ac_executable_extensions; do
7696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7697    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7699    break 2
7700  fi
7701done
7702  done
7703IFS=$as_save_IFS
7704
7705  ;;
7706esac
7707fi
7708FILE=$ac_cv_path_FILE
7709if test -n "$FILE"; then
7710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7711$as_echo "$FILE" >&6; }
7712else
7713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7714$as_echo "no" >&6; }
7715fi
7716
7717
7718          if test "x$FILE" = x; then
7719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7720          fi
7721        else
7722          # Otherwise we believe it is a complete path. Use it as it is.
7723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7724$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7726$as_echo_n "checking for FILE... " >&6; }
7727          if test ! -x "$tool_specified"; then
7728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7729$as_echo "not found" >&6; }
7730            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7731          fi
7732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7733$as_echo "$tool_specified" >&6; }
7734        fi
7735      fi
7736    fi
7737
7738  fi
7739
7740
7741
7742  if test "x$FILE" = x; then
7743    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7744  fi
7745
7746
7747
7748
7749
7750  # Publish this variable in the help.
7751
7752
7753  if [ -z "${FIND+x}" ]; then
7754    # The variable is not set by user, try to locate tool using the code snippet
7755    for ac_prog in find
7756do
7757  # Extract the first word of "$ac_prog", so it can be a program name with args.
7758set dummy $ac_prog; ac_word=$2
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7760$as_echo_n "checking for $ac_word... " >&6; }
7761if ${ac_cv_path_FIND+:} false; then :
7762  $as_echo_n "(cached) " >&6
7763else
7764  case $FIND in
7765  [\\/]* | ?:[\\/]*)
7766  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7767  ;;
7768  *)
7769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772  IFS=$as_save_IFS
7773  test -z "$as_dir" && as_dir=.
7774    for ac_exec_ext in '' $ac_executable_extensions; do
7775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778    break 2
7779  fi
7780done
7781  done
7782IFS=$as_save_IFS
7783
7784  ;;
7785esac
7786fi
7787FIND=$ac_cv_path_FIND
7788if test -n "$FIND"; then
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7790$as_echo "$FIND" >&6; }
7791else
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7793$as_echo "no" >&6; }
7794fi
7795
7796
7797  test -n "$FIND" && break
7798done
7799
7800  else
7801    # The variable is set, but is it from the command line or the environment?
7802
7803    # Try to remove the string !FIND! from our list.
7804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7806      # If it failed, the variable was not from the command line. Ignore it,
7807      # but warn the user (except for BASH, which is always set by the calling BASH).
7808      if test "xFIND" != xBASH; then
7809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7810$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7811      fi
7812      # Try to locate tool using the code snippet
7813      for ac_prog in find
7814do
7815  # Extract the first word of "$ac_prog", so it can be a program name with args.
7816set dummy $ac_prog; ac_word=$2
7817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7818$as_echo_n "checking for $ac_word... " >&6; }
7819if ${ac_cv_path_FIND+:} false; then :
7820  $as_echo_n "(cached) " >&6
7821else
7822  case $FIND in
7823  [\\/]* | ?:[\\/]*)
7824  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7825  ;;
7826  *)
7827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7828for as_dir in $PATH
7829do
7830  IFS=$as_save_IFS
7831  test -z "$as_dir" && as_dir=.
7832    for ac_exec_ext in '' $ac_executable_extensions; do
7833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7834    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7836    break 2
7837  fi
7838done
7839  done
7840IFS=$as_save_IFS
7841
7842  ;;
7843esac
7844fi
7845FIND=$ac_cv_path_FIND
7846if test -n "$FIND"; then
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7848$as_echo "$FIND" >&6; }
7849else
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7851$as_echo "no" >&6; }
7852fi
7853
7854
7855  test -n "$FIND" && break
7856done
7857
7858    else
7859      # If it succeeded, then it was overridden by the user. We will use it
7860      # for the tool.
7861
7862      # First remove it from the list of overridden variables, so we can test
7863      # for unknown variables in the end.
7864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7865
7866      # Check if we try to supply an empty value
7867      if test "x$FIND" = x; then
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7869$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7871$as_echo_n "checking for FIND... " >&6; }
7872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7873$as_echo "disabled" >&6; }
7874      else
7875        # Check if the provided tool contains a complete path.
7876        tool_specified="$FIND"
7877        tool_basename="${tool_specified##*/}"
7878        if test "x$tool_basename" = "x$tool_specified"; then
7879          # A command without a complete path is provided, search $PATH.
7880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7881$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7882          # Extract the first word of "$tool_basename", so it can be a program name with args.
7883set dummy $tool_basename; ac_word=$2
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7885$as_echo_n "checking for $ac_word... " >&6; }
7886if ${ac_cv_path_FIND+:} false; then :
7887  $as_echo_n "(cached) " >&6
7888else
7889  case $FIND in
7890  [\\/]* | ?:[\\/]*)
7891  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7892  ;;
7893  *)
7894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7895for as_dir in $PATH
7896do
7897  IFS=$as_save_IFS
7898  test -z "$as_dir" && as_dir=.
7899    for ac_exec_ext in '' $ac_executable_extensions; do
7900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7901    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7903    break 2
7904  fi
7905done
7906  done
7907IFS=$as_save_IFS
7908
7909  ;;
7910esac
7911fi
7912FIND=$ac_cv_path_FIND
7913if test -n "$FIND"; then
7914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7915$as_echo "$FIND" >&6; }
7916else
7917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7918$as_echo "no" >&6; }
7919fi
7920
7921
7922          if test "x$FIND" = x; then
7923            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7924          fi
7925        else
7926          # Otherwise we believe it is a complete path. Use it as it is.
7927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7928$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7929          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7930$as_echo_n "checking for FIND... " >&6; }
7931          if test ! -x "$tool_specified"; then
7932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7933$as_echo "not found" >&6; }
7934            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7935          fi
7936          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7937$as_echo "$tool_specified" >&6; }
7938        fi
7939      fi
7940    fi
7941
7942  fi
7943
7944
7945
7946  if test "x$FIND" = x; then
7947    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7948  fi
7949
7950
7951
7952
7953
7954  # Publish this variable in the help.
7955
7956
7957  if [ -z "${HEAD+x}" ]; then
7958    # The variable is not set by user, try to locate tool using the code snippet
7959    for ac_prog in head
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_HEAD+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $HEAD in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991HEAD=$ac_cv_path_HEAD
7992if test -n "$HEAD"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7994$as_echo "$HEAD" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$HEAD" && break
8002done
8003
8004  else
8005    # The variable is set, but is it from the command line or the environment?
8006
8007    # Try to remove the string !HEAD! from our list.
8008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8010      # If it failed, the variable was not from the command line. Ignore it,
8011      # but warn the user (except for BASH, which is always set by the calling BASH).
8012      if test "xHEAD" != xBASH; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8014$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8015      fi
8016      # Try to locate tool using the code snippet
8017      for ac_prog in head
8018do
8019  # Extract the first word of "$ac_prog", so it can be a program name with args.
8020set dummy $ac_prog; ac_word=$2
8021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if ${ac_cv_path_HEAD+:} false; then :
8024  $as_echo_n "(cached) " >&6
8025else
8026  case $HEAD in
8027  [\\/]* | ?:[\\/]*)
8028  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034  IFS=$as_save_IFS
8035  test -z "$as_dir" && as_dir=.
8036    for ac_exec_ext in '' $ac_executable_extensions; do
8037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040    break 2
8041  fi
8042done
8043  done
8044IFS=$as_save_IFS
8045
8046  ;;
8047esac
8048fi
8049HEAD=$ac_cv_path_HEAD
8050if test -n "$HEAD"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8052$as_echo "$HEAD" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$HEAD" && break
8060done
8061
8062    else
8063      # If it succeeded, then it was overridden by the user. We will use it
8064      # for the tool.
8065
8066      # First remove it from the list of overridden variables, so we can test
8067      # for unknown variables in the end.
8068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8069
8070      # Check if we try to supply an empty value
8071      if test "x$HEAD" = x; then
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8073$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8075$as_echo_n "checking for HEAD... " >&6; }
8076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8077$as_echo "disabled" >&6; }
8078      else
8079        # Check if the provided tool contains a complete path.
8080        tool_specified="$HEAD"
8081        tool_basename="${tool_specified##*/}"
8082        if test "x$tool_basename" = "x$tool_specified"; then
8083          # A command without a complete path is provided, search $PATH.
8084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8085$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8086          # Extract the first word of "$tool_basename", so it can be a program name with args.
8087set dummy $tool_basename; ac_word=$2
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8089$as_echo_n "checking for $ac_word... " >&6; }
8090if ${ac_cv_path_HEAD+:} false; then :
8091  $as_echo_n "(cached) " >&6
8092else
8093  case $HEAD in
8094  [\\/]* | ?:[\\/]*)
8095  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8096  ;;
8097  *)
8098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8099for as_dir in $PATH
8100do
8101  IFS=$as_save_IFS
8102  test -z "$as_dir" && as_dir=.
8103    for ac_exec_ext in '' $ac_executable_extensions; do
8104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8105    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8107    break 2
8108  fi
8109done
8110  done
8111IFS=$as_save_IFS
8112
8113  ;;
8114esac
8115fi
8116HEAD=$ac_cv_path_HEAD
8117if test -n "$HEAD"; then
8118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8119$as_echo "$HEAD" >&6; }
8120else
8121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8122$as_echo "no" >&6; }
8123fi
8124
8125
8126          if test "x$HEAD" = x; then
8127            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8128          fi
8129        else
8130          # Otherwise we believe it is a complete path. Use it as it is.
8131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8132$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8133          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8134$as_echo_n "checking for HEAD... " >&6; }
8135          if test ! -x "$tool_specified"; then
8136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8137$as_echo "not found" >&6; }
8138            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8139          fi
8140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8141$as_echo "$tool_specified" >&6; }
8142        fi
8143      fi
8144    fi
8145
8146  fi
8147
8148
8149
8150  if test "x$HEAD" = x; then
8151    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8152  fi
8153
8154
8155
8156
8157
8158  # Publish this variable in the help.
8159
8160
8161  if [ -z "${LN+x}" ]; then
8162    # The variable is not set by user, try to locate tool using the code snippet
8163    for ac_prog in ln
8164do
8165  # Extract the first word of "$ac_prog", so it can be a program name with args.
8166set dummy $ac_prog; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_LN+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $LN in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195LN=$ac_cv_path_LN
8196if test -n "$LN"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8198$as_echo "$LN" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205  test -n "$LN" && break
8206done
8207
8208  else
8209    # The variable is set, but is it from the command line or the environment?
8210
8211    # Try to remove the string !LN! from our list.
8212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8214      # If it failed, the variable was not from the command line. Ignore it,
8215      # but warn the user (except for BASH, which is always set by the calling BASH).
8216      if test "xLN" != xBASH; then
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8218$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8219      fi
8220      # Try to locate tool using the code snippet
8221      for ac_prog in ln
8222do
8223  # Extract the first word of "$ac_prog", so it can be a program name with args.
8224set dummy $ac_prog; ac_word=$2
8225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8226$as_echo_n "checking for $ac_word... " >&6; }
8227if ${ac_cv_path_LN+:} false; then :
8228  $as_echo_n "(cached) " >&6
8229else
8230  case $LN in
8231  [\\/]* | ?:[\\/]*)
8232  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8233  ;;
8234  *)
8235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8236for as_dir in $PATH
8237do
8238  IFS=$as_save_IFS
8239  test -z "$as_dir" && as_dir=.
8240    for ac_exec_ext in '' $ac_executable_extensions; do
8241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8242    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8244    break 2
8245  fi
8246done
8247  done
8248IFS=$as_save_IFS
8249
8250  ;;
8251esac
8252fi
8253LN=$ac_cv_path_LN
8254if test -n "$LN"; then
8255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8256$as_echo "$LN" >&6; }
8257else
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
8260fi
8261
8262
8263  test -n "$LN" && break
8264done
8265
8266    else
8267      # If it succeeded, then it was overridden by the user. We will use it
8268      # for the tool.
8269
8270      # First remove it from the list of overridden variables, so we can test
8271      # for unknown variables in the end.
8272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8273
8274      # Check if we try to supply an empty value
8275      if test "x$LN" = x; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8277$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8279$as_echo_n "checking for LN... " >&6; }
8280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8281$as_echo "disabled" >&6; }
8282      else
8283        # Check if the provided tool contains a complete path.
8284        tool_specified="$LN"
8285        tool_basename="${tool_specified##*/}"
8286        if test "x$tool_basename" = "x$tool_specified"; then
8287          # A command without a complete path is provided, search $PATH.
8288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8289$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8290          # Extract the first word of "$tool_basename", so it can be a program name with args.
8291set dummy $tool_basename; ac_word=$2
8292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8293$as_echo_n "checking for $ac_word... " >&6; }
8294if ${ac_cv_path_LN+:} false; then :
8295  $as_echo_n "(cached) " >&6
8296else
8297  case $LN in
8298  [\\/]* | ?:[\\/]*)
8299  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8300  ;;
8301  *)
8302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8303for as_dir in $PATH
8304do
8305  IFS=$as_save_IFS
8306  test -z "$as_dir" && as_dir=.
8307    for ac_exec_ext in '' $ac_executable_extensions; do
8308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8309    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8311    break 2
8312  fi
8313done
8314  done
8315IFS=$as_save_IFS
8316
8317  ;;
8318esac
8319fi
8320LN=$ac_cv_path_LN
8321if test -n "$LN"; then
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8323$as_echo "$LN" >&6; }
8324else
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8326$as_echo "no" >&6; }
8327fi
8328
8329
8330          if test "x$LN" = x; then
8331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8332          fi
8333        else
8334          # Otherwise we believe it is a complete path. Use it as it is.
8335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8336$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8338$as_echo_n "checking for LN... " >&6; }
8339          if test ! -x "$tool_specified"; then
8340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8341$as_echo "not found" >&6; }
8342            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8343          fi
8344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8345$as_echo "$tool_specified" >&6; }
8346        fi
8347      fi
8348    fi
8349
8350  fi
8351
8352
8353
8354  if test "x$LN" = x; then
8355    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8356  fi
8357
8358
8359
8360
8361
8362  # Publish this variable in the help.
8363
8364
8365  if [ -z "${LS+x}" ]; then
8366    # The variable is not set by user, try to locate tool using the code snippet
8367    for ac_prog in ls
8368do
8369  # Extract the first word of "$ac_prog", so it can be a program name with args.
8370set dummy $ac_prog; ac_word=$2
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
8373if ${ac_cv_path_LS+:} false; then :
8374  $as_echo_n "(cached) " >&6
8375else
8376  case $LS in
8377  [\\/]* | ?:[\\/]*)
8378  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8379  ;;
8380  *)
8381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384  IFS=$as_save_IFS
8385  test -z "$as_dir" && as_dir=.
8386    for ac_exec_ext in '' $ac_executable_extensions; do
8387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390    break 2
8391  fi
8392done
8393  done
8394IFS=$as_save_IFS
8395
8396  ;;
8397esac
8398fi
8399LS=$ac_cv_path_LS
8400if test -n "$LS"; then
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8402$as_echo "$LS" >&6; }
8403else
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
8406fi
8407
8408
8409  test -n "$LS" && break
8410done
8411
8412  else
8413    # The variable is set, but is it from the command line or the environment?
8414
8415    # Try to remove the string !LS! from our list.
8416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8418      # If it failed, the variable was not from the command line. Ignore it,
8419      # but warn the user (except for BASH, which is always set by the calling BASH).
8420      if test "xLS" != xBASH; then
8421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8422$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8423      fi
8424      # Try to locate tool using the code snippet
8425      for ac_prog in ls
8426do
8427  # Extract the first word of "$ac_prog", so it can be a program name with args.
8428set dummy $ac_prog; ac_word=$2
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430$as_echo_n "checking for $ac_word... " >&6; }
8431if ${ac_cv_path_LS+:} false; then :
8432  $as_echo_n "(cached) " >&6
8433else
8434  case $LS in
8435  [\\/]* | ?:[\\/]*)
8436  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8437  ;;
8438  *)
8439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8440for as_dir in $PATH
8441do
8442  IFS=$as_save_IFS
8443  test -z "$as_dir" && as_dir=.
8444    for ac_exec_ext in '' $ac_executable_extensions; do
8445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8446    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8448    break 2
8449  fi
8450done
8451  done
8452IFS=$as_save_IFS
8453
8454  ;;
8455esac
8456fi
8457LS=$ac_cv_path_LS
8458if test -n "$LS"; then
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8460$as_echo "$LS" >&6; }
8461else
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8463$as_echo "no" >&6; }
8464fi
8465
8466
8467  test -n "$LS" && break
8468done
8469
8470    else
8471      # If it succeeded, then it was overridden by the user. We will use it
8472      # for the tool.
8473
8474      # First remove it from the list of overridden variables, so we can test
8475      # for unknown variables in the end.
8476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8477
8478      # Check if we try to supply an empty value
8479      if test "x$LS" = x; then
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8481$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8483$as_echo_n "checking for LS... " >&6; }
8484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8485$as_echo "disabled" >&6; }
8486      else
8487        # Check if the provided tool contains a complete path.
8488        tool_specified="$LS"
8489        tool_basename="${tool_specified##*/}"
8490        if test "x$tool_basename" = "x$tool_specified"; then
8491          # A command without a complete path is provided, search $PATH.
8492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8493$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8494          # Extract the first word of "$tool_basename", so it can be a program name with args.
8495set dummy $tool_basename; ac_word=$2
8496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8497$as_echo_n "checking for $ac_word... " >&6; }
8498if ${ac_cv_path_LS+:} false; then :
8499  $as_echo_n "(cached) " >&6
8500else
8501  case $LS in
8502  [\\/]* | ?:[\\/]*)
8503  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8504  ;;
8505  *)
8506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8507for as_dir in $PATH
8508do
8509  IFS=$as_save_IFS
8510  test -z "$as_dir" && as_dir=.
8511    for ac_exec_ext in '' $ac_executable_extensions; do
8512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8513    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8515    break 2
8516  fi
8517done
8518  done
8519IFS=$as_save_IFS
8520
8521  ;;
8522esac
8523fi
8524LS=$ac_cv_path_LS
8525if test -n "$LS"; then
8526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8527$as_echo "$LS" >&6; }
8528else
8529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8530$as_echo "no" >&6; }
8531fi
8532
8533
8534          if test "x$LS" = x; then
8535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8536          fi
8537        else
8538          # Otherwise we believe it is a complete path. Use it as it is.
8539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8540$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8542$as_echo_n "checking for LS... " >&6; }
8543          if test ! -x "$tool_specified"; then
8544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8545$as_echo "not found" >&6; }
8546            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8547          fi
8548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8549$as_echo "$tool_specified" >&6; }
8550        fi
8551      fi
8552    fi
8553
8554  fi
8555
8556
8557
8558  if test "x$LS" = x; then
8559    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8560  fi
8561
8562
8563
8564
8565
8566  # Publish this variable in the help.
8567
8568
8569  if [ -z "${MKDIR+x}" ]; then
8570    # The variable is not set by user, try to locate tool using the code snippet
8571    for ac_prog in mkdir
8572do
8573  # Extract the first word of "$ac_prog", so it can be a program name with args.
8574set dummy $ac_prog; ac_word=$2
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8576$as_echo_n "checking for $ac_word... " >&6; }
8577if ${ac_cv_path_MKDIR+:} false; then :
8578  $as_echo_n "(cached) " >&6
8579else
8580  case $MKDIR in
8581  [\\/]* | ?:[\\/]*)
8582  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8583  ;;
8584  *)
8585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8586for as_dir in $PATH
8587do
8588  IFS=$as_save_IFS
8589  test -z "$as_dir" && as_dir=.
8590    for ac_exec_ext in '' $ac_executable_extensions; do
8591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8592    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8594    break 2
8595  fi
8596done
8597  done
8598IFS=$as_save_IFS
8599
8600  ;;
8601esac
8602fi
8603MKDIR=$ac_cv_path_MKDIR
8604if test -n "$MKDIR"; then
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8606$as_echo "$MKDIR" >&6; }
8607else
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609$as_echo "no" >&6; }
8610fi
8611
8612
8613  test -n "$MKDIR" && break
8614done
8615
8616  else
8617    # The variable is set, but is it from the command line or the environment?
8618
8619    # Try to remove the string !MKDIR! from our list.
8620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8622      # If it failed, the variable was not from the command line. Ignore it,
8623      # but warn the user (except for BASH, which is always set by the calling BASH).
8624      if test "xMKDIR" != xBASH; then
8625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8626$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8627      fi
8628      # Try to locate tool using the code snippet
8629      for ac_prog in mkdir
8630do
8631  # Extract the first word of "$ac_prog", so it can be a program name with args.
8632set dummy $ac_prog; ac_word=$2
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8634$as_echo_n "checking for $ac_word... " >&6; }
8635if ${ac_cv_path_MKDIR+:} false; then :
8636  $as_echo_n "(cached) " >&6
8637else
8638  case $MKDIR in
8639  [\\/]* | ?:[\\/]*)
8640  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8641  ;;
8642  *)
8643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8644for as_dir in $PATH
8645do
8646  IFS=$as_save_IFS
8647  test -z "$as_dir" && as_dir=.
8648    for ac_exec_ext in '' $ac_executable_extensions; do
8649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8650    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8652    break 2
8653  fi
8654done
8655  done
8656IFS=$as_save_IFS
8657
8658  ;;
8659esac
8660fi
8661MKDIR=$ac_cv_path_MKDIR
8662if test -n "$MKDIR"; then
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8664$as_echo "$MKDIR" >&6; }
8665else
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8667$as_echo "no" >&6; }
8668fi
8669
8670
8671  test -n "$MKDIR" && break
8672done
8673
8674    else
8675      # If it succeeded, then it was overridden by the user. We will use it
8676      # for the tool.
8677
8678      # First remove it from the list of overridden variables, so we can test
8679      # for unknown variables in the end.
8680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8681
8682      # Check if we try to supply an empty value
8683      if test "x$MKDIR" = x; then
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8685$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8687$as_echo_n "checking for MKDIR... " >&6; }
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8689$as_echo "disabled" >&6; }
8690      else
8691        # Check if the provided tool contains a complete path.
8692        tool_specified="$MKDIR"
8693        tool_basename="${tool_specified##*/}"
8694        if test "x$tool_basename" = "x$tool_specified"; then
8695          # A command without a complete path is provided, search $PATH.
8696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8697$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8698          # Extract the first word of "$tool_basename", so it can be a program name with args.
8699set dummy $tool_basename; ac_word=$2
8700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8701$as_echo_n "checking for $ac_word... " >&6; }
8702if ${ac_cv_path_MKDIR+:} false; then :
8703  $as_echo_n "(cached) " >&6
8704else
8705  case $MKDIR in
8706  [\\/]* | ?:[\\/]*)
8707  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8708  ;;
8709  *)
8710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711for as_dir in $PATH
8712do
8713  IFS=$as_save_IFS
8714  test -z "$as_dir" && as_dir=.
8715    for ac_exec_ext in '' $ac_executable_extensions; do
8716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8717    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8719    break 2
8720  fi
8721done
8722  done
8723IFS=$as_save_IFS
8724
8725  ;;
8726esac
8727fi
8728MKDIR=$ac_cv_path_MKDIR
8729if test -n "$MKDIR"; then
8730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8731$as_echo "$MKDIR" >&6; }
8732else
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734$as_echo "no" >&6; }
8735fi
8736
8737
8738          if test "x$MKDIR" = x; then
8739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8740          fi
8741        else
8742          # Otherwise we believe it is a complete path. Use it as it is.
8743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8744$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8746$as_echo_n "checking for MKDIR... " >&6; }
8747          if test ! -x "$tool_specified"; then
8748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8749$as_echo "not found" >&6; }
8750            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8751          fi
8752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8753$as_echo "$tool_specified" >&6; }
8754        fi
8755      fi
8756    fi
8757
8758  fi
8759
8760
8761
8762  if test "x$MKDIR" = x; then
8763    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8764  fi
8765
8766
8767
8768
8769
8770  # Publish this variable in the help.
8771
8772
8773  if [ -z "${MKTEMP+x}" ]; then
8774    # The variable is not set by user, try to locate tool using the code snippet
8775    for ac_prog in mktemp
8776do
8777  # Extract the first word of "$ac_prog", so it can be a program name with args.
8778set dummy $ac_prog; ac_word=$2
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8780$as_echo_n "checking for $ac_word... " >&6; }
8781if ${ac_cv_path_MKTEMP+:} false; then :
8782  $as_echo_n "(cached) " >&6
8783else
8784  case $MKTEMP in
8785  [\\/]* | ?:[\\/]*)
8786  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8787  ;;
8788  *)
8789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790for as_dir in $PATH
8791do
8792  IFS=$as_save_IFS
8793  test -z "$as_dir" && as_dir=.
8794    for ac_exec_ext in '' $ac_executable_extensions; do
8795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798    break 2
8799  fi
8800done
8801  done
8802IFS=$as_save_IFS
8803
8804  ;;
8805esac
8806fi
8807MKTEMP=$ac_cv_path_MKTEMP
8808if test -n "$MKTEMP"; then
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8810$as_echo "$MKTEMP" >&6; }
8811else
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817  test -n "$MKTEMP" && break
8818done
8819
8820  else
8821    # The variable is set, but is it from the command line or the environment?
8822
8823    # Try to remove the string !MKTEMP! from our list.
8824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8826      # If it failed, the variable was not from the command line. Ignore it,
8827      # but warn the user (except for BASH, which is always set by the calling BASH).
8828      if test "xMKTEMP" != xBASH; then
8829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8830$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8831      fi
8832      # Try to locate tool using the code snippet
8833      for ac_prog in mktemp
8834do
8835  # Extract the first word of "$ac_prog", so it can be a program name with args.
8836set dummy $ac_prog; ac_word=$2
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838$as_echo_n "checking for $ac_word... " >&6; }
8839if ${ac_cv_path_MKTEMP+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  case $MKTEMP in
8843  [\\/]* | ?:[\\/]*)
8844  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8845  ;;
8846  *)
8847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848for as_dir in $PATH
8849do
8850  IFS=$as_save_IFS
8851  test -z "$as_dir" && as_dir=.
8852    for ac_exec_ext in '' $ac_executable_extensions; do
8853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8854    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856    break 2
8857  fi
8858done
8859  done
8860IFS=$as_save_IFS
8861
8862  ;;
8863esac
8864fi
8865MKTEMP=$ac_cv_path_MKTEMP
8866if test -n "$MKTEMP"; then
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8868$as_echo "$MKTEMP" >&6; }
8869else
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
8872fi
8873
8874
8875  test -n "$MKTEMP" && break
8876done
8877
8878    else
8879      # If it succeeded, then it was overridden by the user. We will use it
8880      # for the tool.
8881
8882      # First remove it from the list of overridden variables, so we can test
8883      # for unknown variables in the end.
8884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8885
8886      # Check if we try to supply an empty value
8887      if test "x$MKTEMP" = x; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8889$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8891$as_echo_n "checking for MKTEMP... " >&6; }
8892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8893$as_echo "disabled" >&6; }
8894      else
8895        # Check if the provided tool contains a complete path.
8896        tool_specified="$MKTEMP"
8897        tool_basename="${tool_specified##*/}"
8898        if test "x$tool_basename" = "x$tool_specified"; then
8899          # A command without a complete path is provided, search $PATH.
8900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8901$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8902          # Extract the first word of "$tool_basename", so it can be a program name with args.
8903set dummy $tool_basename; ac_word=$2
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8905$as_echo_n "checking for $ac_word... " >&6; }
8906if ${ac_cv_path_MKTEMP+:} false; then :
8907  $as_echo_n "(cached) " >&6
8908else
8909  case $MKTEMP in
8910  [\\/]* | ?:[\\/]*)
8911  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8912  ;;
8913  *)
8914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917  IFS=$as_save_IFS
8918  test -z "$as_dir" && as_dir=.
8919    for ac_exec_ext in '' $ac_executable_extensions; do
8920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8921    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8923    break 2
8924  fi
8925done
8926  done
8927IFS=$as_save_IFS
8928
8929  ;;
8930esac
8931fi
8932MKTEMP=$ac_cv_path_MKTEMP
8933if test -n "$MKTEMP"; then
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8935$as_echo "$MKTEMP" >&6; }
8936else
8937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938$as_echo "no" >&6; }
8939fi
8940
8941
8942          if test "x$MKTEMP" = x; then
8943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8944          fi
8945        else
8946          # Otherwise we believe it is a complete path. Use it as it is.
8947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8948$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8950$as_echo_n "checking for MKTEMP... " >&6; }
8951          if test ! -x "$tool_specified"; then
8952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8953$as_echo "not found" >&6; }
8954            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8955          fi
8956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8957$as_echo "$tool_specified" >&6; }
8958        fi
8959      fi
8960    fi
8961
8962  fi
8963
8964
8965
8966  if test "x$MKTEMP" = x; then
8967    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8968  fi
8969
8970
8971
8972
8973
8974  # Publish this variable in the help.
8975
8976
8977  if [ -z "${MV+x}" ]; then
8978    # The variable is not set by user, try to locate tool using the code snippet
8979    for ac_prog in mv
8980do
8981  # Extract the first word of "$ac_prog", so it can be a program name with args.
8982set dummy $ac_prog; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_MV+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $MV in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011MV=$ac_cv_path_MV
9012if test -n "$MV"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9014$as_echo "$MV" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021  test -n "$MV" && break
9022done
9023
9024  else
9025    # The variable is set, but is it from the command line or the environment?
9026
9027    # Try to remove the string !MV! from our list.
9028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9030      # If it failed, the variable was not from the command line. Ignore it,
9031      # but warn the user (except for BASH, which is always set by the calling BASH).
9032      if test "xMV" != xBASH; then
9033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9034$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9035      fi
9036      # Try to locate tool using the code snippet
9037      for ac_prog in mv
9038do
9039  # Extract the first word of "$ac_prog", so it can be a program name with args.
9040set dummy $ac_prog; ac_word=$2
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9042$as_echo_n "checking for $ac_word... " >&6; }
9043if ${ac_cv_path_MV+:} false; then :
9044  $as_echo_n "(cached) " >&6
9045else
9046  case $MV in
9047  [\\/]* | ?:[\\/]*)
9048  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9049  ;;
9050  *)
9051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9052for as_dir in $PATH
9053do
9054  IFS=$as_save_IFS
9055  test -z "$as_dir" && as_dir=.
9056    for ac_exec_ext in '' $ac_executable_extensions; do
9057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9058    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9060    break 2
9061  fi
9062done
9063  done
9064IFS=$as_save_IFS
9065
9066  ;;
9067esac
9068fi
9069MV=$ac_cv_path_MV
9070if test -n "$MV"; then
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9072$as_echo "$MV" >&6; }
9073else
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
9076fi
9077
9078
9079  test -n "$MV" && break
9080done
9081
9082    else
9083      # If it succeeded, then it was overridden by the user. We will use it
9084      # for the tool.
9085
9086      # First remove it from the list of overridden variables, so we can test
9087      # for unknown variables in the end.
9088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9089
9090      # Check if we try to supply an empty value
9091      if test "x$MV" = x; then
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9093$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9095$as_echo_n "checking for MV... " >&6; }
9096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9097$as_echo "disabled" >&6; }
9098      else
9099        # Check if the provided tool contains a complete path.
9100        tool_specified="$MV"
9101        tool_basename="${tool_specified##*/}"
9102        if test "x$tool_basename" = "x$tool_specified"; then
9103          # A command without a complete path is provided, search $PATH.
9104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9105$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9106          # Extract the first word of "$tool_basename", so it can be a program name with args.
9107set dummy $tool_basename; ac_word=$2
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9109$as_echo_n "checking for $ac_word... " >&6; }
9110if ${ac_cv_path_MV+:} false; then :
9111  $as_echo_n "(cached) " >&6
9112else
9113  case $MV in
9114  [\\/]* | ?:[\\/]*)
9115  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9116  ;;
9117  *)
9118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9119for as_dir in $PATH
9120do
9121  IFS=$as_save_IFS
9122  test -z "$as_dir" && as_dir=.
9123    for ac_exec_ext in '' $ac_executable_extensions; do
9124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9125    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9127    break 2
9128  fi
9129done
9130  done
9131IFS=$as_save_IFS
9132
9133  ;;
9134esac
9135fi
9136MV=$ac_cv_path_MV
9137if test -n "$MV"; then
9138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9139$as_echo "$MV" >&6; }
9140else
9141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9142$as_echo "no" >&6; }
9143fi
9144
9145
9146          if test "x$MV" = x; then
9147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9148          fi
9149        else
9150          # Otherwise we believe it is a complete path. Use it as it is.
9151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9152$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9154$as_echo_n "checking for MV... " >&6; }
9155          if test ! -x "$tool_specified"; then
9156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9157$as_echo "not found" >&6; }
9158            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9159          fi
9160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9161$as_echo "$tool_specified" >&6; }
9162        fi
9163      fi
9164    fi
9165
9166  fi
9167
9168
9169
9170  if test "x$MV" = x; then
9171    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9172  fi
9173
9174
9175
9176
9177
9178  # Publish this variable in the help.
9179
9180
9181  if [ -z "${NAWK+x}" ]; then
9182    # The variable is not set by user, try to locate tool using the code snippet
9183    for ac_prog in nawk gawk awk
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_NAWK+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $NAWK in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215NAWK=$ac_cv_path_NAWK
9216if test -n "$NAWK"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9218$as_echo "$NAWK" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$NAWK" && break
9226done
9227
9228  else
9229    # The variable is set, but is it from the command line or the environment?
9230
9231    # Try to remove the string !NAWK! from our list.
9232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9234      # If it failed, the variable was not from the command line. Ignore it,
9235      # but warn the user (except for BASH, which is always set by the calling BASH).
9236      if test "xNAWK" != xBASH; then
9237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9238$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9239      fi
9240      # Try to locate tool using the code snippet
9241      for ac_prog in nawk gawk awk
9242do
9243  # Extract the first word of "$ac_prog", so it can be a program name with args.
9244set dummy $ac_prog; ac_word=$2
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9246$as_echo_n "checking for $ac_word... " >&6; }
9247if ${ac_cv_path_NAWK+:} false; then :
9248  $as_echo_n "(cached) " >&6
9249else
9250  case $NAWK in
9251  [\\/]* | ?:[\\/]*)
9252  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9253  ;;
9254  *)
9255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9256for as_dir in $PATH
9257do
9258  IFS=$as_save_IFS
9259  test -z "$as_dir" && as_dir=.
9260    for ac_exec_ext in '' $ac_executable_extensions; do
9261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9262    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9264    break 2
9265  fi
9266done
9267  done
9268IFS=$as_save_IFS
9269
9270  ;;
9271esac
9272fi
9273NAWK=$ac_cv_path_NAWK
9274if test -n "$NAWK"; then
9275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9276$as_echo "$NAWK" >&6; }
9277else
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
9280fi
9281
9282
9283  test -n "$NAWK" && break
9284done
9285
9286    else
9287      # If it succeeded, then it was overridden by the user. We will use it
9288      # for the tool.
9289
9290      # First remove it from the list of overridden variables, so we can test
9291      # for unknown variables in the end.
9292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9293
9294      # Check if we try to supply an empty value
9295      if test "x$NAWK" = x; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9297$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9299$as_echo_n "checking for NAWK... " >&6; }
9300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9301$as_echo "disabled" >&6; }
9302      else
9303        # Check if the provided tool contains a complete path.
9304        tool_specified="$NAWK"
9305        tool_basename="${tool_specified##*/}"
9306        if test "x$tool_basename" = "x$tool_specified"; then
9307          # A command without a complete path is provided, search $PATH.
9308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9309$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9310          # Extract the first word of "$tool_basename", so it can be a program name with args.
9311set dummy $tool_basename; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_NAWK+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $NAWK in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340NAWK=$ac_cv_path_NAWK
9341if test -n "$NAWK"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9343$as_echo "$NAWK" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350          if test "x$NAWK" = x; then
9351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9352          fi
9353        else
9354          # Otherwise we believe it is a complete path. Use it as it is.
9355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9356$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9358$as_echo_n "checking for NAWK... " >&6; }
9359          if test ! -x "$tool_specified"; then
9360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9361$as_echo "not found" >&6; }
9362            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9363          fi
9364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9365$as_echo "$tool_specified" >&6; }
9366        fi
9367      fi
9368    fi
9369
9370  fi
9371
9372
9373
9374  if test "x$NAWK" = x; then
9375    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9376  fi
9377
9378
9379
9380
9381
9382  # Publish this variable in the help.
9383
9384
9385  if [ -z "${PRINTF+x}" ]; then
9386    # The variable is not set by user, try to locate tool using the code snippet
9387    for ac_prog in printf
9388do
9389  # Extract the first word of "$ac_prog", so it can be a program name with args.
9390set dummy $ac_prog; ac_word=$2
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392$as_echo_n "checking for $ac_word... " >&6; }
9393if ${ac_cv_path_PRINTF+:} false; then :
9394  $as_echo_n "(cached) " >&6
9395else
9396  case $PRINTF in
9397  [\\/]* | ?:[\\/]*)
9398  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9399  ;;
9400  *)
9401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402for as_dir in $PATH
9403do
9404  IFS=$as_save_IFS
9405  test -z "$as_dir" && as_dir=.
9406    for ac_exec_ext in '' $ac_executable_extensions; do
9407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410    break 2
9411  fi
9412done
9413  done
9414IFS=$as_save_IFS
9415
9416  ;;
9417esac
9418fi
9419PRINTF=$ac_cv_path_PRINTF
9420if test -n "$PRINTF"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9422$as_echo "$PRINTF" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429  test -n "$PRINTF" && break
9430done
9431
9432  else
9433    # The variable is set, but is it from the command line or the environment?
9434
9435    # Try to remove the string !PRINTF! from our list.
9436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9438      # If it failed, the variable was not from the command line. Ignore it,
9439      # but warn the user (except for BASH, which is always set by the calling BASH).
9440      if test "xPRINTF" != xBASH; then
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9442$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9443      fi
9444      # Try to locate tool using the code snippet
9445      for ac_prog in printf
9446do
9447  # Extract the first word of "$ac_prog", so it can be a program name with args.
9448set dummy $ac_prog; ac_word=$2
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450$as_echo_n "checking for $ac_word... " >&6; }
9451if ${ac_cv_path_PRINTF+:} false; then :
9452  $as_echo_n "(cached) " >&6
9453else
9454  case $PRINTF in
9455  [\\/]* | ?:[\\/]*)
9456  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9457  ;;
9458  *)
9459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474  ;;
9475esac
9476fi
9477PRINTF=$ac_cv_path_PRINTF
9478if test -n "$PRINTF"; then
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9480$as_echo "$PRINTF" >&6; }
9481else
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
9484fi
9485
9486
9487  test -n "$PRINTF" && break
9488done
9489
9490    else
9491      # If it succeeded, then it was overridden by the user. We will use it
9492      # for the tool.
9493
9494      # First remove it from the list of overridden variables, so we can test
9495      # for unknown variables in the end.
9496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9497
9498      # Check if we try to supply an empty value
9499      if test "x$PRINTF" = x; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9501$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9503$as_echo_n "checking for PRINTF... " >&6; }
9504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9505$as_echo "disabled" >&6; }
9506      else
9507        # Check if the provided tool contains a complete path.
9508        tool_specified="$PRINTF"
9509        tool_basename="${tool_specified##*/}"
9510        if test "x$tool_basename" = "x$tool_specified"; then
9511          # A command without a complete path is provided, search $PATH.
9512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9513$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9514          # Extract the first word of "$tool_basename", so it can be a program name with args.
9515set dummy $tool_basename; ac_word=$2
9516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9517$as_echo_n "checking for $ac_word... " >&6; }
9518if ${ac_cv_path_PRINTF+:} false; then :
9519  $as_echo_n "(cached) " >&6
9520else
9521  case $PRINTF in
9522  [\\/]* | ?:[\\/]*)
9523  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9524  ;;
9525  *)
9526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9527for as_dir in $PATH
9528do
9529  IFS=$as_save_IFS
9530  test -z "$as_dir" && as_dir=.
9531    for ac_exec_ext in '' $ac_executable_extensions; do
9532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9533    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9535    break 2
9536  fi
9537done
9538  done
9539IFS=$as_save_IFS
9540
9541  ;;
9542esac
9543fi
9544PRINTF=$ac_cv_path_PRINTF
9545if test -n "$PRINTF"; then
9546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9547$as_echo "$PRINTF" >&6; }
9548else
9549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
9551fi
9552
9553
9554          if test "x$PRINTF" = x; then
9555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9556          fi
9557        else
9558          # Otherwise we believe it is a complete path. Use it as it is.
9559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9560$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9562$as_echo_n "checking for PRINTF... " >&6; }
9563          if test ! -x "$tool_specified"; then
9564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9565$as_echo "not found" >&6; }
9566            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9567          fi
9568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9569$as_echo "$tool_specified" >&6; }
9570        fi
9571      fi
9572    fi
9573
9574  fi
9575
9576
9577
9578  if test "x$PRINTF" = x; then
9579    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9580  fi
9581
9582
9583
9584
9585
9586  # Publish this variable in the help.
9587
9588
9589  if [ -z "${RM+x}" ]; then
9590    # The variable is not set by user, try to locate tool using the code snippet
9591    for ac_prog in rm
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_RM+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $RM in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623RM=$ac_cv_path_RM
9624if test -n "$RM"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9626$as_echo "$RM" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$RM" && break
9634done
9635
9636  else
9637    # The variable is set, but is it from the command line or the environment?
9638
9639    # Try to remove the string !RM! from our list.
9640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9642      # If it failed, the variable was not from the command line. Ignore it,
9643      # but warn the user (except for BASH, which is always set by the calling BASH).
9644      if test "xRM" != xBASH; then
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9646$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9647      fi
9648      # Try to locate tool using the code snippet
9649      for ac_prog in rm
9650do
9651  # Extract the first word of "$ac_prog", so it can be a program name with args.
9652set dummy $ac_prog; ac_word=$2
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654$as_echo_n "checking for $ac_word... " >&6; }
9655if ${ac_cv_path_RM+:} false; then :
9656  $as_echo_n "(cached) " >&6
9657else
9658  case $RM in
9659  [\\/]* | ?:[\\/]*)
9660  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9661  ;;
9662  *)
9663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664for as_dir in $PATH
9665do
9666  IFS=$as_save_IFS
9667  test -z "$as_dir" && as_dir=.
9668    for ac_exec_ext in '' $ac_executable_extensions; do
9669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9670    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9672    break 2
9673  fi
9674done
9675  done
9676IFS=$as_save_IFS
9677
9678  ;;
9679esac
9680fi
9681RM=$ac_cv_path_RM
9682if test -n "$RM"; then
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9684$as_echo "$RM" >&6; }
9685else
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
9688fi
9689
9690
9691  test -n "$RM" && break
9692done
9693
9694    else
9695      # If it succeeded, then it was overridden by the user. We will use it
9696      # for the tool.
9697
9698      # First remove it from the list of overridden variables, so we can test
9699      # for unknown variables in the end.
9700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9701
9702      # Check if we try to supply an empty value
9703      if test "x$RM" = x; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9705$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9707$as_echo_n "checking for RM... " >&6; }
9708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9709$as_echo "disabled" >&6; }
9710      else
9711        # Check if the provided tool contains a complete path.
9712        tool_specified="$RM"
9713        tool_basename="${tool_specified##*/}"
9714        if test "x$tool_basename" = "x$tool_specified"; then
9715          # A command without a complete path is provided, search $PATH.
9716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9717$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9718          # Extract the first word of "$tool_basename", so it can be a program name with args.
9719set dummy $tool_basename; ac_word=$2
9720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721$as_echo_n "checking for $ac_word... " >&6; }
9722if ${ac_cv_path_RM+:} false; then :
9723  $as_echo_n "(cached) " >&6
9724else
9725  case $RM in
9726  [\\/]* | ?:[\\/]*)
9727  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9728  ;;
9729  *)
9730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731for as_dir in $PATH
9732do
9733  IFS=$as_save_IFS
9734  test -z "$as_dir" && as_dir=.
9735    for ac_exec_ext in '' $ac_executable_extensions; do
9736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739    break 2
9740  fi
9741done
9742  done
9743IFS=$as_save_IFS
9744
9745  ;;
9746esac
9747fi
9748RM=$ac_cv_path_RM
9749if test -n "$RM"; then
9750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9751$as_echo "$RM" >&6; }
9752else
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754$as_echo "no" >&6; }
9755fi
9756
9757
9758          if test "x$RM" = x; then
9759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9760          fi
9761        else
9762          # Otherwise we believe it is a complete path. Use it as it is.
9763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9764$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9766$as_echo_n "checking for RM... " >&6; }
9767          if test ! -x "$tool_specified"; then
9768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9769$as_echo "not found" >&6; }
9770            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9771          fi
9772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9773$as_echo "$tool_specified" >&6; }
9774        fi
9775      fi
9776    fi
9777
9778  fi
9779
9780
9781
9782  if test "x$RM" = x; then
9783    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9784  fi
9785
9786
9787
9788
9789
9790  # Publish this variable in the help.
9791
9792
9793  if [ -z "${RMDIR+x}" ]; then
9794    # The variable is not set by user, try to locate tool using the code snippet
9795    for ac_prog in rmdir
9796do
9797  # Extract the first word of "$ac_prog", so it can be a program name with args.
9798set dummy $ac_prog; ac_word=$2
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
9801if ${ac_cv_path_RMDIR+:} false; then :
9802  $as_echo_n "(cached) " >&6
9803else
9804  case $RMDIR in
9805  [\\/]* | ?:[\\/]*)
9806  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9807  ;;
9808  *)
9809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810for as_dir in $PATH
9811do
9812  IFS=$as_save_IFS
9813  test -z "$as_dir" && as_dir=.
9814    for ac_exec_ext in '' $ac_executable_extensions; do
9815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818    break 2
9819  fi
9820done
9821  done
9822IFS=$as_save_IFS
9823
9824  ;;
9825esac
9826fi
9827RMDIR=$ac_cv_path_RMDIR
9828if test -n "$RMDIR"; then
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9830$as_echo "$RMDIR" >&6; }
9831else
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834fi
9835
9836
9837  test -n "$RMDIR" && break
9838done
9839
9840  else
9841    # The variable is set, but is it from the command line or the environment?
9842
9843    # Try to remove the string !RMDIR! from our list.
9844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9846      # If it failed, the variable was not from the command line. Ignore it,
9847      # but warn the user (except for BASH, which is always set by the calling BASH).
9848      if test "xRMDIR" != xBASH; then
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9850$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9851      fi
9852      # Try to locate tool using the code snippet
9853      for ac_prog in rmdir
9854do
9855  # Extract the first word of "$ac_prog", so it can be a program name with args.
9856set dummy $ac_prog; ac_word=$2
9857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9858$as_echo_n "checking for $ac_word... " >&6; }
9859if ${ac_cv_path_RMDIR+:} false; then :
9860  $as_echo_n "(cached) " >&6
9861else
9862  case $RMDIR in
9863  [\\/]* | ?:[\\/]*)
9864  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9865  ;;
9866  *)
9867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9868for as_dir in $PATH
9869do
9870  IFS=$as_save_IFS
9871  test -z "$as_dir" && as_dir=.
9872    for ac_exec_ext in '' $ac_executable_extensions; do
9873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9874    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9876    break 2
9877  fi
9878done
9879  done
9880IFS=$as_save_IFS
9881
9882  ;;
9883esac
9884fi
9885RMDIR=$ac_cv_path_RMDIR
9886if test -n "$RMDIR"; then
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9888$as_echo "$RMDIR" >&6; }
9889else
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892fi
9893
9894
9895  test -n "$RMDIR" && break
9896done
9897
9898    else
9899      # If it succeeded, then it was overridden by the user. We will use it
9900      # for the tool.
9901
9902      # First remove it from the list of overridden variables, so we can test
9903      # for unknown variables in the end.
9904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9905
9906      # Check if we try to supply an empty value
9907      if test "x$RMDIR" = x; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9909$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9911$as_echo_n "checking for RMDIR... " >&6; }
9912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9913$as_echo "disabled" >&6; }
9914      else
9915        # Check if the provided tool contains a complete path.
9916        tool_specified="$RMDIR"
9917        tool_basename="${tool_specified##*/}"
9918        if test "x$tool_basename" = "x$tool_specified"; then
9919          # A command without a complete path is provided, search $PATH.
9920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9921$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9922          # Extract the first word of "$tool_basename", so it can be a program name with args.
9923set dummy $tool_basename; ac_word=$2
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9925$as_echo_n "checking for $ac_word... " >&6; }
9926if ${ac_cv_path_RMDIR+:} false; then :
9927  $as_echo_n "(cached) " >&6
9928else
9929  case $RMDIR in
9930  [\\/]* | ?:[\\/]*)
9931  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9932  ;;
9933  *)
9934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9935for as_dir in $PATH
9936do
9937  IFS=$as_save_IFS
9938  test -z "$as_dir" && as_dir=.
9939    for ac_exec_ext in '' $ac_executable_extensions; do
9940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9941    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9943    break 2
9944  fi
9945done
9946  done
9947IFS=$as_save_IFS
9948
9949  ;;
9950esac
9951fi
9952RMDIR=$ac_cv_path_RMDIR
9953if test -n "$RMDIR"; then
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9955$as_echo "$RMDIR" >&6; }
9956else
9957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
9959fi
9960
9961
9962          if test "x$RMDIR" = x; then
9963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9964          fi
9965        else
9966          # Otherwise we believe it is a complete path. Use it as it is.
9967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9968$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9970$as_echo_n "checking for RMDIR... " >&6; }
9971          if test ! -x "$tool_specified"; then
9972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9973$as_echo "not found" >&6; }
9974            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9975          fi
9976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9977$as_echo "$tool_specified" >&6; }
9978        fi
9979      fi
9980    fi
9981
9982  fi
9983
9984
9985
9986  if test "x$RMDIR" = x; then
9987    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9988  fi
9989
9990
9991
9992
9993
9994  # Publish this variable in the help.
9995
9996
9997  if [ -z "${SH+x}" ]; then
9998    # The variable is not set by user, try to locate tool using the code snippet
9999    for ac_prog in sh
10000do
10001  # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if ${ac_cv_path_SH+:} false; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $SH in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10020    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031SH=$ac_cv_path_SH
10032if test -n "$SH"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10034$as_echo "$SH" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041  test -n "$SH" && break
10042done
10043
10044  else
10045    # The variable is set, but is it from the command line or the environment?
10046
10047    # Try to remove the string !SH! from our list.
10048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10050      # If it failed, the variable was not from the command line. Ignore it,
10051      # but warn the user (except for BASH, which is always set by the calling BASH).
10052      if test "xSH" != xBASH; then
10053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10054$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10055      fi
10056      # Try to locate tool using the code snippet
10057      for ac_prog in sh
10058do
10059  # Extract the first word of "$ac_prog", so it can be a program name with args.
10060set dummy $ac_prog; ac_word=$2
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10062$as_echo_n "checking for $ac_word... " >&6; }
10063if ${ac_cv_path_SH+:} false; then :
10064  $as_echo_n "(cached) " >&6
10065else
10066  case $SH in
10067  [\\/]* | ?:[\\/]*)
10068  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10069  ;;
10070  *)
10071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10072for as_dir in $PATH
10073do
10074  IFS=$as_save_IFS
10075  test -z "$as_dir" && as_dir=.
10076    for ac_exec_ext in '' $ac_executable_extensions; do
10077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10078    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10080    break 2
10081  fi
10082done
10083  done
10084IFS=$as_save_IFS
10085
10086  ;;
10087esac
10088fi
10089SH=$ac_cv_path_SH
10090if test -n "$SH"; then
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10092$as_echo "$SH" >&6; }
10093else
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
10096fi
10097
10098
10099  test -n "$SH" && break
10100done
10101
10102    else
10103      # If it succeeded, then it was overridden by the user. We will use it
10104      # for the tool.
10105
10106      # First remove it from the list of overridden variables, so we can test
10107      # for unknown variables in the end.
10108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10109
10110      # Check if we try to supply an empty value
10111      if test "x$SH" = x; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10113$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10115$as_echo_n "checking for SH... " >&6; }
10116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10117$as_echo "disabled" >&6; }
10118      else
10119        # Check if the provided tool contains a complete path.
10120        tool_specified="$SH"
10121        tool_basename="${tool_specified##*/}"
10122        if test "x$tool_basename" = "x$tool_specified"; then
10123          # A command without a complete path is provided, search $PATH.
10124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10125$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10126          # Extract the first word of "$tool_basename", so it can be a program name with args.
10127set dummy $tool_basename; ac_word=$2
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10129$as_echo_n "checking for $ac_word... " >&6; }
10130if ${ac_cv_path_SH+:} false; then :
10131  $as_echo_n "(cached) " >&6
10132else
10133  case $SH in
10134  [\\/]* | ?:[\\/]*)
10135  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10136  ;;
10137  *)
10138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10139for as_dir in $PATH
10140do
10141  IFS=$as_save_IFS
10142  test -z "$as_dir" && as_dir=.
10143    for ac_exec_ext in '' $ac_executable_extensions; do
10144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10145    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10147    break 2
10148  fi
10149done
10150  done
10151IFS=$as_save_IFS
10152
10153  ;;
10154esac
10155fi
10156SH=$ac_cv_path_SH
10157if test -n "$SH"; then
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10159$as_echo "$SH" >&6; }
10160else
10161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
10163fi
10164
10165
10166          if test "x$SH" = x; then
10167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10168          fi
10169        else
10170          # Otherwise we believe it is a complete path. Use it as it is.
10171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10172$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10174$as_echo_n "checking for SH... " >&6; }
10175          if test ! -x "$tool_specified"; then
10176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10177$as_echo "not found" >&6; }
10178            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10179          fi
10180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10181$as_echo "$tool_specified" >&6; }
10182        fi
10183      fi
10184    fi
10185
10186  fi
10187
10188
10189
10190  if test "x$SH" = x; then
10191    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10192  fi
10193
10194
10195
10196
10197
10198  # Publish this variable in the help.
10199
10200
10201  if [ -z "${SORT+x}" ]; then
10202    # The variable is not set by user, try to locate tool using the code snippet
10203    for ac_prog in sort
10204do
10205  # Extract the first word of "$ac_prog", so it can be a program name with args.
10206set dummy $ac_prog; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_path_SORT+:} false; then :
10210  $as_echo_n "(cached) " >&6
10211else
10212  case $SORT in
10213  [\\/]* | ?:[\\/]*)
10214  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10215  ;;
10216  *)
10217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10218for as_dir in $PATH
10219do
10220  IFS=$as_save_IFS
10221  test -z "$as_dir" && as_dir=.
10222    for ac_exec_ext in '' $ac_executable_extensions; do
10223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10224    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10226    break 2
10227  fi
10228done
10229  done
10230IFS=$as_save_IFS
10231
10232  ;;
10233esac
10234fi
10235SORT=$ac_cv_path_SORT
10236if test -n "$SORT"; then
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10238$as_echo "$SORT" >&6; }
10239else
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
10242fi
10243
10244
10245  test -n "$SORT" && break
10246done
10247
10248  else
10249    # The variable is set, but is it from the command line or the environment?
10250
10251    # Try to remove the string !SORT! from our list.
10252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10254      # If it failed, the variable was not from the command line. Ignore it,
10255      # but warn the user (except for BASH, which is always set by the calling BASH).
10256      if test "xSORT" != xBASH; then
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10258$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10259      fi
10260      # Try to locate tool using the code snippet
10261      for ac_prog in sort
10262do
10263  # Extract the first word of "$ac_prog", so it can be a program name with args.
10264set dummy $ac_prog; ac_word=$2
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10266$as_echo_n "checking for $ac_word... " >&6; }
10267if ${ac_cv_path_SORT+:} false; then :
10268  $as_echo_n "(cached) " >&6
10269else
10270  case $SORT in
10271  [\\/]* | ?:[\\/]*)
10272  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10273  ;;
10274  *)
10275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10276for as_dir in $PATH
10277do
10278  IFS=$as_save_IFS
10279  test -z "$as_dir" && as_dir=.
10280    for ac_exec_ext in '' $ac_executable_extensions; do
10281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10282    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10284    break 2
10285  fi
10286done
10287  done
10288IFS=$as_save_IFS
10289
10290  ;;
10291esac
10292fi
10293SORT=$ac_cv_path_SORT
10294if test -n "$SORT"; then
10295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10296$as_echo "$SORT" >&6; }
10297else
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302
10303  test -n "$SORT" && break
10304done
10305
10306    else
10307      # If it succeeded, then it was overridden by the user. We will use it
10308      # for the tool.
10309
10310      # First remove it from the list of overridden variables, so we can test
10311      # for unknown variables in the end.
10312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10313
10314      # Check if we try to supply an empty value
10315      if test "x$SORT" = x; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10317$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10319$as_echo_n "checking for SORT... " >&6; }
10320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10321$as_echo "disabled" >&6; }
10322      else
10323        # Check if the provided tool contains a complete path.
10324        tool_specified="$SORT"
10325        tool_basename="${tool_specified##*/}"
10326        if test "x$tool_basename" = "x$tool_specified"; then
10327          # A command without a complete path is provided, search $PATH.
10328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10329$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10330          # Extract the first word of "$tool_basename", so it can be a program name with args.
10331set dummy $tool_basename; ac_word=$2
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10333$as_echo_n "checking for $ac_word... " >&6; }
10334if ${ac_cv_path_SORT+:} false; then :
10335  $as_echo_n "(cached) " >&6
10336else
10337  case $SORT in
10338  [\\/]* | ?:[\\/]*)
10339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10340  ;;
10341  *)
10342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357  ;;
10358esac
10359fi
10360SORT=$ac_cv_path_SORT
10361if test -n "$SORT"; then
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10363$as_echo "$SORT" >&6; }
10364else
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
10367fi
10368
10369
10370          if test "x$SORT" = x; then
10371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10372          fi
10373        else
10374          # Otherwise we believe it is a complete path. Use it as it is.
10375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10376$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10378$as_echo_n "checking for SORT... " >&6; }
10379          if test ! -x "$tool_specified"; then
10380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10381$as_echo "not found" >&6; }
10382            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10383          fi
10384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10385$as_echo "$tool_specified" >&6; }
10386        fi
10387      fi
10388    fi
10389
10390  fi
10391
10392
10393
10394  if test "x$SORT" = x; then
10395    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10396  fi
10397
10398
10399
10400
10401
10402  # Publish this variable in the help.
10403
10404
10405  if [ -z "${TAIL+x}" ]; then
10406    # The variable is not set by user, try to locate tool using the code snippet
10407    for ac_prog in tail
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_TAIL+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $TAIL in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439TAIL=$ac_cv_path_TAIL
10440if test -n "$TAIL"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10442$as_echo "$TAIL" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$TAIL" && break
10450done
10451
10452  else
10453    # The variable is set, but is it from the command line or the environment?
10454
10455    # Try to remove the string !TAIL! from our list.
10456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10458      # If it failed, the variable was not from the command line. Ignore it,
10459      # but warn the user (except for BASH, which is always set by the calling BASH).
10460      if test "xTAIL" != xBASH; then
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10462$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10463      fi
10464      # Try to locate tool using the code snippet
10465      for ac_prog in tail
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_TAIL+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $TAIL in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497TAIL=$ac_cv_path_TAIL
10498if test -n "$TAIL"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10500$as_echo "$TAIL" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$TAIL" && break
10508done
10509
10510    else
10511      # If it succeeded, then it was overridden by the user. We will use it
10512      # for the tool.
10513
10514      # First remove it from the list of overridden variables, so we can test
10515      # for unknown variables in the end.
10516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10517
10518      # Check if we try to supply an empty value
10519      if test "x$TAIL" = x; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10521$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10523$as_echo_n "checking for TAIL... " >&6; }
10524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10525$as_echo "disabled" >&6; }
10526      else
10527        # Check if the provided tool contains a complete path.
10528        tool_specified="$TAIL"
10529        tool_basename="${tool_specified##*/}"
10530        if test "x$tool_basename" = "x$tool_specified"; then
10531          # A command without a complete path is provided, search $PATH.
10532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10533$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10534          # Extract the first word of "$tool_basename", so it can be a program name with args.
10535set dummy $tool_basename; ac_word=$2
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10537$as_echo_n "checking for $ac_word... " >&6; }
10538if ${ac_cv_path_TAIL+:} false; then :
10539  $as_echo_n "(cached) " >&6
10540else
10541  case $TAIL in
10542  [\\/]* | ?:[\\/]*)
10543  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10544  ;;
10545  *)
10546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10547for as_dir in $PATH
10548do
10549  IFS=$as_save_IFS
10550  test -z "$as_dir" && as_dir=.
10551    for ac_exec_ext in '' $ac_executable_extensions; do
10552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10553    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10555    break 2
10556  fi
10557done
10558  done
10559IFS=$as_save_IFS
10560
10561  ;;
10562esac
10563fi
10564TAIL=$ac_cv_path_TAIL
10565if test -n "$TAIL"; then
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10567$as_echo "$TAIL" >&6; }
10568else
10569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10570$as_echo "no" >&6; }
10571fi
10572
10573
10574          if test "x$TAIL" = x; then
10575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10576          fi
10577        else
10578          # Otherwise we believe it is a complete path. Use it as it is.
10579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10580$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10582$as_echo_n "checking for TAIL... " >&6; }
10583          if test ! -x "$tool_specified"; then
10584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10585$as_echo "not found" >&6; }
10586            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10587          fi
10588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10589$as_echo "$tool_specified" >&6; }
10590        fi
10591      fi
10592    fi
10593
10594  fi
10595
10596
10597
10598  if test "x$TAIL" = x; then
10599    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10600  fi
10601
10602
10603
10604
10605
10606  # Publish this variable in the help.
10607
10608
10609  if [ -z "${TAR+x}" ]; then
10610    # The variable is not set by user, try to locate tool using the code snippet
10611    for ac_prog in tar
10612do
10613  # Extract the first word of "$ac_prog", so it can be a program name with args.
10614set dummy $ac_prog; ac_word=$2
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10616$as_echo_n "checking for $ac_word... " >&6; }
10617if ${ac_cv_path_TAR+:} false; then :
10618  $as_echo_n "(cached) " >&6
10619else
10620  case $TAR in
10621  [\\/]* | ?:[\\/]*)
10622  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10623  ;;
10624  *)
10625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630    for ac_exec_ext in '' $ac_executable_extensions; do
10631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10632    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634    break 2
10635  fi
10636done
10637  done
10638IFS=$as_save_IFS
10639
10640  ;;
10641esac
10642fi
10643TAR=$ac_cv_path_TAR
10644if test -n "$TAR"; then
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10646$as_echo "$TAR" >&6; }
10647else
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650fi
10651
10652
10653  test -n "$TAR" && break
10654done
10655
10656  else
10657    # The variable is set, but is it from the command line or the environment?
10658
10659    # Try to remove the string !TAR! from our list.
10660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10662      # If it failed, the variable was not from the command line. Ignore it,
10663      # but warn the user (except for BASH, which is always set by the calling BASH).
10664      if test "xTAR" != xBASH; then
10665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10666$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10667      fi
10668      # Try to locate tool using the code snippet
10669      for ac_prog in tar
10670do
10671  # Extract the first word of "$ac_prog", so it can be a program name with args.
10672set dummy $ac_prog; ac_word=$2
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674$as_echo_n "checking for $ac_word... " >&6; }
10675if ${ac_cv_path_TAR+:} false; then :
10676  $as_echo_n "(cached) " >&6
10677else
10678  case $TAR in
10679  [\\/]* | ?:[\\/]*)
10680  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10681  ;;
10682  *)
10683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684for as_dir in $PATH
10685do
10686  IFS=$as_save_IFS
10687  test -z "$as_dir" && as_dir=.
10688    for ac_exec_ext in '' $ac_executable_extensions; do
10689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10690    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692    break 2
10693  fi
10694done
10695  done
10696IFS=$as_save_IFS
10697
10698  ;;
10699esac
10700fi
10701TAR=$ac_cv_path_TAR
10702if test -n "$TAR"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10704$as_echo "$TAR" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711  test -n "$TAR" && break
10712done
10713
10714    else
10715      # If it succeeded, then it was overridden by the user. We will use it
10716      # for the tool.
10717
10718      # First remove it from the list of overridden variables, so we can test
10719      # for unknown variables in the end.
10720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10721
10722      # Check if we try to supply an empty value
10723      if test "x$TAR" = x; then
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10725$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10727$as_echo_n "checking for TAR... " >&6; }
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10729$as_echo "disabled" >&6; }
10730      else
10731        # Check if the provided tool contains a complete path.
10732        tool_specified="$TAR"
10733        tool_basename="${tool_specified##*/}"
10734        if test "x$tool_basename" = "x$tool_specified"; then
10735          # A command without a complete path is provided, search $PATH.
10736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10737$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10738          # Extract the first word of "$tool_basename", so it can be a program name with args.
10739set dummy $tool_basename; ac_word=$2
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10741$as_echo_n "checking for $ac_word... " >&6; }
10742if ${ac_cv_path_TAR+:} false; then :
10743  $as_echo_n "(cached) " >&6
10744else
10745  case $TAR in
10746  [\\/]* | ?:[\\/]*)
10747  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10748  ;;
10749  *)
10750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10751for as_dir in $PATH
10752do
10753  IFS=$as_save_IFS
10754  test -z "$as_dir" && as_dir=.
10755    for ac_exec_ext in '' $ac_executable_extensions; do
10756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10757    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10759    break 2
10760  fi
10761done
10762  done
10763IFS=$as_save_IFS
10764
10765  ;;
10766esac
10767fi
10768TAR=$ac_cv_path_TAR
10769if test -n "$TAR"; then
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10771$as_echo "$TAR" >&6; }
10772else
10773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
10775fi
10776
10777
10778          if test "x$TAR" = x; then
10779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10780          fi
10781        else
10782          # Otherwise we believe it is a complete path. Use it as it is.
10783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10784$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10786$as_echo_n "checking for TAR... " >&6; }
10787          if test ! -x "$tool_specified"; then
10788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10789$as_echo "not found" >&6; }
10790            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10791          fi
10792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10793$as_echo "$tool_specified" >&6; }
10794        fi
10795      fi
10796    fi
10797
10798  fi
10799
10800
10801
10802  if test "x$TAR" = x; then
10803    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10804  fi
10805
10806
10807
10808
10809
10810  # Publish this variable in the help.
10811
10812
10813  if [ -z "${TEE+x}" ]; then
10814    # The variable is not set by user, try to locate tool using the code snippet
10815    for ac_prog in tee
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_TEE+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $TEE in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847TEE=$ac_cv_path_TEE
10848if test -n "$TEE"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10850$as_echo "$TEE" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$TEE" && break
10858done
10859
10860  else
10861    # The variable is set, but is it from the command line or the environment?
10862
10863    # Try to remove the string !TEE! from our list.
10864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10866      # If it failed, the variable was not from the command line. Ignore it,
10867      # but warn the user (except for BASH, which is always set by the calling BASH).
10868      if test "xTEE" != xBASH; then
10869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10870$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10871      fi
10872      # Try to locate tool using the code snippet
10873      for ac_prog in tee
10874do
10875  # Extract the first word of "$ac_prog", so it can be a program name with args.
10876set dummy $ac_prog; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_TEE+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $TEE in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905TEE=$ac_cv_path_TEE
10906if test -n "$TEE"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10908$as_echo "$TEE" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915  test -n "$TEE" && break
10916done
10917
10918    else
10919      # If it succeeded, then it was overridden by the user. We will use it
10920      # for the tool.
10921
10922      # First remove it from the list of overridden variables, so we can test
10923      # for unknown variables in the end.
10924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10925
10926      # Check if we try to supply an empty value
10927      if test "x$TEE" = x; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10929$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10931$as_echo_n "checking for TEE... " >&6; }
10932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10933$as_echo "disabled" >&6; }
10934      else
10935        # Check if the provided tool contains a complete path.
10936        tool_specified="$TEE"
10937        tool_basename="${tool_specified##*/}"
10938        if test "x$tool_basename" = "x$tool_specified"; then
10939          # A command without a complete path is provided, search $PATH.
10940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10941$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10942          # Extract the first word of "$tool_basename", so it can be a program name with args.
10943set dummy $tool_basename; ac_word=$2
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945$as_echo_n "checking for $ac_word... " >&6; }
10946if ${ac_cv_path_TEE+:} false; then :
10947  $as_echo_n "(cached) " >&6
10948else
10949  case $TEE in
10950  [\\/]* | ?:[\\/]*)
10951  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10952  ;;
10953  *)
10954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955for as_dir in $PATH
10956do
10957  IFS=$as_save_IFS
10958  test -z "$as_dir" && as_dir=.
10959    for ac_exec_ext in '' $ac_executable_extensions; do
10960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10961    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10963    break 2
10964  fi
10965done
10966  done
10967IFS=$as_save_IFS
10968
10969  ;;
10970esac
10971fi
10972TEE=$ac_cv_path_TEE
10973if test -n "$TEE"; then
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10975$as_echo "$TEE" >&6; }
10976else
10977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
10979fi
10980
10981
10982          if test "x$TEE" = x; then
10983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10984          fi
10985        else
10986          # Otherwise we believe it is a complete path. Use it as it is.
10987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10988$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10990$as_echo_n "checking for TEE... " >&6; }
10991          if test ! -x "$tool_specified"; then
10992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10993$as_echo "not found" >&6; }
10994            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10995          fi
10996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10997$as_echo "$tool_specified" >&6; }
10998        fi
10999      fi
11000    fi
11001
11002  fi
11003
11004
11005
11006  if test "x$TEE" = x; then
11007    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11008  fi
11009
11010
11011
11012
11013
11014  # Publish this variable in the help.
11015
11016
11017  if [ -z "${TOUCH+x}" ]; then
11018    # The variable is not set by user, try to locate tool using the code snippet
11019    for ac_prog in touch
11020do
11021  # Extract the first word of "$ac_prog", so it can be a program name with args.
11022set dummy $ac_prog; ac_word=$2
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
11025if ${ac_cv_path_TOUCH+:} false; then :
11026  $as_echo_n "(cached) " >&6
11027else
11028  case $TOUCH in
11029  [\\/]* | ?:[\\/]*)
11030  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11031  ;;
11032  *)
11033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11034for as_dir in $PATH
11035do
11036  IFS=$as_save_IFS
11037  test -z "$as_dir" && as_dir=.
11038    for ac_exec_ext in '' $ac_executable_extensions; do
11039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11040    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11042    break 2
11043  fi
11044done
11045  done
11046IFS=$as_save_IFS
11047
11048  ;;
11049esac
11050fi
11051TOUCH=$ac_cv_path_TOUCH
11052if test -n "$TOUCH"; then
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11054$as_echo "$TOUCH" >&6; }
11055else
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057$as_echo "no" >&6; }
11058fi
11059
11060
11061  test -n "$TOUCH" && break
11062done
11063
11064  else
11065    # The variable is set, but is it from the command line or the environment?
11066
11067    # Try to remove the string !TOUCH! from our list.
11068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11070      # If it failed, the variable was not from the command line. Ignore it,
11071      # but warn the user (except for BASH, which is always set by the calling BASH).
11072      if test "xTOUCH" != xBASH; then
11073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11074$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11075      fi
11076      # Try to locate tool using the code snippet
11077      for ac_prog in touch
11078do
11079  # Extract the first word of "$ac_prog", so it can be a program name with args.
11080set dummy $ac_prog; ac_word=$2
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11082$as_echo_n "checking for $ac_word... " >&6; }
11083if ${ac_cv_path_TOUCH+:} false; then :
11084  $as_echo_n "(cached) " >&6
11085else
11086  case $TOUCH in
11087  [\\/]* | ?:[\\/]*)
11088  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11089  ;;
11090  *)
11091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092for as_dir in $PATH
11093do
11094  IFS=$as_save_IFS
11095  test -z "$as_dir" && as_dir=.
11096    for ac_exec_ext in '' $ac_executable_extensions; do
11097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11098    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11100    break 2
11101  fi
11102done
11103  done
11104IFS=$as_save_IFS
11105
11106  ;;
11107esac
11108fi
11109TOUCH=$ac_cv_path_TOUCH
11110if test -n "$TOUCH"; then
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11112$as_echo "$TOUCH" >&6; }
11113else
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11115$as_echo "no" >&6; }
11116fi
11117
11118
11119  test -n "$TOUCH" && break
11120done
11121
11122    else
11123      # If it succeeded, then it was overridden by the user. We will use it
11124      # for the tool.
11125
11126      # First remove it from the list of overridden variables, so we can test
11127      # for unknown variables in the end.
11128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11129
11130      # Check if we try to supply an empty value
11131      if test "x$TOUCH" = x; then
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11133$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11135$as_echo_n "checking for TOUCH... " >&6; }
11136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11137$as_echo "disabled" >&6; }
11138      else
11139        # Check if the provided tool contains a complete path.
11140        tool_specified="$TOUCH"
11141        tool_basename="${tool_specified##*/}"
11142        if test "x$tool_basename" = "x$tool_specified"; then
11143          # A command without a complete path is provided, search $PATH.
11144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11145$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11146          # Extract the first word of "$tool_basename", so it can be a program name with args.
11147set dummy $tool_basename; ac_word=$2
11148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11149$as_echo_n "checking for $ac_word... " >&6; }
11150if ${ac_cv_path_TOUCH+:} false; then :
11151  $as_echo_n "(cached) " >&6
11152else
11153  case $TOUCH in
11154  [\\/]* | ?:[\\/]*)
11155  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11156  ;;
11157  *)
11158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11159for as_dir in $PATH
11160do
11161  IFS=$as_save_IFS
11162  test -z "$as_dir" && as_dir=.
11163    for ac_exec_ext in '' $ac_executable_extensions; do
11164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11165    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11167    break 2
11168  fi
11169done
11170  done
11171IFS=$as_save_IFS
11172
11173  ;;
11174esac
11175fi
11176TOUCH=$ac_cv_path_TOUCH
11177if test -n "$TOUCH"; then
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11179$as_echo "$TOUCH" >&6; }
11180else
11181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
11183fi
11184
11185
11186          if test "x$TOUCH" = x; then
11187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11188          fi
11189        else
11190          # Otherwise we believe it is a complete path. Use it as it is.
11191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11192$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11194$as_echo_n "checking for TOUCH... " >&6; }
11195          if test ! -x "$tool_specified"; then
11196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11197$as_echo "not found" >&6; }
11198            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11199          fi
11200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11201$as_echo "$tool_specified" >&6; }
11202        fi
11203      fi
11204    fi
11205
11206  fi
11207
11208
11209
11210  if test "x$TOUCH" = x; then
11211    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11212  fi
11213
11214
11215
11216
11217
11218  # Publish this variable in the help.
11219
11220
11221  if [ -z "${TR+x}" ]; then
11222    # The variable is not set by user, try to locate tool using the code snippet
11223    for ac_prog in tr
11224do
11225  # Extract the first word of "$ac_prog", so it can be a program name with args.
11226set dummy $ac_prog; ac_word=$2
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11228$as_echo_n "checking for $ac_word... " >&6; }
11229if ${ac_cv_path_TR+:} false; then :
11230  $as_echo_n "(cached) " >&6
11231else
11232  case $TR in
11233  [\\/]* | ?:[\\/]*)
11234  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11235  ;;
11236  *)
11237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11238for as_dir in $PATH
11239do
11240  IFS=$as_save_IFS
11241  test -z "$as_dir" && as_dir=.
11242    for ac_exec_ext in '' $ac_executable_extensions; do
11243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11244    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11246    break 2
11247  fi
11248done
11249  done
11250IFS=$as_save_IFS
11251
11252  ;;
11253esac
11254fi
11255TR=$ac_cv_path_TR
11256if test -n "$TR"; then
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11258$as_echo "$TR" >&6; }
11259else
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
11262fi
11263
11264
11265  test -n "$TR" && break
11266done
11267
11268  else
11269    # The variable is set, but is it from the command line or the environment?
11270
11271    # Try to remove the string !TR! from our list.
11272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11274      # If it failed, the variable was not from the command line. Ignore it,
11275      # but warn the user (except for BASH, which is always set by the calling BASH).
11276      if test "xTR" != xBASH; then
11277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11278$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11279      fi
11280      # Try to locate tool using the code snippet
11281      for ac_prog in tr
11282do
11283  # Extract the first word of "$ac_prog", so it can be a program name with args.
11284set dummy $ac_prog; ac_word=$2
11285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11286$as_echo_n "checking for $ac_word... " >&6; }
11287if ${ac_cv_path_TR+:} false; then :
11288  $as_echo_n "(cached) " >&6
11289else
11290  case $TR in
11291  [\\/]* | ?:[\\/]*)
11292  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11293  ;;
11294  *)
11295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11296for as_dir in $PATH
11297do
11298  IFS=$as_save_IFS
11299  test -z "$as_dir" && as_dir=.
11300    for ac_exec_ext in '' $ac_executable_extensions; do
11301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11302    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11304    break 2
11305  fi
11306done
11307  done
11308IFS=$as_save_IFS
11309
11310  ;;
11311esac
11312fi
11313TR=$ac_cv_path_TR
11314if test -n "$TR"; then
11315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11316$as_echo "$TR" >&6; }
11317else
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
11320fi
11321
11322
11323  test -n "$TR" && break
11324done
11325
11326    else
11327      # If it succeeded, then it was overridden by the user. We will use it
11328      # for the tool.
11329
11330      # First remove it from the list of overridden variables, so we can test
11331      # for unknown variables in the end.
11332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11333
11334      # Check if we try to supply an empty value
11335      if test "x$TR" = x; then
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11337$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11339$as_echo_n "checking for TR... " >&6; }
11340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11341$as_echo "disabled" >&6; }
11342      else
11343        # Check if the provided tool contains a complete path.
11344        tool_specified="$TR"
11345        tool_basename="${tool_specified##*/}"
11346        if test "x$tool_basename" = "x$tool_specified"; then
11347          # A command without a complete path is provided, search $PATH.
11348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11349$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11350          # Extract the first word of "$tool_basename", so it can be a program name with args.
11351set dummy $tool_basename; ac_word=$2
11352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11353$as_echo_n "checking for $ac_word... " >&6; }
11354if ${ac_cv_path_TR+:} false; then :
11355  $as_echo_n "(cached) " >&6
11356else
11357  case $TR in
11358  [\\/]* | ?:[\\/]*)
11359  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11360  ;;
11361  *)
11362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11363for as_dir in $PATH
11364do
11365  IFS=$as_save_IFS
11366  test -z "$as_dir" && as_dir=.
11367    for ac_exec_ext in '' $ac_executable_extensions; do
11368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11369    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11371    break 2
11372  fi
11373done
11374  done
11375IFS=$as_save_IFS
11376
11377  ;;
11378esac
11379fi
11380TR=$ac_cv_path_TR
11381if test -n "$TR"; then
11382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11383$as_echo "$TR" >&6; }
11384else
11385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
11387fi
11388
11389
11390          if test "x$TR" = x; then
11391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11392          fi
11393        else
11394          # Otherwise we believe it is a complete path. Use it as it is.
11395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11396$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11398$as_echo_n "checking for TR... " >&6; }
11399          if test ! -x "$tool_specified"; then
11400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11401$as_echo "not found" >&6; }
11402            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11403          fi
11404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11405$as_echo "$tool_specified" >&6; }
11406        fi
11407      fi
11408    fi
11409
11410  fi
11411
11412
11413
11414  if test "x$TR" = x; then
11415    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11416  fi
11417
11418
11419
11420
11421
11422  # Publish this variable in the help.
11423
11424
11425  if [ -z "${UNAME+x}" ]; then
11426    # The variable is not set by user, try to locate tool using the code snippet
11427    for ac_prog in uname
11428do
11429  # Extract the first word of "$ac_prog", so it can be a program name with args.
11430set dummy $ac_prog; ac_word=$2
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11432$as_echo_n "checking for $ac_word... " >&6; }
11433if ${ac_cv_path_UNAME+:} false; then :
11434  $as_echo_n "(cached) " >&6
11435else
11436  case $UNAME in
11437  [\\/]* | ?:[\\/]*)
11438  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11439  ;;
11440  *)
11441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456  ;;
11457esac
11458fi
11459UNAME=$ac_cv_path_UNAME
11460if test -n "$UNAME"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11462$as_echo "$UNAME" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$UNAME" && break
11470done
11471
11472  else
11473    # The variable is set, but is it from the command line or the environment?
11474
11475    # Try to remove the string !UNAME! from our list.
11476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11478      # If it failed, the variable was not from the command line. Ignore it,
11479      # but warn the user (except for BASH, which is always set by the calling BASH).
11480      if test "xUNAME" != xBASH; then
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11482$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11483      fi
11484      # Try to locate tool using the code snippet
11485      for ac_prog in uname
11486do
11487  # Extract the first word of "$ac_prog", so it can be a program name with args.
11488set dummy $ac_prog; 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_UNAME+:} false; then :
11492  $as_echo_n "(cached) " >&6
11493else
11494  case $UNAME in
11495  [\\/]* | ?:[\\/]*)
11496  ac_cv_path_UNAME="$UNAME" # 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_UNAME="$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
11517UNAME=$ac_cv_path_UNAME
11518if test -n "$UNAME"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11520$as_echo "$UNAME" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527  test -n "$UNAME" && break
11528done
11529
11530    else
11531      # If it succeeded, then it was overridden by the user. We will use it
11532      # for the tool.
11533
11534      # First remove it from the list of overridden variables, so we can test
11535      # for unknown variables in the end.
11536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11537
11538      # Check if we try to supply an empty value
11539      if test "x$UNAME" = x; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11541$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11543$as_echo_n "checking for UNAME... " >&6; }
11544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11545$as_echo "disabled" >&6; }
11546      else
11547        # Check if the provided tool contains a complete path.
11548        tool_specified="$UNAME"
11549        tool_basename="${tool_specified##*/}"
11550        if test "x$tool_basename" = "x$tool_specified"; then
11551          # A command without a complete path is provided, search $PATH.
11552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11553$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11554          # Extract the first word of "$tool_basename", so it can be a program name with args.
11555set dummy $tool_basename; ac_word=$2
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11557$as_echo_n "checking for $ac_word... " >&6; }
11558if ${ac_cv_path_UNAME+:} false; then :
11559  $as_echo_n "(cached) " >&6
11560else
11561  case $UNAME in
11562  [\\/]* | ?:[\\/]*)
11563  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11564  ;;
11565  *)
11566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11567for as_dir in $PATH
11568do
11569  IFS=$as_save_IFS
11570  test -z "$as_dir" && as_dir=.
11571    for ac_exec_ext in '' $ac_executable_extensions; do
11572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11573    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11575    break 2
11576  fi
11577done
11578  done
11579IFS=$as_save_IFS
11580
11581  ;;
11582esac
11583fi
11584UNAME=$ac_cv_path_UNAME
11585if test -n "$UNAME"; then
11586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11587$as_echo "$UNAME" >&6; }
11588else
11589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11590$as_echo "no" >&6; }
11591fi
11592
11593
11594          if test "x$UNAME" = x; then
11595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11596          fi
11597        else
11598          # Otherwise we believe it is a complete path. Use it as it is.
11599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11600$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11602$as_echo_n "checking for UNAME... " >&6; }
11603          if test ! -x "$tool_specified"; then
11604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11605$as_echo "not found" >&6; }
11606            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11607          fi
11608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11609$as_echo "$tool_specified" >&6; }
11610        fi
11611      fi
11612    fi
11613
11614  fi
11615
11616
11617
11618  if test "x$UNAME" = x; then
11619    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11620  fi
11621
11622
11623
11624
11625
11626  # Publish this variable in the help.
11627
11628
11629  if [ -z "${UNIQ+x}" ]; then
11630    # The variable is not set by user, try to locate tool using the code snippet
11631    for ac_prog in uniq
11632do
11633  # Extract the first word of "$ac_prog", so it can be a program name with args.
11634set dummy $ac_prog; ac_word=$2
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11636$as_echo_n "checking for $ac_word... " >&6; }
11637if ${ac_cv_path_UNIQ+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  case $UNIQ in
11641  [\\/]* | ?:[\\/]*)
11642  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11643  ;;
11644  *)
11645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH
11647do
11648  IFS=$as_save_IFS
11649  test -z "$as_dir" && as_dir=.
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11652    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11654    break 2
11655  fi
11656done
11657  done
11658IFS=$as_save_IFS
11659
11660  ;;
11661esac
11662fi
11663UNIQ=$ac_cv_path_UNIQ
11664if test -n "$UNIQ"; then
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11666$as_echo "$UNIQ" >&6; }
11667else
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11669$as_echo "no" >&6; }
11670fi
11671
11672
11673  test -n "$UNIQ" && break
11674done
11675
11676  else
11677    # The variable is set, but is it from the command line or the environment?
11678
11679    # Try to remove the string !UNIQ! from our list.
11680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11682      # If it failed, the variable was not from the command line. Ignore it,
11683      # but warn the user (except for BASH, which is always set by the calling BASH).
11684      if test "xUNIQ" != xBASH; then
11685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11686$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11687      fi
11688      # Try to locate tool using the code snippet
11689      for ac_prog in uniq
11690do
11691  # Extract the first word of "$ac_prog", so it can be a program name with args.
11692set dummy $ac_prog; ac_word=$2
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11694$as_echo_n "checking for $ac_word... " >&6; }
11695if ${ac_cv_path_UNIQ+:} false; then :
11696  $as_echo_n "(cached) " >&6
11697else
11698  case $UNIQ in
11699  [\\/]* | ?:[\\/]*)
11700  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11701  ;;
11702  *)
11703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11704for as_dir in $PATH
11705do
11706  IFS=$as_save_IFS
11707  test -z "$as_dir" && as_dir=.
11708    for ac_exec_ext in '' $ac_executable_extensions; do
11709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11710    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11712    break 2
11713  fi
11714done
11715  done
11716IFS=$as_save_IFS
11717
11718  ;;
11719esac
11720fi
11721UNIQ=$ac_cv_path_UNIQ
11722if test -n "$UNIQ"; then
11723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11724$as_echo "$UNIQ" >&6; }
11725else
11726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
11728fi
11729
11730
11731  test -n "$UNIQ" && break
11732done
11733
11734    else
11735      # If it succeeded, then it was overridden by the user. We will use it
11736      # for the tool.
11737
11738      # First remove it from the list of overridden variables, so we can test
11739      # for unknown variables in the end.
11740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11741
11742      # Check if we try to supply an empty value
11743      if test "x$UNIQ" = x; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11745$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11747$as_echo_n "checking for UNIQ... " >&6; }
11748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11749$as_echo "disabled" >&6; }
11750      else
11751        # Check if the provided tool contains a complete path.
11752        tool_specified="$UNIQ"
11753        tool_basename="${tool_specified##*/}"
11754        if test "x$tool_basename" = "x$tool_specified"; then
11755          # A command without a complete path is provided, search $PATH.
11756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11757$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11758          # Extract the first word of "$tool_basename", so it can be a program name with args.
11759set dummy $tool_basename; ac_word=$2
11760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11761$as_echo_n "checking for $ac_word... " >&6; }
11762if ${ac_cv_path_UNIQ+:} false; then :
11763  $as_echo_n "(cached) " >&6
11764else
11765  case $UNIQ in
11766  [\\/]* | ?:[\\/]*)
11767  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11768  ;;
11769  *)
11770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11771for as_dir in $PATH
11772do
11773  IFS=$as_save_IFS
11774  test -z "$as_dir" && as_dir=.
11775    for ac_exec_ext in '' $ac_executable_extensions; do
11776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11777    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11779    break 2
11780  fi
11781done
11782  done
11783IFS=$as_save_IFS
11784
11785  ;;
11786esac
11787fi
11788UNIQ=$ac_cv_path_UNIQ
11789if test -n "$UNIQ"; then
11790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11791$as_echo "$UNIQ" >&6; }
11792else
11793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794$as_echo "no" >&6; }
11795fi
11796
11797
11798          if test "x$UNIQ" = x; then
11799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11800          fi
11801        else
11802          # Otherwise we believe it is a complete path. Use it as it is.
11803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11804$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11806$as_echo_n "checking for UNIQ... " >&6; }
11807          if test ! -x "$tool_specified"; then
11808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11809$as_echo "not found" >&6; }
11810            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11811          fi
11812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11813$as_echo "$tool_specified" >&6; }
11814        fi
11815      fi
11816    fi
11817
11818  fi
11819
11820
11821
11822  if test "x$UNIQ" = x; then
11823    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11824  fi
11825
11826
11827
11828
11829
11830  # Publish this variable in the help.
11831
11832
11833  if [ -z "${WC+x}" ]; then
11834    # The variable is not set by user, try to locate tool using the code snippet
11835    for ac_prog in wc
11836do
11837  # Extract the first word of "$ac_prog", so it can be a program name with args.
11838set dummy $ac_prog; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_path_WC+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  case $WC in
11845  [\\/]* | ?:[\\/]*)
11846  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11847  ;;
11848  *)
11849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11850for as_dir in $PATH
11851do
11852  IFS=$as_save_IFS
11853  test -z "$as_dir" && as_dir=.
11854    for ac_exec_ext in '' $ac_executable_extensions; do
11855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11856    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11858    break 2
11859  fi
11860done
11861  done
11862IFS=$as_save_IFS
11863
11864  ;;
11865esac
11866fi
11867WC=$ac_cv_path_WC
11868if test -n "$WC"; then
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11870$as_echo "$WC" >&6; }
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874fi
11875
11876
11877  test -n "$WC" && break
11878done
11879
11880  else
11881    # The variable is set, but is it from the command line or the environment?
11882
11883    # Try to remove the string !WC! from our list.
11884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11886      # If it failed, the variable was not from the command line. Ignore it,
11887      # but warn the user (except for BASH, which is always set by the calling BASH).
11888      if test "xWC" != xBASH; then
11889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11890$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11891      fi
11892      # Try to locate tool using the code snippet
11893      for ac_prog in wc
11894do
11895  # Extract the first word of "$ac_prog", so it can be a program name with args.
11896set dummy $ac_prog; ac_word=$2
11897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11898$as_echo_n "checking for $ac_word... " >&6; }
11899if ${ac_cv_path_WC+:} false; then :
11900  $as_echo_n "(cached) " >&6
11901else
11902  case $WC in
11903  [\\/]* | ?:[\\/]*)
11904  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11905  ;;
11906  *)
11907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908for as_dir in $PATH
11909do
11910  IFS=$as_save_IFS
11911  test -z "$as_dir" && as_dir=.
11912    for ac_exec_ext in '' $ac_executable_extensions; do
11913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11914    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11916    break 2
11917  fi
11918done
11919  done
11920IFS=$as_save_IFS
11921
11922  ;;
11923esac
11924fi
11925WC=$ac_cv_path_WC
11926if test -n "$WC"; then
11927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11928$as_echo "$WC" >&6; }
11929else
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931$as_echo "no" >&6; }
11932fi
11933
11934
11935  test -n "$WC" && break
11936done
11937
11938    else
11939      # If it succeeded, then it was overridden by the user. We will use it
11940      # for the tool.
11941
11942      # First remove it from the list of overridden variables, so we can test
11943      # for unknown variables in the end.
11944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11945
11946      # Check if we try to supply an empty value
11947      if test "x$WC" = x; then
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11949$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11951$as_echo_n "checking for WC... " >&6; }
11952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11953$as_echo "disabled" >&6; }
11954      else
11955        # Check if the provided tool contains a complete path.
11956        tool_specified="$WC"
11957        tool_basename="${tool_specified##*/}"
11958        if test "x$tool_basename" = "x$tool_specified"; then
11959          # A command without a complete path is provided, search $PATH.
11960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11961$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11962          # Extract the first word of "$tool_basename", so it can be a program name with args.
11963set dummy $tool_basename; ac_word=$2
11964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11965$as_echo_n "checking for $ac_word... " >&6; }
11966if ${ac_cv_path_WC+:} false; then :
11967  $as_echo_n "(cached) " >&6
11968else
11969  case $WC in
11970  [\\/]* | ?:[\\/]*)
11971  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11972  ;;
11973  *)
11974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11975for as_dir in $PATH
11976do
11977  IFS=$as_save_IFS
11978  test -z "$as_dir" && as_dir=.
11979    for ac_exec_ext in '' $ac_executable_extensions; do
11980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11981    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11983    break 2
11984  fi
11985done
11986  done
11987IFS=$as_save_IFS
11988
11989  ;;
11990esac
11991fi
11992WC=$ac_cv_path_WC
11993if test -n "$WC"; then
11994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11995$as_echo "$WC" >&6; }
11996else
11997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11998$as_echo "no" >&6; }
11999fi
12000
12001
12002          if test "x$WC" = x; then
12003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12004          fi
12005        else
12006          # Otherwise we believe it is a complete path. Use it as it is.
12007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12008$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12010$as_echo_n "checking for WC... " >&6; }
12011          if test ! -x "$tool_specified"; then
12012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12013$as_echo "not found" >&6; }
12014            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12015          fi
12016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12017$as_echo "$tool_specified" >&6; }
12018        fi
12019      fi
12020    fi
12021
12022  fi
12023
12024
12025
12026  if test "x$WC" = x; then
12027    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12028  fi
12029
12030
12031
12032
12033
12034  # Publish this variable in the help.
12035
12036
12037  if [ -z "${WHICH+x}" ]; then
12038    # The variable is not set by user, try to locate tool using the code snippet
12039    for ac_prog in which
12040do
12041  # Extract the first word of "$ac_prog", so it can be a program name with args.
12042set dummy $ac_prog; ac_word=$2
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12044$as_echo_n "checking for $ac_word... " >&6; }
12045if ${ac_cv_path_WHICH+:} false; then :
12046  $as_echo_n "(cached) " >&6
12047else
12048  case $WHICH in
12049  [\\/]* | ?:[\\/]*)
12050  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12051  ;;
12052  *)
12053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054for as_dir in $PATH
12055do
12056  IFS=$as_save_IFS
12057  test -z "$as_dir" && as_dir=.
12058    for ac_exec_ext in '' $ac_executable_extensions; do
12059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12060    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12062    break 2
12063  fi
12064done
12065  done
12066IFS=$as_save_IFS
12067
12068  ;;
12069esac
12070fi
12071WHICH=$ac_cv_path_WHICH
12072if test -n "$WHICH"; then
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12074$as_echo "$WHICH" >&6; }
12075else
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077$as_echo "no" >&6; }
12078fi
12079
12080
12081  test -n "$WHICH" && break
12082done
12083
12084  else
12085    # The variable is set, but is it from the command line or the environment?
12086
12087    # Try to remove the string !WHICH! from our list.
12088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12090      # If it failed, the variable was not from the command line. Ignore it,
12091      # but warn the user (except for BASH, which is always set by the calling BASH).
12092      if test "xWHICH" != xBASH; then
12093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12094$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12095      fi
12096      # Try to locate tool using the code snippet
12097      for ac_prog in which
12098do
12099  # Extract the first word of "$ac_prog", so it can be a program name with args.
12100set dummy $ac_prog; ac_word=$2
12101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12102$as_echo_n "checking for $ac_word... " >&6; }
12103if ${ac_cv_path_WHICH+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106  case $WHICH in
12107  [\\/]* | ?:[\\/]*)
12108  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12109  ;;
12110  *)
12111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH
12113do
12114  IFS=$as_save_IFS
12115  test -z "$as_dir" && as_dir=.
12116    for ac_exec_ext in '' $ac_executable_extensions; do
12117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12118    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12120    break 2
12121  fi
12122done
12123  done
12124IFS=$as_save_IFS
12125
12126  ;;
12127esac
12128fi
12129WHICH=$ac_cv_path_WHICH
12130if test -n "$WHICH"; then
12131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12132$as_echo "$WHICH" >&6; }
12133else
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12135$as_echo "no" >&6; }
12136fi
12137
12138
12139  test -n "$WHICH" && break
12140done
12141
12142    else
12143      # If it succeeded, then it was overridden by the user. We will use it
12144      # for the tool.
12145
12146      # First remove it from the list of overridden variables, so we can test
12147      # for unknown variables in the end.
12148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12149
12150      # Check if we try to supply an empty value
12151      if test "x$WHICH" = x; then
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12153$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12155$as_echo_n "checking for WHICH... " >&6; }
12156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12157$as_echo "disabled" >&6; }
12158      else
12159        # Check if the provided tool contains a complete path.
12160        tool_specified="$WHICH"
12161        tool_basename="${tool_specified##*/}"
12162        if test "x$tool_basename" = "x$tool_specified"; then
12163          # A command without a complete path is provided, search $PATH.
12164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12165$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12166          # Extract the first word of "$tool_basename", so it can be a program name with args.
12167set dummy $tool_basename; ac_word=$2
12168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12169$as_echo_n "checking for $ac_word... " >&6; }
12170if ${ac_cv_path_WHICH+:} false; then :
12171  $as_echo_n "(cached) " >&6
12172else
12173  case $WHICH in
12174  [\\/]* | ?:[\\/]*)
12175  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12176  ;;
12177  *)
12178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12179for as_dir in $PATH
12180do
12181  IFS=$as_save_IFS
12182  test -z "$as_dir" && as_dir=.
12183    for ac_exec_ext in '' $ac_executable_extensions; do
12184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12185    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12187    break 2
12188  fi
12189done
12190  done
12191IFS=$as_save_IFS
12192
12193  ;;
12194esac
12195fi
12196WHICH=$ac_cv_path_WHICH
12197if test -n "$WHICH"; then
12198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12199$as_echo "$WHICH" >&6; }
12200else
12201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12202$as_echo "no" >&6; }
12203fi
12204
12205
12206          if test "x$WHICH" = x; then
12207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12208          fi
12209        else
12210          # Otherwise we believe it is a complete path. Use it as it is.
12211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12212$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12214$as_echo_n "checking for WHICH... " >&6; }
12215          if test ! -x "$tool_specified"; then
12216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12217$as_echo "not found" >&6; }
12218            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12219          fi
12220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12221$as_echo "$tool_specified" >&6; }
12222        fi
12223      fi
12224    fi
12225
12226  fi
12227
12228
12229
12230  if test "x$WHICH" = x; then
12231    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12232  fi
12233
12234
12235
12236
12237
12238  # Publish this variable in the help.
12239
12240
12241  if [ -z "${XARGS+x}" ]; then
12242    # The variable is not set by user, try to locate tool using the code snippet
12243    for ac_prog in xargs
12244do
12245  # Extract the first word of "$ac_prog", so it can be a program name with args.
12246set dummy $ac_prog; ac_word=$2
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12248$as_echo_n "checking for $ac_word... " >&6; }
12249if ${ac_cv_path_XARGS+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  case $XARGS in
12253  [\\/]* | ?:[\\/]*)
12254  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12255  ;;
12256  *)
12257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12258for as_dir in $PATH
12259do
12260  IFS=$as_save_IFS
12261  test -z "$as_dir" && as_dir=.
12262    for ac_exec_ext in '' $ac_executable_extensions; do
12263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12264    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12266    break 2
12267  fi
12268done
12269  done
12270IFS=$as_save_IFS
12271
12272  ;;
12273esac
12274fi
12275XARGS=$ac_cv_path_XARGS
12276if test -n "$XARGS"; then
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12278$as_echo "$XARGS" >&6; }
12279else
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
12282fi
12283
12284
12285  test -n "$XARGS" && break
12286done
12287
12288  else
12289    # The variable is set, but is it from the command line or the environment?
12290
12291    # Try to remove the string !XARGS! from our list.
12292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12294      # If it failed, the variable was not from the command line. Ignore it,
12295      # but warn the user (except for BASH, which is always set by the calling BASH).
12296      if test "xXARGS" != xBASH; then
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12298$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12299      fi
12300      # Try to locate tool using the code snippet
12301      for ac_prog in xargs
12302do
12303  # Extract the first word of "$ac_prog", so it can be a program name with args.
12304set dummy $ac_prog; ac_word=$2
12305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12306$as_echo_n "checking for $ac_word... " >&6; }
12307if ${ac_cv_path_XARGS+:} false; then :
12308  $as_echo_n "(cached) " >&6
12309else
12310  case $XARGS in
12311  [\\/]* | ?:[\\/]*)
12312  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12313  ;;
12314  *)
12315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316for as_dir in $PATH
12317do
12318  IFS=$as_save_IFS
12319  test -z "$as_dir" && as_dir=.
12320    for ac_exec_ext in '' $ac_executable_extensions; do
12321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12322    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12324    break 2
12325  fi
12326done
12327  done
12328IFS=$as_save_IFS
12329
12330  ;;
12331esac
12332fi
12333XARGS=$ac_cv_path_XARGS
12334if test -n "$XARGS"; then
12335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12336$as_echo "$XARGS" >&6; }
12337else
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
12340fi
12341
12342
12343  test -n "$XARGS" && break
12344done
12345
12346    else
12347      # If it succeeded, then it was overridden by the user. We will use it
12348      # for the tool.
12349
12350      # First remove it from the list of overridden variables, so we can test
12351      # for unknown variables in the end.
12352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12353
12354      # Check if we try to supply an empty value
12355      if test "x$XARGS" = x; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12357$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12359$as_echo_n "checking for XARGS... " >&6; }
12360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12361$as_echo "disabled" >&6; }
12362      else
12363        # Check if the provided tool contains a complete path.
12364        tool_specified="$XARGS"
12365        tool_basename="${tool_specified##*/}"
12366        if test "x$tool_basename" = "x$tool_specified"; then
12367          # A command without a complete path is provided, search $PATH.
12368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12369$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12370          # Extract the first word of "$tool_basename", so it can be a program name with args.
12371set dummy $tool_basename; ac_word=$2
12372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12373$as_echo_n "checking for $ac_word... " >&6; }
12374if ${ac_cv_path_XARGS+:} false; then :
12375  $as_echo_n "(cached) " >&6
12376else
12377  case $XARGS in
12378  [\\/]* | ?:[\\/]*)
12379  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12380  ;;
12381  *)
12382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383for as_dir in $PATH
12384do
12385  IFS=$as_save_IFS
12386  test -z "$as_dir" && as_dir=.
12387    for ac_exec_ext in '' $ac_executable_extensions; do
12388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12389    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12391    break 2
12392  fi
12393done
12394  done
12395IFS=$as_save_IFS
12396
12397  ;;
12398esac
12399fi
12400XARGS=$ac_cv_path_XARGS
12401if test -n "$XARGS"; then
12402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12403$as_echo "$XARGS" >&6; }
12404else
12405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
12407fi
12408
12409
12410          if test "x$XARGS" = x; then
12411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12412          fi
12413        else
12414          # Otherwise we believe it is a complete path. Use it as it is.
12415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12416$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12418$as_echo_n "checking for XARGS... " >&6; }
12419          if test ! -x "$tool_specified"; then
12420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12421$as_echo "not found" >&6; }
12422            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12423          fi
12424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12425$as_echo "$tool_specified" >&6; }
12426        fi
12427      fi
12428    fi
12429
12430  fi
12431
12432
12433
12434  if test "x$XARGS" = x; then
12435    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12436  fi
12437
12438
12439
12440  # Then required tools that require some special treatment.
12441
12442
12443  # Publish this variable in the help.
12444
12445
12446  if [ -z "${AWK+x}" ]; then
12447    # The variable is not set by user, try to locate tool using the code snippet
12448    for ac_prog in gawk mawk nawk awk
12449do
12450  # Extract the first word of "$ac_prog", so it can be a program name with args.
12451set dummy $ac_prog; ac_word=$2
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12453$as_echo_n "checking for $ac_word... " >&6; }
12454if ${ac_cv_prog_AWK+:} false; then :
12455  $as_echo_n "(cached) " >&6
12456else
12457  if test -n "$AWK"; then
12458  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12459else
12460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12461for as_dir in $PATH
12462do
12463  IFS=$as_save_IFS
12464  test -z "$as_dir" && as_dir=.
12465    for ac_exec_ext in '' $ac_executable_extensions; do
12466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12467    ac_cv_prog_AWK="$ac_prog"
12468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12469    break 2
12470  fi
12471done
12472  done
12473IFS=$as_save_IFS
12474
12475fi
12476fi
12477AWK=$ac_cv_prog_AWK
12478if test -n "$AWK"; then
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12480$as_echo "$AWK" >&6; }
12481else
12482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12483$as_echo "no" >&6; }
12484fi
12485
12486
12487  test -n "$AWK" && break
12488done
12489
12490  else
12491    # The variable is set, but is it from the command line or the environment?
12492
12493    # Try to remove the string !AWK! from our list.
12494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12496      # If it failed, the variable was not from the command line. Ignore it,
12497      # but warn the user (except for BASH, which is always set by the calling BASH).
12498      if test "xAWK" != xBASH; then
12499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12500$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12501      fi
12502      # Try to locate tool using the code snippet
12503      for ac_prog in gawk mawk nawk awk
12504do
12505  # Extract the first word of "$ac_prog", so it can be a program name with args.
12506set dummy $ac_prog; ac_word=$2
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12508$as_echo_n "checking for $ac_word... " >&6; }
12509if ${ac_cv_prog_AWK+:} false; then :
12510  $as_echo_n "(cached) " >&6
12511else
12512  if test -n "$AWK"; then
12513  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12514else
12515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12516for as_dir in $PATH
12517do
12518  IFS=$as_save_IFS
12519  test -z "$as_dir" && as_dir=.
12520    for ac_exec_ext in '' $ac_executable_extensions; do
12521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12522    ac_cv_prog_AWK="$ac_prog"
12523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12524    break 2
12525  fi
12526done
12527  done
12528IFS=$as_save_IFS
12529
12530fi
12531fi
12532AWK=$ac_cv_prog_AWK
12533if test -n "$AWK"; then
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12535$as_echo "$AWK" >&6; }
12536else
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
12539fi
12540
12541
12542  test -n "$AWK" && break
12543done
12544
12545    else
12546      # If it succeeded, then it was overridden by the user. We will use it
12547      # for the tool.
12548
12549      # First remove it from the list of overridden variables, so we can test
12550      # for unknown variables in the end.
12551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12552
12553      # Check if we try to supply an empty value
12554      if test "x$AWK" = x; then
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12556$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12558$as_echo_n "checking for AWK... " >&6; }
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12560$as_echo "disabled" >&6; }
12561      else
12562        # Check if the provided tool contains a complete path.
12563        tool_specified="$AWK"
12564        tool_basename="${tool_specified##*/}"
12565        if test "x$tool_basename" = "x$tool_specified"; then
12566          # A command without a complete path is provided, search $PATH.
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12568$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12569          # Extract the first word of "$tool_basename", so it can be a program name with args.
12570set dummy $tool_basename; ac_word=$2
12571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12572$as_echo_n "checking for $ac_word... " >&6; }
12573if ${ac_cv_path_AWK+:} false; then :
12574  $as_echo_n "(cached) " >&6
12575else
12576  case $AWK in
12577  [\\/]* | ?:[\\/]*)
12578  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12579  ;;
12580  *)
12581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12582for as_dir in $PATH
12583do
12584  IFS=$as_save_IFS
12585  test -z "$as_dir" && as_dir=.
12586    for ac_exec_ext in '' $ac_executable_extensions; do
12587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12588    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12590    break 2
12591  fi
12592done
12593  done
12594IFS=$as_save_IFS
12595
12596  ;;
12597esac
12598fi
12599AWK=$ac_cv_path_AWK
12600if test -n "$AWK"; then
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12602$as_echo "$AWK" >&6; }
12603else
12604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12605$as_echo "no" >&6; }
12606fi
12607
12608
12609          if test "x$AWK" = x; then
12610            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12611          fi
12612        else
12613          # Otherwise we believe it is a complete path. Use it as it is.
12614          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12615$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12616          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12617$as_echo_n "checking for AWK... " >&6; }
12618          if test ! -x "$tool_specified"; then
12619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12620$as_echo "not found" >&6; }
12621            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12622          fi
12623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12624$as_echo "$tool_specified" >&6; }
12625        fi
12626      fi
12627    fi
12628
12629  fi
12630
12631
12632  if test "x$AWK" = x; then
12633    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12634  fi
12635
12636
12637
12638
12639  # Publish this variable in the help.
12640
12641
12642  if [ -z "${GREP+x}" ]; then
12643    # The variable is not set by user, try to locate tool using the code snippet
12644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12645$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12646if ${ac_cv_path_GREP+:} false; then :
12647  $as_echo_n "(cached) " >&6
12648else
12649  if test -z "$GREP"; then
12650  ac_path_GREP_found=false
12651  # Loop through the user's path and test for each of PROGNAME-LIST
12652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12653for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12654do
12655  IFS=$as_save_IFS
12656  test -z "$as_dir" && as_dir=.
12657    for ac_prog in grep ggrep; do
12658    for ac_exec_ext in '' $ac_executable_extensions; do
12659      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12660      as_fn_executable_p "$ac_path_GREP" || continue
12661# Check for GNU ac_path_GREP and select it if it is found.
12662  # Check for GNU $ac_path_GREP
12663case `"$ac_path_GREP" --version 2>&1` in
12664*GNU*)
12665  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12666*)
12667  ac_count=0
12668  $as_echo_n 0123456789 >"conftest.in"
12669  while :
12670  do
12671    cat "conftest.in" "conftest.in" >"conftest.tmp"
12672    mv "conftest.tmp" "conftest.in"
12673    cp "conftest.in" "conftest.nl"
12674    $as_echo 'GREP' >> "conftest.nl"
12675    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12676    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12677    as_fn_arith $ac_count + 1 && ac_count=$as_val
12678    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12679      # Best one so far, save it but keep looking for a better one
12680      ac_cv_path_GREP="$ac_path_GREP"
12681      ac_path_GREP_max=$ac_count
12682    fi
12683    # 10*(2^10) chars as input seems more than enough
12684    test $ac_count -gt 10 && break
12685  done
12686  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12687esac
12688
12689      $ac_path_GREP_found && break 3
12690    done
12691  done
12692  done
12693IFS=$as_save_IFS
12694  if test -z "$ac_cv_path_GREP"; then
12695    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12696  fi
12697else
12698  ac_cv_path_GREP=$GREP
12699fi
12700
12701fi
12702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12703$as_echo "$ac_cv_path_GREP" >&6; }
12704 GREP="$ac_cv_path_GREP"
12705
12706
12707  else
12708    # The variable is set, but is it from the command line or the environment?
12709
12710    # Try to remove the string !GREP! from our list.
12711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12713      # If it failed, the variable was not from the command line. Ignore it,
12714      # but warn the user (except for BASH, which is always set by the calling BASH).
12715      if test "xGREP" != xBASH; then
12716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12717$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12718      fi
12719      # Try to locate tool using the code snippet
12720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12721$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12722if ${ac_cv_path_GREP+:} false; then :
12723  $as_echo_n "(cached) " >&6
12724else
12725  if test -z "$GREP"; then
12726  ac_path_GREP_found=false
12727  # Loop through the user's path and test for each of PROGNAME-LIST
12728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12729for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12730do
12731  IFS=$as_save_IFS
12732  test -z "$as_dir" && as_dir=.
12733    for ac_prog in grep ggrep; do
12734    for ac_exec_ext in '' $ac_executable_extensions; do
12735      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12736      as_fn_executable_p "$ac_path_GREP" || continue
12737# Check for GNU ac_path_GREP and select it if it is found.
12738  # Check for GNU $ac_path_GREP
12739case `"$ac_path_GREP" --version 2>&1` in
12740*GNU*)
12741  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12742*)
12743  ac_count=0
12744  $as_echo_n 0123456789 >"conftest.in"
12745  while :
12746  do
12747    cat "conftest.in" "conftest.in" >"conftest.tmp"
12748    mv "conftest.tmp" "conftest.in"
12749    cp "conftest.in" "conftest.nl"
12750    $as_echo 'GREP' >> "conftest.nl"
12751    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12752    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12753    as_fn_arith $ac_count + 1 && ac_count=$as_val
12754    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12755      # Best one so far, save it but keep looking for a better one
12756      ac_cv_path_GREP="$ac_path_GREP"
12757      ac_path_GREP_max=$ac_count
12758    fi
12759    # 10*(2^10) chars as input seems more than enough
12760    test $ac_count -gt 10 && break
12761  done
12762  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12763esac
12764
12765      $ac_path_GREP_found && break 3
12766    done
12767  done
12768  done
12769IFS=$as_save_IFS
12770  if test -z "$ac_cv_path_GREP"; then
12771    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12772  fi
12773else
12774  ac_cv_path_GREP=$GREP
12775fi
12776
12777fi
12778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12779$as_echo "$ac_cv_path_GREP" >&6; }
12780 GREP="$ac_cv_path_GREP"
12781
12782
12783    else
12784      # If it succeeded, then it was overridden by the user. We will use it
12785      # for the tool.
12786
12787      # First remove it from the list of overridden variables, so we can test
12788      # for unknown variables in the end.
12789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12790
12791      # Check if we try to supply an empty value
12792      if test "x$GREP" = x; then
12793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12794$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12796$as_echo_n "checking for GREP... " >&6; }
12797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12798$as_echo "disabled" >&6; }
12799      else
12800        # Check if the provided tool contains a complete path.
12801        tool_specified="$GREP"
12802        tool_basename="${tool_specified##*/}"
12803        if test "x$tool_basename" = "x$tool_specified"; then
12804          # A command without a complete path is provided, search $PATH.
12805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12806$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12807          # Extract the first word of "$tool_basename", so it can be a program name with args.
12808set dummy $tool_basename; ac_word=$2
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12810$as_echo_n "checking for $ac_word... " >&6; }
12811if ${ac_cv_path_GREP+:} false; then :
12812  $as_echo_n "(cached) " >&6
12813else
12814  case $GREP in
12815  [\\/]* | ?:[\\/]*)
12816  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12817  ;;
12818  *)
12819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822  IFS=$as_save_IFS
12823  test -z "$as_dir" && as_dir=.
12824    for ac_exec_ext in '' $ac_executable_extensions; do
12825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12828    break 2
12829  fi
12830done
12831  done
12832IFS=$as_save_IFS
12833
12834  ;;
12835esac
12836fi
12837GREP=$ac_cv_path_GREP
12838if test -n "$GREP"; then
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12840$as_echo "$GREP" >&6; }
12841else
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
12844fi
12845
12846
12847          if test "x$GREP" = x; then
12848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12849          fi
12850        else
12851          # Otherwise we believe it is a complete path. Use it as it is.
12852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12853$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12855$as_echo_n "checking for GREP... " >&6; }
12856          if test ! -x "$tool_specified"; then
12857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12858$as_echo "not found" >&6; }
12859            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12860          fi
12861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12862$as_echo "$tool_specified" >&6; }
12863        fi
12864      fi
12865    fi
12866
12867  fi
12868
12869
12870  if test "x$GREP" = x; then
12871    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12872  fi
12873
12874
12875
12876
12877  # Publish this variable in the help.
12878
12879
12880  if [ -z "${EGREP+x}" ]; then
12881    # The variable is not set by user, try to locate tool using the code snippet
12882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12883$as_echo_n "checking for egrep... " >&6; }
12884if ${ac_cv_path_EGREP+:} false; then :
12885  $as_echo_n "(cached) " >&6
12886else
12887  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12888   then ac_cv_path_EGREP="$GREP -E"
12889   else
12890     if test -z "$EGREP"; then
12891  ac_path_EGREP_found=false
12892  # Loop through the user's path and test for each of PROGNAME-LIST
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_prog in egrep; do
12899    for ac_exec_ext in '' $ac_executable_extensions; do
12900      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12901      as_fn_executable_p "$ac_path_EGREP" || continue
12902# Check for GNU ac_path_EGREP and select it if it is found.
12903  # Check for GNU $ac_path_EGREP
12904case `"$ac_path_EGREP" --version 2>&1` in
12905*GNU*)
12906  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12907*)
12908  ac_count=0
12909  $as_echo_n 0123456789 >"conftest.in"
12910  while :
12911  do
12912    cat "conftest.in" "conftest.in" >"conftest.tmp"
12913    mv "conftest.tmp" "conftest.in"
12914    cp "conftest.in" "conftest.nl"
12915    $as_echo 'EGREP' >> "conftest.nl"
12916    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12917    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12918    as_fn_arith $ac_count + 1 && ac_count=$as_val
12919    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12920      # Best one so far, save it but keep looking for a better one
12921      ac_cv_path_EGREP="$ac_path_EGREP"
12922      ac_path_EGREP_max=$ac_count
12923    fi
12924    # 10*(2^10) chars as input seems more than enough
12925    test $ac_count -gt 10 && break
12926  done
12927  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12928esac
12929
12930      $ac_path_EGREP_found && break 3
12931    done
12932  done
12933  done
12934IFS=$as_save_IFS
12935  if test -z "$ac_cv_path_EGREP"; then
12936    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12937  fi
12938else
12939  ac_cv_path_EGREP=$EGREP
12940fi
12941
12942   fi
12943fi
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12945$as_echo "$ac_cv_path_EGREP" >&6; }
12946 EGREP="$ac_cv_path_EGREP"
12947
12948
12949  else
12950    # The variable is set, but is it from the command line or the environment?
12951
12952    # Try to remove the string !EGREP! from our list.
12953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12955      # If it failed, the variable was not from the command line. Ignore it,
12956      # but warn the user (except for BASH, which is always set by the calling BASH).
12957      if test "xEGREP" != xBASH; then
12958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12959$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12960      fi
12961      # Try to locate tool using the code snippet
12962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12963$as_echo_n "checking for egrep... " >&6; }
12964if ${ac_cv_path_EGREP+:} false; then :
12965  $as_echo_n "(cached) " >&6
12966else
12967  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12968   then ac_cv_path_EGREP="$GREP -E"
12969   else
12970     if test -z "$EGREP"; then
12971  ac_path_EGREP_found=false
12972  # Loop through the user's path and test for each of PROGNAME-LIST
12973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12974for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12975do
12976  IFS=$as_save_IFS
12977  test -z "$as_dir" && as_dir=.
12978    for ac_prog in egrep; do
12979    for ac_exec_ext in '' $ac_executable_extensions; do
12980      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12981      as_fn_executable_p "$ac_path_EGREP" || continue
12982# Check for GNU ac_path_EGREP and select it if it is found.
12983  # Check for GNU $ac_path_EGREP
12984case `"$ac_path_EGREP" --version 2>&1` in
12985*GNU*)
12986  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12987*)
12988  ac_count=0
12989  $as_echo_n 0123456789 >"conftest.in"
12990  while :
12991  do
12992    cat "conftest.in" "conftest.in" >"conftest.tmp"
12993    mv "conftest.tmp" "conftest.in"
12994    cp "conftest.in" "conftest.nl"
12995    $as_echo 'EGREP' >> "conftest.nl"
12996    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12997    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12998    as_fn_arith $ac_count + 1 && ac_count=$as_val
12999    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13000      # Best one so far, save it but keep looking for a better one
13001      ac_cv_path_EGREP="$ac_path_EGREP"
13002      ac_path_EGREP_max=$ac_count
13003    fi
13004    # 10*(2^10) chars as input seems more than enough
13005    test $ac_count -gt 10 && break
13006  done
13007  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13008esac
13009
13010      $ac_path_EGREP_found && break 3
13011    done
13012  done
13013  done
13014IFS=$as_save_IFS
13015  if test -z "$ac_cv_path_EGREP"; then
13016    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13017  fi
13018else
13019  ac_cv_path_EGREP=$EGREP
13020fi
13021
13022   fi
13023fi
13024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13025$as_echo "$ac_cv_path_EGREP" >&6; }
13026 EGREP="$ac_cv_path_EGREP"
13027
13028
13029    else
13030      # If it succeeded, then it was overridden by the user. We will use it
13031      # for the tool.
13032
13033      # First remove it from the list of overridden variables, so we can test
13034      # for unknown variables in the end.
13035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13036
13037      # Check if we try to supply an empty value
13038      if test "x$EGREP" = x; then
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13040$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13042$as_echo_n "checking for EGREP... " >&6; }
13043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13044$as_echo "disabled" >&6; }
13045      else
13046        # Check if the provided tool contains a complete path.
13047        tool_specified="$EGREP"
13048        tool_basename="${tool_specified##*/}"
13049        if test "x$tool_basename" = "x$tool_specified"; then
13050          # A command without a complete path is provided, search $PATH.
13051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13052$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13053          # Extract the first word of "$tool_basename", so it can be a program name with args.
13054set dummy $tool_basename; ac_word=$2
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13056$as_echo_n "checking for $ac_word... " >&6; }
13057if ${ac_cv_path_EGREP+:} false; then :
13058  $as_echo_n "(cached) " >&6
13059else
13060  case $EGREP in
13061  [\\/]* | ?:[\\/]*)
13062  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13063  ;;
13064  *)
13065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13066for as_dir in $PATH
13067do
13068  IFS=$as_save_IFS
13069  test -z "$as_dir" && as_dir=.
13070    for ac_exec_ext in '' $ac_executable_extensions; do
13071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13072    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13074    break 2
13075  fi
13076done
13077  done
13078IFS=$as_save_IFS
13079
13080  ;;
13081esac
13082fi
13083EGREP=$ac_cv_path_EGREP
13084if test -n "$EGREP"; then
13085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13086$as_echo "$EGREP" >&6; }
13087else
13088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13089$as_echo "no" >&6; }
13090fi
13091
13092
13093          if test "x$EGREP" = x; then
13094            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13095          fi
13096        else
13097          # Otherwise we believe it is a complete path. Use it as it is.
13098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13099$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13100          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13101$as_echo_n "checking for EGREP... " >&6; }
13102          if test ! -x "$tool_specified"; then
13103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13104$as_echo "not found" >&6; }
13105            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13106          fi
13107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13108$as_echo "$tool_specified" >&6; }
13109        fi
13110      fi
13111    fi
13112
13113  fi
13114
13115
13116  if test "x$EGREP" = x; then
13117    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13118  fi
13119
13120
13121
13122
13123  # Publish this variable in the help.
13124
13125
13126  if [ -z "${FGREP+x}" ]; then
13127    # The variable is not set by user, try to locate tool using the code snippet
13128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13129$as_echo_n "checking for fgrep... " >&6; }
13130if ${ac_cv_path_FGREP+:} false; then :
13131  $as_echo_n "(cached) " >&6
13132else
13133  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13134   then ac_cv_path_FGREP="$GREP -F"
13135   else
13136     if test -z "$FGREP"; then
13137  ac_path_FGREP_found=false
13138  # Loop through the user's path and test for each of PROGNAME-LIST
13139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13141do
13142  IFS=$as_save_IFS
13143  test -z "$as_dir" && as_dir=.
13144    for ac_prog in fgrep; do
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13147      as_fn_executable_p "$ac_path_FGREP" || continue
13148# Check for GNU ac_path_FGREP and select it if it is found.
13149  # Check for GNU $ac_path_FGREP
13150case `"$ac_path_FGREP" --version 2>&1` in
13151*GNU*)
13152  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13153*)
13154  ac_count=0
13155  $as_echo_n 0123456789 >"conftest.in"
13156  while :
13157  do
13158    cat "conftest.in" "conftest.in" >"conftest.tmp"
13159    mv "conftest.tmp" "conftest.in"
13160    cp "conftest.in" "conftest.nl"
13161    $as_echo 'FGREP' >> "conftest.nl"
13162    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13163    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13164    as_fn_arith $ac_count + 1 && ac_count=$as_val
13165    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13166      # Best one so far, save it but keep looking for a better one
13167      ac_cv_path_FGREP="$ac_path_FGREP"
13168      ac_path_FGREP_max=$ac_count
13169    fi
13170    # 10*(2^10) chars as input seems more than enough
13171    test $ac_count -gt 10 && break
13172  done
13173  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13174esac
13175
13176      $ac_path_FGREP_found && break 3
13177    done
13178  done
13179  done
13180IFS=$as_save_IFS
13181  if test -z "$ac_cv_path_FGREP"; then
13182    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13183  fi
13184else
13185  ac_cv_path_FGREP=$FGREP
13186fi
13187
13188   fi
13189fi
13190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13191$as_echo "$ac_cv_path_FGREP" >&6; }
13192 FGREP="$ac_cv_path_FGREP"
13193
13194
13195  else
13196    # The variable is set, but is it from the command line or the environment?
13197
13198    # Try to remove the string !FGREP! from our list.
13199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13201      # If it failed, the variable was not from the command line. Ignore it,
13202      # but warn the user (except for BASH, which is always set by the calling BASH).
13203      if test "xFGREP" != xBASH; then
13204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13205$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13206      fi
13207      # Try to locate tool using the code snippet
13208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13209$as_echo_n "checking for fgrep... " >&6; }
13210if ${ac_cv_path_FGREP+:} false; then :
13211  $as_echo_n "(cached) " >&6
13212else
13213  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13214   then ac_cv_path_FGREP="$GREP -F"
13215   else
13216     if test -z "$FGREP"; then
13217  ac_path_FGREP_found=false
13218  # Loop through the user's path and test for each of PROGNAME-LIST
13219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13220for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13221do
13222  IFS=$as_save_IFS
13223  test -z "$as_dir" && as_dir=.
13224    for ac_prog in fgrep; do
13225    for ac_exec_ext in '' $ac_executable_extensions; do
13226      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13227      as_fn_executable_p "$ac_path_FGREP" || continue
13228# Check for GNU ac_path_FGREP and select it if it is found.
13229  # Check for GNU $ac_path_FGREP
13230case `"$ac_path_FGREP" --version 2>&1` in
13231*GNU*)
13232  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13233*)
13234  ac_count=0
13235  $as_echo_n 0123456789 >"conftest.in"
13236  while :
13237  do
13238    cat "conftest.in" "conftest.in" >"conftest.tmp"
13239    mv "conftest.tmp" "conftest.in"
13240    cp "conftest.in" "conftest.nl"
13241    $as_echo 'FGREP' >> "conftest.nl"
13242    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13243    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13244    as_fn_arith $ac_count + 1 && ac_count=$as_val
13245    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13246      # Best one so far, save it but keep looking for a better one
13247      ac_cv_path_FGREP="$ac_path_FGREP"
13248      ac_path_FGREP_max=$ac_count
13249    fi
13250    # 10*(2^10) chars as input seems more than enough
13251    test $ac_count -gt 10 && break
13252  done
13253  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13254esac
13255
13256      $ac_path_FGREP_found && break 3
13257    done
13258  done
13259  done
13260IFS=$as_save_IFS
13261  if test -z "$ac_cv_path_FGREP"; then
13262    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13263  fi
13264else
13265  ac_cv_path_FGREP=$FGREP
13266fi
13267
13268   fi
13269fi
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13271$as_echo "$ac_cv_path_FGREP" >&6; }
13272 FGREP="$ac_cv_path_FGREP"
13273
13274
13275    else
13276      # If it succeeded, then it was overridden by the user. We will use it
13277      # for the tool.
13278
13279      # First remove it from the list of overridden variables, so we can test
13280      # for unknown variables in the end.
13281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13282
13283      # Check if we try to supply an empty value
13284      if test "x$FGREP" = x; then
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13286$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13288$as_echo_n "checking for FGREP... " >&6; }
13289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13290$as_echo "disabled" >&6; }
13291      else
13292        # Check if the provided tool contains a complete path.
13293        tool_specified="$FGREP"
13294        tool_basename="${tool_specified##*/}"
13295        if test "x$tool_basename" = "x$tool_specified"; then
13296          # A command without a complete path is provided, search $PATH.
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13298$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13299          # Extract the first word of "$tool_basename", so it can be a program name with args.
13300set dummy $tool_basename; ac_word=$2
13301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13302$as_echo_n "checking for $ac_word... " >&6; }
13303if ${ac_cv_path_FGREP+:} false; then :
13304  $as_echo_n "(cached) " >&6
13305else
13306  case $FGREP in
13307  [\\/]* | ?:[\\/]*)
13308  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13309  ;;
13310  *)
13311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13312for as_dir in $PATH
13313do
13314  IFS=$as_save_IFS
13315  test -z "$as_dir" && as_dir=.
13316    for ac_exec_ext in '' $ac_executable_extensions; do
13317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13318    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13320    break 2
13321  fi
13322done
13323  done
13324IFS=$as_save_IFS
13325
13326  ;;
13327esac
13328fi
13329FGREP=$ac_cv_path_FGREP
13330if test -n "$FGREP"; then
13331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13332$as_echo "$FGREP" >&6; }
13333else
13334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13335$as_echo "no" >&6; }
13336fi
13337
13338
13339          if test "x$FGREP" = x; then
13340            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13341          fi
13342        else
13343          # Otherwise we believe it is a complete path. Use it as it is.
13344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13345$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13346          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13347$as_echo_n "checking for FGREP... " >&6; }
13348          if test ! -x "$tool_specified"; then
13349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13350$as_echo "not found" >&6; }
13351            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13352          fi
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13354$as_echo "$tool_specified" >&6; }
13355        fi
13356      fi
13357    fi
13358
13359  fi
13360
13361
13362  if test "x$FGREP" = x; then
13363    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13364  fi
13365
13366
13367
13368
13369  # Publish this variable in the help.
13370
13371
13372  if [ -z "${SED+x}" ]; then
13373    # The variable is not set by user, try to locate tool using the code snippet
13374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13375$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13376if ${ac_cv_path_SED+:} false; then :
13377  $as_echo_n "(cached) " >&6
13378else
13379            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13380     for ac_i in 1 2 3 4 5 6 7; do
13381       ac_script="$ac_script$as_nl$ac_script"
13382     done
13383     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13384     { ac_script=; unset ac_script;}
13385     if test -z "$SED"; then
13386  ac_path_SED_found=false
13387  # Loop through the user's path and test for each of PROGNAME-LIST
13388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13389for as_dir in $PATH
13390do
13391  IFS=$as_save_IFS
13392  test -z "$as_dir" && as_dir=.
13393    for ac_prog in sed gsed; do
13394    for ac_exec_ext in '' $ac_executable_extensions; do
13395      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13396      as_fn_executable_p "$ac_path_SED" || continue
13397# Check for GNU ac_path_SED and select it if it is found.
13398  # Check for GNU $ac_path_SED
13399case `"$ac_path_SED" --version 2>&1` in
13400*GNU*)
13401  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13402*)
13403  ac_count=0
13404  $as_echo_n 0123456789 >"conftest.in"
13405  while :
13406  do
13407    cat "conftest.in" "conftest.in" >"conftest.tmp"
13408    mv "conftest.tmp" "conftest.in"
13409    cp "conftest.in" "conftest.nl"
13410    $as_echo '' >> "conftest.nl"
13411    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13412    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13413    as_fn_arith $ac_count + 1 && ac_count=$as_val
13414    if test $ac_count -gt ${ac_path_SED_max-0}; then
13415      # Best one so far, save it but keep looking for a better one
13416      ac_cv_path_SED="$ac_path_SED"
13417      ac_path_SED_max=$ac_count
13418    fi
13419    # 10*(2^10) chars as input seems more than enough
13420    test $ac_count -gt 10 && break
13421  done
13422  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13423esac
13424
13425      $ac_path_SED_found && break 3
13426    done
13427  done
13428  done
13429IFS=$as_save_IFS
13430  if test -z "$ac_cv_path_SED"; then
13431    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13432  fi
13433else
13434  ac_cv_path_SED=$SED
13435fi
13436
13437fi
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13439$as_echo "$ac_cv_path_SED" >&6; }
13440 SED="$ac_cv_path_SED"
13441  rm -f conftest.sed
13442
13443  else
13444    # The variable is set, but is it from the command line or the environment?
13445
13446    # Try to remove the string !SED! from our list.
13447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13449      # If it failed, the variable was not from the command line. Ignore it,
13450      # but warn the user (except for BASH, which is always set by the calling BASH).
13451      if test "xSED" != xBASH; then
13452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13453$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13454      fi
13455      # Try to locate tool using the code snippet
13456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13457$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13458if ${ac_cv_path_SED+:} false; then :
13459  $as_echo_n "(cached) " >&6
13460else
13461            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13462     for ac_i in 1 2 3 4 5 6 7; do
13463       ac_script="$ac_script$as_nl$ac_script"
13464     done
13465     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13466     { ac_script=; unset ac_script;}
13467     if test -z "$SED"; then
13468  ac_path_SED_found=false
13469  # Loop through the user's path and test for each of PROGNAME-LIST
13470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13471for as_dir in $PATH
13472do
13473  IFS=$as_save_IFS
13474  test -z "$as_dir" && as_dir=.
13475    for ac_prog in sed gsed; do
13476    for ac_exec_ext in '' $ac_executable_extensions; do
13477      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13478      as_fn_executable_p "$ac_path_SED" || continue
13479# Check for GNU ac_path_SED and select it if it is found.
13480  # Check for GNU $ac_path_SED
13481case `"$ac_path_SED" --version 2>&1` in
13482*GNU*)
13483  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13484*)
13485  ac_count=0
13486  $as_echo_n 0123456789 >"conftest.in"
13487  while :
13488  do
13489    cat "conftest.in" "conftest.in" >"conftest.tmp"
13490    mv "conftest.tmp" "conftest.in"
13491    cp "conftest.in" "conftest.nl"
13492    $as_echo '' >> "conftest.nl"
13493    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13494    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13495    as_fn_arith $ac_count + 1 && ac_count=$as_val
13496    if test $ac_count -gt ${ac_path_SED_max-0}; then
13497      # Best one so far, save it but keep looking for a better one
13498      ac_cv_path_SED="$ac_path_SED"
13499      ac_path_SED_max=$ac_count
13500    fi
13501    # 10*(2^10) chars as input seems more than enough
13502    test $ac_count -gt 10 && break
13503  done
13504  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13505esac
13506
13507      $ac_path_SED_found && break 3
13508    done
13509  done
13510  done
13511IFS=$as_save_IFS
13512  if test -z "$ac_cv_path_SED"; then
13513    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13514  fi
13515else
13516  ac_cv_path_SED=$SED
13517fi
13518
13519fi
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13521$as_echo "$ac_cv_path_SED" >&6; }
13522 SED="$ac_cv_path_SED"
13523  rm -f conftest.sed
13524
13525    else
13526      # If it succeeded, then it was overridden by the user. We will use it
13527      # for the tool.
13528
13529      # First remove it from the list of overridden variables, so we can test
13530      # for unknown variables in the end.
13531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13532
13533      # Check if we try to supply an empty value
13534      if test "x$SED" = x; then
13535        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13536$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13537        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13538$as_echo_n "checking for SED... " >&6; }
13539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13540$as_echo "disabled" >&6; }
13541      else
13542        # Check if the provided tool contains a complete path.
13543        tool_specified="$SED"
13544        tool_basename="${tool_specified##*/}"
13545        if test "x$tool_basename" = "x$tool_specified"; then
13546          # A command without a complete path is provided, search $PATH.
13547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13548$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13549          # Extract the first word of "$tool_basename", so it can be a program name with args.
13550set dummy $tool_basename; ac_word=$2
13551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13552$as_echo_n "checking for $ac_word... " >&6; }
13553if ${ac_cv_path_SED+:} false; then :
13554  $as_echo_n "(cached) " >&6
13555else
13556  case $SED in
13557  [\\/]* | ?:[\\/]*)
13558  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13559  ;;
13560  *)
13561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13562for as_dir in $PATH
13563do
13564  IFS=$as_save_IFS
13565  test -z "$as_dir" && as_dir=.
13566    for ac_exec_ext in '' $ac_executable_extensions; do
13567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13568    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13570    break 2
13571  fi
13572done
13573  done
13574IFS=$as_save_IFS
13575
13576  ;;
13577esac
13578fi
13579SED=$ac_cv_path_SED
13580if test -n "$SED"; then
13581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13582$as_echo "$SED" >&6; }
13583else
13584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
13586fi
13587
13588
13589          if test "x$SED" = x; then
13590            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13591          fi
13592        else
13593          # Otherwise we believe it is a complete path. Use it as it is.
13594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13595$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13596          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13597$as_echo_n "checking for SED... " >&6; }
13598          if test ! -x "$tool_specified"; then
13599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13600$as_echo "not found" >&6; }
13601            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13602          fi
13603          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13604$as_echo "$tool_specified" >&6; }
13605        fi
13606      fi
13607    fi
13608
13609  fi
13610
13611
13612  if test "x$SED" = x; then
13613    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13614  fi
13615
13616
13617
13618  # Always force rm.
13619  RM="$RM -f"
13620
13621  # pwd behaves differently on various platforms and some don't support the -L flag.
13622  # Always use the bash builtin pwd to get uniform behavior.
13623  THEPWDCMD=pwd
13624
13625  # These are not required on all platforms
13626
13627
13628  # Publish this variable in the help.
13629
13630
13631  if [ -z "${CYGPATH+x}" ]; then
13632    # The variable is not set by user, try to locate tool using the code snippet
13633    for ac_prog in cygpath
13634do
13635  # Extract the first word of "$ac_prog", so it can be a program name with args.
13636set dummy $ac_prog; ac_word=$2
13637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13638$as_echo_n "checking for $ac_word... " >&6; }
13639if ${ac_cv_path_CYGPATH+:} false; then :
13640  $as_echo_n "(cached) " >&6
13641else
13642  case $CYGPATH in
13643  [\\/]* | ?:[\\/]*)
13644  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13645  ;;
13646  *)
13647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13648for as_dir in $PATH
13649do
13650  IFS=$as_save_IFS
13651  test -z "$as_dir" && as_dir=.
13652    for ac_exec_ext in '' $ac_executable_extensions; do
13653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13654    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13656    break 2
13657  fi
13658done
13659  done
13660IFS=$as_save_IFS
13661
13662  ;;
13663esac
13664fi
13665CYGPATH=$ac_cv_path_CYGPATH
13666if test -n "$CYGPATH"; then
13667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13668$as_echo "$CYGPATH" >&6; }
13669else
13670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13671$as_echo "no" >&6; }
13672fi
13673
13674
13675  test -n "$CYGPATH" && break
13676done
13677
13678  else
13679    # The variable is set, but is it from the command line or the environment?
13680
13681    # Try to remove the string !CYGPATH! from our list.
13682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13684      # If it failed, the variable was not from the command line. Ignore it,
13685      # but warn the user (except for BASH, which is always set by the calling BASH).
13686      if test "xCYGPATH" != xBASH; then
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13688$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13689      fi
13690      # Try to locate tool using the code snippet
13691      for ac_prog in cygpath
13692do
13693  # Extract the first word of "$ac_prog", so it can be a program name with args.
13694set dummy $ac_prog; ac_word=$2
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13696$as_echo_n "checking for $ac_word... " >&6; }
13697if ${ac_cv_path_CYGPATH+:} false; then :
13698  $as_echo_n "(cached) " >&6
13699else
13700  case $CYGPATH in
13701  [\\/]* | ?:[\\/]*)
13702  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13703  ;;
13704  *)
13705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13706for as_dir in $PATH
13707do
13708  IFS=$as_save_IFS
13709  test -z "$as_dir" && as_dir=.
13710    for ac_exec_ext in '' $ac_executable_extensions; do
13711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13712    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13714    break 2
13715  fi
13716done
13717  done
13718IFS=$as_save_IFS
13719
13720  ;;
13721esac
13722fi
13723CYGPATH=$ac_cv_path_CYGPATH
13724if test -n "$CYGPATH"; then
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13726$as_echo "$CYGPATH" >&6; }
13727else
13728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729$as_echo "no" >&6; }
13730fi
13731
13732
13733  test -n "$CYGPATH" && break
13734done
13735
13736    else
13737      # If it succeeded, then it was overridden by the user. We will use it
13738      # for the tool.
13739
13740      # First remove it from the list of overridden variables, so we can test
13741      # for unknown variables in the end.
13742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13743
13744      # Check if we try to supply an empty value
13745      if test "x$CYGPATH" = x; then
13746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13747$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13749$as_echo_n "checking for CYGPATH... " >&6; }
13750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13751$as_echo "disabled" >&6; }
13752      else
13753        # Check if the provided tool contains a complete path.
13754        tool_specified="$CYGPATH"
13755        tool_basename="${tool_specified##*/}"
13756        if test "x$tool_basename" = "x$tool_specified"; then
13757          # A command without a complete path is provided, search $PATH.
13758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13759$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13760          # Extract the first word of "$tool_basename", so it can be a program name with args.
13761set dummy $tool_basename; ac_word=$2
13762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13763$as_echo_n "checking for $ac_word... " >&6; }
13764if ${ac_cv_path_CYGPATH+:} false; then :
13765  $as_echo_n "(cached) " >&6
13766else
13767  case $CYGPATH in
13768  [\\/]* | ?:[\\/]*)
13769  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13770  ;;
13771  *)
13772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13773for as_dir in $PATH
13774do
13775  IFS=$as_save_IFS
13776  test -z "$as_dir" && as_dir=.
13777    for ac_exec_ext in '' $ac_executable_extensions; do
13778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13779    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13781    break 2
13782  fi
13783done
13784  done
13785IFS=$as_save_IFS
13786
13787  ;;
13788esac
13789fi
13790CYGPATH=$ac_cv_path_CYGPATH
13791if test -n "$CYGPATH"; then
13792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13793$as_echo "$CYGPATH" >&6; }
13794else
13795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13796$as_echo "no" >&6; }
13797fi
13798
13799
13800          if test "x$CYGPATH" = x; then
13801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13802          fi
13803        else
13804          # Otherwise we believe it is a complete path. Use it as it is.
13805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13806$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13808$as_echo_n "checking for CYGPATH... " >&6; }
13809          if test ! -x "$tool_specified"; then
13810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13811$as_echo "not found" >&6; }
13812            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13813          fi
13814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13815$as_echo "$tool_specified" >&6; }
13816        fi
13817      fi
13818    fi
13819
13820  fi
13821
13822
13823
13824
13825  # Publish this variable in the help.
13826
13827
13828  if [ -z "${READLINK+x}" ]; then
13829    # The variable is not set by user, try to locate tool using the code snippet
13830    for ac_prog in greadlink readlink
13831do
13832  # Extract the first word of "$ac_prog", so it can be a program name with args.
13833set dummy $ac_prog; ac_word=$2
13834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13835$as_echo_n "checking for $ac_word... " >&6; }
13836if ${ac_cv_path_READLINK+:} false; then :
13837  $as_echo_n "(cached) " >&6
13838else
13839  case $READLINK in
13840  [\\/]* | ?:[\\/]*)
13841  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13842  ;;
13843  *)
13844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13845for as_dir in $PATH
13846do
13847  IFS=$as_save_IFS
13848  test -z "$as_dir" && as_dir=.
13849    for ac_exec_ext in '' $ac_executable_extensions; do
13850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13851    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13853    break 2
13854  fi
13855done
13856  done
13857IFS=$as_save_IFS
13858
13859  ;;
13860esac
13861fi
13862READLINK=$ac_cv_path_READLINK
13863if test -n "$READLINK"; then
13864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13865$as_echo "$READLINK" >&6; }
13866else
13867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13868$as_echo "no" >&6; }
13869fi
13870
13871
13872  test -n "$READLINK" && break
13873done
13874
13875  else
13876    # The variable is set, but is it from the command line or the environment?
13877
13878    # Try to remove the string !READLINK! from our list.
13879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13881      # If it failed, the variable was not from the command line. Ignore it,
13882      # but warn the user (except for BASH, which is always set by the calling BASH).
13883      if test "xREADLINK" != xBASH; then
13884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13885$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13886      fi
13887      # Try to locate tool using the code snippet
13888      for ac_prog in greadlink readlink
13889do
13890  # Extract the first word of "$ac_prog", so it can be a program name with args.
13891set dummy $ac_prog; ac_word=$2
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13893$as_echo_n "checking for $ac_word... " >&6; }
13894if ${ac_cv_path_READLINK+:} false; then :
13895  $as_echo_n "(cached) " >&6
13896else
13897  case $READLINK in
13898  [\\/]* | ?:[\\/]*)
13899  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13900  ;;
13901  *)
13902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13903for as_dir in $PATH
13904do
13905  IFS=$as_save_IFS
13906  test -z "$as_dir" && as_dir=.
13907    for ac_exec_ext in '' $ac_executable_extensions; do
13908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13909    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13911    break 2
13912  fi
13913done
13914  done
13915IFS=$as_save_IFS
13916
13917  ;;
13918esac
13919fi
13920READLINK=$ac_cv_path_READLINK
13921if test -n "$READLINK"; then
13922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13923$as_echo "$READLINK" >&6; }
13924else
13925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13926$as_echo "no" >&6; }
13927fi
13928
13929
13930  test -n "$READLINK" && break
13931done
13932
13933    else
13934      # If it succeeded, then it was overridden by the user. We will use it
13935      # for the tool.
13936
13937      # First remove it from the list of overridden variables, so we can test
13938      # for unknown variables in the end.
13939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13940
13941      # Check if we try to supply an empty value
13942      if test "x$READLINK" = x; then
13943        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13944$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13946$as_echo_n "checking for READLINK... " >&6; }
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13948$as_echo "disabled" >&6; }
13949      else
13950        # Check if the provided tool contains a complete path.
13951        tool_specified="$READLINK"
13952        tool_basename="${tool_specified##*/}"
13953        if test "x$tool_basename" = "x$tool_specified"; then
13954          # A command without a complete path is provided, search $PATH.
13955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13956$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13957          # Extract the first word of "$tool_basename", so it can be a program name with args.
13958set dummy $tool_basename; ac_word=$2
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13960$as_echo_n "checking for $ac_word... " >&6; }
13961if ${ac_cv_path_READLINK+:} false; then :
13962  $as_echo_n "(cached) " >&6
13963else
13964  case $READLINK in
13965  [\\/]* | ?:[\\/]*)
13966  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13967  ;;
13968  *)
13969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13970for as_dir in $PATH
13971do
13972  IFS=$as_save_IFS
13973  test -z "$as_dir" && as_dir=.
13974    for ac_exec_ext in '' $ac_executable_extensions; do
13975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13976    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13978    break 2
13979  fi
13980done
13981  done
13982IFS=$as_save_IFS
13983
13984  ;;
13985esac
13986fi
13987READLINK=$ac_cv_path_READLINK
13988if test -n "$READLINK"; then
13989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13990$as_echo "$READLINK" >&6; }
13991else
13992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13993$as_echo "no" >&6; }
13994fi
13995
13996
13997          if test "x$READLINK" = x; then
13998            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13999          fi
14000        else
14001          # Otherwise we believe it is a complete path. Use it as it is.
14002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14003$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14005$as_echo_n "checking for READLINK... " >&6; }
14006          if test ! -x "$tool_specified"; then
14007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14008$as_echo "not found" >&6; }
14009            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14010          fi
14011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14012$as_echo "$tool_specified" >&6; }
14013        fi
14014      fi
14015    fi
14016
14017  fi
14018
14019
14020
14021
14022  # Publish this variable in the help.
14023
14024
14025  if [ -z "${DF+x}" ]; then
14026    # The variable is not set by user, try to locate tool using the code snippet
14027    for ac_prog in df
14028do
14029  # Extract the first word of "$ac_prog", so it can be a program name with args.
14030set dummy $ac_prog; ac_word=$2
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14032$as_echo_n "checking for $ac_word... " >&6; }
14033if ${ac_cv_path_DF+:} false; then :
14034  $as_echo_n "(cached) " >&6
14035else
14036  case $DF in
14037  [\\/]* | ?:[\\/]*)
14038  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14039  ;;
14040  *)
14041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14042for as_dir in $PATH
14043do
14044  IFS=$as_save_IFS
14045  test -z "$as_dir" && as_dir=.
14046    for ac_exec_ext in '' $ac_executable_extensions; do
14047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14048    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14050    break 2
14051  fi
14052done
14053  done
14054IFS=$as_save_IFS
14055
14056  ;;
14057esac
14058fi
14059DF=$ac_cv_path_DF
14060if test -n "$DF"; then
14061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14062$as_echo "$DF" >&6; }
14063else
14064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14065$as_echo "no" >&6; }
14066fi
14067
14068
14069  test -n "$DF" && break
14070done
14071
14072  else
14073    # The variable is set, but is it from the command line or the environment?
14074
14075    # Try to remove the string !DF! from our list.
14076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14078      # If it failed, the variable was not from the command line. Ignore it,
14079      # but warn the user (except for BASH, which is always set by the calling BASH).
14080      if test "xDF" != xBASH; then
14081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14082$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14083      fi
14084      # Try to locate tool using the code snippet
14085      for ac_prog in df
14086do
14087  # Extract the first word of "$ac_prog", so it can be a program name with args.
14088set dummy $ac_prog; ac_word=$2
14089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14090$as_echo_n "checking for $ac_word... " >&6; }
14091if ${ac_cv_path_DF+:} false; then :
14092  $as_echo_n "(cached) " >&6
14093else
14094  case $DF in
14095  [\\/]* | ?:[\\/]*)
14096  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14097  ;;
14098  *)
14099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14100for as_dir in $PATH
14101do
14102  IFS=$as_save_IFS
14103  test -z "$as_dir" && as_dir=.
14104    for ac_exec_ext in '' $ac_executable_extensions; do
14105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14106    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14108    break 2
14109  fi
14110done
14111  done
14112IFS=$as_save_IFS
14113
14114  ;;
14115esac
14116fi
14117DF=$ac_cv_path_DF
14118if test -n "$DF"; then
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14120$as_echo "$DF" >&6; }
14121else
14122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14123$as_echo "no" >&6; }
14124fi
14125
14126
14127  test -n "$DF" && break
14128done
14129
14130    else
14131      # If it succeeded, then it was overridden by the user. We will use it
14132      # for the tool.
14133
14134      # First remove it from the list of overridden variables, so we can test
14135      # for unknown variables in the end.
14136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14137
14138      # Check if we try to supply an empty value
14139      if test "x$DF" = x; then
14140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14141$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14143$as_echo_n "checking for DF... " >&6; }
14144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14145$as_echo "disabled" >&6; }
14146      else
14147        # Check if the provided tool contains a complete path.
14148        tool_specified="$DF"
14149        tool_basename="${tool_specified##*/}"
14150        if test "x$tool_basename" = "x$tool_specified"; then
14151          # A command without a complete path is provided, search $PATH.
14152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14153$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14154          # Extract the first word of "$tool_basename", so it can be a program name with args.
14155set dummy $tool_basename; ac_word=$2
14156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14157$as_echo_n "checking for $ac_word... " >&6; }
14158if ${ac_cv_path_DF+:} false; then :
14159  $as_echo_n "(cached) " >&6
14160else
14161  case $DF in
14162  [\\/]* | ?:[\\/]*)
14163  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14164  ;;
14165  *)
14166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14167for as_dir in $PATH
14168do
14169  IFS=$as_save_IFS
14170  test -z "$as_dir" && as_dir=.
14171    for ac_exec_ext in '' $ac_executable_extensions; do
14172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14173    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14175    break 2
14176  fi
14177done
14178  done
14179IFS=$as_save_IFS
14180
14181  ;;
14182esac
14183fi
14184DF=$ac_cv_path_DF
14185if test -n "$DF"; then
14186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14187$as_echo "$DF" >&6; }
14188else
14189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14190$as_echo "no" >&6; }
14191fi
14192
14193
14194          if test "x$DF" = x; then
14195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14196          fi
14197        else
14198          # Otherwise we believe it is a complete path. Use it as it is.
14199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14200$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14202$as_echo_n "checking for DF... " >&6; }
14203          if test ! -x "$tool_specified"; then
14204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14205$as_echo "not found" >&6; }
14206            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14207          fi
14208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14209$as_echo "$tool_specified" >&6; }
14210        fi
14211      fi
14212    fi
14213
14214  fi
14215
14216
14217
14218
14219  # Publish this variable in the help.
14220
14221
14222  if [ -z "${CPIO+x}" ]; then
14223    # The variable is not set by user, try to locate tool using the code snippet
14224    for ac_prog in cpio bsdcpio
14225do
14226  # Extract the first word of "$ac_prog", so it can be a program name with args.
14227set dummy $ac_prog; ac_word=$2
14228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14229$as_echo_n "checking for $ac_word... " >&6; }
14230if ${ac_cv_path_CPIO+:} false; then :
14231  $as_echo_n "(cached) " >&6
14232else
14233  case $CPIO in
14234  [\\/]* | ?:[\\/]*)
14235  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14236  ;;
14237  *)
14238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14239for as_dir in $PATH
14240do
14241  IFS=$as_save_IFS
14242  test -z "$as_dir" && as_dir=.
14243    for ac_exec_ext in '' $ac_executable_extensions; do
14244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14245    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14247    break 2
14248  fi
14249done
14250  done
14251IFS=$as_save_IFS
14252
14253  ;;
14254esac
14255fi
14256CPIO=$ac_cv_path_CPIO
14257if test -n "$CPIO"; then
14258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14259$as_echo "$CPIO" >&6; }
14260else
14261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14262$as_echo "no" >&6; }
14263fi
14264
14265
14266  test -n "$CPIO" && break
14267done
14268
14269  else
14270    # The variable is set, but is it from the command line or the environment?
14271
14272    # Try to remove the string !CPIO! from our list.
14273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14275      # If it failed, the variable was not from the command line. Ignore it,
14276      # but warn the user (except for BASH, which is always set by the calling BASH).
14277      if test "xCPIO" != xBASH; then
14278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14279$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14280      fi
14281      # Try to locate tool using the code snippet
14282      for ac_prog in cpio bsdcpio
14283do
14284  # Extract the first word of "$ac_prog", so it can be a program name with args.
14285set dummy $ac_prog; ac_word=$2
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14287$as_echo_n "checking for $ac_word... " >&6; }
14288if ${ac_cv_path_CPIO+:} false; then :
14289  $as_echo_n "(cached) " >&6
14290else
14291  case $CPIO in
14292  [\\/]* | ?:[\\/]*)
14293  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14294  ;;
14295  *)
14296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14297for as_dir in $PATH
14298do
14299  IFS=$as_save_IFS
14300  test -z "$as_dir" && as_dir=.
14301    for ac_exec_ext in '' $ac_executable_extensions; do
14302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14303    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14305    break 2
14306  fi
14307done
14308  done
14309IFS=$as_save_IFS
14310
14311  ;;
14312esac
14313fi
14314CPIO=$ac_cv_path_CPIO
14315if test -n "$CPIO"; then
14316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14317$as_echo "$CPIO" >&6; }
14318else
14319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14320$as_echo "no" >&6; }
14321fi
14322
14323
14324  test -n "$CPIO" && break
14325done
14326
14327    else
14328      # If it succeeded, then it was overridden by the user. We will use it
14329      # for the tool.
14330
14331      # First remove it from the list of overridden variables, so we can test
14332      # for unknown variables in the end.
14333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14334
14335      # Check if we try to supply an empty value
14336      if test "x$CPIO" = x; then
14337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14338$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14340$as_echo_n "checking for CPIO... " >&6; }
14341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14342$as_echo "disabled" >&6; }
14343      else
14344        # Check if the provided tool contains a complete path.
14345        tool_specified="$CPIO"
14346        tool_basename="${tool_specified##*/}"
14347        if test "x$tool_basename" = "x$tool_specified"; then
14348          # A command without a complete path is provided, search $PATH.
14349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14350$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14351          # Extract the first word of "$tool_basename", so it can be a program name with args.
14352set dummy $tool_basename; ac_word=$2
14353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14354$as_echo_n "checking for $ac_word... " >&6; }
14355if ${ac_cv_path_CPIO+:} false; then :
14356  $as_echo_n "(cached) " >&6
14357else
14358  case $CPIO in
14359  [\\/]* | ?:[\\/]*)
14360  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14361  ;;
14362  *)
14363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14364for as_dir in $PATH
14365do
14366  IFS=$as_save_IFS
14367  test -z "$as_dir" && as_dir=.
14368    for ac_exec_ext in '' $ac_executable_extensions; do
14369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14370    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14372    break 2
14373  fi
14374done
14375  done
14376IFS=$as_save_IFS
14377
14378  ;;
14379esac
14380fi
14381CPIO=$ac_cv_path_CPIO
14382if test -n "$CPIO"; then
14383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14384$as_echo "$CPIO" >&6; }
14385else
14386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14387$as_echo "no" >&6; }
14388fi
14389
14390
14391          if test "x$CPIO" = x; then
14392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14393          fi
14394        else
14395          # Otherwise we believe it is a complete path. Use it as it is.
14396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14397$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14399$as_echo_n "checking for CPIO... " >&6; }
14400          if test ! -x "$tool_specified"; then
14401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14402$as_echo "not found" >&6; }
14403            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14404          fi
14405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14406$as_echo "$tool_specified" >&6; }
14407        fi
14408      fi
14409    fi
14410
14411  fi
14412
14413
14414
14415
14416  # Publish this variable in the help.
14417
14418
14419  if [ -z "${NICE+x}" ]; then
14420    # The variable is not set by user, try to locate tool using the code snippet
14421    for ac_prog in nice
14422do
14423  # Extract the first word of "$ac_prog", so it can be a program name with args.
14424set dummy $ac_prog; ac_word=$2
14425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14426$as_echo_n "checking for $ac_word... " >&6; }
14427if ${ac_cv_path_NICE+:} false; then :
14428  $as_echo_n "(cached) " >&6
14429else
14430  case $NICE in
14431  [\\/]* | ?:[\\/]*)
14432  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14433  ;;
14434  *)
14435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14436for as_dir in $PATH
14437do
14438  IFS=$as_save_IFS
14439  test -z "$as_dir" && as_dir=.
14440    for ac_exec_ext in '' $ac_executable_extensions; do
14441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14442    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14444    break 2
14445  fi
14446done
14447  done
14448IFS=$as_save_IFS
14449
14450  ;;
14451esac
14452fi
14453NICE=$ac_cv_path_NICE
14454if test -n "$NICE"; then
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14456$as_echo "$NICE" >&6; }
14457else
14458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14459$as_echo "no" >&6; }
14460fi
14461
14462
14463  test -n "$NICE" && break
14464done
14465
14466  else
14467    # The variable is set, but is it from the command line or the environment?
14468
14469    # Try to remove the string !NICE! from our list.
14470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14472      # If it failed, the variable was not from the command line. Ignore it,
14473      # but warn the user (except for BASH, which is always set by the calling BASH).
14474      if test "xNICE" != xBASH; then
14475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14476$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14477      fi
14478      # Try to locate tool using the code snippet
14479      for ac_prog in nice
14480do
14481  # Extract the first word of "$ac_prog", so it can be a program name with args.
14482set dummy $ac_prog; ac_word=$2
14483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14484$as_echo_n "checking for $ac_word... " >&6; }
14485if ${ac_cv_path_NICE+:} false; then :
14486  $as_echo_n "(cached) " >&6
14487else
14488  case $NICE in
14489  [\\/]* | ?:[\\/]*)
14490  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14491  ;;
14492  *)
14493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14494for as_dir in $PATH
14495do
14496  IFS=$as_save_IFS
14497  test -z "$as_dir" && as_dir=.
14498    for ac_exec_ext in '' $ac_executable_extensions; do
14499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14500    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14502    break 2
14503  fi
14504done
14505  done
14506IFS=$as_save_IFS
14507
14508  ;;
14509esac
14510fi
14511NICE=$ac_cv_path_NICE
14512if test -n "$NICE"; then
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14514$as_echo "$NICE" >&6; }
14515else
14516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14517$as_echo "no" >&6; }
14518fi
14519
14520
14521  test -n "$NICE" && break
14522done
14523
14524    else
14525      # If it succeeded, then it was overridden by the user. We will use it
14526      # for the tool.
14527
14528      # First remove it from the list of overridden variables, so we can test
14529      # for unknown variables in the end.
14530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14531
14532      # Check if we try to supply an empty value
14533      if test "x$NICE" = x; then
14534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14535$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14537$as_echo_n "checking for NICE... " >&6; }
14538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14539$as_echo "disabled" >&6; }
14540      else
14541        # Check if the provided tool contains a complete path.
14542        tool_specified="$NICE"
14543        tool_basename="${tool_specified##*/}"
14544        if test "x$tool_basename" = "x$tool_specified"; then
14545          # A command without a complete path is provided, search $PATH.
14546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14547$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14548          # Extract the first word of "$tool_basename", so it can be a program name with args.
14549set dummy $tool_basename; ac_word=$2
14550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14551$as_echo_n "checking for $ac_word... " >&6; }
14552if ${ac_cv_path_NICE+:} false; then :
14553  $as_echo_n "(cached) " >&6
14554else
14555  case $NICE in
14556  [\\/]* | ?:[\\/]*)
14557  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14558  ;;
14559  *)
14560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14561for as_dir in $PATH
14562do
14563  IFS=$as_save_IFS
14564  test -z "$as_dir" && as_dir=.
14565    for ac_exec_ext in '' $ac_executable_extensions; do
14566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14567    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14569    break 2
14570  fi
14571done
14572  done
14573IFS=$as_save_IFS
14574
14575  ;;
14576esac
14577fi
14578NICE=$ac_cv_path_NICE
14579if test -n "$NICE"; then
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14581$as_echo "$NICE" >&6; }
14582else
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14584$as_echo "no" >&6; }
14585fi
14586
14587
14588          if test "x$NICE" = x; then
14589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14590          fi
14591        else
14592          # Otherwise we believe it is a complete path. Use it as it is.
14593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14594$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14596$as_echo_n "checking for NICE... " >&6; }
14597          if test ! -x "$tool_specified"; then
14598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14599$as_echo "not found" >&6; }
14600            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14601          fi
14602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14603$as_echo "$tool_specified" >&6; }
14604        fi
14605      fi
14606    fi
14607
14608  fi
14609
14610
14611
14612
14613# Now we can determine OpenJDK build and target platforms. This is required to
14614# have early on.
14615# Make sure we can run config.sub.
14616$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14617  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14618
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14620$as_echo_n "checking build system type... " >&6; }
14621if ${ac_cv_build+:} false; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  ac_build_alias=$build_alias
14625test "x$ac_build_alias" = x &&
14626  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14627test "x$ac_build_alias" = x &&
14628  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14629ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14630  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14631
14632fi
14633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14634$as_echo "$ac_cv_build" >&6; }
14635case $ac_cv_build in
14636*-*-*) ;;
14637*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14638esac
14639build=$ac_cv_build
14640ac_save_IFS=$IFS; IFS='-'
14641set x $ac_cv_build
14642shift
14643build_cpu=$1
14644build_vendor=$2
14645shift; shift
14646# Remember, the first character of IFS is used to create $*,
14647# except with old shells:
14648build_os=$*
14649IFS=$ac_save_IFS
14650case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14651
14652
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14654$as_echo_n "checking host system type... " >&6; }
14655if ${ac_cv_host+:} false; then :
14656  $as_echo_n "(cached) " >&6
14657else
14658  if test "x$host_alias" = x; then
14659  ac_cv_host=$ac_cv_build
14660else
14661  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14662    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14663fi
14664
14665fi
14666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14667$as_echo "$ac_cv_host" >&6; }
14668case $ac_cv_host in
14669*-*-*) ;;
14670*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14671esac
14672host=$ac_cv_host
14673ac_save_IFS=$IFS; IFS='-'
14674set x $ac_cv_host
14675shift
14676host_cpu=$1
14677host_vendor=$2
14678shift; shift
14679# Remember, the first character of IFS is used to create $*,
14680# except with old shells:
14681host_os=$*
14682IFS=$ac_save_IFS
14683case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14684
14685
14686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14687$as_echo_n "checking target system type... " >&6; }
14688if ${ac_cv_target+:} false; then :
14689  $as_echo_n "(cached) " >&6
14690else
14691  if test "x$target_alias" = x; then
14692  ac_cv_target=$ac_cv_host
14693else
14694  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14695    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14696fi
14697
14698fi
14699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14700$as_echo "$ac_cv_target" >&6; }
14701case $ac_cv_target in
14702*-*-*) ;;
14703*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14704esac
14705target=$ac_cv_target
14706ac_save_IFS=$IFS; IFS='-'
14707set x $ac_cv_target
14708shift
14709target_cpu=$1
14710target_vendor=$2
14711shift; shift
14712# Remember, the first character of IFS is used to create $*,
14713# except with old shells:
14714target_os=$*
14715IFS=$ac_save_IFS
14716case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14717
14718
14719# The aliases save the names the user supplied, while $host etc.
14720# will get canonicalized.
14721test -n "$target_alias" &&
14722  test "$program_prefix$program_suffix$program_transform_name" = \
14723    NONENONEs,x,x, &&
14724  program_prefix=${target_alias}-
14725
14726  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14727  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14728  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14729  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14730  # to use the configure naming style.
14731
14732
14733
14734
14735
14736  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14737  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14738  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14739  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14740  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14741  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14742
14743
14744
14745  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14746
14747  case "$build_os" in
14748    *linux*)
14749      VAR_OS=linux
14750      VAR_OS_TYPE=unix
14751      ;;
14752    *solaris*)
14753      VAR_OS=solaris
14754      VAR_OS_TYPE=unix
14755      ;;
14756    *darwin*)
14757      VAR_OS=macosx
14758      VAR_OS_TYPE=unix
14759      ;;
14760    *bsd*)
14761      VAR_OS=bsd
14762      VAR_OS_TYPE=unix
14763      ;;
14764    *cygwin*)
14765      VAR_OS=windows
14766      VAR_OS_ENV=windows.cygwin
14767      ;;
14768    *mingw*)
14769      VAR_OS=windows
14770      VAR_OS_ENV=windows.msys
14771      ;;
14772    *aix*)
14773      VAR_OS=aix
14774      VAR_OS_TYPE=unix
14775      ;;
14776    *)
14777      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14778      ;;
14779  esac
14780
14781
14782  # First argument is the cpu name from the trip/quad
14783  case "$build_cpu" in
14784    x86_64)
14785      VAR_CPU=x86_64
14786      VAR_CPU_ARCH=x86
14787      VAR_CPU_BITS=64
14788      VAR_CPU_ENDIAN=little
14789      ;;
14790    i?86)
14791      VAR_CPU=x86
14792      VAR_CPU_ARCH=x86
14793      VAR_CPU_BITS=32
14794      VAR_CPU_ENDIAN=little
14795      ;;
14796    arm*)
14797      VAR_CPU=arm
14798      VAR_CPU_ARCH=arm
14799      VAR_CPU_BITS=32
14800      VAR_CPU_ENDIAN=little
14801      ;;
14802    aarch64)
14803      VAR_CPU=aarch64
14804      VAR_CPU_ARCH=aarch64
14805      VAR_CPU_BITS=64
14806      VAR_CPU_ENDIAN=little
14807      ;;
14808    powerpc)
14809      VAR_CPU=ppc
14810      VAR_CPU_ARCH=ppc
14811      VAR_CPU_BITS=32
14812      VAR_CPU_ENDIAN=big
14813      ;;
14814    powerpc64)
14815      VAR_CPU=ppc64
14816      VAR_CPU_ARCH=ppc
14817      VAR_CPU_BITS=64
14818      VAR_CPU_ENDIAN=big
14819      ;;
14820    powerpc64le)
14821      VAR_CPU=ppc64le
14822      VAR_CPU_ARCH=ppc
14823      VAR_CPU_BITS=64
14824      VAR_CPU_ENDIAN=little
14825      ;;
14826    s390)
14827      VAR_CPU=s390
14828      VAR_CPU_ARCH=s390
14829      VAR_CPU_BITS=32
14830      VAR_CPU_ENDIAN=big
14831      ;;
14832    s390x)
14833      VAR_CPU=s390x
14834      VAR_CPU_ARCH=s390
14835      VAR_CPU_BITS=64
14836      VAR_CPU_ENDIAN=big
14837      ;;
14838    sparc)
14839      VAR_CPU=sparc
14840      VAR_CPU_ARCH=sparc
14841      VAR_CPU_BITS=32
14842      VAR_CPU_ENDIAN=big
14843      ;;
14844    sparcv9|sparc64)
14845      VAR_CPU=sparcv9
14846      VAR_CPU_ARCH=sparc
14847      VAR_CPU_BITS=64
14848      VAR_CPU_ENDIAN=big
14849      ;;
14850    *)
14851      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14852      ;;
14853  esac
14854
14855  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14856  OPENJDK_BUILD_OS="$VAR_OS"
14857  if test "x$VAR_OS_TYPE" != x; then
14858    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14859  else
14860    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14861  fi
14862  if test "x$VAR_OS_ENV" != x; then
14863    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14864  else
14865    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14866  fi
14867  OPENJDK_BUILD_CPU="$VAR_CPU"
14868  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14869  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14870  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14871
14872
14873
14874
14875
14876
14877
14878
14879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14880$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14882$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14883
14884  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14885
14886  case "$host_os" in
14887    *linux*)
14888      VAR_OS=linux
14889      VAR_OS_TYPE=unix
14890      ;;
14891    *solaris*)
14892      VAR_OS=solaris
14893      VAR_OS_TYPE=unix
14894      ;;
14895    *darwin*)
14896      VAR_OS=macosx
14897      VAR_OS_TYPE=unix
14898      ;;
14899    *bsd*)
14900      VAR_OS=bsd
14901      VAR_OS_TYPE=unix
14902      ;;
14903    *cygwin*)
14904      VAR_OS=windows
14905      VAR_OS_ENV=windows.cygwin
14906      ;;
14907    *mingw*)
14908      VAR_OS=windows
14909      VAR_OS_ENV=windows.msys
14910      ;;
14911    *aix*)
14912      VAR_OS=aix
14913      VAR_OS_TYPE=unix
14914      ;;
14915    *)
14916      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14917      ;;
14918  esac
14919
14920
14921  # First argument is the cpu name from the trip/quad
14922  case "$host_cpu" in
14923    x86_64)
14924      VAR_CPU=x86_64
14925      VAR_CPU_ARCH=x86
14926      VAR_CPU_BITS=64
14927      VAR_CPU_ENDIAN=little
14928      ;;
14929    i?86)
14930      VAR_CPU=x86
14931      VAR_CPU_ARCH=x86
14932      VAR_CPU_BITS=32
14933      VAR_CPU_ENDIAN=little
14934      ;;
14935    arm*)
14936      VAR_CPU=arm
14937      VAR_CPU_ARCH=arm
14938      VAR_CPU_BITS=32
14939      VAR_CPU_ENDIAN=little
14940      ;;
14941    aarch64)
14942      VAR_CPU=aarch64
14943      VAR_CPU_ARCH=aarch64
14944      VAR_CPU_BITS=64
14945      VAR_CPU_ENDIAN=little
14946      ;;
14947    powerpc)
14948      VAR_CPU=ppc
14949      VAR_CPU_ARCH=ppc
14950      VAR_CPU_BITS=32
14951      VAR_CPU_ENDIAN=big
14952      ;;
14953    powerpc64)
14954      VAR_CPU=ppc64
14955      VAR_CPU_ARCH=ppc
14956      VAR_CPU_BITS=64
14957      VAR_CPU_ENDIAN=big
14958      ;;
14959    powerpc64le)
14960      VAR_CPU=ppc64le
14961      VAR_CPU_ARCH=ppc
14962      VAR_CPU_BITS=64
14963      VAR_CPU_ENDIAN=little
14964      ;;
14965    s390)
14966      VAR_CPU=s390
14967      VAR_CPU_ARCH=s390
14968      VAR_CPU_BITS=32
14969      VAR_CPU_ENDIAN=big
14970      ;;
14971    s390x)
14972      VAR_CPU=s390x
14973      VAR_CPU_ARCH=s390
14974      VAR_CPU_BITS=64
14975      VAR_CPU_ENDIAN=big
14976      ;;
14977    sparc)
14978      VAR_CPU=sparc
14979      VAR_CPU_ARCH=sparc
14980      VAR_CPU_BITS=32
14981      VAR_CPU_ENDIAN=big
14982      ;;
14983    sparcv9|sparc64)
14984      VAR_CPU=sparcv9
14985      VAR_CPU_ARCH=sparc
14986      VAR_CPU_BITS=64
14987      VAR_CPU_ENDIAN=big
14988      ;;
14989    *)
14990      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14991      ;;
14992  esac
14993
14994  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14995  OPENJDK_TARGET_OS="$VAR_OS"
14996  if test "x$VAR_OS_TYPE" != x; then
14997    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14998  else
14999    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15000  fi
15001  if test "x$VAR_OS_ENV" != x; then
15002    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15003  else
15004    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15005  fi
15006  OPENJDK_TARGET_CPU="$VAR_CPU"
15007  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15008  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15009  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15010
15011
15012
15013
15014
15015
15016
15017
15018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15019$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15021$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15022
15023
15024
15025# Check whether --with-target-bits was given.
15026if test "${with_target_bits+set}" = set; then :
15027  withval=$with_target_bits;
15028fi
15029
15030
15031  # We have three types of compiles:
15032  # native  == normal compilation, target system == build system
15033  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15034  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15035  #
15036  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15037    # We're doing a proper cross-compilation
15038    COMPILE_TYPE="cross"
15039  else
15040    COMPILE_TYPE="native"
15041  fi
15042
15043  if test "x$with_target_bits" != x; then
15044    if test "x$COMPILE_TYPE" = "xcross"; then
15045      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15046    fi
15047
15048    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15049      # A reduced build is requested
15050      COMPILE_TYPE="reduced"
15051      OPENJDK_TARGET_CPU_BITS=32
15052      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15053        OPENJDK_TARGET_CPU=x86
15054      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15055        OPENJDK_TARGET_CPU=sparc
15056      else
15057        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15058      fi
15059    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15060      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
15061    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15062      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15063$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15064    else
15065      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15066    fi
15067  fi
15068
15069
15070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15071$as_echo_n "checking compilation type... " >&6; }
15072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15073$as_echo "$COMPILE_TYPE" >&6; }
15074
15075
15076  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15077    REQUIRED_OS_NAME=SunOS
15078    REQUIRED_OS_VERSION=5.10
15079  fi
15080  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15081    REQUIRED_OS_NAME=Linux
15082    REQUIRED_OS_VERSION=2.6
15083  fi
15084  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15085    REQUIRED_OS_NAME=Windows
15086    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15087      REQUIRED_OS_VERSION=5.2
15088    else
15089      REQUIRED_OS_VERSION=5.1
15090    fi
15091  fi
15092  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15093    REQUIRED_OS_NAME=Darwin
15094    REQUIRED_OS_VERSION=11.2
15095  fi
15096
15097
15098
15099
15100
15101  # Also store the legacy naming of the cpu.
15102  # Ie i586 and amd64 instead of x86 and x86_64
15103  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15104  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15105    OPENJDK_TARGET_CPU_LEGACY="i586"
15106  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15107    # On all platforms except MacOSX replace x86_64 with amd64.
15108    OPENJDK_TARGET_CPU_LEGACY="amd64"
15109  fi
15110
15111
15112  # And the second legacy naming of the cpu.
15113  # Ie i386 and amd64 instead of x86 and x86_64.
15114  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15115  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15116    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15117  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15118    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15119  fi
15120
15121
15122  # This is the name of the cpu (but using i386 and amd64 instead of
15123  # x86 and x86_64, respectively), preceeded by a /, to be used when
15124  # locating libraries. On macosx, it's empty, though.
15125  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15126  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15127    OPENJDK_TARGET_CPU_LIBDIR=""
15128  fi
15129
15130
15131  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15132  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15133  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15134  OPENJDK_TARGET_CPU_ISADIR=""
15135  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15136    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15137      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15138    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15139      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15140    fi
15141  fi
15142
15143
15144  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15145  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15146  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15147    # On linux only, we replace x86 with i386.
15148    OPENJDK_TARGET_CPU_OSARCH="i386"
15149  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15150    # On all platforms except macosx, we replace x86_64 with amd64.
15151    OPENJDK_TARGET_CPU_OSARCH="amd64"
15152  fi
15153
15154
15155  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15156  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15157    OPENJDK_TARGET_CPU_JLI="i386"
15158  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15159    # On all platforms except macosx, we replace x86_64 with amd64.
15160    OPENJDK_TARGET_CPU_JLI="amd64"
15161  fi
15162  # Now setup the -D flags for building libjli.
15163  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15164  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15165    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15166      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15167    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15168      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15169    fi
15170  fi
15171
15172
15173  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15174      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15175  else
15176      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15177  fi
15178
15179
15180  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15181    A_LP64="LP64:="
15182    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15183    # unpack200.exe
15184    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15185      ADD_LP64="-D_LP64=1"
15186    fi
15187  fi
15188  LP64=$A_LP64
15189
15190
15191  if test "x$COMPILE_TYPE" = "xcross"; then
15192    # FIXME: ... or should this include reduced builds..?
15193    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15194  else
15195    DEFINE_CROSS_COMPILE_ARCH=""
15196  fi
15197
15198
15199  # ZERO_ARCHDEF is used to enable architecture-specific code
15200  case "${OPENJDK_TARGET_CPU}" in
15201    ppc)     ZERO_ARCHDEF=PPC32 ;;
15202    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15203    s390*)   ZERO_ARCHDEF=S390  ;;
15204    sparc*)  ZERO_ARCHDEF=SPARC ;;
15205    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15206    x86)     ZERO_ARCHDEF=IA32  ;;
15207    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15208  esac
15209
15210
15211
15212
15213# Continue setting up basic stuff. Most remaining code require fundamental tools.
15214
15215  # Save the current directory this script was started from
15216  CURDIR="$PWD"
15217
15218  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15219  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15220  # was not available at that time.
15221  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15222  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15223    ORIGINAL_PATH="$REWRITTEN_PATH"
15224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15225$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15226  fi
15227
15228  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15229    PATH_SEP=";"
15230
15231  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15232  if test $SRC_ROOT_LENGTH -gt 100; then
15233    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15234  fi
15235
15236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15238$as_echo_n "checking cygwin release... " >&6; }
15239    CYGWIN_VERSION=`$UNAME -r`
15240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15241$as_echo "$CYGWIN_VERSION" >&6; }
15242    WINDOWS_ENV_VENDOR='cygwin'
15243    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15244
15245    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15246    if test "x$CYGWIN_VERSION_OLD" != x; then
15247      { $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
15248$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;}
15249      as_fn_error $? "Cannot continue" "$LINENO" 5
15250    fi
15251    if test "x$CYGPATH" = x; then
15252      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15253    fi
15254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15255$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15256    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15257    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15258    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15259    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15261$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15262    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15263    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15264    if test "x$test_cygdrive_prefix" = x; then
15265      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15266    fi
15267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15269$as_echo_n "checking msys release... " >&6; }
15270    MSYS_VERSION=`$UNAME -r`
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15272$as_echo "$MSYS_VERSION" >&6; }
15273
15274    WINDOWS_ENV_VENDOR='msys'
15275    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15276
15277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15278$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15279    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15280    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15281
15282  windows_path="$MSYS_ROOT_PATH"
15283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15284    unix_path=`$CYGPATH -u "$windows_path"`
15285    MSYS_ROOT_PATH="$unix_path"
15286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15288    MSYS_ROOT_PATH="$unix_path"
15289  fi
15290
15291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15292$as_echo "$MSYS_ROOT_PATH" >&6; }
15293    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15294  else
15295    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15296  fi
15297
15298  # Test if windows or unix (cygwin/msys) find is first in path.
15299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15300$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15301  FIND_BINARY_OUTPUT=`find --version 2>&1`
15302  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15304$as_echo "unix style" >&6; }
15305  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15307$as_echo "Windows" >&6; }
15308    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15309$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15310    { $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
15311$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15312    as_fn_error $? "Cannot continue" "$LINENO" 5
15313  else
15314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15315$as_echo "unknown" >&6; }
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15317$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15318  fi
15319
15320  else
15321    PATH_SEP=":"
15322  fi
15323
15324
15325  # We get the top-level directory from the supporting wrappers.
15326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15327$as_echo_n "checking for top-level directory... " >&6; }
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15329$as_echo "$TOPDIR" >&6; }
15330
15331
15332  # Save the original version of TOPDIR for string comparisons
15333  ORIGINAL_TOPDIR="$TOPDIR"
15334
15335
15336  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15337
15338  # Only process if variable expands to non-empty
15339
15340  if test "x$CURDIR" != x; then
15341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15342
15343  # Input might be given as Windows format, start by converting to
15344  # unix format.
15345  path="$CURDIR"
15346  new_path=`$CYGPATH -u "$path"`
15347
15348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15351  # "foo.exe" is OK but "foo" is an error.
15352  #
15353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15354  # It is also a way to make sure we got the proper file name for the real test later on.
15355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15356  if test "x$test_shortpath" = x; then
15357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15358$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15359    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15360  fi
15361
15362  # Call helper function which possibly converts this using DOS-style short mode.
15363  # If so, the updated path is stored in $new_path.
15364
15365  input_path="$new_path"
15366  # Check if we need to convert this using DOS-style short mode. If the path
15367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15368  # take no chances and rewrite it.
15369  # Note: m4 eats our [], so we need to use [ and ] instead.
15370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15371  if test "x$has_forbidden_chars" != x; then
15372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15376      # Going to short mode and back again did indeed matter. Since short mode is
15377      # case insensitive, let's make it lowercase to improve readability.
15378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15379      # Now convert it back to Unix-style (cygpath)
15380      input_path=`$CYGPATH -u "$shortmode_path"`
15381      new_path="$input_path"
15382    fi
15383  fi
15384
15385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15386  if test "x$test_cygdrive_prefix" = x; then
15387    # As a simple fix, exclude /usr/bin since it's not a real path.
15388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15390      # a path prefixed by /cygdrive for fixpath to work.
15391      new_path="$CYGWIN_ROOT_PATH$input_path"
15392    fi
15393  fi
15394
15395
15396  if test "x$path" != "x$new_path"; then
15397    CURDIR="$new_path"
15398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15399$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15400  fi
15401
15402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15403
15404  path="$CURDIR"
15405  has_colon=`$ECHO $path | $GREP ^.:`
15406  new_path="$path"
15407  if test "x$has_colon" = x; then
15408    # Not in mixed or Windows style, start by that.
15409    new_path=`cmd //c echo $path`
15410  fi
15411
15412
15413  input_path="$new_path"
15414  # Check if we need to convert this using DOS-style short mode. If the path
15415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15416  # take no chances and rewrite it.
15417  # Note: m4 eats our [], so we need to use [ and ] instead.
15418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15419  if test "x$has_forbidden_chars" != x; then
15420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15422  fi
15423
15424
15425  windows_path="$new_path"
15426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15427    unix_path=`$CYGPATH -u "$windows_path"`
15428    new_path="$unix_path"
15429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15431    new_path="$unix_path"
15432  fi
15433
15434  if test "x$path" != "x$new_path"; then
15435    CURDIR="$new_path"
15436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15437$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15438  fi
15439
15440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15442
15443    else
15444      # We're on a unix platform. Hooray! :)
15445      path="$CURDIR"
15446      has_space=`$ECHO "$path" | $GREP " "`
15447      if test "x$has_space" != x; then
15448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15449$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15451      fi
15452
15453      # Use eval to expand a potential ~
15454      eval path="$path"
15455      if test ! -f "$path" && test ! -d "$path"; then
15456        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15457      fi
15458
15459      if test -d "$path"; then
15460        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15461      else
15462        dir="`$DIRNAME "$path"`"
15463        base="`$BASENAME "$path"`"
15464        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15465      fi
15466    fi
15467  fi
15468
15469
15470  # Only process if variable expands to non-empty
15471
15472  if test "x$TOPDIR" != x; then
15473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15474
15475  # Input might be given as Windows format, start by converting to
15476  # unix format.
15477  path="$TOPDIR"
15478  new_path=`$CYGPATH -u "$path"`
15479
15480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15483  # "foo.exe" is OK but "foo" is an error.
15484  #
15485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15486  # It is also a way to make sure we got the proper file name for the real test later on.
15487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15488  if test "x$test_shortpath" = x; then
15489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15490$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15491    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15492  fi
15493
15494  # Call helper function which possibly converts this using DOS-style short mode.
15495  # If so, the updated path is stored in $new_path.
15496
15497  input_path="$new_path"
15498  # Check if we need to convert this using DOS-style short mode. If the path
15499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15500  # take no chances and rewrite it.
15501  # Note: m4 eats our [], so we need to use [ and ] instead.
15502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15503  if test "x$has_forbidden_chars" != x; then
15504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15508      # Going to short mode and back again did indeed matter. Since short mode is
15509      # case insensitive, let's make it lowercase to improve readability.
15510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15511      # Now convert it back to Unix-style (cygpath)
15512      input_path=`$CYGPATH -u "$shortmode_path"`
15513      new_path="$input_path"
15514    fi
15515  fi
15516
15517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15518  if test "x$test_cygdrive_prefix" = x; then
15519    # As a simple fix, exclude /usr/bin since it's not a real path.
15520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15522      # a path prefixed by /cygdrive for fixpath to work.
15523      new_path="$CYGWIN_ROOT_PATH$input_path"
15524    fi
15525  fi
15526
15527
15528  if test "x$path" != "x$new_path"; then
15529    TOPDIR="$new_path"
15530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15531$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15532  fi
15533
15534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15535
15536  path="$TOPDIR"
15537  has_colon=`$ECHO $path | $GREP ^.:`
15538  new_path="$path"
15539  if test "x$has_colon" = x; then
15540    # Not in mixed or Windows style, start by that.
15541    new_path=`cmd //c echo $path`
15542  fi
15543
15544
15545  input_path="$new_path"
15546  # Check if we need to convert this using DOS-style short mode. If the path
15547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15548  # take no chances and rewrite it.
15549  # Note: m4 eats our [], so we need to use [ and ] instead.
15550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15551  if test "x$has_forbidden_chars" != x; then
15552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15554  fi
15555
15556
15557  windows_path="$new_path"
15558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15559    unix_path=`$CYGPATH -u "$windows_path"`
15560    new_path="$unix_path"
15561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15563    new_path="$unix_path"
15564  fi
15565
15566  if test "x$path" != "x$new_path"; then
15567    TOPDIR="$new_path"
15568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15569$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15570  fi
15571
15572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15574
15575    else
15576      # We're on a unix platform. Hooray! :)
15577      path="$TOPDIR"
15578      has_space=`$ECHO "$path" | $GREP " "`
15579      if test "x$has_space" != x; then
15580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15581$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15583      fi
15584
15585      # Use eval to expand a potential ~
15586      eval path="$path"
15587      if test ! -f "$path" && test ! -d "$path"; then
15588        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15589      fi
15590
15591      if test -d "$path"; then
15592        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15593      else
15594        dir="`$DIRNAME "$path"`"
15595        base="`$BASENAME "$path"`"
15596        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15597      fi
15598    fi
15599  fi
15600
15601  # SRC_ROOT is a traditional alias for TOPDIR.
15602  SRC_ROOT=$TOPDIR
15603
15604  # Calculate a canonical version of TOPDIR for string comparisons
15605  CANONICAL_TOPDIR=$TOPDIR
15606
15607  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15608    # Follow a chain of symbolic links. Use readlink
15609    # where it exists, else fall back to horribly
15610    # complicated shell code.
15611    if test "x$READLINK_TESTED" != yes; then
15612      # On MacOSX there is a readlink tool with a different
15613      # purpose than the GNU readlink tool. Check the found readlink.
15614      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15615      if test "x$ISGNU" = x; then
15616        # A readlink that we do not know how to use.
15617        # Are there other non-GNU readlinks out there?
15618        READLINK_TESTED=yes
15619        READLINK=
15620      fi
15621    fi
15622
15623    if test "x$READLINK" != x; then
15624      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15625    else
15626      # Save the current directory for restoring afterwards
15627      STARTDIR=$PWD
15628      COUNTER=0
15629      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15630      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15631      cd $sym_link_dir
15632      # Use -P flag to resolve symlinks in directories.
15633      cd `$THEPWDCMD -P`
15634      sym_link_dir=`$THEPWDCMD -P`
15635      # Resolve file symlinks
15636      while test $COUNTER -lt 20; do
15637        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15638        if test "x$ISLINK" == x; then
15639          # This is not a symbolic link! We are done!
15640          break
15641        fi
15642        # Again resolve directory symlinks since the target of the just found
15643        # link could be in a different directory
15644        cd `$DIRNAME $ISLINK`
15645        sym_link_dir=`$THEPWDCMD -P`
15646        sym_link_file=`$BASENAME $ISLINK`
15647        let COUNTER=COUNTER+1
15648      done
15649      cd $STARTDIR
15650      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15651    fi
15652  fi
15653
15654
15655
15656  # Locate the directory of this script.
15657  AUTOCONF_DIR=$TOPDIR/common/autoconf
15658
15659
15660# Check if it's a pure open build or if custom sources are to be used.
15661
15662  # Check whether --enable-openjdk-only was given.
15663if test "${enable_openjdk_only+set}" = set; then :
15664  enableval=$enable_openjdk_only;
15665else
15666  enable_openjdk_only="no"
15667fi
15668
15669
15670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15671$as_echo_n "checking for presence of closed sources... " >&6; }
15672  if test -d "$SRC_ROOT/jdk/src/closed"; then
15673    CLOSED_SOURCE_PRESENT=yes
15674  else
15675    CLOSED_SOURCE_PRESENT=no
15676  fi
15677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15678$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15679
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15681$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15682  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15684$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15685
15686  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15687    OPENJDK=true
15688    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15689      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15690$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15691    fi
15692  else
15693    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15694      OPENJDK=true
15695    else
15696      OPENJDK=false
15697    fi
15698  fi
15699
15700  if test "x$OPENJDK" = "xtrue"; then
15701    SET_OPENJDK="OPENJDK=true"
15702  fi
15703
15704
15705
15706  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15707  # the IncludeCustomExtension macro.
15708
15709
15710# Check whether --with-custom-make-dir was given.
15711if test "${with_custom_make_dir+set}" = set; then :
15712  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
15713$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15714fi
15715
15716
15717
15718
15719# These are needed to be able to create a configuration name (and thus the output directory)
15720
15721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15722$as_echo_n "checking which variant of the JDK to build... " >&6; }
15723
15724# Check whether --with-jdk-variant was given.
15725if test "${with_jdk_variant+set}" = set; then :
15726  withval=$with_jdk_variant;
15727fi
15728
15729
15730  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15731    JDK_VARIANT="normal"
15732  else
15733    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15734  fi
15735
15736
15737
15738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15739$as_echo "$JDK_VARIANT" >&6; }
15740
15741
15742
15743# Check whether --with-jvm-interpreter was given.
15744if test "${with_jvm_interpreter+set}" = set; then :
15745  withval=$with_jvm_interpreter;
15746fi
15747
15748
15749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15750$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15751  if test "x$with_jvm_interpreter" = x; then
15752    JVM_INTERPRETER="template"
15753  else
15754    JVM_INTERPRETER="$with_jvm_interpreter"
15755  fi
15756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15757$as_echo "$JVM_INTERPRETER" >&6; }
15758
15759  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15760    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15761  fi
15762
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15767$as_echo_n "checking which variants of the JVM to build... " >&6; }
15768
15769# Check whether --with-jvm-variants was given.
15770if test "${with_jvm_variants+set}" = set; then :
15771  withval=$with_jvm_variants;
15772fi
15773
15774
15775  if test "x$with_jvm_variants" = x; then
15776    with_jvm_variants="server"
15777  fi
15778
15779  JVM_VARIANTS=",$with_jvm_variants,"
15780  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15781
15782  if test "x$TEST_VARIANTS" != "x,"; then
15783    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15784  fi
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15786$as_echo "$with_jvm_variants" >&6; }
15787
15788  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15789  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15790  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15791  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15792  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15793  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15794
15795  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15796    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15797      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15798    fi
15799  fi
15800  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15801    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15802      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15803    fi
15804  fi
15805
15806  # Replace the commas with AND for use in the build directory name.
15807  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15808  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15809  if test "x$COUNT_VARIANTS" != "x,1"; then
15810    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15811  else
15812    BUILDING_MULTIPLE_JVM_VARIANTS=no
15813  fi
15814
15815  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15816    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15817  fi
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827  INCLUDE_SA=true
15828  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15829    INCLUDE_SA=false
15830  fi
15831  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15832    INCLUDE_SA=false
15833  fi
15834  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15835    INCLUDE_SA=false
15836  fi
15837  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15838    INCLUDE_SA=false
15839  fi
15840
15841
15842  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15843    MACOSX_UNIVERSAL="true"
15844  fi
15845
15846
15847
15848
15849  DEBUG_LEVEL="release"
15850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15851$as_echo_n "checking which debug level to use... " >&6; }
15852  # Check whether --enable-debug was given.
15853if test "${enable_debug+set}" = set; then :
15854  enableval=$enable_debug;
15855        ENABLE_DEBUG="${enableval}"
15856        DEBUG_LEVEL="fastdebug"
15857
15858else
15859  ENABLE_DEBUG="no"
15860fi
15861
15862
15863
15864# Check whether --with-debug-level was given.
15865if test "${with_debug_level+set}" = set; then :
15866  withval=$with_debug_level;
15867        DEBUG_LEVEL="${withval}"
15868        if test "x$ENABLE_DEBUG" = xyes; then
15869          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15870        fi
15871
15872fi
15873
15874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15875$as_echo "$DEBUG_LEVEL" >&6; }
15876
15877  if test "x$DEBUG_LEVEL" != xrelease && \
15878      test "x$DEBUG_LEVEL" != xoptimized && \
15879      test "x$DEBUG_LEVEL" != xfastdebug && \
15880      test "x$DEBUG_LEVEL" != xslowdebug; then
15881    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15882  fi
15883
15884
15885  case $DEBUG_LEVEL in
15886    release )
15887      VARIANT="OPT"
15888      FASTDEBUG="false"
15889      DEBUG_CLASSFILES="false"
15890      BUILD_VARIANT_RELEASE=""
15891      HOTSPOT_DEBUG_LEVEL="product"
15892      HOTSPOT_EXPORT="product"
15893      ;;
15894    fastdebug )
15895      VARIANT="DBG"
15896      FASTDEBUG="true"
15897      DEBUG_CLASSFILES="true"
15898      BUILD_VARIANT_RELEASE="-fastdebug"
15899      HOTSPOT_DEBUG_LEVEL="fastdebug"
15900      HOTSPOT_EXPORT="fastdebug"
15901      ;;
15902    slowdebug )
15903      VARIANT="DBG"
15904      FASTDEBUG="false"
15905      DEBUG_CLASSFILES="true"
15906      BUILD_VARIANT_RELEASE="-debug"
15907      HOTSPOT_DEBUG_LEVEL="debug"
15908      HOTSPOT_EXPORT="debug"
15909      ;;
15910    optimized )
15911      VARIANT="OPT"
15912      FASTDEBUG="false"
15913      DEBUG_CLASSFILES="false"
15914      BUILD_VARIANT_RELEASE="-optimized"
15915      HOTSPOT_DEBUG_LEVEL="optimized"
15916      HOTSPOT_EXPORT="optimized"
15917      ;;
15918  esac
15919
15920  # The debug level 'optimized' is a little special because it is currently only
15921  # applicable to the HotSpot build where it means to build a completely
15922  # optimized version of the VM without any debugging code (like for the
15923  # 'release' debug level which is called 'product' in the HotSpot build) but
15924  # with the exception that it can contain additional code which is otherwise
15925  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15926  # test new and/or experimental features which are not intended for customer
15927  # shipment. Because these new features need to be tested and benchmarked in
15928  # real world scenarios, we want to build the containing JDK at the 'release'
15929  # debug level.
15930  if test "x$DEBUG_LEVEL" = xoptimized; then
15931    DEBUG_LEVEL="release"
15932  fi
15933
15934  #####
15935  # Generate the legacy makefile targets for hotspot.
15936  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15937  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15938  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15939  # But until then ...
15940  HOTSPOT_TARGET=""
15941
15942  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15943    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15944  fi
15945
15946  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15947    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15948  fi
15949
15950  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15951    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15952  fi
15953
15954  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15955    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15956  fi
15957
15958  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15959    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15960  fi
15961
15962  if test "x$JVM_VARIANT_CORE" = xtrue; then
15963    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15964  fi
15965
15966  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15967
15968  # On Macosx universal binaries are produced, but they only contain
15969  # 64 bit intel. This invalidates control of which jvms are built
15970  # from configure, but only server is valid anyway. Fix this
15971  # when hotspot makefiles are rewritten.
15972  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15973    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15974  fi
15975
15976  #####
15977
15978
15979
15980
15981
15982
15983
15984
15985# With basic setup done, call the custom early hook.
15986
15987
15988# Check if we have devkits, extra paths or sysroot set.
15989
15990
15991# Check whether --with-devkit was given.
15992if test "${with_devkit+set}" = set; then :
15993  withval=$with_devkit;
15994
15995  # Only process if variable expands to non-empty
15996
15997  if test "x$with_devkit" != x; then
15998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999
16000  # Input might be given as Windows format, start by converting to
16001  # unix format.
16002  path="$with_devkit"
16003  new_path=`$CYGPATH -u "$path"`
16004
16005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16008  # "foo.exe" is OK but "foo" is an error.
16009  #
16010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16011  # It is also a way to make sure we got the proper file name for the real test later on.
16012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16013  if test "x$test_shortpath" = x; then
16014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16015$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16016    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16017  fi
16018
16019  # Call helper function which possibly converts this using DOS-style short mode.
16020  # If so, the updated path is stored in $new_path.
16021
16022  input_path="$new_path"
16023  # Check if we need to convert this using DOS-style short mode. If the path
16024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16025  # take no chances and rewrite it.
16026  # Note: m4 eats our [], so we need to use [ and ] instead.
16027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16028  if test "x$has_forbidden_chars" != x; then
16029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16033      # Going to short mode and back again did indeed matter. Since short mode is
16034      # case insensitive, let's make it lowercase to improve readability.
16035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16036      # Now convert it back to Unix-style (cygpath)
16037      input_path=`$CYGPATH -u "$shortmode_path"`
16038      new_path="$input_path"
16039    fi
16040  fi
16041
16042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16043  if test "x$test_cygdrive_prefix" = x; then
16044    # As a simple fix, exclude /usr/bin since it's not a real path.
16045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16047      # a path prefixed by /cygdrive for fixpath to work.
16048      new_path="$CYGWIN_ROOT_PATH$input_path"
16049    fi
16050  fi
16051
16052
16053  if test "x$path" != "x$new_path"; then
16054    with_devkit="$new_path"
16055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16056$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16057  fi
16058
16059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16060
16061  path="$with_devkit"
16062  has_colon=`$ECHO $path | $GREP ^.:`
16063  new_path="$path"
16064  if test "x$has_colon" = x; then
16065    # Not in mixed or Windows style, start by that.
16066    new_path=`cmd //c echo $path`
16067  fi
16068
16069
16070  input_path="$new_path"
16071  # Check if we need to convert this using DOS-style short mode. If the path
16072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16073  # take no chances and rewrite it.
16074  # Note: m4 eats our [], so we need to use [ and ] instead.
16075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16076  if test "x$has_forbidden_chars" != x; then
16077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16079  fi
16080
16081
16082  windows_path="$new_path"
16083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16084    unix_path=`$CYGPATH -u "$windows_path"`
16085    new_path="$unix_path"
16086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16088    new_path="$unix_path"
16089  fi
16090
16091  if test "x$path" != "x$new_path"; then
16092    with_devkit="$new_path"
16093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16094$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16095  fi
16096
16097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16099
16100    else
16101      # We're on a unix platform. Hooray! :)
16102      path="$with_devkit"
16103      has_space=`$ECHO "$path" | $GREP " "`
16104      if test "x$has_space" != x; then
16105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16106$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16108      fi
16109
16110      # Use eval to expand a potential ~
16111      eval path="$path"
16112      if test ! -f "$path" && test ! -d "$path"; then
16113        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16114      fi
16115
16116      if test -d "$path"; then
16117        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16118      else
16119        dir="`$DIRNAME "$path"`"
16120        base="`$BASENAME "$path"`"
16121        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16122      fi
16123    fi
16124  fi
16125
16126        DEVKIT_ROOT="$with_devkit"
16127        # Check for a meta data info file in the root of the devkit
16128        if test -f "$DEVKIT_ROOT/devkit.info"; then
16129          . $DEVKIT_ROOT/devkit.info
16130          # This potentially sets the following:
16131          # A descriptive name of the devkit
16132
16133  if test "x$DEVKIT_NAME" = x; then
16134    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16135  fi
16136
16137          # Corresponds to --with-extra-path
16138
16139  if test "x$DEVKIT_EXTRA_PATH" = x; then
16140    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16141  fi
16142
16143          # Corresponds to --with-toolchain-path
16144
16145  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16146    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16147  fi
16148
16149          # Corresponds to --with-sysroot
16150
16151  if test "x$DEVKIT_SYSROOT" = x; then
16152    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16153  fi
16154
16155
16156          # Identifies the Visual Studio version in the devkit
16157
16158  if test "x$DEVKIT_VS_VERSION" = x; then
16159    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16160  fi
16161
16162          # The Visual Studio include environment variable
16163
16164  if test "x$DEVKIT_VS_INCLUDE" = x; then
16165    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16166  fi
16167
16168          # The Visual Studio lib environment variable
16169
16170  if test "x$DEVKIT_VS_LIB" = x; then
16171    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16172  fi
16173
16174          # Corresponds to --with-msvcr-dll
16175
16176  if test "x$DEVKIT_MSVCR_DLL" = x; then
16177    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16178  fi
16179
16180          # Corresponds to --with-msvcp-dll
16181
16182  if test "x$DEVKIT_MSVCP_DLL" = x; then
16183    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16184  fi
16185
16186        fi
16187
16188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16189$as_echo_n "checking for devkit... " >&6; }
16190        if test "x$DEVKIT_NAME" != x; then
16191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16192$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16193        else
16194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16195$as_echo "$DEVKIT_ROOT" >&6; }
16196        fi
16197
16198
16199  if test "x$DEVKIT_EXTRA_PATH" != x; then
16200    if test "x$EXTRA_PATH" = x; then
16201      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16202    else
16203      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16204    fi
16205  fi
16206
16207
16208        # Fallback default of just /bin if DEVKIT_PATH is not defined
16209        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16210          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16211        fi
16212
16213  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16214    if test "x$TOOLCHAIN_PATH" = x; then
16215      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16216    else
16217      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16218    fi
16219  fi
16220
16221
16222        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16223        # places for backwards compatiblity.
16224        if test "x$DEVKIT_SYSROOT" != x; then
16225          SYSROOT="$DEVKIT_SYSROOT"
16226        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16227          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16228        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16229          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16230        fi
16231
16232
16233fi
16234
16235
16236  # You can force the sysroot if the sysroot encoded into the compiler tools
16237  # is not correct.
16238
16239# Check whether --with-sys-root was given.
16240if test "${with_sys_root+set}" = set; then :
16241  withval=$with_sys_root; SYSROOT=$with_sys_root
16242
16243fi
16244
16245
16246
16247# Check whether --with-sysroot was given.
16248if test "${with_sysroot+set}" = set; then :
16249  withval=$with_sysroot; SYSROOT=$with_sysroot
16250
16251fi
16252
16253
16254
16255# Check whether --with-tools-dir was given.
16256if test "${with_tools_dir+set}" = set; then :
16257  withval=$with_tools_dir;
16258  if test "x$with_tools_dir" != x; then
16259    if test "x$TOOLCHAIN_PATH" = x; then
16260      TOOLCHAIN_PATH="$with_tools_dir"
16261    else
16262      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16263    fi
16264  fi
16265
16266
16267fi
16268
16269
16270
16271# Check whether --with-toolchain-path was given.
16272if test "${with_toolchain_path+set}" = set; then :
16273  withval=$with_toolchain_path;
16274  if test "x$with_toolchain_path" != x; then
16275    if test "x$TOOLCHAIN_PATH" = x; then
16276      TOOLCHAIN_PATH="$with_toolchain_path"
16277    else
16278      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16279    fi
16280  fi
16281
16282
16283fi
16284
16285
16286
16287# Check whether --with-extra-path was given.
16288if test "${with_extra_path+set}" = set; then :
16289  withval=$with_extra_path;
16290  if test "x$with_extra_path" != x; then
16291    if test "x$EXTRA_PATH" = x; then
16292      EXTRA_PATH="$with_extra_path"
16293    else
16294      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16295    fi
16296  fi
16297
16298
16299fi
16300
16301
16302  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16303    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16304    # If not, detect if Xcode is installed by running xcodebuild -version
16305    # if no Xcode installed, xcodebuild exits with 1
16306    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16307    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16308      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16309      # fall back on the stub binary in /usr/bin/xcodebuild
16310      # Extract the first word of "xcodebuild", so it can be a program name with args.
16311set dummy xcodebuild; ac_word=$2
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16313$as_echo_n "checking for $ac_word... " >&6; }
16314if ${ac_cv_path_XCODEBUILD+:} false; then :
16315  $as_echo_n "(cached) " >&6
16316else
16317  case $XCODEBUILD in
16318  [\\/]* | ?:[\\/]*)
16319  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16320  ;;
16321  *)
16322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16323for as_dir in $TOOLCHAIN_PATH
16324do
16325  IFS=$as_save_IFS
16326  test -z "$as_dir" && as_dir=.
16327    for ac_exec_ext in '' $ac_executable_extensions; do
16328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16329    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16331    break 2
16332  fi
16333done
16334  done
16335IFS=$as_save_IFS
16336
16337  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16338  ;;
16339esac
16340fi
16341XCODEBUILD=$ac_cv_path_XCODEBUILD
16342if test -n "$XCODEBUILD"; then
16343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16344$as_echo "$XCODEBUILD" >&6; }
16345else
16346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16347$as_echo "no" >&6; }
16348fi
16349
16350
16351    else
16352      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16353      # when only the command line tools are installed there are no SDKs, so headers
16354      # are copied into the system frameworks
16355      XCODEBUILD=
16356
16357    fi
16358
16359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16360$as_echo_n "checking for sdk name... " >&6; }
16361
16362# Check whether --with-sdk-name was given.
16363if test "${with_sdk_name+set}" = set; then :
16364  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16365
16366fi
16367
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16369$as_echo "$SDKNAME" >&6; }
16370
16371    # if toolchain path is specified then don't rely on system headers, they may not compile
16372    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16373    test -z "$TOOLCHAIN_PATH" && \
16374      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16375
16376    if test -z "$SYSROOT"; then
16377      if test -n "$XCODEBUILD"; then
16378        # if we don't have system headers, use default SDK name (last resort)
16379        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16380          SDKNAME=${SDKNAME:-macosx}
16381        fi
16382
16383        if test -n "$SDKNAME"; then
16384          # Call xcodebuild to determine SYSROOT
16385          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16386        fi
16387      else
16388        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16389          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
16390        fi
16391      fi
16392    else
16393      # warn user if --with-sdk-name was also set
16394      if test -n "$with_sdk_name"; then
16395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16396$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16397      fi
16398    fi
16399
16400    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16401      # If no system framework headers, then SYSROOT must be set, or we won't build
16402      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
16403    fi
16404
16405    # Perform a basic sanity test
16406    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16407      if test -z "$SYSROOT"; then
16408        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
16409      else
16410        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16411      fi
16412    fi
16413
16414    # set SDKROOT too, Xcode tools will pick it up
16415    SDKROOT=$SYSROOT
16416
16417  fi
16418
16419  # Prepend the extra path to the global path
16420
16421  if test "x$EXTRA_PATH" != x; then
16422    if test "x$PATH" = x; then
16423      PATH="$EXTRA_PATH"
16424    else
16425      PATH="$EXTRA_PATH:$PATH"
16426    fi
16427  fi
16428
16429
16430  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16431    # Add extra search paths on solaris for utilities like ar and as etc...
16432    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16433  fi
16434
16435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16436$as_echo_n "checking for sysroot... " >&6; }
16437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16438$as_echo "$SYSROOT" >&6; }
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16440$as_echo_n "checking for toolchain path... " >&6; }
16441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16442$as_echo "$TOOLCHAIN_PATH" >&6; }
16443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16444$as_echo_n "checking for extra path... " >&6; }
16445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16446$as_echo "$EXTRA_PATH" >&6; }
16447
16448
16449# To properly create a configuration name, we need to have the OpenJDK target
16450# and options (variants and debug level) parsed.
16451
16452
16453
16454# Check whether --with-conf-name was given.
16455if test "${with_conf_name+set}" = set; then :
16456  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16457fi
16458
16459
16460  # Test from where we are running configure, in or outside of src root.
16461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16462$as_echo_n "checking where to store configuration... " >&6; }
16463  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16464      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16465      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16466    # We are running configure from the src root.
16467    # Create a default ./build/target-variant-debuglevel output root.
16468    if test "x${CONF_NAME}" = x; then
16469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16470$as_echo "in default location" >&6; }
16471      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16472    else
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16474$as_echo "in build directory with custom name" >&6; }
16475    fi
16476    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16477    $MKDIR -p "$OUTPUT_ROOT"
16478    if test ! -d "$OUTPUT_ROOT"; then
16479      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16480    fi
16481  else
16482    # We are running configure from outside of the src dir.
16483    # Then use the current directory as output dir!
16484    # If configuration is situated in normal build directory, just use the build
16485    # directory name as configuration name, otherwise use the complete path.
16486    if test "x${CONF_NAME}" = x; then
16487      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16488    fi
16489    OUTPUT_ROOT="$CURDIR"
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16491$as_echo "in current directory" >&6; }
16492
16493    # WARNING: This might be a bad thing to do. You need to be sure you want to
16494    # have a configuration in this directory. Do some sanity checks!
16495
16496    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16497      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16498      # other files
16499      files_present=`$LS $OUTPUT_ROOT`
16500      # Configure has already touched config.log and confdefs.h in the current dir when this check
16501      # is performed.
16502      filtered_files=`$ECHO "$files_present" \
16503          | $SED -e 's/config.log//g' \
16504              -e 's/configure.log//g' \
16505              -e 's/confdefs.h//g' \
16506              -e 's/ //g' \
16507          | $TR -d '\n'`
16508      if test "x$filtered_files" != x; then
16509        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16510$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16511        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16512$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16514$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16515        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16516$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16517        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16518$as_echo "$as_me: seriously mess up just about everything." >&6;}
16519        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16520$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16522$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16523        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16524      fi
16525    fi
16526  fi
16527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16528$as_echo_n "checking what configuration name to use... " >&6; }
16529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16530$as_echo "$CONF_NAME" >&6; }
16531
16532
16533  # Only process if variable expands to non-empty
16534
16535  if test "x$OUTPUT_ROOT" != x; then
16536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16537
16538  # Input might be given as Windows format, start by converting to
16539  # unix format.
16540  path="$OUTPUT_ROOT"
16541  new_path=`$CYGPATH -u "$path"`
16542
16543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16546  # "foo.exe" is OK but "foo" is an error.
16547  #
16548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16549  # It is also a way to make sure we got the proper file name for the real test later on.
16550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16551  if test "x$test_shortpath" = x; then
16552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16553$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16554    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16555  fi
16556
16557  # Call helper function which possibly converts this using DOS-style short mode.
16558  # If so, the updated path is stored in $new_path.
16559
16560  input_path="$new_path"
16561  # Check if we need to convert this using DOS-style short mode. If the path
16562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16563  # take no chances and rewrite it.
16564  # Note: m4 eats our [], so we need to use [ and ] instead.
16565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16566  if test "x$has_forbidden_chars" != x; then
16567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16571      # Going to short mode and back again did indeed matter. Since short mode is
16572      # case insensitive, let's make it lowercase to improve readability.
16573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16574      # Now convert it back to Unix-style (cygpath)
16575      input_path=`$CYGPATH -u "$shortmode_path"`
16576      new_path="$input_path"
16577    fi
16578  fi
16579
16580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16581  if test "x$test_cygdrive_prefix" = x; then
16582    # As a simple fix, exclude /usr/bin since it's not a real path.
16583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16585      # a path prefixed by /cygdrive for fixpath to work.
16586      new_path="$CYGWIN_ROOT_PATH$input_path"
16587    fi
16588  fi
16589
16590
16591  if test "x$path" != "x$new_path"; then
16592    OUTPUT_ROOT="$new_path"
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16594$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16595  fi
16596
16597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16598
16599  path="$OUTPUT_ROOT"
16600  has_colon=`$ECHO $path | $GREP ^.:`
16601  new_path="$path"
16602  if test "x$has_colon" = x; then
16603    # Not in mixed or Windows style, start by that.
16604    new_path=`cmd //c echo $path`
16605  fi
16606
16607
16608  input_path="$new_path"
16609  # Check if we need to convert this using DOS-style short mode. If the path
16610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16611  # take no chances and rewrite it.
16612  # Note: m4 eats our [], so we need to use [ and ] instead.
16613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16614  if test "x$has_forbidden_chars" != x; then
16615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16617  fi
16618
16619
16620  windows_path="$new_path"
16621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16622    unix_path=`$CYGPATH -u "$windows_path"`
16623    new_path="$unix_path"
16624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16626    new_path="$unix_path"
16627  fi
16628
16629  if test "x$path" != "x$new_path"; then
16630    OUTPUT_ROOT="$new_path"
16631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16632$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16633  fi
16634
16635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16637
16638    else
16639      # We're on a unix platform. Hooray! :)
16640      path="$OUTPUT_ROOT"
16641      has_space=`$ECHO "$path" | $GREP " "`
16642      if test "x$has_space" != x; then
16643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16644$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16646      fi
16647
16648      # Use eval to expand a potential ~
16649      eval path="$path"
16650      if test ! -f "$path" && test ! -d "$path"; then
16651        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16652      fi
16653
16654      if test -d "$path"; then
16655        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16656      else
16657        dir="`$DIRNAME "$path"`"
16658        base="`$BASENAME "$path"`"
16659        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16660      fi
16661    fi
16662  fi
16663
16664
16665  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16666  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16667
16668  SPEC=$OUTPUT_ROOT/spec.gmk
16669
16670  CONF_NAME=$CONF_NAME
16671
16672  OUTPUT_ROOT=$OUTPUT_ROOT
16673
16674
16675
16676  # The spec.gmk file contains all variables for the make system.
16677  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16678
16679  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16680  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16681
16682  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16683  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16684
16685  # The compare.sh is used to compare the build output to other builds.
16686  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16687
16688  # The generated Makefile knows where the spec.gmk is and where the source is.
16689  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16690  # which will look for generated configurations
16691  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16692
16693
16694
16695# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16696
16697  for ac_prog in apt-get yum port pkgutil pkgadd
16698do
16699  # Extract the first word of "$ac_prog", so it can be a program name with args.
16700set dummy $ac_prog; ac_word=$2
16701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16702$as_echo_n "checking for $ac_word... " >&6; }
16703if ${ac_cv_prog_PKGHANDLER+:} false; then :
16704  $as_echo_n "(cached) " >&6
16705else
16706  if test -n "$PKGHANDLER"; then
16707  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16708else
16709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16710for as_dir in $PATH
16711do
16712  IFS=$as_save_IFS
16713  test -z "$as_dir" && as_dir=.
16714    for ac_exec_ext in '' $ac_executable_extensions; do
16715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16716    ac_cv_prog_PKGHANDLER="$ac_prog"
16717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16718    break 2
16719  fi
16720done
16721  done
16722IFS=$as_save_IFS
16723
16724fi
16725fi
16726PKGHANDLER=$ac_cv_prog_PKGHANDLER
16727if test -n "$PKGHANDLER"; then
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16729$as_echo "$PKGHANDLER" >&6; }
16730else
16731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16732$as_echo "no" >&6; }
16733fi
16734
16735
16736  test -n "$PKGHANDLER" && break
16737done
16738
16739
16740
16741# Setup tools that requires more complex handling, or that is not needed by the configure script.
16742
16743
16744
16745  # Publish this variable in the help.
16746
16747
16748  if [ -z "${MAKE+x}" ]; then
16749    # The variable is not set by user, try to locate tool using the code snippet
16750
16751    # Try our hardest to locate a correct version of GNU make
16752    for ac_prog in gmake
16753do
16754  # Extract the first word of "$ac_prog", so it can be a program name with args.
16755set dummy $ac_prog; ac_word=$2
16756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16757$as_echo_n "checking for $ac_word... " >&6; }
16758if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16759  $as_echo_n "(cached) " >&6
16760else
16761  case $CHECK_GMAKE in
16762  [\\/]* | ?:[\\/]*)
16763  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16764  ;;
16765  *)
16766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16767for as_dir in $PATH
16768do
16769  IFS=$as_save_IFS
16770  test -z "$as_dir" && as_dir=.
16771    for ac_exec_ext in '' $ac_executable_extensions; do
16772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16773    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16775    break 2
16776  fi
16777done
16778  done
16779IFS=$as_save_IFS
16780
16781  ;;
16782esac
16783fi
16784CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16785if test -n "$CHECK_GMAKE"; then
16786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16787$as_echo "$CHECK_GMAKE" >&6; }
16788else
16789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16790$as_echo "no" >&6; }
16791fi
16792
16793
16794  test -n "$CHECK_GMAKE" && break
16795done
16796
16797
16798  MAKE_CANDIDATE=""$CHECK_GMAKE""
16799  DESCRIPTION="gmake in PATH"
16800
16801  # On Cygwin, we require a newer version of make than on other platforms
16802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16803    MAKE_VERSION_EXPR="-e 4\."
16804    MAKE_REQUIRED_VERSION="4.0"
16805   else
16806    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16807    MAKE_REQUIRED_VERSION="3.81"
16808  fi
16809
16810  if test "x$MAKE_CANDIDATE" != x; then
16811    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16812$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16813    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16814    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16815    if test "x$IS_GNU_MAKE" = x; then
16816      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16817$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16818    else
16819      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16820      if test "x$IS_MODERN_MAKE" = x; then
16821        { $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
16822$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;}
16823      else
16824        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16825          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16826            MAKE_EXPECTED_ENV='cygwin'
16827          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16828            MAKE_EXPECTED_ENV='msys'
16829          else
16830            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16831          fi
16832          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16833          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16834        else
16835          # Not relevant for non-Windows
16836          IS_MAKE_CORRECT_ENV=true
16837        fi
16838        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16839          { $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
16840$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;}
16841        else
16842          FOUND_MAKE=$MAKE_CANDIDATE
16843
16844  # Only process if variable expands to non-empty
16845
16846  if test "x$FOUND_MAKE" != x; then
16847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848
16849  # First separate the path from the arguments. This will split at the first
16850  # space.
16851  complete="$FOUND_MAKE"
16852  path="${complete%% *}"
16853  tmp="$complete EOL"
16854  arguments="${tmp#* }"
16855
16856  # Input might be given as Windows format, start by converting to
16857  # unix format.
16858  new_path=`$CYGPATH -u "$path"`
16859
16860  # Now try to locate executable using which
16861  new_path=`$WHICH "$new_path" 2> /dev/null`
16862  # bat and cmd files are not always considered executable in cygwin causing which
16863  # to not find them
16864  if test "x$new_path" = x \
16865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16867    new_path=`$CYGPATH -u "$path"`
16868  fi
16869  if test "x$new_path" = x; then
16870    # Oops. Which didn't find the executable.
16871    # The splitting of arguments from the executable at a space might have been incorrect,
16872    # since paths with space are more likely in Windows. Give it another try with the whole
16873    # argument.
16874    path="$complete"
16875    arguments="EOL"
16876    new_path=`$CYGPATH -u "$path"`
16877    new_path=`$WHICH "$new_path" 2> /dev/null`
16878    # bat and cmd files are not always considered executable in cygwin causing which
16879    # to not find them
16880    if test "x$new_path" = x \
16881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16883      new_path=`$CYGPATH -u "$path"`
16884    fi
16885    if test "x$new_path" = x; then
16886      # It's still not found. Now this is an unrecoverable error.
16887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16889      has_space=`$ECHO "$complete" | $GREP " "`
16890      if test "x$has_space" != x; then
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16893      fi
16894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16895    fi
16896  fi
16897
16898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16901  # "foo.exe" is OK but "foo" is an error.
16902  #
16903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16904  # It is also a way to make sure we got the proper file name for the real test later on.
16905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16906  if test "x$test_shortpath" = x; then
16907    # Short path failed, file does not exist as specified.
16908    # Try adding .exe or .cmd
16909    if test -f "${new_path}.exe"; then
16910      input_to_shortpath="${new_path}.exe"
16911    elif test -f "${new_path}.cmd"; then
16912      input_to_shortpath="${new_path}.cmd"
16913    else
16914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16915$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16918      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16919    fi
16920  else
16921    input_to_shortpath="$new_path"
16922  fi
16923
16924  # Call helper function which possibly converts this using DOS-style short mode.
16925  # If so, the updated path is stored in $new_path.
16926  new_path="$input_to_shortpath"
16927
16928  input_path="$input_to_shortpath"
16929  # Check if we need to convert this using DOS-style short mode. If the path
16930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16931  # take no chances and rewrite it.
16932  # Note: m4 eats our [], so we need to use [ and ] instead.
16933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16934  if test "x$has_forbidden_chars" != x; then
16935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16939      # Going to short mode and back again did indeed matter. Since short mode is
16940      # case insensitive, let's make it lowercase to improve readability.
16941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16942      # Now convert it back to Unix-style (cygpath)
16943      input_path=`$CYGPATH -u "$shortmode_path"`
16944      new_path="$input_path"
16945    fi
16946  fi
16947
16948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16949  if test "x$test_cygdrive_prefix" = x; then
16950    # As a simple fix, exclude /usr/bin since it's not a real path.
16951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16953      # a path prefixed by /cygdrive for fixpath to work.
16954      new_path="$CYGWIN_ROOT_PATH$input_path"
16955    fi
16956  fi
16957
16958  # remove trailing .exe if any
16959  new_path="${new_path/%.exe/}"
16960
16961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16962
16963  # First separate the path from the arguments. This will split at the first
16964  # space.
16965  complete="$FOUND_MAKE"
16966  path="${complete%% *}"
16967  tmp="$complete EOL"
16968  arguments="${tmp#* }"
16969
16970  # Input might be given as Windows format, start by converting to
16971  # unix format.
16972  new_path="$path"
16973
16974  windows_path="$new_path"
16975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16976    unix_path=`$CYGPATH -u "$windows_path"`
16977    new_path="$unix_path"
16978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16980    new_path="$unix_path"
16981  fi
16982
16983
16984  # Now try to locate executable using which
16985  new_path=`$WHICH "$new_path" 2> /dev/null`
16986
16987  if test "x$new_path" = x; then
16988    # Oops. Which didn't find the executable.
16989    # The splitting of arguments from the executable at a space might have been incorrect,
16990    # since paths with space are more likely in Windows. Give it another try with the whole
16991    # argument.
16992    path="$complete"
16993    arguments="EOL"
16994    new_path="$path"
16995
16996  windows_path="$new_path"
16997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16998    unix_path=`$CYGPATH -u "$windows_path"`
16999    new_path="$unix_path"
17000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17002    new_path="$unix_path"
17003  fi
17004
17005
17006    new_path=`$WHICH "$new_path" 2> /dev/null`
17007    # bat and cmd files are not always considered executable in MSYS causing which
17008    # to not find them
17009    if test "x$new_path" = x \
17010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17012      new_path="$path"
17013
17014  windows_path="$new_path"
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016    unix_path=`$CYGPATH -u "$windows_path"`
17017    new_path="$unix_path"
17018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17020    new_path="$unix_path"
17021  fi
17022
17023    fi
17024
17025    if test "x$new_path" = x; then
17026      # It's still not found. Now this is an unrecoverable error.
17027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17028$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17029      has_space=`$ECHO "$complete" | $GREP " "`
17030      if test "x$has_space" != x; then
17031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17033      fi
17034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17035    fi
17036  fi
17037
17038  # Now new_path has a complete unix path to the binary
17039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17040    # Keep paths in /bin as-is, but remove trailing .exe if any
17041    new_path="${new_path/%.exe/}"
17042    # Do not save /bin paths to all_fixpath_prefixes!
17043  else
17044    # Not in mixed or Windows style, start by that.
17045    new_path=`cmd //c echo $new_path`
17046
17047  input_path="$new_path"
17048  # Check if we need to convert this using DOS-style short mode. If the path
17049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17050  # take no chances and rewrite it.
17051  # Note: m4 eats our [], so we need to use [ and ] instead.
17052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17053  if test "x$has_forbidden_chars" != x; then
17054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17056  fi
17057
17058    # Output is in $new_path
17059
17060  windows_path="$new_path"
17061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17062    unix_path=`$CYGPATH -u "$windows_path"`
17063    new_path="$unix_path"
17064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17066    new_path="$unix_path"
17067  fi
17068
17069    # remove trailing .exe if any
17070    new_path="${new_path/%.exe/}"
17071
17072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17074  fi
17075
17076    else
17077      # We're on a unix platform. Hooray! :)
17078      # First separate the path from the arguments. This will split at the first
17079      # space.
17080      complete="$FOUND_MAKE"
17081      path="${complete%% *}"
17082      tmp="$complete EOL"
17083      arguments="${tmp#* }"
17084
17085      # Cannot rely on the command "which" here since it doesn't always work.
17086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17087      if test -z "$is_absolute_path"; then
17088        # Path to executable is not absolute. Find it.
17089        IFS_save="$IFS"
17090        IFS=:
17091        for p in $PATH; do
17092          if test -f "$p/$path" && test -x "$p/$path"; then
17093            new_path="$p/$path"
17094            break
17095          fi
17096        done
17097        IFS="$IFS_save"
17098      else
17099        # This is an absolute path, we can use it without further modifications.
17100        new_path="$path"
17101      fi
17102
17103      if test "x$new_path" = x; then
17104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17105$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17106        has_space=`$ECHO "$complete" | $GREP " "`
17107        if test "x$has_space" != x; then
17108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17110        fi
17111        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17112      fi
17113    fi
17114
17115    # Now join together the path and the arguments once again
17116    if test "x$arguments" != xEOL; then
17117      new_complete="$new_path ${arguments% *}"
17118    else
17119      new_complete="$new_path"
17120    fi
17121
17122    if test "x$complete" != "x$new_complete"; then
17123      FOUND_MAKE="$new_complete"
17124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17125$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17126    fi
17127  fi
17128
17129        fi
17130      fi
17131    fi
17132  fi
17133
17134
17135    if test "x$FOUND_MAKE" = x; then
17136      for ac_prog in make
17137do
17138  # Extract the first word of "$ac_prog", so it can be a program name with args.
17139set dummy $ac_prog; ac_word=$2
17140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17141$as_echo_n "checking for $ac_word... " >&6; }
17142if ${ac_cv_path_CHECK_MAKE+:} false; then :
17143  $as_echo_n "(cached) " >&6
17144else
17145  case $CHECK_MAKE in
17146  [\\/]* | ?:[\\/]*)
17147  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17148  ;;
17149  *)
17150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17151for as_dir in $PATH
17152do
17153  IFS=$as_save_IFS
17154  test -z "$as_dir" && as_dir=.
17155    for ac_exec_ext in '' $ac_executable_extensions; do
17156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17157    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17159    break 2
17160  fi
17161done
17162  done
17163IFS=$as_save_IFS
17164
17165  ;;
17166esac
17167fi
17168CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17169if test -n "$CHECK_MAKE"; then
17170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17171$as_echo "$CHECK_MAKE" >&6; }
17172else
17173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17174$as_echo "no" >&6; }
17175fi
17176
17177
17178  test -n "$CHECK_MAKE" && break
17179done
17180
17181
17182  MAKE_CANDIDATE=""$CHECK_MAKE""
17183  DESCRIPTION="make in PATH"
17184
17185  # On Cygwin, we require a newer version of make than on other platforms
17186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17187    MAKE_VERSION_EXPR="-e 4\."
17188    MAKE_REQUIRED_VERSION="4.0"
17189   else
17190    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17191    MAKE_REQUIRED_VERSION="3.81"
17192  fi
17193
17194  if test "x$MAKE_CANDIDATE" != x; then
17195    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17196$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17197    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17198    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17199    if test "x$IS_GNU_MAKE" = x; then
17200      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17201$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17202    else
17203      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17204      if test "x$IS_MODERN_MAKE" = x; then
17205        { $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
17206$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;}
17207      else
17208        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17209          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17210            MAKE_EXPECTED_ENV='cygwin'
17211          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17212            MAKE_EXPECTED_ENV='msys'
17213          else
17214            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17215          fi
17216          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17217          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17218        else
17219          # Not relevant for non-Windows
17220          IS_MAKE_CORRECT_ENV=true
17221        fi
17222        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17223          { $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
17224$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;}
17225        else
17226          FOUND_MAKE=$MAKE_CANDIDATE
17227
17228  # Only process if variable expands to non-empty
17229
17230  if test "x$FOUND_MAKE" != x; then
17231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17232
17233  # First separate the path from the arguments. This will split at the first
17234  # space.
17235  complete="$FOUND_MAKE"
17236  path="${complete%% *}"
17237  tmp="$complete EOL"
17238  arguments="${tmp#* }"
17239
17240  # Input might be given as Windows format, start by converting to
17241  # unix format.
17242  new_path=`$CYGPATH -u "$path"`
17243
17244  # Now try to locate executable using which
17245  new_path=`$WHICH "$new_path" 2> /dev/null`
17246  # bat and cmd files are not always considered executable in cygwin causing which
17247  # to not find them
17248  if test "x$new_path" = x \
17249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17251    new_path=`$CYGPATH -u "$path"`
17252  fi
17253  if test "x$new_path" = x; then
17254    # Oops. Which didn't find the executable.
17255    # The splitting of arguments from the executable at a space might have been incorrect,
17256    # since paths with space are more likely in Windows. Give it another try with the whole
17257    # argument.
17258    path="$complete"
17259    arguments="EOL"
17260    new_path=`$CYGPATH -u "$path"`
17261    new_path=`$WHICH "$new_path" 2> /dev/null`
17262    # bat and cmd files are not always considered executable in cygwin causing which
17263    # to not find them
17264    if test "x$new_path" = x \
17265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17267      new_path=`$CYGPATH -u "$path"`
17268    fi
17269    if test "x$new_path" = x; then
17270      # It's still not found. Now this is an unrecoverable error.
17271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17272$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17273      has_space=`$ECHO "$complete" | $GREP " "`
17274      if test "x$has_space" != x; then
17275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17277      fi
17278      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17279    fi
17280  fi
17281
17282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17285  # "foo.exe" is OK but "foo" is an error.
17286  #
17287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17288  # It is also a way to make sure we got the proper file name for the real test later on.
17289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17290  if test "x$test_shortpath" = x; then
17291    # Short path failed, file does not exist as specified.
17292    # Try adding .exe or .cmd
17293    if test -f "${new_path}.exe"; then
17294      input_to_shortpath="${new_path}.exe"
17295    elif test -f "${new_path}.cmd"; then
17296      input_to_shortpath="${new_path}.cmd"
17297    else
17298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17299$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17302      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17303    fi
17304  else
17305    input_to_shortpath="$new_path"
17306  fi
17307
17308  # Call helper function which possibly converts this using DOS-style short mode.
17309  # If so, the updated path is stored in $new_path.
17310  new_path="$input_to_shortpath"
17311
17312  input_path="$input_to_shortpath"
17313  # Check if we need to convert this using DOS-style short mode. If the path
17314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17315  # take no chances and rewrite it.
17316  # Note: m4 eats our [], so we need to use [ and ] instead.
17317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17318  if test "x$has_forbidden_chars" != x; then
17319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17323      # Going to short mode and back again did indeed matter. Since short mode is
17324      # case insensitive, let's make it lowercase to improve readability.
17325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17326      # Now convert it back to Unix-style (cygpath)
17327      input_path=`$CYGPATH -u "$shortmode_path"`
17328      new_path="$input_path"
17329    fi
17330  fi
17331
17332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17333  if test "x$test_cygdrive_prefix" = x; then
17334    # As a simple fix, exclude /usr/bin since it's not a real path.
17335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17337      # a path prefixed by /cygdrive for fixpath to work.
17338      new_path="$CYGWIN_ROOT_PATH$input_path"
17339    fi
17340  fi
17341
17342  # remove trailing .exe if any
17343  new_path="${new_path/%.exe/}"
17344
17345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17346
17347  # First separate the path from the arguments. This will split at the first
17348  # space.
17349  complete="$FOUND_MAKE"
17350  path="${complete%% *}"
17351  tmp="$complete EOL"
17352  arguments="${tmp#* }"
17353
17354  # Input might be given as Windows format, start by converting to
17355  # unix format.
17356  new_path="$path"
17357
17358  windows_path="$new_path"
17359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17360    unix_path=`$CYGPATH -u "$windows_path"`
17361    new_path="$unix_path"
17362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17364    new_path="$unix_path"
17365  fi
17366
17367
17368  # Now try to locate executable using which
17369  new_path=`$WHICH "$new_path" 2> /dev/null`
17370
17371  if test "x$new_path" = x; then
17372    # Oops. Which didn't find the executable.
17373    # The splitting of arguments from the executable at a space might have been incorrect,
17374    # since paths with space are more likely in Windows. Give it another try with the whole
17375    # argument.
17376    path="$complete"
17377    arguments="EOL"
17378    new_path="$path"
17379
17380  windows_path="$new_path"
17381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17382    unix_path=`$CYGPATH -u "$windows_path"`
17383    new_path="$unix_path"
17384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17386    new_path="$unix_path"
17387  fi
17388
17389
17390    new_path=`$WHICH "$new_path" 2> /dev/null`
17391    # bat and cmd files are not always considered executable in MSYS causing which
17392    # to not find them
17393    if test "x$new_path" = x \
17394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17396      new_path="$path"
17397
17398  windows_path="$new_path"
17399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400    unix_path=`$CYGPATH -u "$windows_path"`
17401    new_path="$unix_path"
17402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17404    new_path="$unix_path"
17405  fi
17406
17407    fi
17408
17409    if test "x$new_path" = x; then
17410      # It's still not found. Now this is an unrecoverable error.
17411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17413      has_space=`$ECHO "$complete" | $GREP " "`
17414      if test "x$has_space" != x; then
17415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17417      fi
17418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17419    fi
17420  fi
17421
17422  # Now new_path has a complete unix path to the binary
17423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17424    # Keep paths in /bin as-is, but remove trailing .exe if any
17425    new_path="${new_path/%.exe/}"
17426    # Do not save /bin paths to all_fixpath_prefixes!
17427  else
17428    # Not in mixed or Windows style, start by that.
17429    new_path=`cmd //c echo $new_path`
17430
17431  input_path="$new_path"
17432  # Check if we need to convert this using DOS-style short mode. If the path
17433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17434  # take no chances and rewrite it.
17435  # Note: m4 eats our [], so we need to use [ and ] instead.
17436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17437  if test "x$has_forbidden_chars" != x; then
17438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17440  fi
17441
17442    # Output is in $new_path
17443
17444  windows_path="$new_path"
17445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17446    unix_path=`$CYGPATH -u "$windows_path"`
17447    new_path="$unix_path"
17448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17450    new_path="$unix_path"
17451  fi
17452
17453    # remove trailing .exe if any
17454    new_path="${new_path/%.exe/}"
17455
17456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17458  fi
17459
17460    else
17461      # We're on a unix platform. Hooray! :)
17462      # First separate the path from the arguments. This will split at the first
17463      # space.
17464      complete="$FOUND_MAKE"
17465      path="${complete%% *}"
17466      tmp="$complete EOL"
17467      arguments="${tmp#* }"
17468
17469      # Cannot rely on the command "which" here since it doesn't always work.
17470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17471      if test -z "$is_absolute_path"; then
17472        # Path to executable is not absolute. Find it.
17473        IFS_save="$IFS"
17474        IFS=:
17475        for p in $PATH; do
17476          if test -f "$p/$path" && test -x "$p/$path"; then
17477            new_path="$p/$path"
17478            break
17479          fi
17480        done
17481        IFS="$IFS_save"
17482      else
17483        # This is an absolute path, we can use it without further modifications.
17484        new_path="$path"
17485      fi
17486
17487      if test "x$new_path" = x; then
17488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17490        has_space=`$ECHO "$complete" | $GREP " "`
17491        if test "x$has_space" != x; then
17492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17494        fi
17495        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17496      fi
17497    fi
17498
17499    # Now join together the path and the arguments once again
17500    if test "x$arguments" != xEOL; then
17501      new_complete="$new_path ${arguments% *}"
17502    else
17503      new_complete="$new_path"
17504    fi
17505
17506    if test "x$complete" != "x$new_complete"; then
17507      FOUND_MAKE="$new_complete"
17508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17509$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17510    fi
17511  fi
17512
17513        fi
17514      fi
17515    fi
17516  fi
17517
17518    fi
17519
17520    if test "x$FOUND_MAKE" = x; then
17521      if test "x$TOOLCHAIN_PATH" != x; then
17522        # We have a toolchain path, check that as well before giving up.
17523        OLD_PATH=$PATH
17524        PATH=$TOOLCHAIN_PATH:$PATH
17525        for ac_prog in gmake
17526do
17527  # Extract the first word of "$ac_prog", so it can be a program name with args.
17528set dummy $ac_prog; ac_word=$2
17529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17530$as_echo_n "checking for $ac_word... " >&6; }
17531if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17532  $as_echo_n "(cached) " >&6
17533else
17534  case $CHECK_TOOLSDIR_GMAKE in
17535  [\\/]* | ?:[\\/]*)
17536  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17537  ;;
17538  *)
17539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17540for as_dir in $PATH
17541do
17542  IFS=$as_save_IFS
17543  test -z "$as_dir" && as_dir=.
17544    for ac_exec_ext in '' $ac_executable_extensions; do
17545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17546    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17548    break 2
17549  fi
17550done
17551  done
17552IFS=$as_save_IFS
17553
17554  ;;
17555esac
17556fi
17557CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17558if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17560$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17561else
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17563$as_echo "no" >&6; }
17564fi
17565
17566
17567  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17568done
17569
17570
17571  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17572  DESCRIPTION="gmake in tools-dir"
17573
17574  # On Cygwin, we require a newer version of make than on other platforms
17575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17576    MAKE_VERSION_EXPR="-e 4\."
17577    MAKE_REQUIRED_VERSION="4.0"
17578   else
17579    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17580    MAKE_REQUIRED_VERSION="3.81"
17581  fi
17582
17583  if test "x$MAKE_CANDIDATE" != x; then
17584    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17585$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17586    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17587    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17588    if test "x$IS_GNU_MAKE" = x; then
17589      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17590$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17591    else
17592      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17593      if test "x$IS_MODERN_MAKE" = x; then
17594        { $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
17595$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;}
17596      else
17597        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17598          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17599            MAKE_EXPECTED_ENV='cygwin'
17600          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17601            MAKE_EXPECTED_ENV='msys'
17602          else
17603            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17604          fi
17605          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17606          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17607        else
17608          # Not relevant for non-Windows
17609          IS_MAKE_CORRECT_ENV=true
17610        fi
17611        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17612          { $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
17613$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;}
17614        else
17615          FOUND_MAKE=$MAKE_CANDIDATE
17616
17617  # Only process if variable expands to non-empty
17618
17619  if test "x$FOUND_MAKE" != x; then
17620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17621
17622  # First separate the path from the arguments. This will split at the first
17623  # space.
17624  complete="$FOUND_MAKE"
17625  path="${complete%% *}"
17626  tmp="$complete EOL"
17627  arguments="${tmp#* }"
17628
17629  # Input might be given as Windows format, start by converting to
17630  # unix format.
17631  new_path=`$CYGPATH -u "$path"`
17632
17633  # Now try to locate executable using which
17634  new_path=`$WHICH "$new_path" 2> /dev/null`
17635  # bat and cmd files are not always considered executable in cygwin causing which
17636  # to not find them
17637  if test "x$new_path" = x \
17638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17640    new_path=`$CYGPATH -u "$path"`
17641  fi
17642  if test "x$new_path" = x; then
17643    # Oops. Which didn't find the executable.
17644    # The splitting of arguments from the executable at a space might have been incorrect,
17645    # since paths with space are more likely in Windows. Give it another try with the whole
17646    # argument.
17647    path="$complete"
17648    arguments="EOL"
17649    new_path=`$CYGPATH -u "$path"`
17650    new_path=`$WHICH "$new_path" 2> /dev/null`
17651    # bat and cmd files are not always considered executable in cygwin causing which
17652    # to not find them
17653    if test "x$new_path" = x \
17654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17656      new_path=`$CYGPATH -u "$path"`
17657    fi
17658    if test "x$new_path" = x; then
17659      # It's still not found. Now this is an unrecoverable error.
17660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17662      has_space=`$ECHO "$complete" | $GREP " "`
17663      if test "x$has_space" != x; then
17664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17666      fi
17667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17668    fi
17669  fi
17670
17671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17674  # "foo.exe" is OK but "foo" is an error.
17675  #
17676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17677  # It is also a way to make sure we got the proper file name for the real test later on.
17678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17679  if test "x$test_shortpath" = x; then
17680    # Short path failed, file does not exist as specified.
17681    # Try adding .exe or .cmd
17682    if test -f "${new_path}.exe"; then
17683      input_to_shortpath="${new_path}.exe"
17684    elif test -f "${new_path}.cmd"; then
17685      input_to_shortpath="${new_path}.cmd"
17686    else
17687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17692    fi
17693  else
17694    input_to_shortpath="$new_path"
17695  fi
17696
17697  # Call helper function which possibly converts this using DOS-style short mode.
17698  # If so, the updated path is stored in $new_path.
17699  new_path="$input_to_shortpath"
17700
17701  input_path="$input_to_shortpath"
17702  # Check if we need to convert this using DOS-style short mode. If the path
17703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17704  # take no chances and rewrite it.
17705  # Note: m4 eats our [], so we need to use [ and ] instead.
17706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17707  if test "x$has_forbidden_chars" != x; then
17708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17712      # Going to short mode and back again did indeed matter. Since short mode is
17713      # case insensitive, let's make it lowercase to improve readability.
17714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17715      # Now convert it back to Unix-style (cygpath)
17716      input_path=`$CYGPATH -u "$shortmode_path"`
17717      new_path="$input_path"
17718    fi
17719  fi
17720
17721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17722  if test "x$test_cygdrive_prefix" = x; then
17723    # As a simple fix, exclude /usr/bin since it's not a real path.
17724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17726      # a path prefixed by /cygdrive for fixpath to work.
17727      new_path="$CYGWIN_ROOT_PATH$input_path"
17728    fi
17729  fi
17730
17731  # remove trailing .exe if any
17732  new_path="${new_path/%.exe/}"
17733
17734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17735
17736  # First separate the path from the arguments. This will split at the first
17737  # space.
17738  complete="$FOUND_MAKE"
17739  path="${complete%% *}"
17740  tmp="$complete EOL"
17741  arguments="${tmp#* }"
17742
17743  # Input might be given as Windows format, start by converting to
17744  # unix format.
17745  new_path="$path"
17746
17747  windows_path="$new_path"
17748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17749    unix_path=`$CYGPATH -u "$windows_path"`
17750    new_path="$unix_path"
17751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17753    new_path="$unix_path"
17754  fi
17755
17756
17757  # Now try to locate executable using which
17758  new_path=`$WHICH "$new_path" 2> /dev/null`
17759
17760  if test "x$new_path" = x; then
17761    # Oops. Which didn't find the executable.
17762    # The splitting of arguments from the executable at a space might have been incorrect,
17763    # since paths with space are more likely in Windows. Give it another try with the whole
17764    # argument.
17765    path="$complete"
17766    arguments="EOL"
17767    new_path="$path"
17768
17769  windows_path="$new_path"
17770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17771    unix_path=`$CYGPATH -u "$windows_path"`
17772    new_path="$unix_path"
17773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17775    new_path="$unix_path"
17776  fi
17777
17778
17779    new_path=`$WHICH "$new_path" 2> /dev/null`
17780    # bat and cmd files are not always considered executable in MSYS causing which
17781    # to not find them
17782    if test "x$new_path" = x \
17783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17785      new_path="$path"
17786
17787  windows_path="$new_path"
17788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789    unix_path=`$CYGPATH -u "$windows_path"`
17790    new_path="$unix_path"
17791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17793    new_path="$unix_path"
17794  fi
17795
17796    fi
17797
17798    if test "x$new_path" = x; then
17799      # It's still not found. Now this is an unrecoverable error.
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17802      has_space=`$ECHO "$complete" | $GREP " "`
17803      if test "x$has_space" != x; then
17804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17806      fi
17807      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17808    fi
17809  fi
17810
17811  # Now new_path has a complete unix path to the binary
17812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17813    # Keep paths in /bin as-is, but remove trailing .exe if any
17814    new_path="${new_path/%.exe/}"
17815    # Do not save /bin paths to all_fixpath_prefixes!
17816  else
17817    # Not in mixed or Windows style, start by that.
17818    new_path=`cmd //c echo $new_path`
17819
17820  input_path="$new_path"
17821  # Check if we need to convert this using DOS-style short mode. If the path
17822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17823  # take no chances and rewrite it.
17824  # Note: m4 eats our [], so we need to use [ and ] instead.
17825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17826  if test "x$has_forbidden_chars" != x; then
17827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17829  fi
17830
17831    # Output is in $new_path
17832
17833  windows_path="$new_path"
17834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17835    unix_path=`$CYGPATH -u "$windows_path"`
17836    new_path="$unix_path"
17837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17839    new_path="$unix_path"
17840  fi
17841
17842    # remove trailing .exe if any
17843    new_path="${new_path/%.exe/}"
17844
17845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17847  fi
17848
17849    else
17850      # We're on a unix platform. Hooray! :)
17851      # First separate the path from the arguments. This will split at the first
17852      # space.
17853      complete="$FOUND_MAKE"
17854      path="${complete%% *}"
17855      tmp="$complete EOL"
17856      arguments="${tmp#* }"
17857
17858      # Cannot rely on the command "which" here since it doesn't always work.
17859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17860      if test -z "$is_absolute_path"; then
17861        # Path to executable is not absolute. Find it.
17862        IFS_save="$IFS"
17863        IFS=:
17864        for p in $PATH; do
17865          if test -f "$p/$path" && test -x "$p/$path"; then
17866            new_path="$p/$path"
17867            break
17868          fi
17869        done
17870        IFS="$IFS_save"
17871      else
17872        # This is an absolute path, we can use it without further modifications.
17873        new_path="$path"
17874      fi
17875
17876      if test "x$new_path" = x; then
17877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17878$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17879        has_space=`$ECHO "$complete" | $GREP " "`
17880        if test "x$has_space" != x; then
17881          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17883        fi
17884        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17885      fi
17886    fi
17887
17888    # Now join together the path and the arguments once again
17889    if test "x$arguments" != xEOL; then
17890      new_complete="$new_path ${arguments% *}"
17891    else
17892      new_complete="$new_path"
17893    fi
17894
17895    if test "x$complete" != "x$new_complete"; then
17896      FOUND_MAKE="$new_complete"
17897      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17898$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17899    fi
17900  fi
17901
17902        fi
17903      fi
17904    fi
17905  fi
17906
17907        if test "x$FOUND_MAKE" = x; then
17908          for ac_prog in make
17909do
17910  # Extract the first word of "$ac_prog", so it can be a program name with args.
17911set dummy $ac_prog; ac_word=$2
17912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17913$as_echo_n "checking for $ac_word... " >&6; }
17914if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17915  $as_echo_n "(cached) " >&6
17916else
17917  case $CHECK_TOOLSDIR_MAKE in
17918  [\\/]* | ?:[\\/]*)
17919  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17920  ;;
17921  *)
17922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17923for as_dir in $PATH
17924do
17925  IFS=$as_save_IFS
17926  test -z "$as_dir" && as_dir=.
17927    for ac_exec_ext in '' $ac_executable_extensions; do
17928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17929    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17931    break 2
17932  fi
17933done
17934  done
17935IFS=$as_save_IFS
17936
17937  ;;
17938esac
17939fi
17940CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17941if test -n "$CHECK_TOOLSDIR_MAKE"; then
17942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17943$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17944else
17945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17946$as_echo "no" >&6; }
17947fi
17948
17949
17950  test -n "$CHECK_TOOLSDIR_MAKE" && break
17951done
17952
17953
17954  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17955  DESCRIPTION="make in tools-dir"
17956
17957  # On Cygwin, we require a newer version of make than on other platforms
17958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17959    MAKE_VERSION_EXPR="-e 4\."
17960    MAKE_REQUIRED_VERSION="4.0"
17961   else
17962    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17963    MAKE_REQUIRED_VERSION="3.81"
17964  fi
17965
17966  if test "x$MAKE_CANDIDATE" != x; then
17967    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17968$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17969    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17970    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17971    if test "x$IS_GNU_MAKE" = x; then
17972      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17973$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17974    else
17975      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17976      if test "x$IS_MODERN_MAKE" = x; then
17977        { $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
17978$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;}
17979      else
17980        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17981          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17982            MAKE_EXPECTED_ENV='cygwin'
17983          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17984            MAKE_EXPECTED_ENV='msys'
17985          else
17986            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17987          fi
17988          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17989          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17990        else
17991          # Not relevant for non-Windows
17992          IS_MAKE_CORRECT_ENV=true
17993        fi
17994        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17995          { $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
17996$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;}
17997        else
17998          FOUND_MAKE=$MAKE_CANDIDATE
17999
18000  # Only process if variable expands to non-empty
18001
18002  if test "x$FOUND_MAKE" != x; then
18003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18004
18005  # First separate the path from the arguments. This will split at the first
18006  # space.
18007  complete="$FOUND_MAKE"
18008  path="${complete%% *}"
18009  tmp="$complete EOL"
18010  arguments="${tmp#* }"
18011
18012  # Input might be given as Windows format, start by converting to
18013  # unix format.
18014  new_path=`$CYGPATH -u "$path"`
18015
18016  # Now try to locate executable using which
18017  new_path=`$WHICH "$new_path" 2> /dev/null`
18018  # bat and cmd files are not always considered executable in cygwin causing which
18019  # to not find them
18020  if test "x$new_path" = x \
18021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18023    new_path=`$CYGPATH -u "$path"`
18024  fi
18025  if test "x$new_path" = x; then
18026    # Oops. Which didn't find the executable.
18027    # The splitting of arguments from the executable at a space might have been incorrect,
18028    # since paths with space are more likely in Windows. Give it another try with the whole
18029    # argument.
18030    path="$complete"
18031    arguments="EOL"
18032    new_path=`$CYGPATH -u "$path"`
18033    new_path=`$WHICH "$new_path" 2> /dev/null`
18034    # bat and cmd files are not always considered executable in cygwin causing which
18035    # to not find them
18036    if test "x$new_path" = x \
18037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18039      new_path=`$CYGPATH -u "$path"`
18040    fi
18041    if test "x$new_path" = x; then
18042      # It's still not found. Now this is an unrecoverable error.
18043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18045      has_space=`$ECHO "$complete" | $GREP " "`
18046      if test "x$has_space" != x; then
18047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18049      fi
18050      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18051    fi
18052  fi
18053
18054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18057  # "foo.exe" is OK but "foo" is an error.
18058  #
18059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18060  # It is also a way to make sure we got the proper file name for the real test later on.
18061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18062  if test "x$test_shortpath" = x; then
18063    # Short path failed, file does not exist as specified.
18064    # Try adding .exe or .cmd
18065    if test -f "${new_path}.exe"; then
18066      input_to_shortpath="${new_path}.exe"
18067    elif test -f "${new_path}.cmd"; then
18068      input_to_shortpath="${new_path}.cmd"
18069    else
18070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18074      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18075    fi
18076  else
18077    input_to_shortpath="$new_path"
18078  fi
18079
18080  # Call helper function which possibly converts this using DOS-style short mode.
18081  # If so, the updated path is stored in $new_path.
18082  new_path="$input_to_shortpath"
18083
18084  input_path="$input_to_shortpath"
18085  # Check if we need to convert this using DOS-style short mode. If the path
18086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18087  # take no chances and rewrite it.
18088  # Note: m4 eats our [], so we need to use [ and ] instead.
18089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18090  if test "x$has_forbidden_chars" != x; then
18091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18095      # Going to short mode and back again did indeed matter. Since short mode is
18096      # case insensitive, let's make it lowercase to improve readability.
18097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18098      # Now convert it back to Unix-style (cygpath)
18099      input_path=`$CYGPATH -u "$shortmode_path"`
18100      new_path="$input_path"
18101    fi
18102  fi
18103
18104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18105  if test "x$test_cygdrive_prefix" = x; then
18106    # As a simple fix, exclude /usr/bin since it's not a real path.
18107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18109      # a path prefixed by /cygdrive for fixpath to work.
18110      new_path="$CYGWIN_ROOT_PATH$input_path"
18111    fi
18112  fi
18113
18114  # remove trailing .exe if any
18115  new_path="${new_path/%.exe/}"
18116
18117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18118
18119  # First separate the path from the arguments. This will split at the first
18120  # space.
18121  complete="$FOUND_MAKE"
18122  path="${complete%% *}"
18123  tmp="$complete EOL"
18124  arguments="${tmp#* }"
18125
18126  # Input might be given as Windows format, start by converting to
18127  # unix format.
18128  new_path="$path"
18129
18130  windows_path="$new_path"
18131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18132    unix_path=`$CYGPATH -u "$windows_path"`
18133    new_path="$unix_path"
18134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18136    new_path="$unix_path"
18137  fi
18138
18139
18140  # Now try to locate executable using which
18141  new_path=`$WHICH "$new_path" 2> /dev/null`
18142
18143  if test "x$new_path" = x; then
18144    # Oops. Which didn't find the executable.
18145    # The splitting of arguments from the executable at a space might have been incorrect,
18146    # since paths with space are more likely in Windows. Give it another try with the whole
18147    # argument.
18148    path="$complete"
18149    arguments="EOL"
18150    new_path="$path"
18151
18152  windows_path="$new_path"
18153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18154    unix_path=`$CYGPATH -u "$windows_path"`
18155    new_path="$unix_path"
18156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18158    new_path="$unix_path"
18159  fi
18160
18161
18162    new_path=`$WHICH "$new_path" 2> /dev/null`
18163    # bat and cmd files are not always considered executable in MSYS causing which
18164    # to not find them
18165    if test "x$new_path" = x \
18166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18168      new_path="$path"
18169
18170  windows_path="$new_path"
18171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18172    unix_path=`$CYGPATH -u "$windows_path"`
18173    new_path="$unix_path"
18174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18176    new_path="$unix_path"
18177  fi
18178
18179    fi
18180
18181    if test "x$new_path" = x; then
18182      # It's still not found. Now this is an unrecoverable error.
18183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18184$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18185      has_space=`$ECHO "$complete" | $GREP " "`
18186      if test "x$has_space" != x; then
18187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18189      fi
18190      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18191    fi
18192  fi
18193
18194  # Now new_path has a complete unix path to the binary
18195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18196    # Keep paths in /bin as-is, but remove trailing .exe if any
18197    new_path="${new_path/%.exe/}"
18198    # Do not save /bin paths to all_fixpath_prefixes!
18199  else
18200    # Not in mixed or Windows style, start by that.
18201    new_path=`cmd //c echo $new_path`
18202
18203  input_path="$new_path"
18204  # Check if we need to convert this using DOS-style short mode. If the path
18205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18206  # take no chances and rewrite it.
18207  # Note: m4 eats our [], so we need to use [ and ] instead.
18208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18209  if test "x$has_forbidden_chars" != x; then
18210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18212  fi
18213
18214    # Output is in $new_path
18215
18216  windows_path="$new_path"
18217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18218    unix_path=`$CYGPATH -u "$windows_path"`
18219    new_path="$unix_path"
18220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18222    new_path="$unix_path"
18223  fi
18224
18225    # remove trailing .exe if any
18226    new_path="${new_path/%.exe/}"
18227
18228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18230  fi
18231
18232    else
18233      # We're on a unix platform. Hooray! :)
18234      # First separate the path from the arguments. This will split at the first
18235      # space.
18236      complete="$FOUND_MAKE"
18237      path="${complete%% *}"
18238      tmp="$complete EOL"
18239      arguments="${tmp#* }"
18240
18241      # Cannot rely on the command "which" here since it doesn't always work.
18242      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18243      if test -z "$is_absolute_path"; then
18244        # Path to executable is not absolute. Find it.
18245        IFS_save="$IFS"
18246        IFS=:
18247        for p in $PATH; do
18248          if test -f "$p/$path" && test -x "$p/$path"; then
18249            new_path="$p/$path"
18250            break
18251          fi
18252        done
18253        IFS="$IFS_save"
18254      else
18255        # This is an absolute path, we can use it without further modifications.
18256        new_path="$path"
18257      fi
18258
18259      if test "x$new_path" = x; then
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18261$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18262        has_space=`$ECHO "$complete" | $GREP " "`
18263        if test "x$has_space" != x; then
18264          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18266        fi
18267        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18268      fi
18269    fi
18270
18271    # Now join together the path and the arguments once again
18272    if test "x$arguments" != xEOL; then
18273      new_complete="$new_path ${arguments% *}"
18274    else
18275      new_complete="$new_path"
18276    fi
18277
18278    if test "x$complete" != "x$new_complete"; then
18279      FOUND_MAKE="$new_complete"
18280      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18281$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18282    fi
18283  fi
18284
18285        fi
18286      fi
18287    fi
18288  fi
18289
18290        fi
18291        PATH=$OLD_PATH
18292      fi
18293    fi
18294
18295    if test "x$FOUND_MAKE" = x; then
18296      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
18297    fi
18298
18299  else
18300    # The variable is set, but is it from the command line or the environment?
18301
18302    # Try to remove the string !MAKE! from our list.
18303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18305      # If it failed, the variable was not from the command line. Ignore it,
18306      # but warn the user (except for BASH, which is always set by the calling BASH).
18307      if test "xMAKE" != xBASH; then
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18309$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18310      fi
18311      # Try to locate tool using the code snippet
18312
18313    # Try our hardest to locate a correct version of GNU make
18314    for ac_prog in gmake
18315do
18316  # Extract the first word of "$ac_prog", so it can be a program name with args.
18317set dummy $ac_prog; ac_word=$2
18318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18319$as_echo_n "checking for $ac_word... " >&6; }
18320if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18321  $as_echo_n "(cached) " >&6
18322else
18323  case $CHECK_GMAKE in
18324  [\\/]* | ?:[\\/]*)
18325  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18326  ;;
18327  *)
18328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329for as_dir in $PATH
18330do
18331  IFS=$as_save_IFS
18332  test -z "$as_dir" && as_dir=.
18333    for ac_exec_ext in '' $ac_executable_extensions; do
18334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18335    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18337    break 2
18338  fi
18339done
18340  done
18341IFS=$as_save_IFS
18342
18343  ;;
18344esac
18345fi
18346CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18347if test -n "$CHECK_GMAKE"; then
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18349$as_echo "$CHECK_GMAKE" >&6; }
18350else
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18352$as_echo "no" >&6; }
18353fi
18354
18355
18356  test -n "$CHECK_GMAKE" && break
18357done
18358
18359
18360  MAKE_CANDIDATE=""$CHECK_GMAKE""
18361  DESCRIPTION="gmake in PATH"
18362
18363  # On Cygwin, we require a newer version of make than on other platforms
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    MAKE_VERSION_EXPR="-e 4\."
18366    MAKE_REQUIRED_VERSION="4.0"
18367   else
18368    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18369    MAKE_REQUIRED_VERSION="3.81"
18370  fi
18371
18372  if test "x$MAKE_CANDIDATE" != x; then
18373    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18374$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18375    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18376    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18377    if test "x$IS_GNU_MAKE" = x; then
18378      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18379$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18380    else
18381      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18382      if test "x$IS_MODERN_MAKE" = x; then
18383        { $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
18384$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;}
18385      else
18386        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18387          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18388            MAKE_EXPECTED_ENV='cygwin'
18389          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390            MAKE_EXPECTED_ENV='msys'
18391          else
18392            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18393          fi
18394          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18395          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18396        else
18397          # Not relevant for non-Windows
18398          IS_MAKE_CORRECT_ENV=true
18399        fi
18400        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18401          { $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
18402$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;}
18403        else
18404          FOUND_MAKE=$MAKE_CANDIDATE
18405
18406  # Only process if variable expands to non-empty
18407
18408  if test "x$FOUND_MAKE" != x; then
18409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18410
18411  # First separate the path from the arguments. This will split at the first
18412  # space.
18413  complete="$FOUND_MAKE"
18414  path="${complete%% *}"
18415  tmp="$complete EOL"
18416  arguments="${tmp#* }"
18417
18418  # Input might be given as Windows format, start by converting to
18419  # unix format.
18420  new_path=`$CYGPATH -u "$path"`
18421
18422  # Now try to locate executable using which
18423  new_path=`$WHICH "$new_path" 2> /dev/null`
18424  # bat and cmd files are not always considered executable in cygwin causing which
18425  # to not find them
18426  if test "x$new_path" = x \
18427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18429    new_path=`$CYGPATH -u "$path"`
18430  fi
18431  if test "x$new_path" = x; then
18432    # Oops. Which didn't find the executable.
18433    # The splitting of arguments from the executable at a space might have been incorrect,
18434    # since paths with space are more likely in Windows. Give it another try with the whole
18435    # argument.
18436    path="$complete"
18437    arguments="EOL"
18438    new_path=`$CYGPATH -u "$path"`
18439    new_path=`$WHICH "$new_path" 2> /dev/null`
18440    # bat and cmd files are not always considered executable in cygwin causing which
18441    # to not find them
18442    if test "x$new_path" = x \
18443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445      new_path=`$CYGPATH -u "$path"`
18446    fi
18447    if test "x$new_path" = x; then
18448      # It's still not found. Now this is an unrecoverable error.
18449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18451      has_space=`$ECHO "$complete" | $GREP " "`
18452      if test "x$has_space" != x; then
18453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18455      fi
18456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18457    fi
18458  fi
18459
18460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18463  # "foo.exe" is OK but "foo" is an error.
18464  #
18465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18466  # It is also a way to make sure we got the proper file name for the real test later on.
18467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18468  if test "x$test_shortpath" = x; then
18469    # Short path failed, file does not exist as specified.
18470    # Try adding .exe or .cmd
18471    if test -f "${new_path}.exe"; then
18472      input_to_shortpath="${new_path}.exe"
18473    elif test -f "${new_path}.cmd"; then
18474      input_to_shortpath="${new_path}.cmd"
18475    else
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18481    fi
18482  else
18483    input_to_shortpath="$new_path"
18484  fi
18485
18486  # Call helper function which possibly converts this using DOS-style short mode.
18487  # If so, the updated path is stored in $new_path.
18488  new_path="$input_to_shortpath"
18489
18490  input_path="$input_to_shortpath"
18491  # Check if we need to convert this using DOS-style short mode. If the path
18492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18493  # take no chances and rewrite it.
18494  # Note: m4 eats our [], so we need to use [ and ] instead.
18495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18496  if test "x$has_forbidden_chars" != x; then
18497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18501      # Going to short mode and back again did indeed matter. Since short mode is
18502      # case insensitive, let's make it lowercase to improve readability.
18503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18504      # Now convert it back to Unix-style (cygpath)
18505      input_path=`$CYGPATH -u "$shortmode_path"`
18506      new_path="$input_path"
18507    fi
18508  fi
18509
18510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18511  if test "x$test_cygdrive_prefix" = x; then
18512    # As a simple fix, exclude /usr/bin since it's not a real path.
18513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18515      # a path prefixed by /cygdrive for fixpath to work.
18516      new_path="$CYGWIN_ROOT_PATH$input_path"
18517    fi
18518  fi
18519
18520  # remove trailing .exe if any
18521  new_path="${new_path/%.exe/}"
18522
18523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18524
18525  # First separate the path from the arguments. This will split at the first
18526  # space.
18527  complete="$FOUND_MAKE"
18528  path="${complete%% *}"
18529  tmp="$complete EOL"
18530  arguments="${tmp#* }"
18531
18532  # Input might be given as Windows format, start by converting to
18533  # unix format.
18534  new_path="$path"
18535
18536  windows_path="$new_path"
18537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18538    unix_path=`$CYGPATH -u "$windows_path"`
18539    new_path="$unix_path"
18540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18542    new_path="$unix_path"
18543  fi
18544
18545
18546  # Now try to locate executable using which
18547  new_path=`$WHICH "$new_path" 2> /dev/null`
18548
18549  if test "x$new_path" = x; then
18550    # Oops. Which didn't find the executable.
18551    # The splitting of arguments from the executable at a space might have been incorrect,
18552    # since paths with space are more likely in Windows. Give it another try with the whole
18553    # argument.
18554    path="$complete"
18555    arguments="EOL"
18556    new_path="$path"
18557
18558  windows_path="$new_path"
18559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18560    unix_path=`$CYGPATH -u "$windows_path"`
18561    new_path="$unix_path"
18562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18564    new_path="$unix_path"
18565  fi
18566
18567
18568    new_path=`$WHICH "$new_path" 2> /dev/null`
18569    # bat and cmd files are not always considered executable in MSYS causing which
18570    # to not find them
18571    if test "x$new_path" = x \
18572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18574      new_path="$path"
18575
18576  windows_path="$new_path"
18577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18578    unix_path=`$CYGPATH -u "$windows_path"`
18579    new_path="$unix_path"
18580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18582    new_path="$unix_path"
18583  fi
18584
18585    fi
18586
18587    if test "x$new_path" = x; then
18588      # It's still not found. Now this is an unrecoverable error.
18589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18591      has_space=`$ECHO "$complete" | $GREP " "`
18592      if test "x$has_space" != x; then
18593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18595      fi
18596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18597    fi
18598  fi
18599
18600  # Now new_path has a complete unix path to the binary
18601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18602    # Keep paths in /bin as-is, but remove trailing .exe if any
18603    new_path="${new_path/%.exe/}"
18604    # Do not save /bin paths to all_fixpath_prefixes!
18605  else
18606    # Not in mixed or Windows style, start by that.
18607    new_path=`cmd //c echo $new_path`
18608
18609  input_path="$new_path"
18610  # Check if we need to convert this using DOS-style short mode. If the path
18611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18612  # take no chances and rewrite it.
18613  # Note: m4 eats our [], so we need to use [ and ] instead.
18614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18615  if test "x$has_forbidden_chars" != x; then
18616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18618  fi
18619
18620    # Output is in $new_path
18621
18622  windows_path="$new_path"
18623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624    unix_path=`$CYGPATH -u "$windows_path"`
18625    new_path="$unix_path"
18626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628    new_path="$unix_path"
18629  fi
18630
18631    # remove trailing .exe if any
18632    new_path="${new_path/%.exe/}"
18633
18634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18636  fi
18637
18638    else
18639      # We're on a unix platform. Hooray! :)
18640      # First separate the path from the arguments. This will split at the first
18641      # space.
18642      complete="$FOUND_MAKE"
18643      path="${complete%% *}"
18644      tmp="$complete EOL"
18645      arguments="${tmp#* }"
18646
18647      # Cannot rely on the command "which" here since it doesn't always work.
18648      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18649      if test -z "$is_absolute_path"; then
18650        # Path to executable is not absolute. Find it.
18651        IFS_save="$IFS"
18652        IFS=:
18653        for p in $PATH; do
18654          if test -f "$p/$path" && test -x "$p/$path"; then
18655            new_path="$p/$path"
18656            break
18657          fi
18658        done
18659        IFS="$IFS_save"
18660      else
18661        # This is an absolute path, we can use it without further modifications.
18662        new_path="$path"
18663      fi
18664
18665      if test "x$new_path" = x; then
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18668        has_space=`$ECHO "$complete" | $GREP " "`
18669        if test "x$has_space" != x; then
18670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18672        fi
18673        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18674      fi
18675    fi
18676
18677    # Now join together the path and the arguments once again
18678    if test "x$arguments" != xEOL; then
18679      new_complete="$new_path ${arguments% *}"
18680    else
18681      new_complete="$new_path"
18682    fi
18683
18684    if test "x$complete" != "x$new_complete"; then
18685      FOUND_MAKE="$new_complete"
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18687$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18688    fi
18689  fi
18690
18691        fi
18692      fi
18693    fi
18694  fi
18695
18696
18697    if test "x$FOUND_MAKE" = x; then
18698      for ac_prog in make
18699do
18700  # Extract the first word of "$ac_prog", so it can be a program name with args.
18701set dummy $ac_prog; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_CHECK_MAKE+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $CHECK_MAKE in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18731if test -n "$CHECK_MAKE"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18733$as_echo "$CHECK_MAKE" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740  test -n "$CHECK_MAKE" && break
18741done
18742
18743
18744  MAKE_CANDIDATE=""$CHECK_MAKE""
18745  DESCRIPTION="make in PATH"
18746
18747  # On Cygwin, we require a newer version of make than on other platforms
18748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18749    MAKE_VERSION_EXPR="-e 4\."
18750    MAKE_REQUIRED_VERSION="4.0"
18751   else
18752    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18753    MAKE_REQUIRED_VERSION="3.81"
18754  fi
18755
18756  if test "x$MAKE_CANDIDATE" != x; then
18757    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18758$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18759    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18760    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18761    if test "x$IS_GNU_MAKE" = x; then
18762      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18763$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18764    else
18765      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18766      if test "x$IS_MODERN_MAKE" = x; then
18767        { $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
18768$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;}
18769      else
18770        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18771          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772            MAKE_EXPECTED_ENV='cygwin'
18773          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18774            MAKE_EXPECTED_ENV='msys'
18775          else
18776            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18777          fi
18778          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18779          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18780        else
18781          # Not relevant for non-Windows
18782          IS_MAKE_CORRECT_ENV=true
18783        fi
18784        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18785          { $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
18786$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;}
18787        else
18788          FOUND_MAKE=$MAKE_CANDIDATE
18789
18790  # Only process if variable expands to non-empty
18791
18792  if test "x$FOUND_MAKE" != x; then
18793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18794
18795  # First separate the path from the arguments. This will split at the first
18796  # space.
18797  complete="$FOUND_MAKE"
18798  path="${complete%% *}"
18799  tmp="$complete EOL"
18800  arguments="${tmp#* }"
18801
18802  # Input might be given as Windows format, start by converting to
18803  # unix format.
18804  new_path=`$CYGPATH -u "$path"`
18805
18806  # Now try to locate executable using which
18807  new_path=`$WHICH "$new_path" 2> /dev/null`
18808  # bat and cmd files are not always considered executable in cygwin causing which
18809  # to not find them
18810  if test "x$new_path" = x \
18811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18813    new_path=`$CYGPATH -u "$path"`
18814  fi
18815  if test "x$new_path" = x; then
18816    # Oops. Which didn't find the executable.
18817    # The splitting of arguments from the executable at a space might have been incorrect,
18818    # since paths with space are more likely in Windows. Give it another try with the whole
18819    # argument.
18820    path="$complete"
18821    arguments="EOL"
18822    new_path=`$CYGPATH -u "$path"`
18823    new_path=`$WHICH "$new_path" 2> /dev/null`
18824    # bat and cmd files are not always considered executable in cygwin causing which
18825    # to not find them
18826    if test "x$new_path" = x \
18827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18829      new_path=`$CYGPATH -u "$path"`
18830    fi
18831    if test "x$new_path" = x; then
18832      # It's still not found. Now this is an unrecoverable error.
18833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18835      has_space=`$ECHO "$complete" | $GREP " "`
18836      if test "x$has_space" != x; then
18837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18839      fi
18840      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18841    fi
18842  fi
18843
18844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18847  # "foo.exe" is OK but "foo" is an error.
18848  #
18849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18850  # It is also a way to make sure we got the proper file name for the real test later on.
18851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18852  if test "x$test_shortpath" = x; then
18853    # Short path failed, file does not exist as specified.
18854    # Try adding .exe or .cmd
18855    if test -f "${new_path}.exe"; then
18856      input_to_shortpath="${new_path}.exe"
18857    elif test -f "${new_path}.cmd"; then
18858      input_to_shortpath="${new_path}.cmd"
18859    else
18860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18864      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18865    fi
18866  else
18867    input_to_shortpath="$new_path"
18868  fi
18869
18870  # Call helper function which possibly converts this using DOS-style short mode.
18871  # If so, the updated path is stored in $new_path.
18872  new_path="$input_to_shortpath"
18873
18874  input_path="$input_to_shortpath"
18875  # Check if we need to convert this using DOS-style short mode. If the path
18876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18877  # take no chances and rewrite it.
18878  # Note: m4 eats our [], so we need to use [ and ] instead.
18879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18880  if test "x$has_forbidden_chars" != x; then
18881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18885      # Going to short mode and back again did indeed matter. Since short mode is
18886      # case insensitive, let's make it lowercase to improve readability.
18887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18888      # Now convert it back to Unix-style (cygpath)
18889      input_path=`$CYGPATH -u "$shortmode_path"`
18890      new_path="$input_path"
18891    fi
18892  fi
18893
18894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18895  if test "x$test_cygdrive_prefix" = x; then
18896    # As a simple fix, exclude /usr/bin since it's not a real path.
18897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18899      # a path prefixed by /cygdrive for fixpath to work.
18900      new_path="$CYGWIN_ROOT_PATH$input_path"
18901    fi
18902  fi
18903
18904  # remove trailing .exe if any
18905  new_path="${new_path/%.exe/}"
18906
18907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18908
18909  # First separate the path from the arguments. This will split at the first
18910  # space.
18911  complete="$FOUND_MAKE"
18912  path="${complete%% *}"
18913  tmp="$complete EOL"
18914  arguments="${tmp#* }"
18915
18916  # Input might be given as Windows format, start by converting to
18917  # unix format.
18918  new_path="$path"
18919
18920  windows_path="$new_path"
18921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18922    unix_path=`$CYGPATH -u "$windows_path"`
18923    new_path="$unix_path"
18924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18926    new_path="$unix_path"
18927  fi
18928
18929
18930  # Now try to locate executable using which
18931  new_path=`$WHICH "$new_path" 2> /dev/null`
18932
18933  if test "x$new_path" = x; then
18934    # Oops. Which didn't find the executable.
18935    # The splitting of arguments from the executable at a space might have been incorrect,
18936    # since paths with space are more likely in Windows. Give it another try with the whole
18937    # argument.
18938    path="$complete"
18939    arguments="EOL"
18940    new_path="$path"
18941
18942  windows_path="$new_path"
18943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18944    unix_path=`$CYGPATH -u "$windows_path"`
18945    new_path="$unix_path"
18946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18948    new_path="$unix_path"
18949  fi
18950
18951
18952    new_path=`$WHICH "$new_path" 2> /dev/null`
18953    # bat and cmd files are not always considered executable in MSYS causing which
18954    # to not find them
18955    if test "x$new_path" = x \
18956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18958      new_path="$path"
18959
18960  windows_path="$new_path"
18961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18962    unix_path=`$CYGPATH -u "$windows_path"`
18963    new_path="$unix_path"
18964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18966    new_path="$unix_path"
18967  fi
18968
18969    fi
18970
18971    if test "x$new_path" = x; then
18972      # It's still not found. Now this is an unrecoverable error.
18973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18975      has_space=`$ECHO "$complete" | $GREP " "`
18976      if test "x$has_space" != x; then
18977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18979      fi
18980      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18981    fi
18982  fi
18983
18984  # Now new_path has a complete unix path to the binary
18985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18986    # Keep paths in /bin as-is, but remove trailing .exe if any
18987    new_path="${new_path/%.exe/}"
18988    # Do not save /bin paths to all_fixpath_prefixes!
18989  else
18990    # Not in mixed or Windows style, start by that.
18991    new_path=`cmd //c echo $new_path`
18992
18993  input_path="$new_path"
18994  # Check if we need to convert this using DOS-style short mode. If the path
18995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18996  # take no chances and rewrite it.
18997  # Note: m4 eats our [], so we need to use [ and ] instead.
18998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18999  if test "x$has_forbidden_chars" != x; then
19000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19002  fi
19003
19004    # Output is in $new_path
19005
19006  windows_path="$new_path"
19007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19008    unix_path=`$CYGPATH -u "$windows_path"`
19009    new_path="$unix_path"
19010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19012    new_path="$unix_path"
19013  fi
19014
19015    # remove trailing .exe if any
19016    new_path="${new_path/%.exe/}"
19017
19018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19020  fi
19021
19022    else
19023      # We're on a unix platform. Hooray! :)
19024      # First separate the path from the arguments. This will split at the first
19025      # space.
19026      complete="$FOUND_MAKE"
19027      path="${complete%% *}"
19028      tmp="$complete EOL"
19029      arguments="${tmp#* }"
19030
19031      # Cannot rely on the command "which" here since it doesn't always work.
19032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19033      if test -z "$is_absolute_path"; then
19034        # Path to executable is not absolute. Find it.
19035        IFS_save="$IFS"
19036        IFS=:
19037        for p in $PATH; do
19038          if test -f "$p/$path" && test -x "$p/$path"; then
19039            new_path="$p/$path"
19040            break
19041          fi
19042        done
19043        IFS="$IFS_save"
19044      else
19045        # This is an absolute path, we can use it without further modifications.
19046        new_path="$path"
19047      fi
19048
19049      if test "x$new_path" = x; then
19050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19052        has_space=`$ECHO "$complete" | $GREP " "`
19053        if test "x$has_space" != x; then
19054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19056        fi
19057        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19058      fi
19059    fi
19060
19061    # Now join together the path and the arguments once again
19062    if test "x$arguments" != xEOL; then
19063      new_complete="$new_path ${arguments% *}"
19064    else
19065      new_complete="$new_path"
19066    fi
19067
19068    if test "x$complete" != "x$new_complete"; then
19069      FOUND_MAKE="$new_complete"
19070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19071$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19072    fi
19073  fi
19074
19075        fi
19076      fi
19077    fi
19078  fi
19079
19080    fi
19081
19082    if test "x$FOUND_MAKE" = x; then
19083      if test "x$TOOLCHAIN_PATH" != x; then
19084        # We have a toolchain path, check that as well before giving up.
19085        OLD_PATH=$PATH
19086        PATH=$TOOLCHAIN_PATH:$PATH
19087        for ac_prog in gmake
19088do
19089  # Extract the first word of "$ac_prog", so it can be a program name with args.
19090set dummy $ac_prog; ac_word=$2
19091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19092$as_echo_n "checking for $ac_word... " >&6; }
19093if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19094  $as_echo_n "(cached) " >&6
19095else
19096  case $CHECK_TOOLSDIR_GMAKE in
19097  [\\/]* | ?:[\\/]*)
19098  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19099  ;;
19100  *)
19101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19102for as_dir in $PATH
19103do
19104  IFS=$as_save_IFS
19105  test -z "$as_dir" && as_dir=.
19106    for ac_exec_ext in '' $ac_executable_extensions; do
19107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19108    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19110    break 2
19111  fi
19112done
19113  done
19114IFS=$as_save_IFS
19115
19116  ;;
19117esac
19118fi
19119CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19120if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19122$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19123else
19124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19125$as_echo "no" >&6; }
19126fi
19127
19128
19129  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19130done
19131
19132
19133  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19134  DESCRIPTION="gmake in tools-dir"
19135
19136  # On Cygwin, we require a newer version of make than on other platforms
19137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19138    MAKE_VERSION_EXPR="-e 4\."
19139    MAKE_REQUIRED_VERSION="4.0"
19140   else
19141    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19142    MAKE_REQUIRED_VERSION="3.81"
19143  fi
19144
19145  if test "x$MAKE_CANDIDATE" != x; then
19146    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19147$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19148    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19149    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19150    if test "x$IS_GNU_MAKE" = x; then
19151      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19152$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19153    else
19154      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19155      if test "x$IS_MODERN_MAKE" = x; then
19156        { $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
19157$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;}
19158      else
19159        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19160          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19161            MAKE_EXPECTED_ENV='cygwin'
19162          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19163            MAKE_EXPECTED_ENV='msys'
19164          else
19165            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19166          fi
19167          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19168          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19169        else
19170          # Not relevant for non-Windows
19171          IS_MAKE_CORRECT_ENV=true
19172        fi
19173        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19174          { $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
19175$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;}
19176        else
19177          FOUND_MAKE=$MAKE_CANDIDATE
19178
19179  # Only process if variable expands to non-empty
19180
19181  if test "x$FOUND_MAKE" != x; then
19182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19183
19184  # First separate the path from the arguments. This will split at the first
19185  # space.
19186  complete="$FOUND_MAKE"
19187  path="${complete%% *}"
19188  tmp="$complete EOL"
19189  arguments="${tmp#* }"
19190
19191  # Input might be given as Windows format, start by converting to
19192  # unix format.
19193  new_path=`$CYGPATH -u "$path"`
19194
19195  # Now try to locate executable using which
19196  new_path=`$WHICH "$new_path" 2> /dev/null`
19197  # bat and cmd files are not always considered executable in cygwin causing which
19198  # to not find them
19199  if test "x$new_path" = x \
19200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19202    new_path=`$CYGPATH -u "$path"`
19203  fi
19204  if test "x$new_path" = x; then
19205    # Oops. Which didn't find the executable.
19206    # The splitting of arguments from the executable at a space might have been incorrect,
19207    # since paths with space are more likely in Windows. Give it another try with the whole
19208    # argument.
19209    path="$complete"
19210    arguments="EOL"
19211    new_path=`$CYGPATH -u "$path"`
19212    new_path=`$WHICH "$new_path" 2> /dev/null`
19213    # bat and cmd files are not always considered executable in cygwin causing which
19214    # to not find them
19215    if test "x$new_path" = x \
19216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19218      new_path=`$CYGPATH -u "$path"`
19219    fi
19220    if test "x$new_path" = x; then
19221      # It's still not found. Now this is an unrecoverable error.
19222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19224      has_space=`$ECHO "$complete" | $GREP " "`
19225      if test "x$has_space" != x; then
19226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19228      fi
19229      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19230    fi
19231  fi
19232
19233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19236  # "foo.exe" is OK but "foo" is an error.
19237  #
19238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19239  # It is also a way to make sure we got the proper file name for the real test later on.
19240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19241  if test "x$test_shortpath" = x; then
19242    # Short path failed, file does not exist as specified.
19243    # Try adding .exe or .cmd
19244    if test -f "${new_path}.exe"; then
19245      input_to_shortpath="${new_path}.exe"
19246    elif test -f "${new_path}.cmd"; then
19247      input_to_shortpath="${new_path}.cmd"
19248    else
19249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19253      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19254    fi
19255  else
19256    input_to_shortpath="$new_path"
19257  fi
19258
19259  # Call helper function which possibly converts this using DOS-style short mode.
19260  # If so, the updated path is stored in $new_path.
19261  new_path="$input_to_shortpath"
19262
19263  input_path="$input_to_shortpath"
19264  # Check if we need to convert this using DOS-style short mode. If the path
19265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19266  # take no chances and rewrite it.
19267  # Note: m4 eats our [], so we need to use [ and ] instead.
19268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19269  if test "x$has_forbidden_chars" != x; then
19270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19274      # Going to short mode and back again did indeed matter. Since short mode is
19275      # case insensitive, let's make it lowercase to improve readability.
19276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19277      # Now convert it back to Unix-style (cygpath)
19278      input_path=`$CYGPATH -u "$shortmode_path"`
19279      new_path="$input_path"
19280    fi
19281  fi
19282
19283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19284  if test "x$test_cygdrive_prefix" = x; then
19285    # As a simple fix, exclude /usr/bin since it's not a real path.
19286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19288      # a path prefixed by /cygdrive for fixpath to work.
19289      new_path="$CYGWIN_ROOT_PATH$input_path"
19290    fi
19291  fi
19292
19293  # remove trailing .exe if any
19294  new_path="${new_path/%.exe/}"
19295
19296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19297
19298  # First separate the path from the arguments. This will split at the first
19299  # space.
19300  complete="$FOUND_MAKE"
19301  path="${complete%% *}"
19302  tmp="$complete EOL"
19303  arguments="${tmp#* }"
19304
19305  # Input might be given as Windows format, start by converting to
19306  # unix format.
19307  new_path="$path"
19308
19309  windows_path="$new_path"
19310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19311    unix_path=`$CYGPATH -u "$windows_path"`
19312    new_path="$unix_path"
19313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19315    new_path="$unix_path"
19316  fi
19317
19318
19319  # Now try to locate executable using which
19320  new_path=`$WHICH "$new_path" 2> /dev/null`
19321
19322  if test "x$new_path" = x; then
19323    # Oops. Which didn't find the executable.
19324    # The splitting of arguments from the executable at a space might have been incorrect,
19325    # since paths with space are more likely in Windows. Give it another try with the whole
19326    # argument.
19327    path="$complete"
19328    arguments="EOL"
19329    new_path="$path"
19330
19331  windows_path="$new_path"
19332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19333    unix_path=`$CYGPATH -u "$windows_path"`
19334    new_path="$unix_path"
19335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19337    new_path="$unix_path"
19338  fi
19339
19340
19341    new_path=`$WHICH "$new_path" 2> /dev/null`
19342    # bat and cmd files are not always considered executable in MSYS causing which
19343    # to not find them
19344    if test "x$new_path" = x \
19345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19347      new_path="$path"
19348
19349  windows_path="$new_path"
19350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19351    unix_path=`$CYGPATH -u "$windows_path"`
19352    new_path="$unix_path"
19353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19355    new_path="$unix_path"
19356  fi
19357
19358    fi
19359
19360    if test "x$new_path" = x; then
19361      # It's still not found. Now this is an unrecoverable error.
19362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19363$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19364      has_space=`$ECHO "$complete" | $GREP " "`
19365      if test "x$has_space" != x; then
19366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19368      fi
19369      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19370    fi
19371  fi
19372
19373  # Now new_path has a complete unix path to the binary
19374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19375    # Keep paths in /bin as-is, but remove trailing .exe if any
19376    new_path="${new_path/%.exe/}"
19377    # Do not save /bin paths to all_fixpath_prefixes!
19378  else
19379    # Not in mixed or Windows style, start by that.
19380    new_path=`cmd //c echo $new_path`
19381
19382  input_path="$new_path"
19383  # Check if we need to convert this using DOS-style short mode. If the path
19384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19385  # take no chances and rewrite it.
19386  # Note: m4 eats our [], so we need to use [ and ] instead.
19387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19388  if test "x$has_forbidden_chars" != x; then
19389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19391  fi
19392
19393    # Output is in $new_path
19394
19395  windows_path="$new_path"
19396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19397    unix_path=`$CYGPATH -u "$windows_path"`
19398    new_path="$unix_path"
19399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19401    new_path="$unix_path"
19402  fi
19403
19404    # remove trailing .exe if any
19405    new_path="${new_path/%.exe/}"
19406
19407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19409  fi
19410
19411    else
19412      # We're on a unix platform. Hooray! :)
19413      # First separate the path from the arguments. This will split at the first
19414      # space.
19415      complete="$FOUND_MAKE"
19416      path="${complete%% *}"
19417      tmp="$complete EOL"
19418      arguments="${tmp#* }"
19419
19420      # Cannot rely on the command "which" here since it doesn't always work.
19421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19422      if test -z "$is_absolute_path"; then
19423        # Path to executable is not absolute. Find it.
19424        IFS_save="$IFS"
19425        IFS=:
19426        for p in $PATH; do
19427          if test -f "$p/$path" && test -x "$p/$path"; then
19428            new_path="$p/$path"
19429            break
19430          fi
19431        done
19432        IFS="$IFS_save"
19433      else
19434        # This is an absolute path, we can use it without further modifications.
19435        new_path="$path"
19436      fi
19437
19438      if test "x$new_path" = x; then
19439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19441        has_space=`$ECHO "$complete" | $GREP " "`
19442        if test "x$has_space" != x; then
19443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19445        fi
19446        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19447      fi
19448    fi
19449
19450    # Now join together the path and the arguments once again
19451    if test "x$arguments" != xEOL; then
19452      new_complete="$new_path ${arguments% *}"
19453    else
19454      new_complete="$new_path"
19455    fi
19456
19457    if test "x$complete" != "x$new_complete"; then
19458      FOUND_MAKE="$new_complete"
19459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19460$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19461    fi
19462  fi
19463
19464        fi
19465      fi
19466    fi
19467  fi
19468
19469        if test "x$FOUND_MAKE" = x; then
19470          for ac_prog in make
19471do
19472  # Extract the first word of "$ac_prog", so it can be a program name with args.
19473set dummy $ac_prog; ac_word=$2
19474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19475$as_echo_n "checking for $ac_word... " >&6; }
19476if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19477  $as_echo_n "(cached) " >&6
19478else
19479  case $CHECK_TOOLSDIR_MAKE in
19480  [\\/]* | ?:[\\/]*)
19481  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19482  ;;
19483  *)
19484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19485for as_dir in $PATH
19486do
19487  IFS=$as_save_IFS
19488  test -z "$as_dir" && as_dir=.
19489    for ac_exec_ext in '' $ac_executable_extensions; do
19490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19491    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19493    break 2
19494  fi
19495done
19496  done
19497IFS=$as_save_IFS
19498
19499  ;;
19500esac
19501fi
19502CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19503if test -n "$CHECK_TOOLSDIR_MAKE"; then
19504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19505$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19506else
19507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19508$as_echo "no" >&6; }
19509fi
19510
19511
19512  test -n "$CHECK_TOOLSDIR_MAKE" && break
19513done
19514
19515
19516  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19517  DESCRIPTION="make in tools-dir"
19518
19519  # On Cygwin, we require a newer version of make than on other platforms
19520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19521    MAKE_VERSION_EXPR="-e 4\."
19522    MAKE_REQUIRED_VERSION="4.0"
19523   else
19524    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19525    MAKE_REQUIRED_VERSION="3.81"
19526  fi
19527
19528  if test "x$MAKE_CANDIDATE" != x; then
19529    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19530$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19531    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19532    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19533    if test "x$IS_GNU_MAKE" = x; then
19534      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19535$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19536    else
19537      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19538      if test "x$IS_MODERN_MAKE" = x; then
19539        { $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
19540$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;}
19541      else
19542        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19543          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19544            MAKE_EXPECTED_ENV='cygwin'
19545          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19546            MAKE_EXPECTED_ENV='msys'
19547          else
19548            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19549          fi
19550          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19551          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19552        else
19553          # Not relevant for non-Windows
19554          IS_MAKE_CORRECT_ENV=true
19555        fi
19556        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19557          { $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
19558$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;}
19559        else
19560          FOUND_MAKE=$MAKE_CANDIDATE
19561
19562  # Only process if variable expands to non-empty
19563
19564  if test "x$FOUND_MAKE" != x; then
19565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19566
19567  # First separate the path from the arguments. This will split at the first
19568  # space.
19569  complete="$FOUND_MAKE"
19570  path="${complete%% *}"
19571  tmp="$complete EOL"
19572  arguments="${tmp#* }"
19573
19574  # Input might be given as Windows format, start by converting to
19575  # unix format.
19576  new_path=`$CYGPATH -u "$path"`
19577
19578  # Now try to locate executable using which
19579  new_path=`$WHICH "$new_path" 2> /dev/null`
19580  # bat and cmd files are not always considered executable in cygwin causing which
19581  # to not find them
19582  if test "x$new_path" = x \
19583      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19584      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19585    new_path=`$CYGPATH -u "$path"`
19586  fi
19587  if test "x$new_path" = x; then
19588    # Oops. Which didn't find the executable.
19589    # The splitting of arguments from the executable at a space might have been incorrect,
19590    # since paths with space are more likely in Windows. Give it another try with the whole
19591    # argument.
19592    path="$complete"
19593    arguments="EOL"
19594    new_path=`$CYGPATH -u "$path"`
19595    new_path=`$WHICH "$new_path" 2> /dev/null`
19596    # bat and cmd files are not always considered executable in cygwin causing which
19597    # to not find them
19598    if test "x$new_path" = x \
19599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19601      new_path=`$CYGPATH -u "$path"`
19602    fi
19603    if test "x$new_path" = x; then
19604      # It's still not found. Now this is an unrecoverable error.
19605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19607      has_space=`$ECHO "$complete" | $GREP " "`
19608      if test "x$has_space" != x; then
19609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19611      fi
19612      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19613    fi
19614  fi
19615
19616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19619  # "foo.exe" is OK but "foo" is an error.
19620  #
19621  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19622  # It is also a way to make sure we got the proper file name for the real test later on.
19623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19624  if test "x$test_shortpath" = x; then
19625    # Short path failed, file does not exist as specified.
19626    # Try adding .exe or .cmd
19627    if test -f "${new_path}.exe"; then
19628      input_to_shortpath="${new_path}.exe"
19629    elif test -f "${new_path}.cmd"; then
19630      input_to_shortpath="${new_path}.cmd"
19631    else
19632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19636      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19637    fi
19638  else
19639    input_to_shortpath="$new_path"
19640  fi
19641
19642  # Call helper function which possibly converts this using DOS-style short mode.
19643  # If so, the updated path is stored in $new_path.
19644  new_path="$input_to_shortpath"
19645
19646  input_path="$input_to_shortpath"
19647  # Check if we need to convert this using DOS-style short mode. If the path
19648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19649  # take no chances and rewrite it.
19650  # Note: m4 eats our [], so we need to use [ and ] instead.
19651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19652  if test "x$has_forbidden_chars" != x; then
19653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19657      # Going to short mode and back again did indeed matter. Since short mode is
19658      # case insensitive, let's make it lowercase to improve readability.
19659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19660      # Now convert it back to Unix-style (cygpath)
19661      input_path=`$CYGPATH -u "$shortmode_path"`
19662      new_path="$input_path"
19663    fi
19664  fi
19665
19666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19667  if test "x$test_cygdrive_prefix" = x; then
19668    # As a simple fix, exclude /usr/bin since it's not a real path.
19669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19671      # a path prefixed by /cygdrive for fixpath to work.
19672      new_path="$CYGWIN_ROOT_PATH$input_path"
19673    fi
19674  fi
19675
19676  # remove trailing .exe if any
19677  new_path="${new_path/%.exe/}"
19678
19679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19680
19681  # First separate the path from the arguments. This will split at the first
19682  # space.
19683  complete="$FOUND_MAKE"
19684  path="${complete%% *}"
19685  tmp="$complete EOL"
19686  arguments="${tmp#* }"
19687
19688  # Input might be given as Windows format, start by converting to
19689  # unix format.
19690  new_path="$path"
19691
19692  windows_path="$new_path"
19693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19694    unix_path=`$CYGPATH -u "$windows_path"`
19695    new_path="$unix_path"
19696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19698    new_path="$unix_path"
19699  fi
19700
19701
19702  # Now try to locate executable using which
19703  new_path=`$WHICH "$new_path" 2> /dev/null`
19704
19705  if test "x$new_path" = x; then
19706    # Oops. Which didn't find the executable.
19707    # The splitting of arguments from the executable at a space might have been incorrect,
19708    # since paths with space are more likely in Windows. Give it another try with the whole
19709    # argument.
19710    path="$complete"
19711    arguments="EOL"
19712    new_path="$path"
19713
19714  windows_path="$new_path"
19715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19716    unix_path=`$CYGPATH -u "$windows_path"`
19717    new_path="$unix_path"
19718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19720    new_path="$unix_path"
19721  fi
19722
19723
19724    new_path=`$WHICH "$new_path" 2> /dev/null`
19725    # bat and cmd files are not always considered executable in MSYS causing which
19726    # to not find them
19727    if test "x$new_path" = x \
19728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19730      new_path="$path"
19731
19732  windows_path="$new_path"
19733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19734    unix_path=`$CYGPATH -u "$windows_path"`
19735    new_path="$unix_path"
19736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19738    new_path="$unix_path"
19739  fi
19740
19741    fi
19742
19743    if test "x$new_path" = x; then
19744      # It's still not found. Now this is an unrecoverable error.
19745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19746$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19747      has_space=`$ECHO "$complete" | $GREP " "`
19748      if test "x$has_space" != x; then
19749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19751      fi
19752      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19753    fi
19754  fi
19755
19756  # Now new_path has a complete unix path to the binary
19757  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19758    # Keep paths in /bin as-is, but remove trailing .exe if any
19759    new_path="${new_path/%.exe/}"
19760    # Do not save /bin paths to all_fixpath_prefixes!
19761  else
19762    # Not in mixed or Windows style, start by that.
19763    new_path=`cmd //c echo $new_path`
19764
19765  input_path="$new_path"
19766  # Check if we need to convert this using DOS-style short mode. If the path
19767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19768  # take no chances and rewrite it.
19769  # Note: m4 eats our [], so we need to use [ and ] instead.
19770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19771  if test "x$has_forbidden_chars" != x; then
19772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19774  fi
19775
19776    # Output is in $new_path
19777
19778  windows_path="$new_path"
19779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19780    unix_path=`$CYGPATH -u "$windows_path"`
19781    new_path="$unix_path"
19782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19784    new_path="$unix_path"
19785  fi
19786
19787    # remove trailing .exe if any
19788    new_path="${new_path/%.exe/}"
19789
19790    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19791    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19792  fi
19793
19794    else
19795      # We're on a unix platform. Hooray! :)
19796      # First separate the path from the arguments. This will split at the first
19797      # space.
19798      complete="$FOUND_MAKE"
19799      path="${complete%% *}"
19800      tmp="$complete EOL"
19801      arguments="${tmp#* }"
19802
19803      # Cannot rely on the command "which" here since it doesn't always work.
19804      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19805      if test -z "$is_absolute_path"; then
19806        # Path to executable is not absolute. Find it.
19807        IFS_save="$IFS"
19808        IFS=:
19809        for p in $PATH; do
19810          if test -f "$p/$path" && test -x "$p/$path"; then
19811            new_path="$p/$path"
19812            break
19813          fi
19814        done
19815        IFS="$IFS_save"
19816      else
19817        # This is an absolute path, we can use it without further modifications.
19818        new_path="$path"
19819      fi
19820
19821      if test "x$new_path" = x; then
19822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19824        has_space=`$ECHO "$complete" | $GREP " "`
19825        if test "x$has_space" != x; then
19826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19828        fi
19829        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19830      fi
19831    fi
19832
19833    # Now join together the path and the arguments once again
19834    if test "x$arguments" != xEOL; then
19835      new_complete="$new_path ${arguments% *}"
19836    else
19837      new_complete="$new_path"
19838    fi
19839
19840    if test "x$complete" != "x$new_complete"; then
19841      FOUND_MAKE="$new_complete"
19842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19843$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19844    fi
19845  fi
19846
19847        fi
19848      fi
19849    fi
19850  fi
19851
19852        fi
19853        PATH=$OLD_PATH
19854      fi
19855    fi
19856
19857    if test "x$FOUND_MAKE" = x; then
19858      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
19859    fi
19860
19861    else
19862      # If it succeeded, then it was overridden by the user. We will use it
19863      # for the tool.
19864
19865      # First remove it from the list of overridden variables, so we can test
19866      # for unknown variables in the end.
19867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19868
19869      # Check if we try to supply an empty value
19870      if test "x$MAKE" = x; then
19871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19872$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19874$as_echo_n "checking for MAKE... " >&6; }
19875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19876$as_echo "disabled" >&6; }
19877      else
19878        # Check if the provided tool contains a complete path.
19879        tool_specified="$MAKE"
19880        tool_basename="${tool_specified##*/}"
19881        if test "x$tool_basename" = "x$tool_specified"; then
19882          # A command without a complete path is provided, search $PATH.
19883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19884$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19885          # Extract the first word of "$tool_basename", so it can be a program name with args.
19886set dummy $tool_basename; ac_word=$2
19887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19888$as_echo_n "checking for $ac_word... " >&6; }
19889if ${ac_cv_path_MAKE+:} false; then :
19890  $as_echo_n "(cached) " >&6
19891else
19892  case $MAKE in
19893  [\\/]* | ?:[\\/]*)
19894  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19895  ;;
19896  *)
19897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19898for as_dir in $PATH
19899do
19900  IFS=$as_save_IFS
19901  test -z "$as_dir" && as_dir=.
19902    for ac_exec_ext in '' $ac_executable_extensions; do
19903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19904    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19906    break 2
19907  fi
19908done
19909  done
19910IFS=$as_save_IFS
19911
19912  ;;
19913esac
19914fi
19915MAKE=$ac_cv_path_MAKE
19916if test -n "$MAKE"; then
19917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19918$as_echo "$MAKE" >&6; }
19919else
19920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19921$as_echo "no" >&6; }
19922fi
19923
19924
19925          if test "x$MAKE" = x; then
19926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19927          fi
19928        else
19929          # Otherwise we believe it is a complete path. Use it as it is.
19930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19931$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19933$as_echo_n "checking for MAKE... " >&6; }
19934          if test ! -x "$tool_specified"; then
19935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19936$as_echo "not found" >&6; }
19937            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19938          fi
19939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19940$as_echo "$tool_specified" >&6; }
19941        fi
19942      fi
19943    fi
19944
19945    # If MAKE was set by user, verify the version
19946
19947  MAKE_CANDIDATE=""$MAKE""
19948  DESCRIPTION="user supplied MAKE=$MAKE"
19949
19950  # On Cygwin, we require a newer version of make than on other platforms
19951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19952    MAKE_VERSION_EXPR="-e 4\."
19953    MAKE_REQUIRED_VERSION="4.0"
19954   else
19955    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19956    MAKE_REQUIRED_VERSION="3.81"
19957  fi
19958
19959  if test "x$MAKE_CANDIDATE" != x; then
19960    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19961$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19962    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19963    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19964    if test "x$IS_GNU_MAKE" = x; then
19965      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19966$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19967    else
19968      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19969      if test "x$IS_MODERN_MAKE" = x; then
19970        { $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
19971$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;}
19972      else
19973        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19974          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975            MAKE_EXPECTED_ENV='cygwin'
19976          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19977            MAKE_EXPECTED_ENV='msys'
19978          else
19979            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19980          fi
19981          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19982          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19983        else
19984          # Not relevant for non-Windows
19985          IS_MAKE_CORRECT_ENV=true
19986        fi
19987        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19988          { $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
19989$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;}
19990        else
19991          FOUND_MAKE=$MAKE_CANDIDATE
19992
19993  # Only process if variable expands to non-empty
19994
19995  if test "x$FOUND_MAKE" != x; then
19996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19997
19998  # First separate the path from the arguments. This will split at the first
19999  # space.
20000  complete="$FOUND_MAKE"
20001  path="${complete%% *}"
20002  tmp="$complete EOL"
20003  arguments="${tmp#* }"
20004
20005  # Input might be given as Windows format, start by converting to
20006  # unix format.
20007  new_path=`$CYGPATH -u "$path"`
20008
20009  # Now try to locate executable using which
20010  new_path=`$WHICH "$new_path" 2> /dev/null`
20011  # bat and cmd files are not always considered executable in cygwin causing which
20012  # to not find them
20013  if test "x$new_path" = x \
20014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20016    new_path=`$CYGPATH -u "$path"`
20017  fi
20018  if test "x$new_path" = x; then
20019    # Oops. Which didn't find the executable.
20020    # The splitting of arguments from the executable at a space might have been incorrect,
20021    # since paths with space are more likely in Windows. Give it another try with the whole
20022    # argument.
20023    path="$complete"
20024    arguments="EOL"
20025    new_path=`$CYGPATH -u "$path"`
20026    new_path=`$WHICH "$new_path" 2> /dev/null`
20027    # bat and cmd files are not always considered executable in cygwin causing which
20028    # to not find them
20029    if test "x$new_path" = x \
20030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20032      new_path=`$CYGPATH -u "$path"`
20033    fi
20034    if test "x$new_path" = x; then
20035      # It's still not found. Now this is an unrecoverable error.
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20038      has_space=`$ECHO "$complete" | $GREP " "`
20039      if test "x$has_space" != x; then
20040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20042      fi
20043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20044    fi
20045  fi
20046
20047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20050  # "foo.exe" is OK but "foo" is an error.
20051  #
20052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20053  # It is also a way to make sure we got the proper file name for the real test later on.
20054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20055  if test "x$test_shortpath" = x; then
20056    # Short path failed, file does not exist as specified.
20057    # Try adding .exe or .cmd
20058    if test -f "${new_path}.exe"; then
20059      input_to_shortpath="${new_path}.exe"
20060    elif test -f "${new_path}.cmd"; then
20061      input_to_shortpath="${new_path}.cmd"
20062    else
20063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20068    fi
20069  else
20070    input_to_shortpath="$new_path"
20071  fi
20072
20073  # Call helper function which possibly converts this using DOS-style short mode.
20074  # If so, the updated path is stored in $new_path.
20075  new_path="$input_to_shortpath"
20076
20077  input_path="$input_to_shortpath"
20078  # Check if we need to convert this using DOS-style short mode. If the path
20079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20080  # take no chances and rewrite it.
20081  # Note: m4 eats our [], so we need to use [ and ] instead.
20082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20083  if test "x$has_forbidden_chars" != x; then
20084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20088      # Going to short mode and back again did indeed matter. Since short mode is
20089      # case insensitive, let's make it lowercase to improve readability.
20090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20091      # Now convert it back to Unix-style (cygpath)
20092      input_path=`$CYGPATH -u "$shortmode_path"`
20093      new_path="$input_path"
20094    fi
20095  fi
20096
20097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20098  if test "x$test_cygdrive_prefix" = x; then
20099    # As a simple fix, exclude /usr/bin since it's not a real path.
20100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20102      # a path prefixed by /cygdrive for fixpath to work.
20103      new_path="$CYGWIN_ROOT_PATH$input_path"
20104    fi
20105  fi
20106
20107  # remove trailing .exe if any
20108  new_path="${new_path/%.exe/}"
20109
20110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20111
20112  # First separate the path from the arguments. This will split at the first
20113  # space.
20114  complete="$FOUND_MAKE"
20115  path="${complete%% *}"
20116  tmp="$complete EOL"
20117  arguments="${tmp#* }"
20118
20119  # Input might be given as Windows format, start by converting to
20120  # unix format.
20121  new_path="$path"
20122
20123  windows_path="$new_path"
20124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20125    unix_path=`$CYGPATH -u "$windows_path"`
20126    new_path="$unix_path"
20127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20129    new_path="$unix_path"
20130  fi
20131
20132
20133  # Now try to locate executable using which
20134  new_path=`$WHICH "$new_path" 2> /dev/null`
20135
20136  if test "x$new_path" = x; then
20137    # Oops. Which didn't find the executable.
20138    # The splitting of arguments from the executable at a space might have been incorrect,
20139    # since paths with space are more likely in Windows. Give it another try with the whole
20140    # argument.
20141    path="$complete"
20142    arguments="EOL"
20143    new_path="$path"
20144
20145  windows_path="$new_path"
20146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20147    unix_path=`$CYGPATH -u "$windows_path"`
20148    new_path="$unix_path"
20149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20151    new_path="$unix_path"
20152  fi
20153
20154
20155    new_path=`$WHICH "$new_path" 2> /dev/null`
20156    # bat and cmd files are not always considered executable in MSYS causing which
20157    # to not find them
20158    if test "x$new_path" = x \
20159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20161      new_path="$path"
20162
20163  windows_path="$new_path"
20164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20165    unix_path=`$CYGPATH -u "$windows_path"`
20166    new_path="$unix_path"
20167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20169    new_path="$unix_path"
20170  fi
20171
20172    fi
20173
20174    if test "x$new_path" = x; then
20175      # It's still not found. Now this is an unrecoverable error.
20176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20177$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20178      has_space=`$ECHO "$complete" | $GREP " "`
20179      if test "x$has_space" != x; then
20180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20182      fi
20183      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20184    fi
20185  fi
20186
20187  # Now new_path has a complete unix path to the binary
20188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20189    # Keep paths in /bin as-is, but remove trailing .exe if any
20190    new_path="${new_path/%.exe/}"
20191    # Do not save /bin paths to all_fixpath_prefixes!
20192  else
20193    # Not in mixed or Windows style, start by that.
20194    new_path=`cmd //c echo $new_path`
20195
20196  input_path="$new_path"
20197  # Check if we need to convert this using DOS-style short mode. If the path
20198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20199  # take no chances and rewrite it.
20200  # Note: m4 eats our [], so we need to use [ and ] instead.
20201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20202  if test "x$has_forbidden_chars" != x; then
20203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20205  fi
20206
20207    # Output is in $new_path
20208
20209  windows_path="$new_path"
20210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20211    unix_path=`$CYGPATH -u "$windows_path"`
20212    new_path="$unix_path"
20213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20215    new_path="$unix_path"
20216  fi
20217
20218    # remove trailing .exe if any
20219    new_path="${new_path/%.exe/}"
20220
20221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20223  fi
20224
20225    else
20226      # We're on a unix platform. Hooray! :)
20227      # First separate the path from the arguments. This will split at the first
20228      # space.
20229      complete="$FOUND_MAKE"
20230      path="${complete%% *}"
20231      tmp="$complete EOL"
20232      arguments="${tmp#* }"
20233
20234      # Cannot rely on the command "which" here since it doesn't always work.
20235      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20236      if test -z "$is_absolute_path"; then
20237        # Path to executable is not absolute. Find it.
20238        IFS_save="$IFS"
20239        IFS=:
20240        for p in $PATH; do
20241          if test -f "$p/$path" && test -x "$p/$path"; then
20242            new_path="$p/$path"
20243            break
20244          fi
20245        done
20246        IFS="$IFS_save"
20247      else
20248        # This is an absolute path, we can use it without further modifications.
20249        new_path="$path"
20250      fi
20251
20252      if test "x$new_path" = x; then
20253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20255        has_space=`$ECHO "$complete" | $GREP " "`
20256        if test "x$has_space" != x; then
20257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20259        fi
20260        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20261      fi
20262    fi
20263
20264    # Now join together the path and the arguments once again
20265    if test "x$arguments" != xEOL; then
20266      new_complete="$new_path ${arguments% *}"
20267    else
20268      new_complete="$new_path"
20269    fi
20270
20271    if test "x$complete" != "x$new_complete"; then
20272      FOUND_MAKE="$new_complete"
20273      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20274$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20275    fi
20276  fi
20277
20278        fi
20279      fi
20280    fi
20281  fi
20282
20283    if test "x$FOUND_MAKE" = x; then
20284      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20285    fi
20286
20287  fi
20288
20289
20290  MAKE=$FOUND_MAKE
20291
20292  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20293$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20294
20295
20296  # Check if make supports the output sync option and if so, setup using it.
20297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20298$as_echo_n "checking if make --output-sync is supported... " >&6; }
20299  if $MAKE --version -O > /dev/null 2>&1; then
20300    OUTPUT_SYNC_SUPPORTED=true
20301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20302$as_echo "yes" >&6; }
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20304$as_echo_n "checking for output-sync value... " >&6; }
20305
20306# Check whether --with-output-sync was given.
20307if test "${with_output_sync+set}" = set; then :
20308  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20309fi
20310
20311    if test "x$OUTPUT_SYNC" = "x"; then
20312      OUTPUT_SYNC=none
20313    fi
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20315$as_echo "$OUTPUT_SYNC" >&6; }
20316    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20317      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20318    fi
20319  else
20320    OUTPUT_SYNC_SUPPORTED=false
20321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20322$as_echo "no" >&6; }
20323  fi
20324
20325
20326
20327
20328
20329
20330  # Test if find supports -delete
20331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20332$as_echo_n "checking if find supports -delete... " >&6; }
20333  FIND_DELETE="-delete"
20334
20335  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20336
20337  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20338
20339  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20340  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20341    # No, it does not.
20342    rm $DELETEDIR/TestIfFindSupportsDelete
20343    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20344      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20345      FIND_DELETE="-print | xargs rm"
20346    else
20347      FIND_DELETE="-exec rm \{\} \+"
20348    fi
20349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20350$as_echo "no" >&6; }
20351  else
20352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20353$as_echo "yes" >&6; }
20354  fi
20355  rmdir $DELETEDIR
20356
20357
20358
20359  # These tools might not be installed by default,
20360  # need hint on how to install them.
20361
20362
20363
20364  # Publish this variable in the help.
20365
20366
20367  if [ -z "${UNZIP+x}" ]; then
20368    # The variable is not set by user, try to locate tool using the code snippet
20369    for ac_prog in unzip
20370do
20371  # Extract the first word of "$ac_prog", so it can be a program name with args.
20372set dummy $ac_prog; ac_word=$2
20373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20374$as_echo_n "checking for $ac_word... " >&6; }
20375if ${ac_cv_path_UNZIP+:} false; then :
20376  $as_echo_n "(cached) " >&6
20377else
20378  case $UNZIP in
20379  [\\/]* | ?:[\\/]*)
20380  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20381  ;;
20382  *)
20383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20384for as_dir in $PATH
20385do
20386  IFS=$as_save_IFS
20387  test -z "$as_dir" && as_dir=.
20388    for ac_exec_ext in '' $ac_executable_extensions; do
20389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20390    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20392    break 2
20393  fi
20394done
20395  done
20396IFS=$as_save_IFS
20397
20398  ;;
20399esac
20400fi
20401UNZIP=$ac_cv_path_UNZIP
20402if test -n "$UNZIP"; then
20403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20404$as_echo "$UNZIP" >&6; }
20405else
20406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20407$as_echo "no" >&6; }
20408fi
20409
20410
20411  test -n "$UNZIP" && break
20412done
20413
20414  else
20415    # The variable is set, but is it from the command line or the environment?
20416
20417    # Try to remove the string !UNZIP! from our list.
20418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20420      # If it failed, the variable was not from the command line. Ignore it,
20421      # but warn the user (except for BASH, which is always set by the calling BASH).
20422      if test "xUNZIP" != xBASH; then
20423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20424$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20425      fi
20426      # Try to locate tool using the code snippet
20427      for ac_prog in unzip
20428do
20429  # Extract the first word of "$ac_prog", so it can be a program name with args.
20430set dummy $ac_prog; ac_word=$2
20431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20432$as_echo_n "checking for $ac_word... " >&6; }
20433if ${ac_cv_path_UNZIP+:} false; then :
20434  $as_echo_n "(cached) " >&6
20435else
20436  case $UNZIP in
20437  [\\/]* | ?:[\\/]*)
20438  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20439  ;;
20440  *)
20441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20442for as_dir in $PATH
20443do
20444  IFS=$as_save_IFS
20445  test -z "$as_dir" && as_dir=.
20446    for ac_exec_ext in '' $ac_executable_extensions; do
20447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20448    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20450    break 2
20451  fi
20452done
20453  done
20454IFS=$as_save_IFS
20455
20456  ;;
20457esac
20458fi
20459UNZIP=$ac_cv_path_UNZIP
20460if test -n "$UNZIP"; then
20461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20462$as_echo "$UNZIP" >&6; }
20463else
20464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20465$as_echo "no" >&6; }
20466fi
20467
20468
20469  test -n "$UNZIP" && break
20470done
20471
20472    else
20473      # If it succeeded, then it was overridden by the user. We will use it
20474      # for the tool.
20475
20476      # First remove it from the list of overridden variables, so we can test
20477      # for unknown variables in the end.
20478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20479
20480      # Check if we try to supply an empty value
20481      if test "x$UNZIP" = x; then
20482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20483$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20485$as_echo_n "checking for UNZIP... " >&6; }
20486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20487$as_echo "disabled" >&6; }
20488      else
20489        # Check if the provided tool contains a complete path.
20490        tool_specified="$UNZIP"
20491        tool_basename="${tool_specified##*/}"
20492        if test "x$tool_basename" = "x$tool_specified"; then
20493          # A command without a complete path is provided, search $PATH.
20494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20495$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20496          # Extract the first word of "$tool_basename", so it can be a program name with args.
20497set dummy $tool_basename; ac_word=$2
20498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20499$as_echo_n "checking for $ac_word... " >&6; }
20500if ${ac_cv_path_UNZIP+:} false; then :
20501  $as_echo_n "(cached) " >&6
20502else
20503  case $UNZIP in
20504  [\\/]* | ?:[\\/]*)
20505  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20506  ;;
20507  *)
20508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20509for as_dir in $PATH
20510do
20511  IFS=$as_save_IFS
20512  test -z "$as_dir" && as_dir=.
20513    for ac_exec_ext in '' $ac_executable_extensions; do
20514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20515    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20517    break 2
20518  fi
20519done
20520  done
20521IFS=$as_save_IFS
20522
20523  ;;
20524esac
20525fi
20526UNZIP=$ac_cv_path_UNZIP
20527if test -n "$UNZIP"; then
20528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20529$as_echo "$UNZIP" >&6; }
20530else
20531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20532$as_echo "no" >&6; }
20533fi
20534
20535
20536          if test "x$UNZIP" = x; then
20537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20538          fi
20539        else
20540          # Otherwise we believe it is a complete path. Use it as it is.
20541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20542$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20544$as_echo_n "checking for UNZIP... " >&6; }
20545          if test ! -x "$tool_specified"; then
20546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20547$as_echo "not found" >&6; }
20548            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20549          fi
20550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20551$as_echo "$tool_specified" >&6; }
20552        fi
20553      fi
20554    fi
20555
20556  fi
20557
20558
20559
20560  if test "x$UNZIP" = x; then
20561    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20562  fi
20563
20564
20565
20566
20567
20568  # Publish this variable in the help.
20569
20570
20571  if [ -z "${ZIP+x}" ]; then
20572    # The variable is not set by user, try to locate tool using the code snippet
20573    for ac_prog in zip
20574do
20575  # Extract the first word of "$ac_prog", so it can be a program name with args.
20576set dummy $ac_prog; ac_word=$2
20577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20578$as_echo_n "checking for $ac_word... " >&6; }
20579if ${ac_cv_path_ZIP+:} false; then :
20580  $as_echo_n "(cached) " >&6
20581else
20582  case $ZIP in
20583  [\\/]* | ?:[\\/]*)
20584  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20585  ;;
20586  *)
20587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20588for as_dir in $PATH
20589do
20590  IFS=$as_save_IFS
20591  test -z "$as_dir" && as_dir=.
20592    for ac_exec_ext in '' $ac_executable_extensions; do
20593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20594    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20596    break 2
20597  fi
20598done
20599  done
20600IFS=$as_save_IFS
20601
20602  ;;
20603esac
20604fi
20605ZIP=$ac_cv_path_ZIP
20606if test -n "$ZIP"; then
20607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20608$as_echo "$ZIP" >&6; }
20609else
20610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20611$as_echo "no" >&6; }
20612fi
20613
20614
20615  test -n "$ZIP" && break
20616done
20617
20618  else
20619    # The variable is set, but is it from the command line or the environment?
20620
20621    # Try to remove the string !ZIP! from our list.
20622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20624      # If it failed, the variable was not from the command line. Ignore it,
20625      # but warn the user (except for BASH, which is always set by the calling BASH).
20626      if test "xZIP" != xBASH; then
20627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20628$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20629      fi
20630      # Try to locate tool using the code snippet
20631      for ac_prog in zip
20632do
20633  # Extract the first word of "$ac_prog", so it can be a program name with args.
20634set dummy $ac_prog; ac_word=$2
20635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20636$as_echo_n "checking for $ac_word... " >&6; }
20637if ${ac_cv_path_ZIP+:} false; then :
20638  $as_echo_n "(cached) " >&6
20639else
20640  case $ZIP in
20641  [\\/]* | ?:[\\/]*)
20642  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20643  ;;
20644  *)
20645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20646for as_dir in $PATH
20647do
20648  IFS=$as_save_IFS
20649  test -z "$as_dir" && as_dir=.
20650    for ac_exec_ext in '' $ac_executable_extensions; do
20651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20652    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20654    break 2
20655  fi
20656done
20657  done
20658IFS=$as_save_IFS
20659
20660  ;;
20661esac
20662fi
20663ZIP=$ac_cv_path_ZIP
20664if test -n "$ZIP"; then
20665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20666$as_echo "$ZIP" >&6; }
20667else
20668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20669$as_echo "no" >&6; }
20670fi
20671
20672
20673  test -n "$ZIP" && break
20674done
20675
20676    else
20677      # If it succeeded, then it was overridden by the user. We will use it
20678      # for the tool.
20679
20680      # First remove it from the list of overridden variables, so we can test
20681      # for unknown variables in the end.
20682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20683
20684      # Check if we try to supply an empty value
20685      if test "x$ZIP" = x; then
20686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20687$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20689$as_echo_n "checking for ZIP... " >&6; }
20690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20691$as_echo "disabled" >&6; }
20692      else
20693        # Check if the provided tool contains a complete path.
20694        tool_specified="$ZIP"
20695        tool_basename="${tool_specified##*/}"
20696        if test "x$tool_basename" = "x$tool_specified"; then
20697          # A command without a complete path is provided, search $PATH.
20698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20699$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20700          # Extract the first word of "$tool_basename", so it can be a program name with args.
20701set dummy $tool_basename; ac_word=$2
20702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20703$as_echo_n "checking for $ac_word... " >&6; }
20704if ${ac_cv_path_ZIP+:} false; then :
20705  $as_echo_n "(cached) " >&6
20706else
20707  case $ZIP in
20708  [\\/]* | ?:[\\/]*)
20709  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20710  ;;
20711  *)
20712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20713for as_dir in $PATH
20714do
20715  IFS=$as_save_IFS
20716  test -z "$as_dir" && as_dir=.
20717    for ac_exec_ext in '' $ac_executable_extensions; do
20718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20719    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20721    break 2
20722  fi
20723done
20724  done
20725IFS=$as_save_IFS
20726
20727  ;;
20728esac
20729fi
20730ZIP=$ac_cv_path_ZIP
20731if test -n "$ZIP"; then
20732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20733$as_echo "$ZIP" >&6; }
20734else
20735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20736$as_echo "no" >&6; }
20737fi
20738
20739
20740          if test "x$ZIP" = x; then
20741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20742          fi
20743        else
20744          # Otherwise we believe it is a complete path. Use it as it is.
20745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20746$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20748$as_echo_n "checking for ZIP... " >&6; }
20749          if test ! -x "$tool_specified"; then
20750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20751$as_echo "not found" >&6; }
20752            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20753          fi
20754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20755$as_echo "$tool_specified" >&6; }
20756        fi
20757      fi
20758    fi
20759
20760  fi
20761
20762
20763
20764  if test "x$ZIP" = x; then
20765    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20766  fi
20767
20768
20769
20770  # Non-required basic tools
20771
20772
20773
20774  # Publish this variable in the help.
20775
20776
20777  if [ -z "${LDD+x}" ]; then
20778    # The variable is not set by user, try to locate tool using the code snippet
20779    for ac_prog in ldd
20780do
20781  # Extract the first word of "$ac_prog", so it can be a program name with args.
20782set dummy $ac_prog; ac_word=$2
20783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20784$as_echo_n "checking for $ac_word... " >&6; }
20785if ${ac_cv_path_LDD+:} false; then :
20786  $as_echo_n "(cached) " >&6
20787else
20788  case $LDD in
20789  [\\/]* | ?:[\\/]*)
20790  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20791  ;;
20792  *)
20793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20794for as_dir in $PATH
20795do
20796  IFS=$as_save_IFS
20797  test -z "$as_dir" && as_dir=.
20798    for ac_exec_ext in '' $ac_executable_extensions; do
20799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20800    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20802    break 2
20803  fi
20804done
20805  done
20806IFS=$as_save_IFS
20807
20808  ;;
20809esac
20810fi
20811LDD=$ac_cv_path_LDD
20812if test -n "$LDD"; then
20813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20814$as_echo "$LDD" >&6; }
20815else
20816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20817$as_echo "no" >&6; }
20818fi
20819
20820
20821  test -n "$LDD" && break
20822done
20823
20824  else
20825    # The variable is set, but is it from the command line or the environment?
20826
20827    # Try to remove the string !LDD! from our list.
20828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20830      # If it failed, the variable was not from the command line. Ignore it,
20831      # but warn the user (except for BASH, which is always set by the calling BASH).
20832      if test "xLDD" != xBASH; then
20833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20834$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20835      fi
20836      # Try to locate tool using the code snippet
20837      for ac_prog in ldd
20838do
20839  # Extract the first word of "$ac_prog", so it can be a program name with args.
20840set dummy $ac_prog; ac_word=$2
20841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20842$as_echo_n "checking for $ac_word... " >&6; }
20843if ${ac_cv_path_LDD+:} false; then :
20844  $as_echo_n "(cached) " >&6
20845else
20846  case $LDD in
20847  [\\/]* | ?:[\\/]*)
20848  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20849  ;;
20850  *)
20851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20852for as_dir in $PATH
20853do
20854  IFS=$as_save_IFS
20855  test -z "$as_dir" && as_dir=.
20856    for ac_exec_ext in '' $ac_executable_extensions; do
20857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20858    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20860    break 2
20861  fi
20862done
20863  done
20864IFS=$as_save_IFS
20865
20866  ;;
20867esac
20868fi
20869LDD=$ac_cv_path_LDD
20870if test -n "$LDD"; then
20871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20872$as_echo "$LDD" >&6; }
20873else
20874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20875$as_echo "no" >&6; }
20876fi
20877
20878
20879  test -n "$LDD" && break
20880done
20881
20882    else
20883      # If it succeeded, then it was overridden by the user. We will use it
20884      # for the tool.
20885
20886      # First remove it from the list of overridden variables, so we can test
20887      # for unknown variables in the end.
20888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20889
20890      # Check if we try to supply an empty value
20891      if test "x$LDD" = x; then
20892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20893$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20895$as_echo_n "checking for LDD... " >&6; }
20896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20897$as_echo "disabled" >&6; }
20898      else
20899        # Check if the provided tool contains a complete path.
20900        tool_specified="$LDD"
20901        tool_basename="${tool_specified##*/}"
20902        if test "x$tool_basename" = "x$tool_specified"; then
20903          # A command without a complete path is provided, search $PATH.
20904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20905$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20906          # Extract the first word of "$tool_basename", so it can be a program name with args.
20907set dummy $tool_basename; ac_word=$2
20908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20909$as_echo_n "checking for $ac_word... " >&6; }
20910if ${ac_cv_path_LDD+:} false; then :
20911  $as_echo_n "(cached) " >&6
20912else
20913  case $LDD in
20914  [\\/]* | ?:[\\/]*)
20915  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20916  ;;
20917  *)
20918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20919for as_dir in $PATH
20920do
20921  IFS=$as_save_IFS
20922  test -z "$as_dir" && as_dir=.
20923    for ac_exec_ext in '' $ac_executable_extensions; do
20924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20925    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20927    break 2
20928  fi
20929done
20930  done
20931IFS=$as_save_IFS
20932
20933  ;;
20934esac
20935fi
20936LDD=$ac_cv_path_LDD
20937if test -n "$LDD"; then
20938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20939$as_echo "$LDD" >&6; }
20940else
20941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20942$as_echo "no" >&6; }
20943fi
20944
20945
20946          if test "x$LDD" = x; then
20947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20948          fi
20949        else
20950          # Otherwise we believe it is a complete path. Use it as it is.
20951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20952$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20954$as_echo_n "checking for LDD... " >&6; }
20955          if test ! -x "$tool_specified"; then
20956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20957$as_echo "not found" >&6; }
20958            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20959          fi
20960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20961$as_echo "$tool_specified" >&6; }
20962        fi
20963      fi
20964    fi
20965
20966  fi
20967
20968
20969  if test "x$LDD" = "x"; then
20970    # List shared lib dependencies is used for
20971    # debug output and checking for forbidden dependencies.
20972    # We can build without it.
20973    LDD="true"
20974  fi
20975
20976
20977  # Publish this variable in the help.
20978
20979
20980  if [ -z "${OTOOL+x}" ]; then
20981    # The variable is not set by user, try to locate tool using the code snippet
20982    for ac_prog in otool
20983do
20984  # Extract the first word of "$ac_prog", so it can be a program name with args.
20985set dummy $ac_prog; ac_word=$2
20986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20987$as_echo_n "checking for $ac_word... " >&6; }
20988if ${ac_cv_path_OTOOL+:} false; then :
20989  $as_echo_n "(cached) " >&6
20990else
20991  case $OTOOL in
20992  [\\/]* | ?:[\\/]*)
20993  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20994  ;;
20995  *)
20996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20997for as_dir in $PATH
20998do
20999  IFS=$as_save_IFS
21000  test -z "$as_dir" && as_dir=.
21001    for ac_exec_ext in '' $ac_executable_extensions; do
21002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21003    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21005    break 2
21006  fi
21007done
21008  done
21009IFS=$as_save_IFS
21010
21011  ;;
21012esac
21013fi
21014OTOOL=$ac_cv_path_OTOOL
21015if test -n "$OTOOL"; then
21016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21017$as_echo "$OTOOL" >&6; }
21018else
21019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21020$as_echo "no" >&6; }
21021fi
21022
21023
21024  test -n "$OTOOL" && break
21025done
21026
21027  else
21028    # The variable is set, but is it from the command line or the environment?
21029
21030    # Try to remove the string !OTOOL! from our list.
21031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21033      # If it failed, the variable was not from the command line. Ignore it,
21034      # but warn the user (except for BASH, which is always set by the calling BASH).
21035      if test "xOTOOL" != xBASH; then
21036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21037$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21038      fi
21039      # Try to locate tool using the code snippet
21040      for ac_prog in otool
21041do
21042  # Extract the first word of "$ac_prog", so it can be a program name with args.
21043set dummy $ac_prog; ac_word=$2
21044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21045$as_echo_n "checking for $ac_word... " >&6; }
21046if ${ac_cv_path_OTOOL+:} false; then :
21047  $as_echo_n "(cached) " >&6
21048else
21049  case $OTOOL in
21050  [\\/]* | ?:[\\/]*)
21051  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21052  ;;
21053  *)
21054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21055for as_dir in $PATH
21056do
21057  IFS=$as_save_IFS
21058  test -z "$as_dir" && as_dir=.
21059    for ac_exec_ext in '' $ac_executable_extensions; do
21060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21061    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21063    break 2
21064  fi
21065done
21066  done
21067IFS=$as_save_IFS
21068
21069  ;;
21070esac
21071fi
21072OTOOL=$ac_cv_path_OTOOL
21073if test -n "$OTOOL"; then
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21075$as_echo "$OTOOL" >&6; }
21076else
21077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21078$as_echo "no" >&6; }
21079fi
21080
21081
21082  test -n "$OTOOL" && break
21083done
21084
21085    else
21086      # If it succeeded, then it was overridden by the user. We will use it
21087      # for the tool.
21088
21089      # First remove it from the list of overridden variables, so we can test
21090      # for unknown variables in the end.
21091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21092
21093      # Check if we try to supply an empty value
21094      if test "x$OTOOL" = x; then
21095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21096$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21098$as_echo_n "checking for OTOOL... " >&6; }
21099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21100$as_echo "disabled" >&6; }
21101      else
21102        # Check if the provided tool contains a complete path.
21103        tool_specified="$OTOOL"
21104        tool_basename="${tool_specified##*/}"
21105        if test "x$tool_basename" = "x$tool_specified"; then
21106          # A command without a complete path is provided, search $PATH.
21107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21108$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21109          # Extract the first word of "$tool_basename", so it can be a program name with args.
21110set dummy $tool_basename; ac_word=$2
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21112$as_echo_n "checking for $ac_word... " >&6; }
21113if ${ac_cv_path_OTOOL+:} false; then :
21114  $as_echo_n "(cached) " >&6
21115else
21116  case $OTOOL in
21117  [\\/]* | ?:[\\/]*)
21118  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21119  ;;
21120  *)
21121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21122for as_dir in $PATH
21123do
21124  IFS=$as_save_IFS
21125  test -z "$as_dir" && as_dir=.
21126    for ac_exec_ext in '' $ac_executable_extensions; do
21127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21128    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21130    break 2
21131  fi
21132done
21133  done
21134IFS=$as_save_IFS
21135
21136  ;;
21137esac
21138fi
21139OTOOL=$ac_cv_path_OTOOL
21140if test -n "$OTOOL"; then
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21142$as_echo "$OTOOL" >&6; }
21143else
21144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21145$as_echo "no" >&6; }
21146fi
21147
21148
21149          if test "x$OTOOL" = x; then
21150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21151          fi
21152        else
21153          # Otherwise we believe it is a complete path. Use it as it is.
21154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21155$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21157$as_echo_n "checking for OTOOL... " >&6; }
21158          if test ! -x "$tool_specified"; then
21159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21160$as_echo "not found" >&6; }
21161            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21162          fi
21163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21164$as_echo "$tool_specified" >&6; }
21165        fi
21166      fi
21167    fi
21168
21169  fi
21170
21171
21172  if test "x$OTOOL" = "x"; then
21173    OTOOL="true"
21174  fi
21175
21176
21177  # Publish this variable in the help.
21178
21179
21180  if [ -z "${READELF+x}" ]; then
21181    # The variable is not set by user, try to locate tool using the code snippet
21182    for ac_prog in greadelf readelf
21183do
21184  # Extract the first word of "$ac_prog", so it can be a program name with args.
21185set dummy $ac_prog; ac_word=$2
21186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21187$as_echo_n "checking for $ac_word... " >&6; }
21188if ${ac_cv_path_READELF+:} false; then :
21189  $as_echo_n "(cached) " >&6
21190else
21191  case $READELF in
21192  [\\/]* | ?:[\\/]*)
21193  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21194  ;;
21195  *)
21196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21197for as_dir in $PATH
21198do
21199  IFS=$as_save_IFS
21200  test -z "$as_dir" && as_dir=.
21201    for ac_exec_ext in '' $ac_executable_extensions; do
21202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21203    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21205    break 2
21206  fi
21207done
21208  done
21209IFS=$as_save_IFS
21210
21211  ;;
21212esac
21213fi
21214READELF=$ac_cv_path_READELF
21215if test -n "$READELF"; then
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21217$as_echo "$READELF" >&6; }
21218else
21219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21220$as_echo "no" >&6; }
21221fi
21222
21223
21224  test -n "$READELF" && break
21225done
21226
21227  else
21228    # The variable is set, but is it from the command line or the environment?
21229
21230    # Try to remove the string !READELF! from our list.
21231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21233      # If it failed, the variable was not from the command line. Ignore it,
21234      # but warn the user (except for BASH, which is always set by the calling BASH).
21235      if test "xREADELF" != xBASH; then
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21237$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21238      fi
21239      # Try to locate tool using the code snippet
21240      for ac_prog in greadelf readelf
21241do
21242  # Extract the first word of "$ac_prog", so it can be a program name with args.
21243set dummy $ac_prog; ac_word=$2
21244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21245$as_echo_n "checking for $ac_word... " >&6; }
21246if ${ac_cv_path_READELF+:} false; then :
21247  $as_echo_n "(cached) " >&6
21248else
21249  case $READELF in
21250  [\\/]* | ?:[\\/]*)
21251  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21252  ;;
21253  *)
21254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21255for as_dir in $PATH
21256do
21257  IFS=$as_save_IFS
21258  test -z "$as_dir" && as_dir=.
21259    for ac_exec_ext in '' $ac_executable_extensions; do
21260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21261    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21263    break 2
21264  fi
21265done
21266  done
21267IFS=$as_save_IFS
21268
21269  ;;
21270esac
21271fi
21272READELF=$ac_cv_path_READELF
21273if test -n "$READELF"; then
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21275$as_echo "$READELF" >&6; }
21276else
21277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278$as_echo "no" >&6; }
21279fi
21280
21281
21282  test -n "$READELF" && break
21283done
21284
21285    else
21286      # If it succeeded, then it was overridden by the user. We will use it
21287      # for the tool.
21288
21289      # First remove it from the list of overridden variables, so we can test
21290      # for unknown variables in the end.
21291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21292
21293      # Check if we try to supply an empty value
21294      if test "x$READELF" = x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21296$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21298$as_echo_n "checking for READELF... " >&6; }
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21300$as_echo "disabled" >&6; }
21301      else
21302        # Check if the provided tool contains a complete path.
21303        tool_specified="$READELF"
21304        tool_basename="${tool_specified##*/}"
21305        if test "x$tool_basename" = "x$tool_specified"; then
21306          # A command without a complete path is provided, search $PATH.
21307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21308$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21309          # Extract the first word of "$tool_basename", so it can be a program name with args.
21310set dummy $tool_basename; ac_word=$2
21311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21312$as_echo_n "checking for $ac_word... " >&6; }
21313if ${ac_cv_path_READELF+:} false; then :
21314  $as_echo_n "(cached) " >&6
21315else
21316  case $READELF in
21317  [\\/]* | ?:[\\/]*)
21318  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21319  ;;
21320  *)
21321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21322for as_dir in $PATH
21323do
21324  IFS=$as_save_IFS
21325  test -z "$as_dir" && as_dir=.
21326    for ac_exec_ext in '' $ac_executable_extensions; do
21327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21328    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21330    break 2
21331  fi
21332done
21333  done
21334IFS=$as_save_IFS
21335
21336  ;;
21337esac
21338fi
21339READELF=$ac_cv_path_READELF
21340if test -n "$READELF"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21342$as_echo "$READELF" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349          if test "x$READELF" = x; then
21350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21351          fi
21352        else
21353          # Otherwise we believe it is a complete path. Use it as it is.
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21355$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21357$as_echo_n "checking for READELF... " >&6; }
21358          if test ! -x "$tool_specified"; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21360$as_echo "not found" >&6; }
21361            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21362          fi
21363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21364$as_echo "$tool_specified" >&6; }
21365        fi
21366      fi
21367    fi
21368
21369  fi
21370
21371
21372
21373
21374  # Publish this variable in the help.
21375
21376
21377  if [ -z "${HG+x}" ]; then
21378    # The variable is not set by user, try to locate tool using the code snippet
21379    for ac_prog in hg
21380do
21381  # Extract the first word of "$ac_prog", so it can be a program name with args.
21382set dummy $ac_prog; ac_word=$2
21383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21384$as_echo_n "checking for $ac_word... " >&6; }
21385if ${ac_cv_path_HG+:} false; then :
21386  $as_echo_n "(cached) " >&6
21387else
21388  case $HG in
21389  [\\/]* | ?:[\\/]*)
21390  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21391  ;;
21392  *)
21393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21394for as_dir in $PATH
21395do
21396  IFS=$as_save_IFS
21397  test -z "$as_dir" && as_dir=.
21398    for ac_exec_ext in '' $ac_executable_extensions; do
21399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21400    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21402    break 2
21403  fi
21404done
21405  done
21406IFS=$as_save_IFS
21407
21408  ;;
21409esac
21410fi
21411HG=$ac_cv_path_HG
21412if test -n "$HG"; then
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21414$as_echo "$HG" >&6; }
21415else
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21417$as_echo "no" >&6; }
21418fi
21419
21420
21421  test -n "$HG" && break
21422done
21423
21424  else
21425    # The variable is set, but is it from the command line or the environment?
21426
21427    # Try to remove the string !HG! from our list.
21428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21430      # If it failed, the variable was not from the command line. Ignore it,
21431      # but warn the user (except for BASH, which is always set by the calling BASH).
21432      if test "xHG" != xBASH; then
21433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21434$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21435      fi
21436      # Try to locate tool using the code snippet
21437      for ac_prog in hg
21438do
21439  # Extract the first word of "$ac_prog", so it can be a program name with args.
21440set dummy $ac_prog; ac_word=$2
21441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21442$as_echo_n "checking for $ac_word... " >&6; }
21443if ${ac_cv_path_HG+:} false; then :
21444  $as_echo_n "(cached) " >&6
21445else
21446  case $HG in
21447  [\\/]* | ?:[\\/]*)
21448  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21449  ;;
21450  *)
21451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21452for as_dir in $PATH
21453do
21454  IFS=$as_save_IFS
21455  test -z "$as_dir" && as_dir=.
21456    for ac_exec_ext in '' $ac_executable_extensions; do
21457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21458    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21460    break 2
21461  fi
21462done
21463  done
21464IFS=$as_save_IFS
21465
21466  ;;
21467esac
21468fi
21469HG=$ac_cv_path_HG
21470if test -n "$HG"; then
21471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21472$as_echo "$HG" >&6; }
21473else
21474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21475$as_echo "no" >&6; }
21476fi
21477
21478
21479  test -n "$HG" && break
21480done
21481
21482    else
21483      # If it succeeded, then it was overridden by the user. We will use it
21484      # for the tool.
21485
21486      # First remove it from the list of overridden variables, so we can test
21487      # for unknown variables in the end.
21488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21489
21490      # Check if we try to supply an empty value
21491      if test "x$HG" = x; then
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21493$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21495$as_echo_n "checking for HG... " >&6; }
21496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21497$as_echo "disabled" >&6; }
21498      else
21499        # Check if the provided tool contains a complete path.
21500        tool_specified="$HG"
21501        tool_basename="${tool_specified##*/}"
21502        if test "x$tool_basename" = "x$tool_specified"; then
21503          # A command without a complete path is provided, search $PATH.
21504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21505$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21506          # Extract the first word of "$tool_basename", so it can be a program name with args.
21507set dummy $tool_basename; ac_word=$2
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509$as_echo_n "checking for $ac_word... " >&6; }
21510if ${ac_cv_path_HG+:} false; then :
21511  $as_echo_n "(cached) " >&6
21512else
21513  case $HG in
21514  [\\/]* | ?:[\\/]*)
21515  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21516  ;;
21517  *)
21518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21519for as_dir in $PATH
21520do
21521  IFS=$as_save_IFS
21522  test -z "$as_dir" && as_dir=.
21523    for ac_exec_ext in '' $ac_executable_extensions; do
21524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21525    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21527    break 2
21528  fi
21529done
21530  done
21531IFS=$as_save_IFS
21532
21533  ;;
21534esac
21535fi
21536HG=$ac_cv_path_HG
21537if test -n "$HG"; then
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21539$as_echo "$HG" >&6; }
21540else
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21542$as_echo "no" >&6; }
21543fi
21544
21545
21546          if test "x$HG" = x; then
21547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21548          fi
21549        else
21550          # Otherwise we believe it is a complete path. Use it as it is.
21551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21552$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21554$as_echo_n "checking for HG... " >&6; }
21555          if test ! -x "$tool_specified"; then
21556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21557$as_echo "not found" >&6; }
21558            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21559          fi
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21561$as_echo "$tool_specified" >&6; }
21562        fi
21563      fi
21564    fi
21565
21566  fi
21567
21568
21569
21570
21571  # Publish this variable in the help.
21572
21573
21574  if [ -z "${STAT+x}" ]; then
21575    # The variable is not set by user, try to locate tool using the code snippet
21576    for ac_prog in stat
21577do
21578  # Extract the first word of "$ac_prog", so it can be a program name with args.
21579set dummy $ac_prog; ac_word=$2
21580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21581$as_echo_n "checking for $ac_word... " >&6; }
21582if ${ac_cv_path_STAT+:} false; then :
21583  $as_echo_n "(cached) " >&6
21584else
21585  case $STAT in
21586  [\\/]* | ?:[\\/]*)
21587  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21588  ;;
21589  *)
21590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21591for as_dir in $PATH
21592do
21593  IFS=$as_save_IFS
21594  test -z "$as_dir" && as_dir=.
21595    for ac_exec_ext in '' $ac_executable_extensions; do
21596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21597    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21599    break 2
21600  fi
21601done
21602  done
21603IFS=$as_save_IFS
21604
21605  ;;
21606esac
21607fi
21608STAT=$ac_cv_path_STAT
21609if test -n "$STAT"; then
21610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21611$as_echo "$STAT" >&6; }
21612else
21613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21614$as_echo "no" >&6; }
21615fi
21616
21617
21618  test -n "$STAT" && break
21619done
21620
21621  else
21622    # The variable is set, but is it from the command line or the environment?
21623
21624    # Try to remove the string !STAT! from our list.
21625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21627      # If it failed, the variable was not from the command line. Ignore it,
21628      # but warn the user (except for BASH, which is always set by the calling BASH).
21629      if test "xSTAT" != xBASH; then
21630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21631$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21632      fi
21633      # Try to locate tool using the code snippet
21634      for ac_prog in stat
21635do
21636  # Extract the first word of "$ac_prog", so it can be a program name with args.
21637set dummy $ac_prog; ac_word=$2
21638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21639$as_echo_n "checking for $ac_word... " >&6; }
21640if ${ac_cv_path_STAT+:} false; then :
21641  $as_echo_n "(cached) " >&6
21642else
21643  case $STAT in
21644  [\\/]* | ?:[\\/]*)
21645  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21646  ;;
21647  *)
21648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21649for as_dir in $PATH
21650do
21651  IFS=$as_save_IFS
21652  test -z "$as_dir" && as_dir=.
21653    for ac_exec_ext in '' $ac_executable_extensions; do
21654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21655    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21657    break 2
21658  fi
21659done
21660  done
21661IFS=$as_save_IFS
21662
21663  ;;
21664esac
21665fi
21666STAT=$ac_cv_path_STAT
21667if test -n "$STAT"; then
21668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21669$as_echo "$STAT" >&6; }
21670else
21671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21672$as_echo "no" >&6; }
21673fi
21674
21675
21676  test -n "$STAT" && break
21677done
21678
21679    else
21680      # If it succeeded, then it was overridden by the user. We will use it
21681      # for the tool.
21682
21683      # First remove it from the list of overridden variables, so we can test
21684      # for unknown variables in the end.
21685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21686
21687      # Check if we try to supply an empty value
21688      if test "x$STAT" = x; then
21689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21690$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21692$as_echo_n "checking for STAT... " >&6; }
21693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21694$as_echo "disabled" >&6; }
21695      else
21696        # Check if the provided tool contains a complete path.
21697        tool_specified="$STAT"
21698        tool_basename="${tool_specified##*/}"
21699        if test "x$tool_basename" = "x$tool_specified"; then
21700          # A command without a complete path is provided, search $PATH.
21701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21702$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21703          # Extract the first word of "$tool_basename", so it can be a program name with args.
21704set dummy $tool_basename; ac_word=$2
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21706$as_echo_n "checking for $ac_word... " >&6; }
21707if ${ac_cv_path_STAT+:} false; then :
21708  $as_echo_n "(cached) " >&6
21709else
21710  case $STAT in
21711  [\\/]* | ?:[\\/]*)
21712  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21713  ;;
21714  *)
21715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716for as_dir in $PATH
21717do
21718  IFS=$as_save_IFS
21719  test -z "$as_dir" && as_dir=.
21720    for ac_exec_ext in '' $ac_executable_extensions; do
21721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21722    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21724    break 2
21725  fi
21726done
21727  done
21728IFS=$as_save_IFS
21729
21730  ;;
21731esac
21732fi
21733STAT=$ac_cv_path_STAT
21734if test -n "$STAT"; then
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21736$as_echo "$STAT" >&6; }
21737else
21738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21739$as_echo "no" >&6; }
21740fi
21741
21742
21743          if test "x$STAT" = x; then
21744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21745          fi
21746        else
21747          # Otherwise we believe it is a complete path. Use it as it is.
21748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21749$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21751$as_echo_n "checking for STAT... " >&6; }
21752          if test ! -x "$tool_specified"; then
21753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21754$as_echo "not found" >&6; }
21755            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21756          fi
21757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21758$as_echo "$tool_specified" >&6; }
21759        fi
21760      fi
21761    fi
21762
21763  fi
21764
21765
21766
21767
21768  # Publish this variable in the help.
21769
21770
21771  if [ -z "${TIME+x}" ]; then
21772    # The variable is not set by user, try to locate tool using the code snippet
21773    for ac_prog in time
21774do
21775  # Extract the first word of "$ac_prog", so it can be a program name with args.
21776set dummy $ac_prog; ac_word=$2
21777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21778$as_echo_n "checking for $ac_word... " >&6; }
21779if ${ac_cv_path_TIME+:} false; then :
21780  $as_echo_n "(cached) " >&6
21781else
21782  case $TIME in
21783  [\\/]* | ?:[\\/]*)
21784  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21785  ;;
21786  *)
21787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21788for as_dir in $PATH
21789do
21790  IFS=$as_save_IFS
21791  test -z "$as_dir" && as_dir=.
21792    for ac_exec_ext in '' $ac_executable_extensions; do
21793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21794    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21796    break 2
21797  fi
21798done
21799  done
21800IFS=$as_save_IFS
21801
21802  ;;
21803esac
21804fi
21805TIME=$ac_cv_path_TIME
21806if test -n "$TIME"; then
21807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21808$as_echo "$TIME" >&6; }
21809else
21810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21811$as_echo "no" >&6; }
21812fi
21813
21814
21815  test -n "$TIME" && break
21816done
21817
21818  else
21819    # The variable is set, but is it from the command line or the environment?
21820
21821    # Try to remove the string !TIME! from our list.
21822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21824      # If it failed, the variable was not from the command line. Ignore it,
21825      # but warn the user (except for BASH, which is always set by the calling BASH).
21826      if test "xTIME" != xBASH; then
21827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21828$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21829      fi
21830      # Try to locate tool using the code snippet
21831      for ac_prog in time
21832do
21833  # Extract the first word of "$ac_prog", so it can be a program name with args.
21834set dummy $ac_prog; ac_word=$2
21835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21836$as_echo_n "checking for $ac_word... " >&6; }
21837if ${ac_cv_path_TIME+:} false; then :
21838  $as_echo_n "(cached) " >&6
21839else
21840  case $TIME in
21841  [\\/]* | ?:[\\/]*)
21842  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21843  ;;
21844  *)
21845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21846for as_dir in $PATH
21847do
21848  IFS=$as_save_IFS
21849  test -z "$as_dir" && as_dir=.
21850    for ac_exec_ext in '' $ac_executable_extensions; do
21851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21852    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21854    break 2
21855  fi
21856done
21857  done
21858IFS=$as_save_IFS
21859
21860  ;;
21861esac
21862fi
21863TIME=$ac_cv_path_TIME
21864if test -n "$TIME"; then
21865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21866$as_echo "$TIME" >&6; }
21867else
21868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21869$as_echo "no" >&6; }
21870fi
21871
21872
21873  test -n "$TIME" && break
21874done
21875
21876    else
21877      # If it succeeded, then it was overridden by the user. We will use it
21878      # for the tool.
21879
21880      # First remove it from the list of overridden variables, so we can test
21881      # for unknown variables in the end.
21882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21883
21884      # Check if we try to supply an empty value
21885      if test "x$TIME" = x; then
21886        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21887$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21889$as_echo_n "checking for TIME... " >&6; }
21890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21891$as_echo "disabled" >&6; }
21892      else
21893        # Check if the provided tool contains a complete path.
21894        tool_specified="$TIME"
21895        tool_basename="${tool_specified##*/}"
21896        if test "x$tool_basename" = "x$tool_specified"; then
21897          # A command without a complete path is provided, search $PATH.
21898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21899$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21900          # Extract the first word of "$tool_basename", so it can be a program name with args.
21901set dummy $tool_basename; ac_word=$2
21902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21903$as_echo_n "checking for $ac_word... " >&6; }
21904if ${ac_cv_path_TIME+:} false; then :
21905  $as_echo_n "(cached) " >&6
21906else
21907  case $TIME in
21908  [\\/]* | ?:[\\/]*)
21909  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21910  ;;
21911  *)
21912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21913for as_dir in $PATH
21914do
21915  IFS=$as_save_IFS
21916  test -z "$as_dir" && as_dir=.
21917    for ac_exec_ext in '' $ac_executable_extensions; do
21918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21919    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21921    break 2
21922  fi
21923done
21924  done
21925IFS=$as_save_IFS
21926
21927  ;;
21928esac
21929fi
21930TIME=$ac_cv_path_TIME
21931if test -n "$TIME"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21933$as_echo "$TIME" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940          if test "x$TIME" = x; then
21941            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21942          fi
21943        else
21944          # Otherwise we believe it is a complete path. Use it as it is.
21945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21946$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21947          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21948$as_echo_n "checking for TIME... " >&6; }
21949          if test ! -x "$tool_specified"; then
21950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21951$as_echo "not found" >&6; }
21952            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21953          fi
21954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21955$as_echo "$tool_specified" >&6; }
21956        fi
21957      fi
21958    fi
21959
21960  fi
21961
21962
21963
21964
21965  # Publish this variable in the help.
21966
21967
21968  if [ -z "${PATCH+x}" ]; then
21969    # The variable is not set by user, try to locate tool using the code snippet
21970    for ac_prog in gpatch patch
21971do
21972  # Extract the first word of "$ac_prog", so it can be a program name with args.
21973set dummy $ac_prog; ac_word=$2
21974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21975$as_echo_n "checking for $ac_word... " >&6; }
21976if ${ac_cv_path_PATCH+:} false; then :
21977  $as_echo_n "(cached) " >&6
21978else
21979  case $PATCH in
21980  [\\/]* | ?:[\\/]*)
21981  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21982  ;;
21983  *)
21984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21985for as_dir in $PATH
21986do
21987  IFS=$as_save_IFS
21988  test -z "$as_dir" && as_dir=.
21989    for ac_exec_ext in '' $ac_executable_extensions; do
21990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21991    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21993    break 2
21994  fi
21995done
21996  done
21997IFS=$as_save_IFS
21998
21999  ;;
22000esac
22001fi
22002PATCH=$ac_cv_path_PATCH
22003if test -n "$PATCH"; then
22004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22005$as_echo "$PATCH" >&6; }
22006else
22007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22008$as_echo "no" >&6; }
22009fi
22010
22011
22012  test -n "$PATCH" && break
22013done
22014
22015  else
22016    # The variable is set, but is it from the command line or the environment?
22017
22018    # Try to remove the string !PATCH! from our list.
22019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22021      # If it failed, the variable was not from the command line. Ignore it,
22022      # but warn the user (except for BASH, which is always set by the calling BASH).
22023      if test "xPATCH" != xBASH; then
22024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22025$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22026      fi
22027      # Try to locate tool using the code snippet
22028      for ac_prog in gpatch patch
22029do
22030  # Extract the first word of "$ac_prog", so it can be a program name with args.
22031set dummy $ac_prog; ac_word=$2
22032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22033$as_echo_n "checking for $ac_word... " >&6; }
22034if ${ac_cv_path_PATCH+:} false; then :
22035  $as_echo_n "(cached) " >&6
22036else
22037  case $PATCH in
22038  [\\/]* | ?:[\\/]*)
22039  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22040  ;;
22041  *)
22042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22043for as_dir in $PATH
22044do
22045  IFS=$as_save_IFS
22046  test -z "$as_dir" && as_dir=.
22047    for ac_exec_ext in '' $ac_executable_extensions; do
22048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22049    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22051    break 2
22052  fi
22053done
22054  done
22055IFS=$as_save_IFS
22056
22057  ;;
22058esac
22059fi
22060PATCH=$ac_cv_path_PATCH
22061if test -n "$PATCH"; then
22062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22063$as_echo "$PATCH" >&6; }
22064else
22065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22066$as_echo "no" >&6; }
22067fi
22068
22069
22070  test -n "$PATCH" && break
22071done
22072
22073    else
22074      # If it succeeded, then it was overridden by the user. We will use it
22075      # for the tool.
22076
22077      # First remove it from the list of overridden variables, so we can test
22078      # for unknown variables in the end.
22079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22080
22081      # Check if we try to supply an empty value
22082      if test "x$PATCH" = x; then
22083        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22084$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22086$as_echo_n "checking for PATCH... " >&6; }
22087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22088$as_echo "disabled" >&6; }
22089      else
22090        # Check if the provided tool contains a complete path.
22091        tool_specified="$PATCH"
22092        tool_basename="${tool_specified##*/}"
22093        if test "x$tool_basename" = "x$tool_specified"; then
22094          # A command without a complete path is provided, search $PATH.
22095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22096$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22097          # Extract the first word of "$tool_basename", so it can be a program name with args.
22098set dummy $tool_basename; ac_word=$2
22099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22100$as_echo_n "checking for $ac_word... " >&6; }
22101if ${ac_cv_path_PATCH+:} false; then :
22102  $as_echo_n "(cached) " >&6
22103else
22104  case $PATCH in
22105  [\\/]* | ?:[\\/]*)
22106  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22107  ;;
22108  *)
22109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22110for as_dir in $PATH
22111do
22112  IFS=$as_save_IFS
22113  test -z "$as_dir" && as_dir=.
22114    for ac_exec_ext in '' $ac_executable_extensions; do
22115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22116    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22118    break 2
22119  fi
22120done
22121  done
22122IFS=$as_save_IFS
22123
22124  ;;
22125esac
22126fi
22127PATCH=$ac_cv_path_PATCH
22128if test -n "$PATCH"; then
22129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22130$as_echo "$PATCH" >&6; }
22131else
22132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22133$as_echo "no" >&6; }
22134fi
22135
22136
22137          if test "x$PATCH" = x; then
22138            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22139          fi
22140        else
22141          # Otherwise we believe it is a complete path. Use it as it is.
22142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22143$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22145$as_echo_n "checking for PATCH... " >&6; }
22146          if test ! -x "$tool_specified"; then
22147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22148$as_echo "not found" >&6; }
22149            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22150          fi
22151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22152$as_echo "$tool_specified" >&6; }
22153        fi
22154      fi
22155    fi
22156
22157  fi
22158
22159
22160  # Check if it's GNU time
22161  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22162  if test "x$IS_GNU_TIME" != x; then
22163    IS_GNU_TIME=yes
22164  else
22165    IS_GNU_TIME=no
22166  fi
22167
22168
22169  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22170
22171
22172
22173  # Publish this variable in the help.
22174
22175
22176  if [ -z "${DSYMUTIL+x}" ]; then
22177    # The variable is not set by user, try to locate tool using the code snippet
22178    for ac_prog in dsymutil
22179do
22180  # Extract the first word of "$ac_prog", so it can be a program name with args.
22181set dummy $ac_prog; ac_word=$2
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22183$as_echo_n "checking for $ac_word... " >&6; }
22184if ${ac_cv_path_DSYMUTIL+:} false; then :
22185  $as_echo_n "(cached) " >&6
22186else
22187  case $DSYMUTIL in
22188  [\\/]* | ?:[\\/]*)
22189  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22190  ;;
22191  *)
22192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22193for as_dir in $PATH
22194do
22195  IFS=$as_save_IFS
22196  test -z "$as_dir" && as_dir=.
22197    for ac_exec_ext in '' $ac_executable_extensions; do
22198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22199    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22201    break 2
22202  fi
22203done
22204  done
22205IFS=$as_save_IFS
22206
22207  ;;
22208esac
22209fi
22210DSYMUTIL=$ac_cv_path_DSYMUTIL
22211if test -n "$DSYMUTIL"; then
22212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22213$as_echo "$DSYMUTIL" >&6; }
22214else
22215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22216$as_echo "no" >&6; }
22217fi
22218
22219
22220  test -n "$DSYMUTIL" && break
22221done
22222
22223  else
22224    # The variable is set, but is it from the command line or the environment?
22225
22226    # Try to remove the string !DSYMUTIL! from our list.
22227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22229      # If it failed, the variable was not from the command line. Ignore it,
22230      # but warn the user (except for BASH, which is always set by the calling BASH).
22231      if test "xDSYMUTIL" != xBASH; then
22232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22233$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22234      fi
22235      # Try to locate tool using the code snippet
22236      for ac_prog in dsymutil
22237do
22238  # Extract the first word of "$ac_prog", so it can be a program name with args.
22239set dummy $ac_prog; ac_word=$2
22240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22241$as_echo_n "checking for $ac_word... " >&6; }
22242if ${ac_cv_path_DSYMUTIL+:} false; then :
22243  $as_echo_n "(cached) " >&6
22244else
22245  case $DSYMUTIL in
22246  [\\/]* | ?:[\\/]*)
22247  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22248  ;;
22249  *)
22250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22251for as_dir in $PATH
22252do
22253  IFS=$as_save_IFS
22254  test -z "$as_dir" && as_dir=.
22255    for ac_exec_ext in '' $ac_executable_extensions; do
22256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22257    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22259    break 2
22260  fi
22261done
22262  done
22263IFS=$as_save_IFS
22264
22265  ;;
22266esac
22267fi
22268DSYMUTIL=$ac_cv_path_DSYMUTIL
22269if test -n "$DSYMUTIL"; then
22270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22271$as_echo "$DSYMUTIL" >&6; }
22272else
22273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22274$as_echo "no" >&6; }
22275fi
22276
22277
22278  test -n "$DSYMUTIL" && break
22279done
22280
22281    else
22282      # If it succeeded, then it was overridden by the user. We will use it
22283      # for the tool.
22284
22285      # First remove it from the list of overridden variables, so we can test
22286      # for unknown variables in the end.
22287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22288
22289      # Check if we try to supply an empty value
22290      if test "x$DSYMUTIL" = x; then
22291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22292$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22294$as_echo_n "checking for DSYMUTIL... " >&6; }
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22296$as_echo "disabled" >&6; }
22297      else
22298        # Check if the provided tool contains a complete path.
22299        tool_specified="$DSYMUTIL"
22300        tool_basename="${tool_specified##*/}"
22301        if test "x$tool_basename" = "x$tool_specified"; then
22302          # A command without a complete path is provided, search $PATH.
22303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22304$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22305          # Extract the first word of "$tool_basename", so it can be a program name with args.
22306set dummy $tool_basename; ac_word=$2
22307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22308$as_echo_n "checking for $ac_word... " >&6; }
22309if ${ac_cv_path_DSYMUTIL+:} false; then :
22310  $as_echo_n "(cached) " >&6
22311else
22312  case $DSYMUTIL in
22313  [\\/]* | ?:[\\/]*)
22314  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22315  ;;
22316  *)
22317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22318for as_dir in $PATH
22319do
22320  IFS=$as_save_IFS
22321  test -z "$as_dir" && as_dir=.
22322    for ac_exec_ext in '' $ac_executable_extensions; do
22323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22324    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22326    break 2
22327  fi
22328done
22329  done
22330IFS=$as_save_IFS
22331
22332  ;;
22333esac
22334fi
22335DSYMUTIL=$ac_cv_path_DSYMUTIL
22336if test -n "$DSYMUTIL"; then
22337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22338$as_echo "$DSYMUTIL" >&6; }
22339else
22340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22341$as_echo "no" >&6; }
22342fi
22343
22344
22345          if test "x$DSYMUTIL" = x; then
22346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22347          fi
22348        else
22349          # Otherwise we believe it is a complete path. Use it as it is.
22350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22351$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22353$as_echo_n "checking for DSYMUTIL... " >&6; }
22354          if test ! -x "$tool_specified"; then
22355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22356$as_echo "not found" >&6; }
22357            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22358          fi
22359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22360$as_echo "$tool_specified" >&6; }
22361        fi
22362      fi
22363    fi
22364
22365  fi
22366
22367
22368
22369  if test "x$DSYMUTIL" = x; then
22370    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22371  fi
22372
22373
22374
22375
22376
22377  # Publish this variable in the help.
22378
22379
22380  if [ -z "${XATTR+x}" ]; then
22381    # The variable is not set by user, try to locate tool using the code snippet
22382    for ac_prog in xattr
22383do
22384  # Extract the first word of "$ac_prog", so it can be a program name with args.
22385set dummy $ac_prog; ac_word=$2
22386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22387$as_echo_n "checking for $ac_word... " >&6; }
22388if ${ac_cv_path_XATTR+:} false; then :
22389  $as_echo_n "(cached) " >&6
22390else
22391  case $XATTR in
22392  [\\/]* | ?:[\\/]*)
22393  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22394  ;;
22395  *)
22396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22397for as_dir in $PATH
22398do
22399  IFS=$as_save_IFS
22400  test -z "$as_dir" && as_dir=.
22401    for ac_exec_ext in '' $ac_executable_extensions; do
22402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22403    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22405    break 2
22406  fi
22407done
22408  done
22409IFS=$as_save_IFS
22410
22411  ;;
22412esac
22413fi
22414XATTR=$ac_cv_path_XATTR
22415if test -n "$XATTR"; then
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22417$as_echo "$XATTR" >&6; }
22418else
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22420$as_echo "no" >&6; }
22421fi
22422
22423
22424  test -n "$XATTR" && break
22425done
22426
22427  else
22428    # The variable is set, but is it from the command line or the environment?
22429
22430    # Try to remove the string !XATTR! from our list.
22431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22433      # If it failed, the variable was not from the command line. Ignore it,
22434      # but warn the user (except for BASH, which is always set by the calling BASH).
22435      if test "xXATTR" != xBASH; then
22436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22437$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22438      fi
22439      # Try to locate tool using the code snippet
22440      for ac_prog in xattr
22441do
22442  # Extract the first word of "$ac_prog", so it can be a program name with args.
22443set dummy $ac_prog; ac_word=$2
22444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22445$as_echo_n "checking for $ac_word... " >&6; }
22446if ${ac_cv_path_XATTR+:} false; then :
22447  $as_echo_n "(cached) " >&6
22448else
22449  case $XATTR in
22450  [\\/]* | ?:[\\/]*)
22451  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22452  ;;
22453  *)
22454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22455for as_dir in $PATH
22456do
22457  IFS=$as_save_IFS
22458  test -z "$as_dir" && as_dir=.
22459    for ac_exec_ext in '' $ac_executable_extensions; do
22460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22461    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22463    break 2
22464  fi
22465done
22466  done
22467IFS=$as_save_IFS
22468
22469  ;;
22470esac
22471fi
22472XATTR=$ac_cv_path_XATTR
22473if test -n "$XATTR"; then
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22475$as_echo "$XATTR" >&6; }
22476else
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478$as_echo "no" >&6; }
22479fi
22480
22481
22482  test -n "$XATTR" && break
22483done
22484
22485    else
22486      # If it succeeded, then it was overridden by the user. We will use it
22487      # for the tool.
22488
22489      # First remove it from the list of overridden variables, so we can test
22490      # for unknown variables in the end.
22491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22492
22493      # Check if we try to supply an empty value
22494      if test "x$XATTR" = x; then
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22496$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22498$as_echo_n "checking for XATTR... " >&6; }
22499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22500$as_echo "disabled" >&6; }
22501      else
22502        # Check if the provided tool contains a complete path.
22503        tool_specified="$XATTR"
22504        tool_basename="${tool_specified##*/}"
22505        if test "x$tool_basename" = "x$tool_specified"; then
22506          # A command without a complete path is provided, search $PATH.
22507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22508$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22509          # Extract the first word of "$tool_basename", so it can be a program name with args.
22510set dummy $tool_basename; ac_word=$2
22511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22512$as_echo_n "checking for $ac_word... " >&6; }
22513if ${ac_cv_path_XATTR+:} false; then :
22514  $as_echo_n "(cached) " >&6
22515else
22516  case $XATTR in
22517  [\\/]* | ?:[\\/]*)
22518  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22519  ;;
22520  *)
22521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22522for as_dir in $PATH
22523do
22524  IFS=$as_save_IFS
22525  test -z "$as_dir" && as_dir=.
22526    for ac_exec_ext in '' $ac_executable_extensions; do
22527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22528    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22530    break 2
22531  fi
22532done
22533  done
22534IFS=$as_save_IFS
22535
22536  ;;
22537esac
22538fi
22539XATTR=$ac_cv_path_XATTR
22540if test -n "$XATTR"; then
22541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22542$as_echo "$XATTR" >&6; }
22543else
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22545$as_echo "no" >&6; }
22546fi
22547
22548
22549          if test "x$XATTR" = x; then
22550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22551          fi
22552        else
22553          # Otherwise we believe it is a complete path. Use it as it is.
22554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22555$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22557$as_echo_n "checking for XATTR... " >&6; }
22558          if test ! -x "$tool_specified"; then
22559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22560$as_echo "not found" >&6; }
22561            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22562          fi
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22564$as_echo "$tool_specified" >&6; }
22565        fi
22566      fi
22567    fi
22568
22569  fi
22570
22571
22572
22573  if test "x$XATTR" = x; then
22574    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22575  fi
22576
22577
22578
22579
22580  # Publish this variable in the help.
22581
22582
22583  if [ -z "${CODESIGN+x}" ]; then
22584    # The variable is not set by user, try to locate tool using the code snippet
22585    for ac_prog in codesign
22586do
22587  # Extract the first word of "$ac_prog", so it can be a program name with args.
22588set dummy $ac_prog; ac_word=$2
22589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22590$as_echo_n "checking for $ac_word... " >&6; }
22591if ${ac_cv_path_CODESIGN+:} false; then :
22592  $as_echo_n "(cached) " >&6
22593else
22594  case $CODESIGN in
22595  [\\/]* | ?:[\\/]*)
22596  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22597  ;;
22598  *)
22599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22600for as_dir in $PATH
22601do
22602  IFS=$as_save_IFS
22603  test -z "$as_dir" && as_dir=.
22604    for ac_exec_ext in '' $ac_executable_extensions; do
22605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22606    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22608    break 2
22609  fi
22610done
22611  done
22612IFS=$as_save_IFS
22613
22614  ;;
22615esac
22616fi
22617CODESIGN=$ac_cv_path_CODESIGN
22618if test -n "$CODESIGN"; then
22619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22620$as_echo "$CODESIGN" >&6; }
22621else
22622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22623$as_echo "no" >&6; }
22624fi
22625
22626
22627  test -n "$CODESIGN" && break
22628done
22629
22630  else
22631    # The variable is set, but is it from the command line or the environment?
22632
22633    # Try to remove the string !CODESIGN! from our list.
22634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22636      # If it failed, the variable was not from the command line. Ignore it,
22637      # but warn the user (except for BASH, which is always set by the calling BASH).
22638      if test "xCODESIGN" != xBASH; then
22639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22640$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22641      fi
22642      # Try to locate tool using the code snippet
22643      for ac_prog in codesign
22644do
22645  # Extract the first word of "$ac_prog", so it can be a program name with args.
22646set dummy $ac_prog; ac_word=$2
22647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22648$as_echo_n "checking for $ac_word... " >&6; }
22649if ${ac_cv_path_CODESIGN+:} false; then :
22650  $as_echo_n "(cached) " >&6
22651else
22652  case $CODESIGN in
22653  [\\/]* | ?:[\\/]*)
22654  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22655  ;;
22656  *)
22657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22658for as_dir in $PATH
22659do
22660  IFS=$as_save_IFS
22661  test -z "$as_dir" && as_dir=.
22662    for ac_exec_ext in '' $ac_executable_extensions; do
22663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22664    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22666    break 2
22667  fi
22668done
22669  done
22670IFS=$as_save_IFS
22671
22672  ;;
22673esac
22674fi
22675CODESIGN=$ac_cv_path_CODESIGN
22676if test -n "$CODESIGN"; then
22677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22678$as_echo "$CODESIGN" >&6; }
22679else
22680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22681$as_echo "no" >&6; }
22682fi
22683
22684
22685  test -n "$CODESIGN" && break
22686done
22687
22688    else
22689      # If it succeeded, then it was overridden by the user. We will use it
22690      # for the tool.
22691
22692      # First remove it from the list of overridden variables, so we can test
22693      # for unknown variables in the end.
22694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22695
22696      # Check if we try to supply an empty value
22697      if test "x$CODESIGN" = x; then
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22699$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22701$as_echo_n "checking for CODESIGN... " >&6; }
22702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22703$as_echo "disabled" >&6; }
22704      else
22705        # Check if the provided tool contains a complete path.
22706        tool_specified="$CODESIGN"
22707        tool_basename="${tool_specified##*/}"
22708        if test "x$tool_basename" = "x$tool_specified"; then
22709          # A command without a complete path is provided, search $PATH.
22710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22711$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22712          # Extract the first word of "$tool_basename", so it can be a program name with args.
22713set dummy $tool_basename; ac_word=$2
22714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22715$as_echo_n "checking for $ac_word... " >&6; }
22716if ${ac_cv_path_CODESIGN+:} false; then :
22717  $as_echo_n "(cached) " >&6
22718else
22719  case $CODESIGN in
22720  [\\/]* | ?:[\\/]*)
22721  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22722  ;;
22723  *)
22724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22725for as_dir in $PATH
22726do
22727  IFS=$as_save_IFS
22728  test -z "$as_dir" && as_dir=.
22729    for ac_exec_ext in '' $ac_executable_extensions; do
22730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22731    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22733    break 2
22734  fi
22735done
22736  done
22737IFS=$as_save_IFS
22738
22739  ;;
22740esac
22741fi
22742CODESIGN=$ac_cv_path_CODESIGN
22743if test -n "$CODESIGN"; then
22744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22745$as_echo "$CODESIGN" >&6; }
22746else
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22748$as_echo "no" >&6; }
22749fi
22750
22751
22752          if test "x$CODESIGN" = x; then
22753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22754          fi
22755        else
22756          # Otherwise we believe it is a complete path. Use it as it is.
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22758$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22760$as_echo_n "checking for CODESIGN... " >&6; }
22761          if test ! -x "$tool_specified"; then
22762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22763$as_echo "not found" >&6; }
22764            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22765          fi
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22767$as_echo "$tool_specified" >&6; }
22768        fi
22769      fi
22770    fi
22771
22772  fi
22773
22774
22775    if test "x$CODESIGN" != "x"; then
22776      # Verify that the openjdk_codesign certificate is present
22777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22778$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22779      rm -f codesign-testfile
22780      touch codesign-testfile
22781      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22782      rm -f codesign-testfile
22783      if test "x$CODESIGN" = x; then
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22785$as_echo "no" >&6; }
22786      else
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22788$as_echo "yes" >&6; }
22789      fi
22790    fi
22791
22792
22793
22794  # Publish this variable in the help.
22795
22796
22797  if [ -z "${SETFILE+x}" ]; then
22798    # The variable is not set by user, try to locate tool using the code snippet
22799    for ac_prog in SetFile
22800do
22801  # Extract the first word of "$ac_prog", so it can be a program name with args.
22802set dummy $ac_prog; ac_word=$2
22803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22804$as_echo_n "checking for $ac_word... " >&6; }
22805if ${ac_cv_path_SETFILE+:} false; then :
22806  $as_echo_n "(cached) " >&6
22807else
22808  case $SETFILE in
22809  [\\/]* | ?:[\\/]*)
22810  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22811  ;;
22812  *)
22813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22814for as_dir in $PATH
22815do
22816  IFS=$as_save_IFS
22817  test -z "$as_dir" && as_dir=.
22818    for ac_exec_ext in '' $ac_executable_extensions; do
22819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22820    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22822    break 2
22823  fi
22824done
22825  done
22826IFS=$as_save_IFS
22827
22828  ;;
22829esac
22830fi
22831SETFILE=$ac_cv_path_SETFILE
22832if test -n "$SETFILE"; then
22833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22834$as_echo "$SETFILE" >&6; }
22835else
22836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22837$as_echo "no" >&6; }
22838fi
22839
22840
22841  test -n "$SETFILE" && break
22842done
22843
22844  else
22845    # The variable is set, but is it from the command line or the environment?
22846
22847    # Try to remove the string !SETFILE! from our list.
22848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22850      # If it failed, the variable was not from the command line. Ignore it,
22851      # but warn the user (except for BASH, which is always set by the calling BASH).
22852      if test "xSETFILE" != xBASH; then
22853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22854$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22855      fi
22856      # Try to locate tool using the code snippet
22857      for ac_prog in SetFile
22858do
22859  # Extract the first word of "$ac_prog", so it can be a program name with args.
22860set dummy $ac_prog; ac_word=$2
22861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22862$as_echo_n "checking for $ac_word... " >&6; }
22863if ${ac_cv_path_SETFILE+:} false; then :
22864  $as_echo_n "(cached) " >&6
22865else
22866  case $SETFILE in
22867  [\\/]* | ?:[\\/]*)
22868  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22869  ;;
22870  *)
22871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22872for as_dir in $PATH
22873do
22874  IFS=$as_save_IFS
22875  test -z "$as_dir" && as_dir=.
22876    for ac_exec_ext in '' $ac_executable_extensions; do
22877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22878    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22880    break 2
22881  fi
22882done
22883  done
22884IFS=$as_save_IFS
22885
22886  ;;
22887esac
22888fi
22889SETFILE=$ac_cv_path_SETFILE
22890if test -n "$SETFILE"; then
22891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22892$as_echo "$SETFILE" >&6; }
22893else
22894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22895$as_echo "no" >&6; }
22896fi
22897
22898
22899  test -n "$SETFILE" && break
22900done
22901
22902    else
22903      # If it succeeded, then it was overridden by the user. We will use it
22904      # for the tool.
22905
22906      # First remove it from the list of overridden variables, so we can test
22907      # for unknown variables in the end.
22908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22909
22910      # Check if we try to supply an empty value
22911      if test "x$SETFILE" = x; then
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22913$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22915$as_echo_n "checking for SETFILE... " >&6; }
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22917$as_echo "disabled" >&6; }
22918      else
22919        # Check if the provided tool contains a complete path.
22920        tool_specified="$SETFILE"
22921        tool_basename="${tool_specified##*/}"
22922        if test "x$tool_basename" = "x$tool_specified"; then
22923          # A command without a complete path is provided, search $PATH.
22924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22925$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22926          # Extract the first word of "$tool_basename", so it can be a program name with args.
22927set dummy $tool_basename; ac_word=$2
22928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22929$as_echo_n "checking for $ac_word... " >&6; }
22930if ${ac_cv_path_SETFILE+:} false; then :
22931  $as_echo_n "(cached) " >&6
22932else
22933  case $SETFILE in
22934  [\\/]* | ?:[\\/]*)
22935  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22936  ;;
22937  *)
22938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22939for as_dir in $PATH
22940do
22941  IFS=$as_save_IFS
22942  test -z "$as_dir" && as_dir=.
22943    for ac_exec_ext in '' $ac_executable_extensions; do
22944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22945    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22947    break 2
22948  fi
22949done
22950  done
22951IFS=$as_save_IFS
22952
22953  ;;
22954esac
22955fi
22956SETFILE=$ac_cv_path_SETFILE
22957if test -n "$SETFILE"; then
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22959$as_echo "$SETFILE" >&6; }
22960else
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22962$as_echo "no" >&6; }
22963fi
22964
22965
22966          if test "x$SETFILE" = x; then
22967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22968          fi
22969        else
22970          # Otherwise we believe it is a complete path. Use it as it is.
22971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22972$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22974$as_echo_n "checking for SETFILE... " >&6; }
22975          if test ! -x "$tool_specified"; then
22976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22977$as_echo "not found" >&6; }
22978            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22979          fi
22980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22981$as_echo "$tool_specified" >&6; }
22982        fi
22983      fi
22984    fi
22985
22986  fi
22987
22988
22989
22990  if test "x$SETFILE" = x; then
22991    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22992  fi
22993
22994
22995  fi
22996
22997
22998  # Test if bash supports pipefail.
22999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23000$as_echo_n "checking if bash supports pipefail... " >&6; }
23001  if ${BASH} -c 'set -o pipefail'; then
23002    BASH_ARGS="$BASH_ARGS -o pipefail"
23003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23004$as_echo "yes" >&6; }
23005  else
23006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23007$as_echo "no" >&6; }
23008  fi
23009
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23011$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23012  if ${BASH} -e -c 'true'; then
23013    BASH_ARGS="$BASH_ARGS -e"
23014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23015$as_echo "yes" >&6; }
23016  else
23017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019  fi
23020
23021
23022
23023
23024# Check if pkg-config is available.
23025
23026
23027if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23028	if test -n "$ac_tool_prefix"; then
23029  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23030set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23032$as_echo_n "checking for $ac_word... " >&6; }
23033if ${ac_cv_path_PKG_CONFIG+:} false; then :
23034  $as_echo_n "(cached) " >&6
23035else
23036  case $PKG_CONFIG in
23037  [\\/]* | ?:[\\/]*)
23038  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23039  ;;
23040  *)
23041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23042for as_dir in $PATH
23043do
23044  IFS=$as_save_IFS
23045  test -z "$as_dir" && as_dir=.
23046    for ac_exec_ext in '' $ac_executable_extensions; do
23047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23048    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23050    break 2
23051  fi
23052done
23053  done
23054IFS=$as_save_IFS
23055
23056  ;;
23057esac
23058fi
23059PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23060if test -n "$PKG_CONFIG"; then
23061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23062$as_echo "$PKG_CONFIG" >&6; }
23063else
23064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23065$as_echo "no" >&6; }
23066fi
23067
23068
23069fi
23070if test -z "$ac_cv_path_PKG_CONFIG"; then
23071  ac_pt_PKG_CONFIG=$PKG_CONFIG
23072  # Extract the first word of "pkg-config", so it can be a program name with args.
23073set dummy pkg-config; ac_word=$2
23074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23075$as_echo_n "checking for $ac_word... " >&6; }
23076if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23077  $as_echo_n "(cached) " >&6
23078else
23079  case $ac_pt_PKG_CONFIG in
23080  [\\/]* | ?:[\\/]*)
23081  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23082  ;;
23083  *)
23084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23085for as_dir in $PATH
23086do
23087  IFS=$as_save_IFS
23088  test -z "$as_dir" && as_dir=.
23089    for ac_exec_ext in '' $ac_executable_extensions; do
23090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23091    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23093    break 2
23094  fi
23095done
23096  done
23097IFS=$as_save_IFS
23098
23099  ;;
23100esac
23101fi
23102ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23103if test -n "$ac_pt_PKG_CONFIG"; then
23104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23105$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23106else
23107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23108$as_echo "no" >&6; }
23109fi
23110
23111  if test "x$ac_pt_PKG_CONFIG" = x; then
23112    PKG_CONFIG=""
23113  else
23114    case $cross_compiling:$ac_tool_warned in
23115yes:)
23116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23118ac_tool_warned=yes ;;
23119esac
23120    PKG_CONFIG=$ac_pt_PKG_CONFIG
23121  fi
23122else
23123  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23124fi
23125
23126fi
23127if test -n "$PKG_CONFIG"; then
23128	_pkg_min_version=0.9.0
23129	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23130$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23131	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23132		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23133$as_echo "yes" >&6; }
23134	else
23135		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23136$as_echo "no" >&6; }
23137		PKG_CONFIG=""
23138	fi
23139
23140fi
23141
23142# After basic tools have been setup, we can check build os specific details.
23143
23144  ###############################################################################
23145
23146  # Note that this is the build platform OS version!
23147
23148  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23149  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23150  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23151  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23152
23153
23154
23155
23156
23157# Misc basic settings
23158
23159
23160# Check whether --with-default-make-target was given.
23161if test "${with_default_make_target+set}" = set; then :
23162  withval=$with_default_make_target;
23163fi
23164
23165  if test "x$with_default_make_target" = "x" \
23166      || test "x$with_default_make_target" = "xyes"; then
23167    DEFAULT_MAKE_TARGET="exploded-image"
23168  elif test "x$with_default_make_target" = "xno"; then
23169    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23170  else
23171    DEFAULT_MAKE_TARGET="$with_default_make_target"
23172  fi
23173
23174
23175
23176
23177###############################################################################
23178#
23179# Determine OpenJDK variants, options and version numbers.
23180#
23181###############################################################################
23182
23183# We need build & target for this.
23184
23185  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23186  # We always build headless support.
23187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23188$as_echo_n "checking headful support... " >&6; }
23189  # Check whether --enable-headful was given.
23190if test "${enable_headful+set}" = set; then :
23191  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23192else
23193  SUPPORT_HEADFUL=yes
23194fi
23195
23196
23197  SUPPORT_HEADLESS=yes
23198  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23199
23200  if test "x$SUPPORT_HEADFUL" = xyes; then
23201    # We are building both headful and headless.
23202    headful_msg="include support for both headful and headless"
23203  fi
23204
23205  if test "x$SUPPORT_HEADFUL" = xno; then
23206    # Thus we are building headless only.
23207    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23208    headful_msg="headless only"
23209  fi
23210
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23212$as_echo "$headful_msg" >&6; }
23213
23214
23215
23216
23217
23218  # Choose cacerts source file
23219
23220# Check whether --with-cacerts-file was given.
23221if test "${with_cacerts_file+set}" = set; then :
23222  withval=$with_cacerts_file;
23223fi
23224
23225  if test "x$with_cacerts_file" != x; then
23226    CACERTS_FILE=$with_cacerts_file
23227  fi
23228
23229
23230  # Enable or disable unlimited crypto
23231  # Check whether --enable-unlimited-crypto was given.
23232if test "${enable_unlimited_crypto+set}" = set; then :
23233  enableval=$enable_unlimited_crypto;
23234else
23235  enable_unlimited_crypto=no
23236fi
23237
23238  if test "x$enable_unlimited_crypto" = "xyes"; then
23239    UNLIMITED_CRYPTO=true
23240  else
23241    UNLIMITED_CRYPTO=false
23242  fi
23243
23244
23245  # Compress jars
23246  COMPRESS_JARS=false
23247
23248
23249
23250  # Setup default copyright year. Mostly overridden when building close to a new year.
23251
23252# Check whether --with-copyright-year was given.
23253if test "${with_copyright_year+set}" = set; then :
23254  withval=$with_copyright_year;
23255fi
23256
23257  if test "x$with_copyright_year" = xyes; then
23258    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23259  elif test "x$with_copyright_year" != x; then
23260    COPYRIGHT_YEAR="$with_copyright_year"
23261  else
23262    COPYRIGHT_YEAR=`date +'%Y'`
23263  fi
23264
23265
23266
23267  # Control wether Hotspot runs Queens test after build.
23268  # Check whether --enable-hotspot-test-in-build was given.
23269if test "${enable_hotspot_test_in_build+set}" = set; then :
23270  enableval=$enable_hotspot_test_in_build;
23271else
23272  enable_hotspot_test_in_build=no
23273fi
23274
23275  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23276    TEST_IN_BUILD=true
23277  else
23278    TEST_IN_BUILD=false
23279  fi
23280
23281
23282
23283  # Warn user that old version arguments are deprecated.
23284
23285
23286# Check whether --with-milestone was given.
23287if test "${with_milestone+set}" = set; then :
23288  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23289$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23290fi
23291
23292
23293
23294
23295# Check whether --with-update-version was given.
23296if test "${with_update_version+set}" = set; then :
23297  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23298$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23299fi
23300
23301
23302
23303
23304# Check whether --with-user-release-suffix was given.
23305if test "${with_user_release_suffix+set}" = set; then :
23306  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
23307$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23308fi
23309
23310
23311
23312
23313# Check whether --with-build-number was given.
23314if test "${with_build_number+set}" = set; then :
23315  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23316$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23317fi
23318
23319
23320
23321  # Source the version numbers file
23322  . $AUTOCONF_DIR/version-numbers
23323
23324  # Some non-version number information is set in that file
23325
23326
23327
23328
23329
23330
23331
23332
23333  # Override version from arguments
23334
23335  # If --with-version-string is set, process it first. It is possible to
23336  # override parts with more specific flags, since these are processed later.
23337
23338# Check whether --with-version-string was given.
23339if test "${with_version_string+set}" = set; then :
23340  withval=$with_version_string;
23341fi
23342
23343  if test "x$with_version_string" = xyes; then
23344    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23345  elif test "x$with_version_string" != x; then
23346    # Additional [] needed to keep m4 from mangling shell constructs.
23347    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23348      VERSION_MAJOR=${BASH_REMATCH[1]}
23349      VERSION_MINOR=${BASH_REMATCH[3]}
23350      VERSION_SECURITY=${BASH_REMATCH[5]}
23351      VERSION_PATCH=${BASH_REMATCH[7]}
23352      VERSION_PRE=${BASH_REMATCH[9]}
23353      version_plus_separator=${BASH_REMATCH[11]}
23354      VERSION_BUILD=${BASH_REMATCH[12]}
23355      VERSION_OPT=${BASH_REMATCH[14]}
23356      # Unspecified numerical fields are interpreted as 0.
23357      if test "x$VERSION_MINOR" = x; then
23358        VERSION_MINOR=0
23359      fi
23360      if test "x$VERSION_SECURITY" = x; then
23361        VERSION_SECURITY=0
23362      fi
23363      if test "x$VERSION_PATCH" = x; then
23364        VERSION_PATCH=0
23365      fi
23366      if test "x$version_plus_separator" != x \
23367          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23368        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23369      fi
23370      # Stop the version part process from setting default values.
23371      # We still allow them to explicitely override though.
23372      NO_DEFAULT_VERSION_PARTS=true
23373    else
23374      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23375    fi
23376  fi
23377
23378
23379# Check whether --with-version-pre was given.
23380if test "${with_version_pre+set}" = set; then :
23381  withval=$with_version_pre; with_version_pre_present=true
23382else
23383  with_version_pre_present=false
23384fi
23385
23386
23387  if test "x$with_version_pre_present" = xtrue; then
23388    if test "x$with_version_pre" = xyes; then
23389      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23390    elif test "x$with_version_pre" = xno; then
23391      # Interpret --without-* as empty string instead of the literal "no"
23392      VERSION_PRE=
23393    else
23394      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23395       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23396      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23398$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23399      fi
23400    fi
23401  else
23402    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23403      # Default is to use "internal" as pre
23404      VERSION_PRE="internal"
23405    fi
23406  fi
23407
23408
23409# Check whether --with-version-opt was given.
23410if test "${with_version_opt+set}" = set; then :
23411  withval=$with_version_opt; with_version_opt_present=true
23412else
23413  with_version_opt_present=false
23414fi
23415
23416
23417  if test "x$with_version_opt_present" = xtrue; then
23418    if test "x$with_version_opt" = xyes; then
23419      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23420    elif test "x$with_version_opt" = xno; then
23421      # Interpret --without-* as empty string instead of the literal "no"
23422      VERSION_OPT=
23423    else
23424      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23425       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23426      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23428$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23429      fi
23430    fi
23431  else
23432    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23433      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23434      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23435      # Outer [ ] to quote m4.
23436       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23437       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23438      VERSION_OPT="$timestamp.$username.$basedirname"
23439    fi
23440  fi
23441
23442
23443# Check whether --with-version-build was given.
23444if test "${with_version_build+set}" = set; then :
23445  withval=$with_version_build; with_version_build_present=true
23446else
23447  with_version_build_present=false
23448fi
23449
23450
23451  if test "x$with_version_build_present" = xtrue; then
23452    if test "x$with_version_build" = xyes; then
23453      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23454    elif test "x$with_version_build" = xno; then
23455      # Interpret --without-* as empty string instead of the literal "no"
23456      VERSION_BUILD=
23457    elif test "x$with_version_build" = x; then
23458      VERSION_BUILD=
23459    else
23460
23461  # Additional [] needed to keep m4 from mangling shell constructs.
23462  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23463    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23464  fi
23465  # Extract the version number without leading zeros.
23466  cleaned_value=${BASH_REMATCH[1]}
23467  if test "x$cleaned_value" = x; then
23468    # Special case for zero
23469    cleaned_value=${BASH_REMATCH[2]}
23470  fi
23471
23472  if test $cleaned_value -gt 255; then
23473    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23474  fi
23475  if test "x$cleaned_value" != "x$with_version_build"; then
23476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23477$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23478  fi
23479  VERSION_BUILD=$cleaned_value
23480
23481    fi
23482  else
23483    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23484      # Default is to not have a build number.
23485      VERSION_BUILD=""
23486      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23487      VERSION_BUILD=0
23488    fi
23489  fi
23490
23491
23492# Check whether --with-version-major was given.
23493if test "${with_version_major+set}" = set; then :
23494  withval=$with_version_major; with_version_major_present=true
23495else
23496  with_version_major_present=false
23497fi
23498
23499
23500  if test "x$with_version_major_present" = xtrue; then
23501    if test "x$with_version_major" = xyes; then
23502      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23503    else
23504
23505  # Additional [] needed to keep m4 from mangling shell constructs.
23506  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23507    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23508  fi
23509  # Extract the version number without leading zeros.
23510  cleaned_value=${BASH_REMATCH[1]}
23511  if test "x$cleaned_value" = x; then
23512    # Special case for zero
23513    cleaned_value=${BASH_REMATCH[2]}
23514  fi
23515
23516  if test $cleaned_value -gt 255; then
23517    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23518  fi
23519  if test "x$cleaned_value" != "x$with_version_major"; then
23520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23521$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23522  fi
23523  VERSION_MAJOR=$cleaned_value
23524
23525    fi
23526  else
23527    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23528      # Default is to get value from version-numbers
23529      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23530    fi
23531  fi
23532
23533
23534# Check whether --with-version-minor was given.
23535if test "${with_version_minor+set}" = set; then :
23536  withval=$with_version_minor; with_version_minor_present=true
23537else
23538  with_version_minor_present=false
23539fi
23540
23541
23542  if test "x$with_version_minor_present" = xtrue; then
23543    if test "x$with_version_minor" = xyes; then
23544      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23545    elif test "x$with_version_minor" = xno; then
23546      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23547      VERSION_MINOR=0
23548    elif test "x$with_version_minor" = x; then
23549      VERSION_MINOR=0
23550    else
23551
23552  # Additional [] needed to keep m4 from mangling shell constructs.
23553  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23554    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23555  fi
23556  # Extract the version number without leading zeros.
23557  cleaned_value=${BASH_REMATCH[1]}
23558  if test "x$cleaned_value" = x; then
23559    # Special case for zero
23560    cleaned_value=${BASH_REMATCH[2]}
23561  fi
23562
23563  if test $cleaned_value -gt 255; then
23564    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23565  fi
23566  if test "x$cleaned_value" != "x$with_version_minor"; then
23567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23568$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23569  fi
23570  VERSION_MINOR=$cleaned_value
23571
23572    fi
23573  else
23574    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23575      # Default is 0, if unspecified
23576      VERSION_MINOR=0
23577    fi
23578  fi
23579
23580
23581# Check whether --with-version-security was given.
23582if test "${with_version_security+set}" = set; then :
23583  withval=$with_version_security; with_version_security_present=true
23584else
23585  with_version_security_present=false
23586fi
23587
23588
23589  if test "x$with_version_security_present" = xtrue; then
23590    if test "x$with_version_security" = xyes; then
23591      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23592    elif test "x$with_version_security" = xno; then
23593      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23594      VERSION_SECURITY=0
23595    elif test "x$with_version_security" = x; then
23596      VERSION_SECURITY=0
23597    else
23598
23599  # Additional [] needed to keep m4 from mangling shell constructs.
23600  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23601    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23602  fi
23603  # Extract the version number without leading zeros.
23604  cleaned_value=${BASH_REMATCH[1]}
23605  if test "x$cleaned_value" = x; then
23606    # Special case for zero
23607    cleaned_value=${BASH_REMATCH[2]}
23608  fi
23609
23610  if test $cleaned_value -gt 255; then
23611    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23612  fi
23613  if test "x$cleaned_value" != "x$with_version_security"; then
23614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23615$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23616  fi
23617  VERSION_SECURITY=$cleaned_value
23618
23619    fi
23620  else
23621    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23622      # Default is 0, if unspecified
23623      VERSION_SECURITY=0
23624    fi
23625  fi
23626
23627
23628# Check whether --with-version-patch was given.
23629if test "${with_version_patch+set}" = set; then :
23630  withval=$with_version_patch; with_version_patch_present=true
23631else
23632  with_version_patch_present=false
23633fi
23634
23635
23636  if test "x$with_version_patch_present" = xtrue; then
23637    if test "x$with_version_patch" = xyes; then
23638      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23639    elif test "x$with_version_patch" = xno; then
23640      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23641      VERSION_PATCH=0
23642    elif test "x$with_version_patch" = x; then
23643      VERSION_PATCH=0
23644    else
23645
23646  # Additional [] needed to keep m4 from mangling shell constructs.
23647  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23648    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23649  fi
23650  # Extract the version number without leading zeros.
23651  cleaned_value=${BASH_REMATCH[1]}
23652  if test "x$cleaned_value" = x; then
23653    # Special case for zero
23654    cleaned_value=${BASH_REMATCH[2]}
23655  fi
23656
23657  if test $cleaned_value -gt 255; then
23658    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23659  fi
23660  if test "x$cleaned_value" != "x$with_version_patch"; then
23661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23662$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23663  fi
23664  VERSION_PATCH=$cleaned_value
23665
23666    fi
23667  else
23668    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23669      # Default is 0, if unspecified
23670      VERSION_PATCH=0
23671    fi
23672  fi
23673
23674  # Calculate derived version properties
23675
23676  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23677  if test "x$VERSION_PRE" = x; then
23678    VERSION_IS_GA=true
23679  else
23680    VERSION_IS_GA=false
23681  fi
23682
23683  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23684  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23685
23686  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23687  # Strip trailing zeroes from stripped_version_number
23688  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23689  VERSION_NUMBER=$stripped_version_number
23690
23691  # The complete version string, with additional build information
23692  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23693    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23694  else
23695    # If either build or opt is set, we need a + separator
23696    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23697  fi
23698
23699  # The short version string, just VERSION_NUMBER and PRE, if present.
23700  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23701
23702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23703$as_echo_n "checking for version string... " >&6; }
23704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23705$as_echo "$VERSION_STRING" >&6; }
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721###############################################################################
23722#
23723# Setup BootJDK, used to bootstrap the build.
23724#
23725###############################################################################
23726
23727
23728  BOOT_JDK_FOUND=no
23729
23730# Check whether --with-boot-jdk was given.
23731if test "${with_boot_jdk+set}" = set; then :
23732  withval=$with_boot_jdk;
23733fi
23734
23735
23736  # We look for the Boot JDK through various means, going from more certain to
23737  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23738  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23739  # must check if this is indeed valid; otherwise we'll continue looking.
23740
23741  # Test: Is bootjdk explicitely set by command line arguments?
23742
23743  if test "x$BOOT_JDK_FOUND" = xno; then
23744    # Now execute the test
23745
23746  if test "x$with_boot_jdk" != x; then
23747    BOOT_JDK=$with_boot_jdk
23748    BOOT_JDK_FOUND=maybe
23749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23750$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23751  fi
23752
23753
23754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23756      # Do we have a bin/java?
23757      if test ! -x "$BOOT_JDK/bin/java"; then
23758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23760        BOOT_JDK_FOUND=no
23761      else
23762        # Do we have a bin/javac?
23763        if test ! -x "$BOOT_JDK/bin/javac"; then
23764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23768          BOOT_JDK_FOUND=no
23769        else
23770          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23771          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23772
23773          # Extra M4 quote needed to protect [] in grep expression.
23774          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23775          if test "x$FOUND_CORRECT_VERSION" = x; then
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23778            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23779$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23780            BOOT_JDK_FOUND=no
23781          else
23782            # We're done! :-)
23783            BOOT_JDK_FOUND=yes
23784
23785  # Only process if variable expands to non-empty
23786
23787  if test "x$BOOT_JDK" != x; then
23788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  path="$BOOT_JDK"
23793  new_path=`$CYGPATH -u "$path"`
23794
23795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23798  # "foo.exe" is OK but "foo" is an error.
23799  #
23800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23801  # It is also a way to make sure we got the proper file name for the real test later on.
23802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23803  if test "x$test_shortpath" = x; then
23804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23807  fi
23808
23809  # Call helper function which possibly converts this using DOS-style short mode.
23810  # If so, the updated path is stored in $new_path.
23811
23812  input_path="$new_path"
23813  # Check if we need to convert this using DOS-style short mode. If the path
23814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815  # take no chances and rewrite it.
23816  # Note: m4 eats our [], so we need to use [ and ] instead.
23817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23818  if test "x$has_forbidden_chars" != x; then
23819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23823      # Going to short mode and back again did indeed matter. Since short mode is
23824      # case insensitive, let's make it lowercase to improve readability.
23825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23826      # Now convert it back to Unix-style (cygpath)
23827      input_path=`$CYGPATH -u "$shortmode_path"`
23828      new_path="$input_path"
23829    fi
23830  fi
23831
23832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23833  if test "x$test_cygdrive_prefix" = x; then
23834    # As a simple fix, exclude /usr/bin since it's not a real path.
23835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23837      # a path prefixed by /cygdrive for fixpath to work.
23838      new_path="$CYGWIN_ROOT_PATH$input_path"
23839    fi
23840  fi
23841
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23850
23851  path="$BOOT_JDK"
23852  has_colon=`$ECHO $path | $GREP ^.:`
23853  new_path="$path"
23854  if test "x$has_colon" = x; then
23855    # Not in mixed or Windows style, start by that.
23856    new_path=`cmd //c echo $path`
23857  fi
23858
23859
23860  input_path="$new_path"
23861  # Check if we need to convert this using DOS-style short mode. If the path
23862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23863  # take no chances and rewrite it.
23864  # Note: m4 eats our [], so we need to use [ and ] instead.
23865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23866  if test "x$has_forbidden_chars" != x; then
23867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23869  fi
23870
23871
23872  windows_path="$new_path"
23873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23874    unix_path=`$CYGPATH -u "$windows_path"`
23875    new_path="$unix_path"
23876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23878    new_path="$unix_path"
23879  fi
23880
23881  if test "x$path" != "x$new_path"; then
23882    BOOT_JDK="$new_path"
23883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23885  fi
23886
23887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23889
23890    else
23891      # We're on a unix platform. Hooray! :)
23892      path="$BOOT_JDK"
23893      has_space=`$ECHO "$path" | $GREP " "`
23894      if test "x$has_space" != x; then
23895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23898      fi
23899
23900      # Use eval to expand a potential ~
23901      eval path="$path"
23902      if test ! -f "$path" && test ! -d "$path"; then
23903        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23904      fi
23905
23906      if test -d "$path"; then
23907        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23908      else
23909        dir="`$DIRNAME "$path"`"
23910        base="`$BASENAME "$path"`"
23911        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23912      fi
23913    fi
23914  fi
23915
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925          fi # end check jdk version
23926        fi # end check javac
23927      fi # end check java
23928    fi # end check boot jdk found
23929  fi
23930
23931  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23932    # Having specified an argument which is incorrect will produce an instant failure;
23933    # we should not go on looking
23934    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23935  fi
23936
23937  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23938
23939  if test "x$BOOT_JDK_FOUND" = xno; then
23940    # Now execute the test
23941
23942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23943    # First check at user selected default
23944
23945  if test "x$BOOT_JDK_FOUND" = xno; then
23946    # Now execute the test
23947
23948  if test -x /usr/libexec/java_home; then
23949    BOOT_JDK=`/usr/libexec/java_home `
23950    BOOT_JDK_FOUND=maybe
23951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23952$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23953  fi
23954
23955
23956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23958      # Do we have a bin/java?
23959      if test ! -x "$BOOT_JDK/bin/java"; then
23960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23962        BOOT_JDK_FOUND=no
23963      else
23964        # Do we have a bin/javac?
23965        if test ! -x "$BOOT_JDK/bin/javac"; then
23966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23970          BOOT_JDK_FOUND=no
23971        else
23972          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23973          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23974
23975          # Extra M4 quote needed to protect [] in grep expression.
23976          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23977          if test "x$FOUND_CORRECT_VERSION" = x; then
23978            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23980            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23981$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23982            BOOT_JDK_FOUND=no
23983          else
23984            # We're done! :-)
23985            BOOT_JDK_FOUND=yes
23986
23987  # Only process if variable expands to non-empty
23988
23989  if test "x$BOOT_JDK" != x; then
23990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23991
23992  # Input might be given as Windows format, start by converting to
23993  # unix format.
23994  path="$BOOT_JDK"
23995  new_path=`$CYGPATH -u "$path"`
23996
23997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24000  # "foo.exe" is OK but "foo" is an error.
24001  #
24002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24003  # It is also a way to make sure we got the proper file name for the real test later on.
24004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24005  if test "x$test_shortpath" = x; then
24006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24008    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24009  fi
24010
24011  # Call helper function which possibly converts this using DOS-style short mode.
24012  # If so, the updated path is stored in $new_path.
24013
24014  input_path="$new_path"
24015  # Check if we need to convert this using DOS-style short mode. If the path
24016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24017  # take no chances and rewrite it.
24018  # Note: m4 eats our [], so we need to use [ and ] instead.
24019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24020  if test "x$has_forbidden_chars" != x; then
24021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24025      # Going to short mode and back again did indeed matter. Since short mode is
24026      # case insensitive, let's make it lowercase to improve readability.
24027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24028      # Now convert it back to Unix-style (cygpath)
24029      input_path=`$CYGPATH -u "$shortmode_path"`
24030      new_path="$input_path"
24031    fi
24032  fi
24033
24034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24035  if test "x$test_cygdrive_prefix" = x; then
24036    # As a simple fix, exclude /usr/bin since it's not a real path.
24037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24039      # a path prefixed by /cygdrive for fixpath to work.
24040      new_path="$CYGWIN_ROOT_PATH$input_path"
24041    fi
24042  fi
24043
24044
24045  if test "x$path" != "x$new_path"; then
24046    BOOT_JDK="$new_path"
24047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24049  fi
24050
24051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24052
24053  path="$BOOT_JDK"
24054  has_colon=`$ECHO $path | $GREP ^.:`
24055  new_path="$path"
24056  if test "x$has_colon" = x; then
24057    # Not in mixed or Windows style, start by that.
24058    new_path=`cmd //c echo $path`
24059  fi
24060
24061
24062  input_path="$new_path"
24063  # Check if we need to convert this using DOS-style short mode. If the path
24064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24065  # take no chances and rewrite it.
24066  # Note: m4 eats our [], so we need to use [ and ] instead.
24067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24068  if test "x$has_forbidden_chars" != x; then
24069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24071  fi
24072
24073
24074  windows_path="$new_path"
24075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24076    unix_path=`$CYGPATH -u "$windows_path"`
24077    new_path="$unix_path"
24078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24080    new_path="$unix_path"
24081  fi
24082
24083  if test "x$path" != "x$new_path"; then
24084    BOOT_JDK="$new_path"
24085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24087  fi
24088
24089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24091
24092    else
24093      # We're on a unix platform. Hooray! :)
24094      path="$BOOT_JDK"
24095      has_space=`$ECHO "$path" | $GREP " "`
24096      if test "x$has_space" != x; then
24097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24100      fi
24101
24102      # Use eval to expand a potential ~
24103      eval path="$path"
24104      if test ! -f "$path" && test ! -d "$path"; then
24105        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24106      fi
24107
24108      if test -d "$path"; then
24109        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24110      else
24111        dir="`$DIRNAME "$path"`"
24112        base="`$BASENAME "$path"`"
24113        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24114      fi
24115    fi
24116  fi
24117
24118            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24119$as_echo_n "checking for Boot JDK... " >&6; }
24120            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24121$as_echo "$BOOT_JDK" >&6; }
24122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24123$as_echo_n "checking Boot JDK version... " >&6; }
24124            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24126$as_echo "$BOOT_JDK_VERSION" >&6; }
24127          fi # end check jdk version
24128        fi # end check javac
24129      fi # end check java
24130    fi # end check boot jdk found
24131  fi
24132
24133    # If that did not work out (e.g. too old), try explicit versions instead
24134
24135  if test "x$BOOT_JDK_FOUND" = xno; then
24136    # Now execute the test
24137
24138  if test -x /usr/libexec/java_home; then
24139    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24140    BOOT_JDK_FOUND=maybe
24141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24142$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24143  fi
24144
24145
24146    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24147    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24148      # Do we have a bin/java?
24149      if test ! -x "$BOOT_JDK/bin/java"; then
24150        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24152        BOOT_JDK_FOUND=no
24153      else
24154        # Do we have a bin/javac?
24155        if test ! -x "$BOOT_JDK/bin/javac"; then
24156          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24158          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24159$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24160          BOOT_JDK_FOUND=no
24161        else
24162          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24163          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24164
24165          # Extra M4 quote needed to protect [] in grep expression.
24166          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24167          if test "x$FOUND_CORRECT_VERSION" = x; then
24168            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24170            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24171$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24172            BOOT_JDK_FOUND=no
24173          else
24174            # We're done! :-)
24175            BOOT_JDK_FOUND=yes
24176
24177  # Only process if variable expands to non-empty
24178
24179  if test "x$BOOT_JDK" != x; then
24180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24181
24182  # Input might be given as Windows format, start by converting to
24183  # unix format.
24184  path="$BOOT_JDK"
24185  new_path=`$CYGPATH -u "$path"`
24186
24187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24190  # "foo.exe" is OK but "foo" is an error.
24191  #
24192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24193  # It is also a way to make sure we got the proper file name for the real test later on.
24194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24195  if test "x$test_shortpath" = x; then
24196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24198    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24199  fi
24200
24201  # Call helper function which possibly converts this using DOS-style short mode.
24202  # If so, the updated path is stored in $new_path.
24203
24204  input_path="$new_path"
24205  # Check if we need to convert this using DOS-style short mode. If the path
24206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24207  # take no chances and rewrite it.
24208  # Note: m4 eats our [], so we need to use [ and ] instead.
24209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24210  if test "x$has_forbidden_chars" != x; then
24211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24215      # Going to short mode and back again did indeed matter. Since short mode is
24216      # case insensitive, let's make it lowercase to improve readability.
24217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24218      # Now convert it back to Unix-style (cygpath)
24219      input_path=`$CYGPATH -u "$shortmode_path"`
24220      new_path="$input_path"
24221    fi
24222  fi
24223
24224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24225  if test "x$test_cygdrive_prefix" = x; then
24226    # As a simple fix, exclude /usr/bin since it's not a real path.
24227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24229      # a path prefixed by /cygdrive for fixpath to work.
24230      new_path="$CYGWIN_ROOT_PATH$input_path"
24231    fi
24232  fi
24233
24234
24235  if test "x$path" != "x$new_path"; then
24236    BOOT_JDK="$new_path"
24237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24239  fi
24240
24241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24242
24243  path="$BOOT_JDK"
24244  has_colon=`$ECHO $path | $GREP ^.:`
24245  new_path="$path"
24246  if test "x$has_colon" = x; then
24247    # Not in mixed or Windows style, start by that.
24248    new_path=`cmd //c echo $path`
24249  fi
24250
24251
24252  input_path="$new_path"
24253  # Check if we need to convert this using DOS-style short mode. If the path
24254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24255  # take no chances and rewrite it.
24256  # Note: m4 eats our [], so we need to use [ and ] instead.
24257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24258  if test "x$has_forbidden_chars" != x; then
24259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24261  fi
24262
24263
24264  windows_path="$new_path"
24265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24266    unix_path=`$CYGPATH -u "$windows_path"`
24267    new_path="$unix_path"
24268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24270    new_path="$unix_path"
24271  fi
24272
24273  if test "x$path" != "x$new_path"; then
24274    BOOT_JDK="$new_path"
24275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24277  fi
24278
24279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24281
24282    else
24283      # We're on a unix platform. Hooray! :)
24284      path="$BOOT_JDK"
24285      has_space=`$ECHO "$path" | $GREP " "`
24286      if test "x$has_space" != x; then
24287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24290      fi
24291
24292      # Use eval to expand a potential ~
24293      eval path="$path"
24294      if test ! -f "$path" && test ! -d "$path"; then
24295        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24296      fi
24297
24298      if test -d "$path"; then
24299        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24300      else
24301        dir="`$DIRNAME "$path"`"
24302        base="`$BASENAME "$path"`"
24303        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24304      fi
24305    fi
24306  fi
24307
24308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24309$as_echo_n "checking for Boot JDK... " >&6; }
24310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24311$as_echo "$BOOT_JDK" >&6; }
24312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24313$as_echo_n "checking Boot JDK version... " >&6; }
24314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24316$as_echo "$BOOT_JDK_VERSION" >&6; }
24317          fi # end check jdk version
24318        fi # end check javac
24319      fi # end check java
24320    fi # end check boot jdk found
24321  fi
24322
24323
24324  if test "x$BOOT_JDK_FOUND" = xno; then
24325    # Now execute the test
24326
24327  if test -x /usr/libexec/java_home; then
24328    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24329    BOOT_JDK_FOUND=maybe
24330    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24331$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24332  fi
24333
24334
24335    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24336    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24337      # Do we have a bin/java?
24338      if test ! -x "$BOOT_JDK/bin/java"; then
24339        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24341        BOOT_JDK_FOUND=no
24342      else
24343        # Do we have a bin/javac?
24344        if test ! -x "$BOOT_JDK/bin/javac"; then
24345          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24347          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24348$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24349          BOOT_JDK_FOUND=no
24350        else
24351          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24352          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24353
24354          # Extra M4 quote needed to protect [] in grep expression.
24355          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24356          if test "x$FOUND_CORRECT_VERSION" = x; then
24357            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24359            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24360$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24361            BOOT_JDK_FOUND=no
24362          else
24363            # We're done! :-)
24364            BOOT_JDK_FOUND=yes
24365
24366  # Only process if variable expands to non-empty
24367
24368  if test "x$BOOT_JDK" != x; then
24369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24370
24371  # Input might be given as Windows format, start by converting to
24372  # unix format.
24373  path="$BOOT_JDK"
24374  new_path=`$CYGPATH -u "$path"`
24375
24376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24379  # "foo.exe" is OK but "foo" is an error.
24380  #
24381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24382  # It is also a way to make sure we got the proper file name for the real test later on.
24383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24384  if test "x$test_shortpath" = x; then
24385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24387    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24388  fi
24389
24390  # Call helper function which possibly converts this using DOS-style short mode.
24391  # If so, the updated path is stored in $new_path.
24392
24393  input_path="$new_path"
24394  # Check if we need to convert this using DOS-style short mode. If the path
24395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24396  # take no chances and rewrite it.
24397  # Note: m4 eats our [], so we need to use [ and ] instead.
24398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24399  if test "x$has_forbidden_chars" != x; then
24400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24404      # Going to short mode and back again did indeed matter. Since short mode is
24405      # case insensitive, let's make it lowercase to improve readability.
24406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24407      # Now convert it back to Unix-style (cygpath)
24408      input_path=`$CYGPATH -u "$shortmode_path"`
24409      new_path="$input_path"
24410    fi
24411  fi
24412
24413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24414  if test "x$test_cygdrive_prefix" = x; then
24415    # As a simple fix, exclude /usr/bin since it's not a real path.
24416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24418      # a path prefixed by /cygdrive for fixpath to work.
24419      new_path="$CYGWIN_ROOT_PATH$input_path"
24420    fi
24421  fi
24422
24423
24424  if test "x$path" != "x$new_path"; then
24425    BOOT_JDK="$new_path"
24426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24428  fi
24429
24430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24431
24432  path="$BOOT_JDK"
24433  has_colon=`$ECHO $path | $GREP ^.:`
24434  new_path="$path"
24435  if test "x$has_colon" = x; then
24436    # Not in mixed or Windows style, start by that.
24437    new_path=`cmd //c echo $path`
24438  fi
24439
24440
24441  input_path="$new_path"
24442  # Check if we need to convert this using DOS-style short mode. If the path
24443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24444  # take no chances and rewrite it.
24445  # Note: m4 eats our [], so we need to use [ and ] instead.
24446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24447  if test "x$has_forbidden_chars" != x; then
24448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24450  fi
24451
24452
24453  windows_path="$new_path"
24454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24455    unix_path=`$CYGPATH -u "$windows_path"`
24456    new_path="$unix_path"
24457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24459    new_path="$unix_path"
24460  fi
24461
24462  if test "x$path" != "x$new_path"; then
24463    BOOT_JDK="$new_path"
24464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24466  fi
24467
24468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24470
24471    else
24472      # We're on a unix platform. Hooray! :)
24473      path="$BOOT_JDK"
24474      has_space=`$ECHO "$path" | $GREP " "`
24475      if test "x$has_space" != x; then
24476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24479      fi
24480
24481      # Use eval to expand a potential ~
24482      eval path="$path"
24483      if test ! -f "$path" && test ! -d "$path"; then
24484        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24485      fi
24486
24487      if test -d "$path"; then
24488        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24489      else
24490        dir="`$DIRNAME "$path"`"
24491        base="`$BASENAME "$path"`"
24492        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24493      fi
24494    fi
24495  fi
24496
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24498$as_echo_n "checking for Boot JDK... " >&6; }
24499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24500$as_echo "$BOOT_JDK" >&6; }
24501            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24502$as_echo_n "checking Boot JDK version... " >&6; }
24503            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24505$as_echo "$BOOT_JDK_VERSION" >&6; }
24506          fi # end check jdk version
24507        fi # end check javac
24508      fi # end check java
24509    fi # end check boot jdk found
24510  fi
24511
24512
24513  if test "x$BOOT_JDK_FOUND" = xno; then
24514    # Now execute the test
24515
24516  if test -x /usr/libexec/java_home; then
24517    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24518    BOOT_JDK_FOUND=maybe
24519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24520$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24521  fi
24522
24523
24524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24526      # Do we have a bin/java?
24527      if test ! -x "$BOOT_JDK/bin/java"; then
24528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24530        BOOT_JDK_FOUND=no
24531      else
24532        # Do we have a bin/javac?
24533        if test ! -x "$BOOT_JDK/bin/javac"; then
24534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24538          BOOT_JDK_FOUND=no
24539        else
24540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24542
24543          # Extra M4 quote needed to protect [] in grep expression.
24544          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24545          if test "x$FOUND_CORRECT_VERSION" = x; then
24546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24550            BOOT_JDK_FOUND=no
24551          else
24552            # We're done! :-)
24553            BOOT_JDK_FOUND=yes
24554
24555  # Only process if variable expands to non-empty
24556
24557  if test "x$BOOT_JDK" != x; then
24558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24559
24560  # Input might be given as Windows format, start by converting to
24561  # unix format.
24562  path="$BOOT_JDK"
24563  new_path=`$CYGPATH -u "$path"`
24564
24565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24568  # "foo.exe" is OK but "foo" is an error.
24569  #
24570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24571  # It is also a way to make sure we got the proper file name for the real test later on.
24572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24573  if test "x$test_shortpath" = x; then
24574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24577  fi
24578
24579  # Call helper function which possibly converts this using DOS-style short mode.
24580  # If so, the updated path is stored in $new_path.
24581
24582  input_path="$new_path"
24583  # Check if we need to convert this using DOS-style short mode. If the path
24584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24585  # take no chances and rewrite it.
24586  # Note: m4 eats our [], so we need to use [ and ] instead.
24587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24588  if test "x$has_forbidden_chars" != x; then
24589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24593      # Going to short mode and back again did indeed matter. Since short mode is
24594      # case insensitive, let's make it lowercase to improve readability.
24595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24596      # Now convert it back to Unix-style (cygpath)
24597      input_path=`$CYGPATH -u "$shortmode_path"`
24598      new_path="$input_path"
24599    fi
24600  fi
24601
24602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24603  if test "x$test_cygdrive_prefix" = x; then
24604    # As a simple fix, exclude /usr/bin since it's not a real path.
24605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24607      # a path prefixed by /cygdrive for fixpath to work.
24608      new_path="$CYGWIN_ROOT_PATH$input_path"
24609    fi
24610  fi
24611
24612
24613  if test "x$path" != "x$new_path"; then
24614    BOOT_JDK="$new_path"
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24617  fi
24618
24619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24620
24621  path="$BOOT_JDK"
24622  has_colon=`$ECHO $path | $GREP ^.:`
24623  new_path="$path"
24624  if test "x$has_colon" = x; then
24625    # Not in mixed or Windows style, start by that.
24626    new_path=`cmd //c echo $path`
24627  fi
24628
24629
24630  input_path="$new_path"
24631  # Check if we need to convert this using DOS-style short mode. If the path
24632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24633  # take no chances and rewrite it.
24634  # Note: m4 eats our [], so we need to use [ and ] instead.
24635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24636  if test "x$has_forbidden_chars" != x; then
24637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24639  fi
24640
24641
24642  windows_path="$new_path"
24643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24644    unix_path=`$CYGPATH -u "$windows_path"`
24645    new_path="$unix_path"
24646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24648    new_path="$unix_path"
24649  fi
24650
24651  if test "x$path" != "x$new_path"; then
24652    BOOT_JDK="$new_path"
24653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24655  fi
24656
24657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24659
24660    else
24661      # We're on a unix platform. Hooray! :)
24662      path="$BOOT_JDK"
24663      has_space=`$ECHO "$path" | $GREP " "`
24664      if test "x$has_space" != x; then
24665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24668      fi
24669
24670      # Use eval to expand a potential ~
24671      eval path="$path"
24672      if test ! -f "$path" && test ! -d "$path"; then
24673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24674      fi
24675
24676      if test -d "$path"; then
24677        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24678      else
24679        dir="`$DIRNAME "$path"`"
24680        base="`$BASENAME "$path"`"
24681        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24682      fi
24683    fi
24684  fi
24685
24686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24687$as_echo_n "checking for Boot JDK... " >&6; }
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24689$as_echo "$BOOT_JDK" >&6; }
24690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24691$as_echo_n "checking Boot JDK version... " >&6; }
24692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24694$as_echo "$BOOT_JDK_VERSION" >&6; }
24695          fi # end check jdk version
24696        fi # end check javac
24697      fi # end check java
24698    fi # end check boot jdk found
24699  fi
24700
24701  fi
24702
24703
24704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24706      # Do we have a bin/java?
24707      if test ! -x "$BOOT_JDK/bin/java"; then
24708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24710        BOOT_JDK_FOUND=no
24711      else
24712        # Do we have a bin/javac?
24713        if test ! -x "$BOOT_JDK/bin/javac"; then
24714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24718          BOOT_JDK_FOUND=no
24719        else
24720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24722
24723          # Extra M4 quote needed to protect [] in grep expression.
24724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24725          if test "x$FOUND_CORRECT_VERSION" = x; then
24726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24730            BOOT_JDK_FOUND=no
24731          else
24732            # We're done! :-)
24733            BOOT_JDK_FOUND=yes
24734
24735  # Only process if variable expands to non-empty
24736
24737  if test "x$BOOT_JDK" != x; then
24738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24739
24740  # Input might be given as Windows format, start by converting to
24741  # unix format.
24742  path="$BOOT_JDK"
24743  new_path=`$CYGPATH -u "$path"`
24744
24745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24748  # "foo.exe" is OK but "foo" is an error.
24749  #
24750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24751  # It is also a way to make sure we got the proper file name for the real test later on.
24752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24753  if test "x$test_shortpath" = x; then
24754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24757  fi
24758
24759  # Call helper function which possibly converts this using DOS-style short mode.
24760  # If so, the updated path is stored in $new_path.
24761
24762  input_path="$new_path"
24763  # Check if we need to convert this using DOS-style short mode. If the path
24764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24765  # take no chances and rewrite it.
24766  # Note: m4 eats our [], so we need to use [ and ] instead.
24767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24768  if test "x$has_forbidden_chars" != x; then
24769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24773      # Going to short mode and back again did indeed matter. Since short mode is
24774      # case insensitive, let's make it lowercase to improve readability.
24775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24776      # Now convert it back to Unix-style (cygpath)
24777      input_path=`$CYGPATH -u "$shortmode_path"`
24778      new_path="$input_path"
24779    fi
24780  fi
24781
24782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24783  if test "x$test_cygdrive_prefix" = x; then
24784    # As a simple fix, exclude /usr/bin since it's not a real path.
24785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24787      # a path prefixed by /cygdrive for fixpath to work.
24788      new_path="$CYGWIN_ROOT_PATH$input_path"
24789    fi
24790  fi
24791
24792
24793  if test "x$path" != "x$new_path"; then
24794    BOOT_JDK="$new_path"
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24797  fi
24798
24799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800
24801  path="$BOOT_JDK"
24802  has_colon=`$ECHO $path | $GREP ^.:`
24803  new_path="$path"
24804  if test "x$has_colon" = x; then
24805    # Not in mixed or Windows style, start by that.
24806    new_path=`cmd //c echo $path`
24807  fi
24808
24809
24810  input_path="$new_path"
24811  # Check if we need to convert this using DOS-style short mode. If the path
24812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24813  # take no chances and rewrite it.
24814  # Note: m4 eats our [], so we need to use [ and ] instead.
24815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24816  if test "x$has_forbidden_chars" != x; then
24817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24819  fi
24820
24821
24822  windows_path="$new_path"
24823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24824    unix_path=`$CYGPATH -u "$windows_path"`
24825    new_path="$unix_path"
24826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24828    new_path="$unix_path"
24829  fi
24830
24831  if test "x$path" != "x$new_path"; then
24832    BOOT_JDK="$new_path"
24833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24835  fi
24836
24837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24839
24840    else
24841      # We're on a unix platform. Hooray! :)
24842      path="$BOOT_JDK"
24843      has_space=`$ECHO "$path" | $GREP " "`
24844      if test "x$has_space" != x; then
24845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24848      fi
24849
24850      # Use eval to expand a potential ~
24851      eval path="$path"
24852      if test ! -f "$path" && test ! -d "$path"; then
24853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24854      fi
24855
24856      if test -d "$path"; then
24857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24858      else
24859        dir="`$DIRNAME "$path"`"
24860        base="`$BASENAME "$path"`"
24861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24862      fi
24863    fi
24864  fi
24865
24866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24867$as_echo_n "checking for Boot JDK... " >&6; }
24868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24869$as_echo "$BOOT_JDK" >&6; }
24870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24871$as_echo_n "checking Boot JDK version... " >&6; }
24872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24874$as_echo "$BOOT_JDK_VERSION" >&6; }
24875          fi # end check jdk version
24876        fi # end check javac
24877      fi # end check java
24878    fi # end check boot jdk found
24879  fi
24880
24881
24882  # Test: Is $JAVA_HOME set?
24883
24884  if test "x$BOOT_JDK_FOUND" = xno; then
24885    # Now execute the test
24886
24887  if test "x$JAVA_HOME" != x; then
24888    JAVA_HOME_PROCESSED="$JAVA_HOME"
24889
24890  # Only process if variable expands to non-empty
24891
24892  if test "x$JAVA_HOME_PROCESSED" != x; then
24893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24894
24895  # Input might be given as Windows format, start by converting to
24896  # unix format.
24897  path="$JAVA_HOME_PROCESSED"
24898  new_path=`$CYGPATH -u "$path"`
24899
24900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24903  # "foo.exe" is OK but "foo" is an error.
24904  #
24905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24906  # It is also a way to make sure we got the proper file name for the real test later on.
24907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24908  if test "x$test_shortpath" = x; then
24909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24910$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24911    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24912  fi
24913
24914  # Call helper function which possibly converts this using DOS-style short mode.
24915  # If so, the updated path is stored in $new_path.
24916
24917  input_path="$new_path"
24918  # Check if we need to convert this using DOS-style short mode. If the path
24919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920  # take no chances and rewrite it.
24921  # Note: m4 eats our [], so we need to use [ and ] instead.
24922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24923  if test "x$has_forbidden_chars" != x; then
24924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24928      # Going to short mode and back again did indeed matter. Since short mode is
24929      # case insensitive, let's make it lowercase to improve readability.
24930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24931      # Now convert it back to Unix-style (cygpath)
24932      input_path=`$CYGPATH -u "$shortmode_path"`
24933      new_path="$input_path"
24934    fi
24935  fi
24936
24937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24938  if test "x$test_cygdrive_prefix" = x; then
24939    # As a simple fix, exclude /usr/bin since it's not a real path.
24940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24942      # a path prefixed by /cygdrive for fixpath to work.
24943      new_path="$CYGWIN_ROOT_PATH$input_path"
24944    fi
24945  fi
24946
24947
24948  if test "x$path" != "x$new_path"; then
24949    JAVA_HOME_PROCESSED="$new_path"
24950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24951$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24952  fi
24953
24954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24955
24956  path="$JAVA_HOME_PROCESSED"
24957  has_colon=`$ECHO $path | $GREP ^.:`
24958  new_path="$path"
24959  if test "x$has_colon" = x; then
24960    # Not in mixed or Windows style, start by that.
24961    new_path=`cmd //c echo $path`
24962  fi
24963
24964
24965  input_path="$new_path"
24966  # Check if we need to convert this using DOS-style short mode. If the path
24967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24968  # take no chances and rewrite it.
24969  # Note: m4 eats our [], so we need to use [ and ] instead.
24970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24971  if test "x$has_forbidden_chars" != x; then
24972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24974  fi
24975
24976
24977  windows_path="$new_path"
24978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24979    unix_path=`$CYGPATH -u "$windows_path"`
24980    new_path="$unix_path"
24981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24983    new_path="$unix_path"
24984  fi
24985
24986  if test "x$path" != "x$new_path"; then
24987    JAVA_HOME_PROCESSED="$new_path"
24988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24989$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24990  fi
24991
24992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24994
24995    else
24996      # We're on a unix platform. Hooray! :)
24997      path="$JAVA_HOME_PROCESSED"
24998      has_space=`$ECHO "$path" | $GREP " "`
24999      if test "x$has_space" != x; then
25000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25001$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25003      fi
25004
25005      # Use eval to expand a potential ~
25006      eval path="$path"
25007      if test ! -f "$path" && test ! -d "$path"; then
25008        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25009      fi
25010
25011      if test -d "$path"; then
25012        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25013      else
25014        dir="`$DIRNAME "$path"`"
25015        base="`$BASENAME "$path"`"
25016        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25017      fi
25018    fi
25019  fi
25020
25021    if test ! -d "$JAVA_HOME_PROCESSED"; then
25022      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25023$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25024    else
25025      # Aha, the user has set a JAVA_HOME
25026      # let us use that as the Boot JDK.
25027      BOOT_JDK="$JAVA_HOME_PROCESSED"
25028      BOOT_JDK_FOUND=maybe
25029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25030$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25031    fi
25032  fi
25033
25034
25035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25037      # Do we have a bin/java?
25038      if test ! -x "$BOOT_JDK/bin/java"; then
25039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25041        BOOT_JDK_FOUND=no
25042      else
25043        # Do we have a bin/javac?
25044        if test ! -x "$BOOT_JDK/bin/javac"; then
25045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25049          BOOT_JDK_FOUND=no
25050        else
25051          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25052          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25053
25054          # Extra M4 quote needed to protect [] in grep expression.
25055          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25056          if test "x$FOUND_CORRECT_VERSION" = x; then
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25059            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25061            BOOT_JDK_FOUND=no
25062          else
25063            # We're done! :-)
25064            BOOT_JDK_FOUND=yes
25065
25066  # Only process if variable expands to non-empty
25067
25068  if test "x$BOOT_JDK" != x; then
25069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25070
25071  # Input might be given as Windows format, start by converting to
25072  # unix format.
25073  path="$BOOT_JDK"
25074  new_path=`$CYGPATH -u "$path"`
25075
25076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25079  # "foo.exe" is OK but "foo" is an error.
25080  #
25081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25082  # It is also a way to make sure we got the proper file name for the real test later on.
25083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25084  if test "x$test_shortpath" = x; then
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25088  fi
25089
25090  # Call helper function which possibly converts this using DOS-style short mode.
25091  # If so, the updated path is stored in $new_path.
25092
25093  input_path="$new_path"
25094  # Check if we need to convert this using DOS-style short mode. If the path
25095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25096  # take no chances and rewrite it.
25097  # Note: m4 eats our [], so we need to use [ and ] instead.
25098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25099  if test "x$has_forbidden_chars" != x; then
25100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25104      # Going to short mode and back again did indeed matter. Since short mode is
25105      # case insensitive, let's make it lowercase to improve readability.
25106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25107      # Now convert it back to Unix-style (cygpath)
25108      input_path=`$CYGPATH -u "$shortmode_path"`
25109      new_path="$input_path"
25110    fi
25111  fi
25112
25113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25114  if test "x$test_cygdrive_prefix" = x; then
25115    # As a simple fix, exclude /usr/bin since it's not a real path.
25116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25118      # a path prefixed by /cygdrive for fixpath to work.
25119      new_path="$CYGWIN_ROOT_PATH$input_path"
25120    fi
25121  fi
25122
25123
25124  if test "x$path" != "x$new_path"; then
25125    BOOT_JDK="$new_path"
25126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25128  fi
25129
25130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25131
25132  path="$BOOT_JDK"
25133  has_colon=`$ECHO $path | $GREP ^.:`
25134  new_path="$path"
25135  if test "x$has_colon" = x; then
25136    # Not in mixed or Windows style, start by that.
25137    new_path=`cmd //c echo $path`
25138  fi
25139
25140
25141  input_path="$new_path"
25142  # Check if we need to convert this using DOS-style short mode. If the path
25143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25144  # take no chances and rewrite it.
25145  # Note: m4 eats our [], so we need to use [ and ] instead.
25146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25147  if test "x$has_forbidden_chars" != x; then
25148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25150  fi
25151
25152
25153  windows_path="$new_path"
25154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25155    unix_path=`$CYGPATH -u "$windows_path"`
25156    new_path="$unix_path"
25157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25159    new_path="$unix_path"
25160  fi
25161
25162  if test "x$path" != "x$new_path"; then
25163    BOOT_JDK="$new_path"
25164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25166  fi
25167
25168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25170
25171    else
25172      # We're on a unix platform. Hooray! :)
25173      path="$BOOT_JDK"
25174      has_space=`$ECHO "$path" | $GREP " "`
25175      if test "x$has_space" != x; then
25176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25179      fi
25180
25181      # Use eval to expand a potential ~
25182      eval path="$path"
25183      if test ! -f "$path" && test ! -d "$path"; then
25184        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25185      fi
25186
25187      if test -d "$path"; then
25188        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25189      else
25190        dir="`$DIRNAME "$path"`"
25191        base="`$BASENAME "$path"`"
25192        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25193      fi
25194    fi
25195  fi
25196
25197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25198$as_echo_n "checking for Boot JDK... " >&6; }
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25200$as_echo "$BOOT_JDK" >&6; }
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25202$as_echo_n "checking Boot JDK version... " >&6; }
25203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25205$as_echo "$BOOT_JDK_VERSION" >&6; }
25206          fi # end check jdk version
25207        fi # end check javac
25208      fi # end check java
25209    fi # end check boot jdk found
25210  fi
25211
25212
25213  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25214
25215  if test "x$BOOT_JDK_FOUND" = xno; then
25216    # Now execute the test
25217
25218  # Extract the first word of "javac", so it can be a program name with args.
25219set dummy javac; ac_word=$2
25220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25221$as_echo_n "checking for $ac_word... " >&6; }
25222if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25223  $as_echo_n "(cached) " >&6
25224else
25225  case $JAVAC_CHECK in
25226  [\\/]* | ?:[\\/]*)
25227  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25228  ;;
25229  *)
25230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25231for as_dir in $PATH
25232do
25233  IFS=$as_save_IFS
25234  test -z "$as_dir" && as_dir=.
25235    for ac_exec_ext in '' $ac_executable_extensions; do
25236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25237    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25239    break 2
25240  fi
25241done
25242  done
25243IFS=$as_save_IFS
25244
25245  ;;
25246esac
25247fi
25248JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25249if test -n "$JAVAC_CHECK"; then
25250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25251$as_echo "$JAVAC_CHECK" >&6; }
25252else
25253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25254$as_echo "no" >&6; }
25255fi
25256
25257
25258  # Extract the first word of "java", so it can be a program name with args.
25259set dummy java; ac_word=$2
25260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25261$as_echo_n "checking for $ac_word... " >&6; }
25262if ${ac_cv_path_JAVA_CHECK+:} false; then :
25263  $as_echo_n "(cached) " >&6
25264else
25265  case $JAVA_CHECK in
25266  [\\/]* | ?:[\\/]*)
25267  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25268  ;;
25269  *)
25270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25271for as_dir in $PATH
25272do
25273  IFS=$as_save_IFS
25274  test -z "$as_dir" && as_dir=.
25275    for ac_exec_ext in '' $ac_executable_extensions; do
25276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25277    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25279    break 2
25280  fi
25281done
25282  done
25283IFS=$as_save_IFS
25284
25285  ;;
25286esac
25287fi
25288JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25289if test -n "$JAVA_CHECK"; then
25290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25291$as_echo "$JAVA_CHECK" >&6; }
25292else
25293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25294$as_echo "no" >&6; }
25295fi
25296
25297
25298  BINARY="$JAVAC_CHECK"
25299  if test "x$JAVAC_CHECK" = x; then
25300    BINARY="$JAVA_CHECK"
25301  fi
25302  if test "x$BINARY" != x; then
25303    # So there is a java(c) binary, it might be part of a JDK.
25304    # Lets find the JDK/JRE directory by following symbolic links.
25305    # Linux/GNU systems often have links from /usr/bin/java to
25306    # /etc/alternatives/java to the real JDK binary.
25307
25308  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25309    # Follow a chain of symbolic links. Use readlink
25310    # where it exists, else fall back to horribly
25311    # complicated shell code.
25312    if test "x$READLINK_TESTED" != yes; then
25313      # On MacOSX there is a readlink tool with a different
25314      # purpose than the GNU readlink tool. Check the found readlink.
25315      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25316      if test "x$ISGNU" = x; then
25317        # A readlink that we do not know how to use.
25318        # Are there other non-GNU readlinks out there?
25319        READLINK_TESTED=yes
25320        READLINK=
25321      fi
25322    fi
25323
25324    if test "x$READLINK" != x; then
25325      BINARY=`$READLINK -f $BINARY`
25326    else
25327      # Save the current directory for restoring afterwards
25328      STARTDIR=$PWD
25329      COUNTER=0
25330      sym_link_dir=`$DIRNAME $BINARY`
25331      sym_link_file=`$BASENAME $BINARY`
25332      cd $sym_link_dir
25333      # Use -P flag to resolve symlinks in directories.
25334      cd `$THEPWDCMD -P`
25335      sym_link_dir=`$THEPWDCMD -P`
25336      # Resolve file symlinks
25337      while test $COUNTER -lt 20; do
25338        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25339        if test "x$ISLINK" == x; then
25340          # This is not a symbolic link! We are done!
25341          break
25342        fi
25343        # Again resolve directory symlinks since the target of the just found
25344        # link could be in a different directory
25345        cd `$DIRNAME $ISLINK`
25346        sym_link_dir=`$THEPWDCMD -P`
25347        sym_link_file=`$BASENAME $ISLINK`
25348        let COUNTER=COUNTER+1
25349      done
25350      cd $STARTDIR
25351      BINARY=$sym_link_dir/$sym_link_file
25352    fi
25353  fi
25354
25355    BOOT_JDK=`dirname "$BINARY"`
25356    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25357    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25358      # Looks like we found ourselves an JDK
25359      BOOT_JDK_FOUND=maybe
25360      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25361$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25362    fi
25363  fi
25364
25365
25366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25368      # Do we have a bin/java?
25369      if test ! -x "$BOOT_JDK/bin/java"; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25372        BOOT_JDK_FOUND=no
25373      else
25374        # Do we have a bin/javac?
25375        if test ! -x "$BOOT_JDK/bin/javac"; then
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25380          BOOT_JDK_FOUND=no
25381        else
25382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25384
25385          # Extra M4 quote needed to protect [] in grep expression.
25386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25387          if test "x$FOUND_CORRECT_VERSION" = x; then
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25392            BOOT_JDK_FOUND=no
25393          else
25394            # We're done! :-)
25395            BOOT_JDK_FOUND=yes
25396
25397  # Only process if variable expands to non-empty
25398
25399  if test "x$BOOT_JDK" != x; then
25400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  path="$BOOT_JDK"
25405  new_path=`$CYGPATH -u "$path"`
25406
25407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25410  # "foo.exe" is OK but "foo" is an error.
25411  #
25412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25413  # It is also a way to make sure we got the proper file name for the real test later on.
25414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25415  if test "x$test_shortpath" = x; then
25416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25419  fi
25420
25421  # Call helper function which possibly converts this using DOS-style short mode.
25422  # If so, the updated path is stored in $new_path.
25423
25424  input_path="$new_path"
25425  # Check if we need to convert this using DOS-style short mode. If the path
25426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25427  # take no chances and rewrite it.
25428  # Note: m4 eats our [], so we need to use [ and ] instead.
25429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25430  if test "x$has_forbidden_chars" != x; then
25431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25435      # Going to short mode and back again did indeed matter. Since short mode is
25436      # case insensitive, let's make it lowercase to improve readability.
25437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25438      # Now convert it back to Unix-style (cygpath)
25439      input_path=`$CYGPATH -u "$shortmode_path"`
25440      new_path="$input_path"
25441    fi
25442  fi
25443
25444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25445  if test "x$test_cygdrive_prefix" = x; then
25446    # As a simple fix, exclude /usr/bin since it's not a real path.
25447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25449      # a path prefixed by /cygdrive for fixpath to work.
25450      new_path="$CYGWIN_ROOT_PATH$input_path"
25451    fi
25452  fi
25453
25454
25455  if test "x$path" != "x$new_path"; then
25456    BOOT_JDK="$new_path"
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25459  fi
25460
25461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462
25463  path="$BOOT_JDK"
25464  has_colon=`$ECHO $path | $GREP ^.:`
25465  new_path="$path"
25466  if test "x$has_colon" = x; then
25467    # Not in mixed or Windows style, start by that.
25468    new_path=`cmd //c echo $path`
25469  fi
25470
25471
25472  input_path="$new_path"
25473  # Check if we need to convert this using DOS-style short mode. If the path
25474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25475  # take no chances and rewrite it.
25476  # Note: m4 eats our [], so we need to use [ and ] instead.
25477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25478  if test "x$has_forbidden_chars" != x; then
25479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25481  fi
25482
25483
25484  windows_path="$new_path"
25485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25486    unix_path=`$CYGPATH -u "$windows_path"`
25487    new_path="$unix_path"
25488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25490    new_path="$unix_path"
25491  fi
25492
25493  if test "x$path" != "x$new_path"; then
25494    BOOT_JDK="$new_path"
25495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25497  fi
25498
25499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25501
25502    else
25503      # We're on a unix platform. Hooray! :)
25504      path="$BOOT_JDK"
25505      has_space=`$ECHO "$path" | $GREP " "`
25506      if test "x$has_space" != x; then
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25510      fi
25511
25512      # Use eval to expand a potential ~
25513      eval path="$path"
25514      if test ! -f "$path" && test ! -d "$path"; then
25515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25516      fi
25517
25518      if test -d "$path"; then
25519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25520      else
25521        dir="`$DIRNAME "$path"`"
25522        base="`$BASENAME "$path"`"
25523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25524      fi
25525    fi
25526  fi
25527
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25529$as_echo_n "checking for Boot JDK... " >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25531$as_echo "$BOOT_JDK" >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25533$as_echo_n "checking Boot JDK version... " >&6; }
25534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25536$as_echo "$BOOT_JDK_VERSION" >&6; }
25537          fi # end check jdk version
25538        fi # end check javac
25539      fi # end check java
25540    fi # end check boot jdk found
25541  fi
25542
25543
25544  # Test: Is there a JDK installed in default, well-known locations?
25545
25546  if test "x$BOOT_JDK_FOUND" = xno; then
25547    # Now execute the test
25548
25549  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25550
25551  if test "x$BOOT_JDK_FOUND" = xno; then
25552    # Now execute the test
25553
25554  if test "x$ProgramW6432" != x; then
25555    VIRTUAL_DIR="$ProgramW6432/Java"
25556
25557  windows_path="$VIRTUAL_DIR"
25558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25559    unix_path=`$CYGPATH -u "$windows_path"`
25560    VIRTUAL_DIR="$unix_path"
25561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25563    VIRTUAL_DIR="$unix_path"
25564  fi
25565
25566
25567  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25568  BOOT_JDK_SUFFIX=""
25569  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25570  if test "x$ALL_JDKS_FOUND" != x; then
25571    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25572
25573  if test "x$BOOT_JDK_FOUND" = xno; then
25574    # Now execute the test
25575
25576        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25577        if test -d "$BOOT_JDK"; then
25578          BOOT_JDK_FOUND=maybe
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25580$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25581        fi
25582
25583
25584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25586      # Do we have a bin/java?
25587      if test ! -x "$BOOT_JDK/bin/java"; then
25588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25590        BOOT_JDK_FOUND=no
25591      else
25592        # Do we have a bin/javac?
25593        if test ! -x "$BOOT_JDK/bin/javac"; then
25594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25598          BOOT_JDK_FOUND=no
25599        else
25600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25602
25603          # Extra M4 quote needed to protect [] in grep expression.
25604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25605          if test "x$FOUND_CORRECT_VERSION" = x; then
25606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25610            BOOT_JDK_FOUND=no
25611          else
25612            # We're done! :-)
25613            BOOT_JDK_FOUND=yes
25614
25615  # Only process if variable expands to non-empty
25616
25617  if test "x$BOOT_JDK" != x; then
25618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25619
25620  # Input might be given as Windows format, start by converting to
25621  # unix format.
25622  path="$BOOT_JDK"
25623  new_path=`$CYGPATH -u "$path"`
25624
25625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25628  # "foo.exe" is OK but "foo" is an error.
25629  #
25630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25631  # It is also a way to make sure we got the proper file name for the real test later on.
25632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25633  if test "x$test_shortpath" = x; then
25634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25637  fi
25638
25639  # Call helper function which possibly converts this using DOS-style short mode.
25640  # If so, the updated path is stored in $new_path.
25641
25642  input_path="$new_path"
25643  # Check if we need to convert this using DOS-style short mode. If the path
25644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25645  # take no chances and rewrite it.
25646  # Note: m4 eats our [], so we need to use [ and ] instead.
25647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25648  if test "x$has_forbidden_chars" != x; then
25649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25653      # Going to short mode and back again did indeed matter. Since short mode is
25654      # case insensitive, let's make it lowercase to improve readability.
25655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25656      # Now convert it back to Unix-style (cygpath)
25657      input_path=`$CYGPATH -u "$shortmode_path"`
25658      new_path="$input_path"
25659    fi
25660  fi
25661
25662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25663  if test "x$test_cygdrive_prefix" = x; then
25664    # As a simple fix, exclude /usr/bin since it's not a real path.
25665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25667      # a path prefixed by /cygdrive for fixpath to work.
25668      new_path="$CYGWIN_ROOT_PATH$input_path"
25669    fi
25670  fi
25671
25672
25673  if test "x$path" != "x$new_path"; then
25674    BOOT_JDK="$new_path"
25675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25677  fi
25678
25679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25680
25681  path="$BOOT_JDK"
25682  has_colon=`$ECHO $path | $GREP ^.:`
25683  new_path="$path"
25684  if test "x$has_colon" = x; then
25685    # Not in mixed or Windows style, start by that.
25686    new_path=`cmd //c echo $path`
25687  fi
25688
25689
25690  input_path="$new_path"
25691  # Check if we need to convert this using DOS-style short mode. If the path
25692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25693  # take no chances and rewrite it.
25694  # Note: m4 eats our [], so we need to use [ and ] instead.
25695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25696  if test "x$has_forbidden_chars" != x; then
25697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25699  fi
25700
25701
25702  windows_path="$new_path"
25703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25704    unix_path=`$CYGPATH -u "$windows_path"`
25705    new_path="$unix_path"
25706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25708    new_path="$unix_path"
25709  fi
25710
25711  if test "x$path" != "x$new_path"; then
25712    BOOT_JDK="$new_path"
25713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25715  fi
25716
25717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25719
25720    else
25721      # We're on a unix platform. Hooray! :)
25722      path="$BOOT_JDK"
25723      has_space=`$ECHO "$path" | $GREP " "`
25724      if test "x$has_space" != x; then
25725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25728      fi
25729
25730      # Use eval to expand a potential ~
25731      eval path="$path"
25732      if test ! -f "$path" && test ! -d "$path"; then
25733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25734      fi
25735
25736      if test -d "$path"; then
25737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25738      else
25739        dir="`$DIRNAME "$path"`"
25740        base="`$BASENAME "$path"`"
25741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25742      fi
25743    fi
25744  fi
25745
25746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25747$as_echo_n "checking for Boot JDK... " >&6; }
25748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25749$as_echo "$BOOT_JDK" >&6; }
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25751$as_echo_n "checking Boot JDK version... " >&6; }
25752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25754$as_echo "$BOOT_JDK_VERSION" >&6; }
25755          fi # end check jdk version
25756        fi # end check javac
25757      fi # end check java
25758    fi # end check boot jdk found
25759  fi
25760
25761    done
25762  fi
25763
25764  fi
25765
25766
25767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25769      # Do we have a bin/java?
25770      if test ! -x "$BOOT_JDK/bin/java"; then
25771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25773        BOOT_JDK_FOUND=no
25774      else
25775        # Do we have a bin/javac?
25776        if test ! -x "$BOOT_JDK/bin/javac"; then
25777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25781          BOOT_JDK_FOUND=no
25782        else
25783          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25784          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25785
25786          # Extra M4 quote needed to protect [] in grep expression.
25787          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25788          if test "x$FOUND_CORRECT_VERSION" = x; then
25789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25791            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25792$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25793            BOOT_JDK_FOUND=no
25794          else
25795            # We're done! :-)
25796            BOOT_JDK_FOUND=yes
25797
25798  # Only process if variable expands to non-empty
25799
25800  if test "x$BOOT_JDK" != x; then
25801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25802
25803  # Input might be given as Windows format, start by converting to
25804  # unix format.
25805  path="$BOOT_JDK"
25806  new_path=`$CYGPATH -u "$path"`
25807
25808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25811  # "foo.exe" is OK but "foo" is an error.
25812  #
25813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25814  # It is also a way to make sure we got the proper file name for the real test later on.
25815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25816  if test "x$test_shortpath" = x; then
25817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25819    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25820  fi
25821
25822  # Call helper function which possibly converts this using DOS-style short mode.
25823  # If so, the updated path is stored in $new_path.
25824
25825  input_path="$new_path"
25826  # Check if we need to convert this using DOS-style short mode. If the path
25827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25828  # take no chances and rewrite it.
25829  # Note: m4 eats our [], so we need to use [ and ] instead.
25830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25831  if test "x$has_forbidden_chars" != x; then
25832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25836      # Going to short mode and back again did indeed matter. Since short mode is
25837      # case insensitive, let's make it lowercase to improve readability.
25838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25839      # Now convert it back to Unix-style (cygpath)
25840      input_path=`$CYGPATH -u "$shortmode_path"`
25841      new_path="$input_path"
25842    fi
25843  fi
25844
25845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25846  if test "x$test_cygdrive_prefix" = x; then
25847    # As a simple fix, exclude /usr/bin since it's not a real path.
25848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25850      # a path prefixed by /cygdrive for fixpath to work.
25851      new_path="$CYGWIN_ROOT_PATH$input_path"
25852    fi
25853  fi
25854
25855
25856  if test "x$path" != "x$new_path"; then
25857    BOOT_JDK="$new_path"
25858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25860  fi
25861
25862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25863
25864  path="$BOOT_JDK"
25865  has_colon=`$ECHO $path | $GREP ^.:`
25866  new_path="$path"
25867  if test "x$has_colon" = x; then
25868    # Not in mixed or Windows style, start by that.
25869    new_path=`cmd //c echo $path`
25870  fi
25871
25872
25873  input_path="$new_path"
25874  # Check if we need to convert this using DOS-style short mode. If the path
25875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25876  # take no chances and rewrite it.
25877  # Note: m4 eats our [], so we need to use [ and ] instead.
25878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25879  if test "x$has_forbidden_chars" != x; then
25880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25882  fi
25883
25884
25885  windows_path="$new_path"
25886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25887    unix_path=`$CYGPATH -u "$windows_path"`
25888    new_path="$unix_path"
25889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25891    new_path="$unix_path"
25892  fi
25893
25894  if test "x$path" != "x$new_path"; then
25895    BOOT_JDK="$new_path"
25896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25898  fi
25899
25900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25902
25903    else
25904      # We're on a unix platform. Hooray! :)
25905      path="$BOOT_JDK"
25906      has_space=`$ECHO "$path" | $GREP " "`
25907      if test "x$has_space" != x; then
25908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25911      fi
25912
25913      # Use eval to expand a potential ~
25914      eval path="$path"
25915      if test ! -f "$path" && test ! -d "$path"; then
25916        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25917      fi
25918
25919      if test -d "$path"; then
25920        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25921      else
25922        dir="`$DIRNAME "$path"`"
25923        base="`$BASENAME "$path"`"
25924        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25925      fi
25926    fi
25927  fi
25928
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25930$as_echo_n "checking for Boot JDK... " >&6; }
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25932$as_echo "$BOOT_JDK" >&6; }
25933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25934$as_echo_n "checking Boot JDK version... " >&6; }
25935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25937$as_echo "$BOOT_JDK_VERSION" >&6; }
25938          fi # end check jdk version
25939        fi # end check javac
25940      fi # end check java
25941    fi # end check boot jdk found
25942  fi
25943
25944
25945  if test "x$BOOT_JDK_FOUND" = xno; then
25946    # Now execute the test
25947
25948  if test "x$PROGRAMW6432" != x; then
25949    VIRTUAL_DIR="$PROGRAMW6432/Java"
25950
25951  windows_path="$VIRTUAL_DIR"
25952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25953    unix_path=`$CYGPATH -u "$windows_path"`
25954    VIRTUAL_DIR="$unix_path"
25955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25957    VIRTUAL_DIR="$unix_path"
25958  fi
25959
25960
25961  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25962  BOOT_JDK_SUFFIX=""
25963  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25964  if test "x$ALL_JDKS_FOUND" != x; then
25965    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25966
25967  if test "x$BOOT_JDK_FOUND" = xno; then
25968    # Now execute the test
25969
25970        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25971        if test -d "$BOOT_JDK"; then
25972          BOOT_JDK_FOUND=maybe
25973          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25974$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25975        fi
25976
25977
25978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25980      # Do we have a bin/java?
25981      if test ! -x "$BOOT_JDK/bin/java"; then
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25984        BOOT_JDK_FOUND=no
25985      else
25986        # Do we have a bin/javac?
25987        if test ! -x "$BOOT_JDK/bin/javac"; then
25988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25992          BOOT_JDK_FOUND=no
25993        else
25994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25996
25997          # Extra M4 quote needed to protect [] in grep expression.
25998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25999          if test "x$FOUND_CORRECT_VERSION" = x; then
26000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26004            BOOT_JDK_FOUND=no
26005          else
26006            # We're done! :-)
26007            BOOT_JDK_FOUND=yes
26008
26009  # Only process if variable expands to non-empty
26010
26011  if test "x$BOOT_JDK" != x; then
26012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26013
26014  # Input might be given as Windows format, start by converting to
26015  # unix format.
26016  path="$BOOT_JDK"
26017  new_path=`$CYGPATH -u "$path"`
26018
26019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26022  # "foo.exe" is OK but "foo" is an error.
26023  #
26024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26025  # It is also a way to make sure we got the proper file name for the real test later on.
26026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26027  if test "x$test_shortpath" = x; then
26028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26031  fi
26032
26033  # Call helper function which possibly converts this using DOS-style short mode.
26034  # If so, the updated path is stored in $new_path.
26035
26036  input_path="$new_path"
26037  # Check if we need to convert this using DOS-style short mode. If the path
26038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26039  # take no chances and rewrite it.
26040  # Note: m4 eats our [], so we need to use [ and ] instead.
26041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26042  if test "x$has_forbidden_chars" != x; then
26043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26047      # Going to short mode and back again did indeed matter. Since short mode is
26048      # case insensitive, let's make it lowercase to improve readability.
26049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26050      # Now convert it back to Unix-style (cygpath)
26051      input_path=`$CYGPATH -u "$shortmode_path"`
26052      new_path="$input_path"
26053    fi
26054  fi
26055
26056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26057  if test "x$test_cygdrive_prefix" = x; then
26058    # As a simple fix, exclude /usr/bin since it's not a real path.
26059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26061      # a path prefixed by /cygdrive for fixpath to work.
26062      new_path="$CYGWIN_ROOT_PATH$input_path"
26063    fi
26064  fi
26065
26066
26067  if test "x$path" != "x$new_path"; then
26068    BOOT_JDK="$new_path"
26069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26071  fi
26072
26073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26074
26075  path="$BOOT_JDK"
26076  has_colon=`$ECHO $path | $GREP ^.:`
26077  new_path="$path"
26078  if test "x$has_colon" = x; then
26079    # Not in mixed or Windows style, start by that.
26080    new_path=`cmd //c echo $path`
26081  fi
26082
26083
26084  input_path="$new_path"
26085  # Check if we need to convert this using DOS-style short mode. If the path
26086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26087  # take no chances and rewrite it.
26088  # Note: m4 eats our [], so we need to use [ and ] instead.
26089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26090  if test "x$has_forbidden_chars" != x; then
26091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26093  fi
26094
26095
26096  windows_path="$new_path"
26097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26098    unix_path=`$CYGPATH -u "$windows_path"`
26099    new_path="$unix_path"
26100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26102    new_path="$unix_path"
26103  fi
26104
26105  if test "x$path" != "x$new_path"; then
26106    BOOT_JDK="$new_path"
26107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26109  fi
26110
26111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26113
26114    else
26115      # We're on a unix platform. Hooray! :)
26116      path="$BOOT_JDK"
26117      has_space=`$ECHO "$path" | $GREP " "`
26118      if test "x$has_space" != x; then
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26122      fi
26123
26124      # Use eval to expand a potential ~
26125      eval path="$path"
26126      if test ! -f "$path" && test ! -d "$path"; then
26127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26128      fi
26129
26130      if test -d "$path"; then
26131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26132      else
26133        dir="`$DIRNAME "$path"`"
26134        base="`$BASENAME "$path"`"
26135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26136      fi
26137    fi
26138  fi
26139
26140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26141$as_echo_n "checking for Boot JDK... " >&6; }
26142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26143$as_echo "$BOOT_JDK" >&6; }
26144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26145$as_echo_n "checking Boot JDK version... " >&6; }
26146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26148$as_echo "$BOOT_JDK_VERSION" >&6; }
26149          fi # end check jdk version
26150        fi # end check javac
26151      fi # end check java
26152    fi # end check boot jdk found
26153  fi
26154
26155    done
26156  fi
26157
26158  fi
26159
26160
26161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26163      # Do we have a bin/java?
26164      if test ! -x "$BOOT_JDK/bin/java"; then
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26167        BOOT_JDK_FOUND=no
26168      else
26169        # Do we have a bin/javac?
26170        if test ! -x "$BOOT_JDK/bin/javac"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26175          BOOT_JDK_FOUND=no
26176        else
26177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26179
26180          # Extra M4 quote needed to protect [] in grep expression.
26181          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26182          if test "x$FOUND_CORRECT_VERSION" = x; then
26183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26187            BOOT_JDK_FOUND=no
26188          else
26189            # We're done! :-)
26190            BOOT_JDK_FOUND=yes
26191
26192  # Only process if variable expands to non-empty
26193
26194  if test "x$BOOT_JDK" != x; then
26195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26196
26197  # Input might be given as Windows format, start by converting to
26198  # unix format.
26199  path="$BOOT_JDK"
26200  new_path=`$CYGPATH -u "$path"`
26201
26202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26205  # "foo.exe" is OK but "foo" is an error.
26206  #
26207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26208  # It is also a way to make sure we got the proper file name for the real test later on.
26209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26210  if test "x$test_shortpath" = x; then
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26214  fi
26215
26216  # Call helper function which possibly converts this using DOS-style short mode.
26217  # If so, the updated path is stored in $new_path.
26218
26219  input_path="$new_path"
26220  # Check if we need to convert this using DOS-style short mode. If the path
26221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26222  # take no chances and rewrite it.
26223  # Note: m4 eats our [], so we need to use [ and ] instead.
26224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26225  if test "x$has_forbidden_chars" != x; then
26226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26230      # Going to short mode and back again did indeed matter. Since short mode is
26231      # case insensitive, let's make it lowercase to improve readability.
26232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233      # Now convert it back to Unix-style (cygpath)
26234      input_path=`$CYGPATH -u "$shortmode_path"`
26235      new_path="$input_path"
26236    fi
26237  fi
26238
26239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26240  if test "x$test_cygdrive_prefix" = x; then
26241    # As a simple fix, exclude /usr/bin since it's not a real path.
26242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26244      # a path prefixed by /cygdrive for fixpath to work.
26245      new_path="$CYGWIN_ROOT_PATH$input_path"
26246    fi
26247  fi
26248
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257
26258  path="$BOOT_JDK"
26259  has_colon=`$ECHO $path | $GREP ^.:`
26260  new_path="$path"
26261  if test "x$has_colon" = x; then
26262    # Not in mixed or Windows style, start by that.
26263    new_path=`cmd //c echo $path`
26264  fi
26265
26266
26267  input_path="$new_path"
26268  # Check if we need to convert this using DOS-style short mode. If the path
26269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26270  # take no chances and rewrite it.
26271  # Note: m4 eats our [], so we need to use [ and ] instead.
26272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26273  if test "x$has_forbidden_chars" != x; then
26274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26276  fi
26277
26278
26279  windows_path="$new_path"
26280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26281    unix_path=`$CYGPATH -u "$windows_path"`
26282    new_path="$unix_path"
26283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26285    new_path="$unix_path"
26286  fi
26287
26288  if test "x$path" != "x$new_path"; then
26289    BOOT_JDK="$new_path"
26290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26292  fi
26293
26294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296
26297    else
26298      # We're on a unix platform. Hooray! :)
26299      path="$BOOT_JDK"
26300      has_space=`$ECHO "$path" | $GREP " "`
26301      if test "x$has_space" != x; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26305      fi
26306
26307      # Use eval to expand a potential ~
26308      eval path="$path"
26309      if test ! -f "$path" && test ! -d "$path"; then
26310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26311      fi
26312
26313      if test -d "$path"; then
26314        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26315      else
26316        dir="`$DIRNAME "$path"`"
26317        base="`$BASENAME "$path"`"
26318        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26319      fi
26320    fi
26321  fi
26322
26323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26324$as_echo_n "checking for Boot JDK... " >&6; }
26325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26326$as_echo "$BOOT_JDK" >&6; }
26327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26328$as_echo_n "checking Boot JDK version... " >&6; }
26329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26331$as_echo "$BOOT_JDK_VERSION" >&6; }
26332          fi # end check jdk version
26333        fi # end check javac
26334      fi # end check java
26335    fi # end check boot jdk found
26336  fi
26337
26338
26339  if test "x$BOOT_JDK_FOUND" = xno; then
26340    # Now execute the test
26341
26342  if test "x$PROGRAMFILES" != x; then
26343    VIRTUAL_DIR="$PROGRAMFILES/Java"
26344
26345  windows_path="$VIRTUAL_DIR"
26346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26347    unix_path=`$CYGPATH -u "$windows_path"`
26348    VIRTUAL_DIR="$unix_path"
26349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26351    VIRTUAL_DIR="$unix_path"
26352  fi
26353
26354
26355  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26356  BOOT_JDK_SUFFIX=""
26357  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26358  if test "x$ALL_JDKS_FOUND" != x; then
26359    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26360
26361  if test "x$BOOT_JDK_FOUND" = xno; then
26362    # Now execute the test
26363
26364        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26365        if test -d "$BOOT_JDK"; then
26366          BOOT_JDK_FOUND=maybe
26367          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26368$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26369        fi
26370
26371
26372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26374      # Do we have a bin/java?
26375      if test ! -x "$BOOT_JDK/bin/java"; then
26376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26378        BOOT_JDK_FOUND=no
26379      else
26380        # Do we have a bin/javac?
26381        if test ! -x "$BOOT_JDK/bin/javac"; then
26382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26386          BOOT_JDK_FOUND=no
26387        else
26388          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26389          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26390
26391          # Extra M4 quote needed to protect [] in grep expression.
26392          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26393          if test "x$FOUND_CORRECT_VERSION" = x; then
26394            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26396            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26397$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26398            BOOT_JDK_FOUND=no
26399          else
26400            # We're done! :-)
26401            BOOT_JDK_FOUND=yes
26402
26403  # Only process if variable expands to non-empty
26404
26405  if test "x$BOOT_JDK" != x; then
26406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26407
26408  # Input might be given as Windows format, start by converting to
26409  # unix format.
26410  path="$BOOT_JDK"
26411  new_path=`$CYGPATH -u "$path"`
26412
26413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26416  # "foo.exe" is OK but "foo" is an error.
26417  #
26418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26419  # It is also a way to make sure we got the proper file name for the real test later on.
26420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26421  if test "x$test_shortpath" = x; then
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26424    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26425  fi
26426
26427  # Call helper function which possibly converts this using DOS-style short mode.
26428  # If so, the updated path is stored in $new_path.
26429
26430  input_path="$new_path"
26431  # Check if we need to convert this using DOS-style short mode. If the path
26432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26433  # take no chances and rewrite it.
26434  # Note: m4 eats our [], so we need to use [ and ] instead.
26435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26436  if test "x$has_forbidden_chars" != x; then
26437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26441      # Going to short mode and back again did indeed matter. Since short mode is
26442      # case insensitive, let's make it lowercase to improve readability.
26443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26444      # Now convert it back to Unix-style (cygpath)
26445      input_path=`$CYGPATH -u "$shortmode_path"`
26446      new_path="$input_path"
26447    fi
26448  fi
26449
26450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26451  if test "x$test_cygdrive_prefix" = x; then
26452    # As a simple fix, exclude /usr/bin since it's not a real path.
26453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26455      # a path prefixed by /cygdrive for fixpath to work.
26456      new_path="$CYGWIN_ROOT_PATH$input_path"
26457    fi
26458  fi
26459
26460
26461  if test "x$path" != "x$new_path"; then
26462    BOOT_JDK="$new_path"
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26465  fi
26466
26467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26468
26469  path="$BOOT_JDK"
26470  has_colon=`$ECHO $path | $GREP ^.:`
26471  new_path="$path"
26472  if test "x$has_colon" = x; then
26473    # Not in mixed or Windows style, start by that.
26474    new_path=`cmd //c echo $path`
26475  fi
26476
26477
26478  input_path="$new_path"
26479  # Check if we need to convert this using DOS-style short mode. If the path
26480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26481  # take no chances and rewrite it.
26482  # Note: m4 eats our [], so we need to use [ and ] instead.
26483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26484  if test "x$has_forbidden_chars" != x; then
26485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26487  fi
26488
26489
26490  windows_path="$new_path"
26491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26492    unix_path=`$CYGPATH -u "$windows_path"`
26493    new_path="$unix_path"
26494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26496    new_path="$unix_path"
26497  fi
26498
26499  if test "x$path" != "x$new_path"; then
26500    BOOT_JDK="$new_path"
26501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26503  fi
26504
26505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26507
26508    else
26509      # We're on a unix platform. Hooray! :)
26510      path="$BOOT_JDK"
26511      has_space=`$ECHO "$path" | $GREP " "`
26512      if test "x$has_space" != x; then
26513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26516      fi
26517
26518      # Use eval to expand a potential ~
26519      eval path="$path"
26520      if test ! -f "$path" && test ! -d "$path"; then
26521        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26522      fi
26523
26524      if test -d "$path"; then
26525        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26526      else
26527        dir="`$DIRNAME "$path"`"
26528        base="`$BASENAME "$path"`"
26529        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26530      fi
26531    fi
26532  fi
26533
26534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26535$as_echo_n "checking for Boot JDK... " >&6; }
26536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26537$as_echo "$BOOT_JDK" >&6; }
26538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26539$as_echo_n "checking Boot JDK version... " >&6; }
26540            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26542$as_echo "$BOOT_JDK_VERSION" >&6; }
26543          fi # end check jdk version
26544        fi # end check javac
26545      fi # end check java
26546    fi # end check boot jdk found
26547  fi
26548
26549    done
26550  fi
26551
26552  fi
26553
26554
26555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26557      # Do we have a bin/java?
26558      if test ! -x "$BOOT_JDK/bin/java"; then
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26561        BOOT_JDK_FOUND=no
26562      else
26563        # Do we have a bin/javac?
26564        if test ! -x "$BOOT_JDK/bin/javac"; then
26565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26569          BOOT_JDK_FOUND=no
26570        else
26571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26573
26574          # Extra M4 quote needed to protect [] in grep expression.
26575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26576          if test "x$FOUND_CORRECT_VERSION" = x; then
26577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26581            BOOT_JDK_FOUND=no
26582          else
26583            # We're done! :-)
26584            BOOT_JDK_FOUND=yes
26585
26586  # Only process if variable expands to non-empty
26587
26588  if test "x$BOOT_JDK" != x; then
26589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590
26591  # Input might be given as Windows format, start by converting to
26592  # unix format.
26593  path="$BOOT_JDK"
26594  new_path=`$CYGPATH -u "$path"`
26595
26596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26599  # "foo.exe" is OK but "foo" is an error.
26600  #
26601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26602  # It is also a way to make sure we got the proper file name for the real test later on.
26603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26604  if test "x$test_shortpath" = x; then
26605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26608  fi
26609
26610  # Call helper function which possibly converts this using DOS-style short mode.
26611  # If so, the updated path is stored in $new_path.
26612
26613  input_path="$new_path"
26614  # Check if we need to convert this using DOS-style short mode. If the path
26615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26616  # take no chances and rewrite it.
26617  # Note: m4 eats our [], so we need to use [ and ] instead.
26618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26619  if test "x$has_forbidden_chars" != x; then
26620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26624      # Going to short mode and back again did indeed matter. Since short mode is
26625      # case insensitive, let's make it lowercase to improve readability.
26626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26627      # Now convert it back to Unix-style (cygpath)
26628      input_path=`$CYGPATH -u "$shortmode_path"`
26629      new_path="$input_path"
26630    fi
26631  fi
26632
26633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26634  if test "x$test_cygdrive_prefix" = x; then
26635    # As a simple fix, exclude /usr/bin since it's not a real path.
26636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26638      # a path prefixed by /cygdrive for fixpath to work.
26639      new_path="$CYGWIN_ROOT_PATH$input_path"
26640    fi
26641  fi
26642
26643
26644  if test "x$path" != "x$new_path"; then
26645    BOOT_JDK="$new_path"
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26648  fi
26649
26650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651
26652  path="$BOOT_JDK"
26653  has_colon=`$ECHO $path | $GREP ^.:`
26654  new_path="$path"
26655  if test "x$has_colon" = x; then
26656    # Not in mixed or Windows style, start by that.
26657    new_path=`cmd //c echo $path`
26658  fi
26659
26660
26661  input_path="$new_path"
26662  # Check if we need to convert this using DOS-style short mode. If the path
26663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26664  # take no chances and rewrite it.
26665  # Note: m4 eats our [], so we need to use [ and ] instead.
26666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26667  if test "x$has_forbidden_chars" != x; then
26668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26670  fi
26671
26672
26673  windows_path="$new_path"
26674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26675    unix_path=`$CYGPATH -u "$windows_path"`
26676    new_path="$unix_path"
26677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26679    new_path="$unix_path"
26680  fi
26681
26682  if test "x$path" != "x$new_path"; then
26683    BOOT_JDK="$new_path"
26684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26686  fi
26687
26688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26690
26691    else
26692      # We're on a unix platform. Hooray! :)
26693      path="$BOOT_JDK"
26694      has_space=`$ECHO "$path" | $GREP " "`
26695      if test "x$has_space" != x; then
26696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26699      fi
26700
26701      # Use eval to expand a potential ~
26702      eval path="$path"
26703      if test ! -f "$path" && test ! -d "$path"; then
26704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26705      fi
26706
26707      if test -d "$path"; then
26708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26709      else
26710        dir="`$DIRNAME "$path"`"
26711        base="`$BASENAME "$path"`"
26712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26713      fi
26714    fi
26715  fi
26716
26717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26718$as_echo_n "checking for Boot JDK... " >&6; }
26719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26720$as_echo "$BOOT_JDK" >&6; }
26721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26722$as_echo_n "checking Boot JDK version... " >&6; }
26723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26725$as_echo "$BOOT_JDK_VERSION" >&6; }
26726          fi # end check jdk version
26727        fi # end check javac
26728      fi # end check java
26729    fi # end check boot jdk found
26730  fi
26731
26732
26733  if test "x$BOOT_JDK_FOUND" = xno; then
26734    # Now execute the test
26735
26736  if test "x$ProgramFiles" != x; then
26737    VIRTUAL_DIR="$ProgramFiles/Java"
26738
26739  windows_path="$VIRTUAL_DIR"
26740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26741    unix_path=`$CYGPATH -u "$windows_path"`
26742    VIRTUAL_DIR="$unix_path"
26743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26745    VIRTUAL_DIR="$unix_path"
26746  fi
26747
26748
26749  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26750  BOOT_JDK_SUFFIX=""
26751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26752  if test "x$ALL_JDKS_FOUND" != x; then
26753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26754
26755  if test "x$BOOT_JDK_FOUND" = xno; then
26756    # Now execute the test
26757
26758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26759        if test -d "$BOOT_JDK"; then
26760          BOOT_JDK_FOUND=maybe
26761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26763        fi
26764
26765
26766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26768      # Do we have a bin/java?
26769      if test ! -x "$BOOT_JDK/bin/java"; then
26770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26772        BOOT_JDK_FOUND=no
26773      else
26774        # Do we have a bin/javac?
26775        if test ! -x "$BOOT_JDK/bin/javac"; then
26776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26780          BOOT_JDK_FOUND=no
26781        else
26782          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26783          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26784
26785          # Extra M4 quote needed to protect [] in grep expression.
26786          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26787          if test "x$FOUND_CORRECT_VERSION" = x; then
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26790            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26791$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26792            BOOT_JDK_FOUND=no
26793          else
26794            # We're done! :-)
26795            BOOT_JDK_FOUND=yes
26796
26797  # Only process if variable expands to non-empty
26798
26799  if test "x$BOOT_JDK" != x; then
26800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26801
26802  # Input might be given as Windows format, start by converting to
26803  # unix format.
26804  path="$BOOT_JDK"
26805  new_path=`$CYGPATH -u "$path"`
26806
26807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26810  # "foo.exe" is OK but "foo" is an error.
26811  #
26812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26813  # It is also a way to make sure we got the proper file name for the real test later on.
26814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26815  if test "x$test_shortpath" = x; then
26816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26819  fi
26820
26821  # Call helper function which possibly converts this using DOS-style short mode.
26822  # If so, the updated path is stored in $new_path.
26823
26824  input_path="$new_path"
26825  # Check if we need to convert this using DOS-style short mode. If the path
26826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26827  # take no chances and rewrite it.
26828  # Note: m4 eats our [], so we need to use [ and ] instead.
26829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26830  if test "x$has_forbidden_chars" != x; then
26831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26835      # Going to short mode and back again did indeed matter. Since short mode is
26836      # case insensitive, let's make it lowercase to improve readability.
26837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26838      # Now convert it back to Unix-style (cygpath)
26839      input_path=`$CYGPATH -u "$shortmode_path"`
26840      new_path="$input_path"
26841    fi
26842  fi
26843
26844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26845  if test "x$test_cygdrive_prefix" = x; then
26846    # As a simple fix, exclude /usr/bin since it's not a real path.
26847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26849      # a path prefixed by /cygdrive for fixpath to work.
26850      new_path="$CYGWIN_ROOT_PATH$input_path"
26851    fi
26852  fi
26853
26854
26855  if test "x$path" != "x$new_path"; then
26856    BOOT_JDK="$new_path"
26857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26859  fi
26860
26861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26862
26863  path="$BOOT_JDK"
26864  has_colon=`$ECHO $path | $GREP ^.:`
26865  new_path="$path"
26866  if test "x$has_colon" = x; then
26867    # Not in mixed or Windows style, start by that.
26868    new_path=`cmd //c echo $path`
26869  fi
26870
26871
26872  input_path="$new_path"
26873  # Check if we need to convert this using DOS-style short mode. If the path
26874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26875  # take no chances and rewrite it.
26876  # Note: m4 eats our [], so we need to use [ and ] instead.
26877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26878  if test "x$has_forbidden_chars" != x; then
26879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26881  fi
26882
26883
26884  windows_path="$new_path"
26885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26886    unix_path=`$CYGPATH -u "$windows_path"`
26887    new_path="$unix_path"
26888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26890    new_path="$unix_path"
26891  fi
26892
26893  if test "x$path" != "x$new_path"; then
26894    BOOT_JDK="$new_path"
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26897  fi
26898
26899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26901
26902    else
26903      # We're on a unix platform. Hooray! :)
26904      path="$BOOT_JDK"
26905      has_space=`$ECHO "$path" | $GREP " "`
26906      if test "x$has_space" != x; then
26907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26910      fi
26911
26912      # Use eval to expand a potential ~
26913      eval path="$path"
26914      if test ! -f "$path" && test ! -d "$path"; then
26915        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26916      fi
26917
26918      if test -d "$path"; then
26919        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26920      else
26921        dir="`$DIRNAME "$path"`"
26922        base="`$BASENAME "$path"`"
26923        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26924      fi
26925    fi
26926  fi
26927
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26929$as_echo_n "checking for Boot JDK... " >&6; }
26930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26931$as_echo "$BOOT_JDK" >&6; }
26932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26933$as_echo_n "checking Boot JDK version... " >&6; }
26934            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26936$as_echo "$BOOT_JDK_VERSION" >&6; }
26937          fi # end check jdk version
26938        fi # end check javac
26939      fi # end check java
26940    fi # end check boot jdk found
26941  fi
26942
26943    done
26944  fi
26945
26946  fi
26947
26948
26949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26951      # Do we have a bin/java?
26952      if test ! -x "$BOOT_JDK/bin/java"; then
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26955        BOOT_JDK_FOUND=no
26956      else
26957        # Do we have a bin/javac?
26958        if test ! -x "$BOOT_JDK/bin/javac"; then
26959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26963          BOOT_JDK_FOUND=no
26964        else
26965          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26966          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26967
26968          # Extra M4 quote needed to protect [] in grep expression.
26969          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26970          if test "x$FOUND_CORRECT_VERSION" = x; then
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26973            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26974$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26975            BOOT_JDK_FOUND=no
26976          else
26977            # We're done! :-)
26978            BOOT_JDK_FOUND=yes
26979
26980  # Only process if variable expands to non-empty
26981
26982  if test "x$BOOT_JDK" != x; then
26983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26984
26985  # Input might be given as Windows format, start by converting to
26986  # unix format.
26987  path="$BOOT_JDK"
26988  new_path=`$CYGPATH -u "$path"`
26989
26990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26993  # "foo.exe" is OK but "foo" is an error.
26994  #
26995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26996  # It is also a way to make sure we got the proper file name for the real test later on.
26997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26998  if test "x$test_shortpath" = x; then
26999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27002  fi
27003
27004  # Call helper function which possibly converts this using DOS-style short mode.
27005  # If so, the updated path is stored in $new_path.
27006
27007  input_path="$new_path"
27008  # Check if we need to convert this using DOS-style short mode. If the path
27009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27010  # take no chances and rewrite it.
27011  # Note: m4 eats our [], so we need to use [ and ] instead.
27012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27013  if test "x$has_forbidden_chars" != x; then
27014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27018      # Going to short mode and back again did indeed matter. Since short mode is
27019      # case insensitive, let's make it lowercase to improve readability.
27020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27021      # Now convert it back to Unix-style (cygpath)
27022      input_path=`$CYGPATH -u "$shortmode_path"`
27023      new_path="$input_path"
27024    fi
27025  fi
27026
27027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27028  if test "x$test_cygdrive_prefix" = x; then
27029    # As a simple fix, exclude /usr/bin since it's not a real path.
27030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27032      # a path prefixed by /cygdrive for fixpath to work.
27033      new_path="$CYGWIN_ROOT_PATH$input_path"
27034    fi
27035  fi
27036
27037
27038  if test "x$path" != "x$new_path"; then
27039    BOOT_JDK="$new_path"
27040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27042  fi
27043
27044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045
27046  path="$BOOT_JDK"
27047  has_colon=`$ECHO $path | $GREP ^.:`
27048  new_path="$path"
27049  if test "x$has_colon" = x; then
27050    # Not in mixed or Windows style, start by that.
27051    new_path=`cmd //c echo $path`
27052  fi
27053
27054
27055  input_path="$new_path"
27056  # Check if we need to convert this using DOS-style short mode. If the path
27057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27058  # take no chances and rewrite it.
27059  # Note: m4 eats our [], so we need to use [ and ] instead.
27060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27061  if test "x$has_forbidden_chars" != x; then
27062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27064  fi
27065
27066
27067  windows_path="$new_path"
27068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27069    unix_path=`$CYGPATH -u "$windows_path"`
27070    new_path="$unix_path"
27071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27073    new_path="$unix_path"
27074  fi
27075
27076  if test "x$path" != "x$new_path"; then
27077    BOOT_JDK="$new_path"
27078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27080  fi
27081
27082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27084
27085    else
27086      # We're on a unix platform. Hooray! :)
27087      path="$BOOT_JDK"
27088      has_space=`$ECHO "$path" | $GREP " "`
27089      if test "x$has_space" != x; then
27090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27093      fi
27094
27095      # Use eval to expand a potential ~
27096      eval path="$path"
27097      if test ! -f "$path" && test ! -d "$path"; then
27098        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27099      fi
27100
27101      if test -d "$path"; then
27102        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27103      else
27104        dir="`$DIRNAME "$path"`"
27105        base="`$BASENAME "$path"`"
27106        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27107      fi
27108    fi
27109  fi
27110
27111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27112$as_echo_n "checking for Boot JDK... " >&6; }
27113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27114$as_echo "$BOOT_JDK" >&6; }
27115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27116$as_echo_n "checking Boot JDK version... " >&6; }
27117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27119$as_echo "$BOOT_JDK_VERSION" >&6; }
27120          fi # end check jdk version
27121        fi # end check javac
27122      fi # end check java
27123    fi # end check boot jdk found
27124  fi
27125
27126
27127  if test "x$BOOT_JDK_FOUND" = xno; then
27128    # Now execute the test
27129
27130  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27131  BOOT_JDK_SUFFIX=""
27132  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27133  if test "x$ALL_JDKS_FOUND" != x; then
27134    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27135
27136  if test "x$BOOT_JDK_FOUND" = xno; then
27137    # Now execute the test
27138
27139        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27140        if test -d "$BOOT_JDK"; then
27141          BOOT_JDK_FOUND=maybe
27142          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27143$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27144        fi
27145
27146
27147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27149      # Do we have a bin/java?
27150      if test ! -x "$BOOT_JDK/bin/java"; then
27151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27153        BOOT_JDK_FOUND=no
27154      else
27155        # Do we have a bin/javac?
27156        if test ! -x "$BOOT_JDK/bin/javac"; then
27157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27161          BOOT_JDK_FOUND=no
27162        else
27163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27165
27166          # Extra M4 quote needed to protect [] in grep expression.
27167          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27168          if test "x$FOUND_CORRECT_VERSION" = x; then
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27173            BOOT_JDK_FOUND=no
27174          else
27175            # We're done! :-)
27176            BOOT_JDK_FOUND=yes
27177
27178  # Only process if variable expands to non-empty
27179
27180  if test "x$BOOT_JDK" != x; then
27181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27182
27183  # Input might be given as Windows format, start by converting to
27184  # unix format.
27185  path="$BOOT_JDK"
27186  new_path=`$CYGPATH -u "$path"`
27187
27188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27191  # "foo.exe" is OK but "foo" is an error.
27192  #
27193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27194  # It is also a way to make sure we got the proper file name for the real test later on.
27195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27196  if test "x$test_shortpath" = x; then
27197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27200  fi
27201
27202  # Call helper function which possibly converts this using DOS-style short mode.
27203  # If so, the updated path is stored in $new_path.
27204
27205  input_path="$new_path"
27206  # Check if we need to convert this using DOS-style short mode. If the path
27207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27208  # take no chances and rewrite it.
27209  # Note: m4 eats our [], so we need to use [ and ] instead.
27210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27211  if test "x$has_forbidden_chars" != x; then
27212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27216      # Going to short mode and back again did indeed matter. Since short mode is
27217      # case insensitive, let's make it lowercase to improve readability.
27218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27219      # Now convert it back to Unix-style (cygpath)
27220      input_path=`$CYGPATH -u "$shortmode_path"`
27221      new_path="$input_path"
27222    fi
27223  fi
27224
27225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27226  if test "x$test_cygdrive_prefix" = x; then
27227    # As a simple fix, exclude /usr/bin since it's not a real path.
27228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27230      # a path prefixed by /cygdrive for fixpath to work.
27231      new_path="$CYGWIN_ROOT_PATH$input_path"
27232    fi
27233  fi
27234
27235
27236  if test "x$path" != "x$new_path"; then
27237    BOOT_JDK="$new_path"
27238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27240  fi
27241
27242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27243
27244  path="$BOOT_JDK"
27245  has_colon=`$ECHO $path | $GREP ^.:`
27246  new_path="$path"
27247  if test "x$has_colon" = x; then
27248    # Not in mixed or Windows style, start by that.
27249    new_path=`cmd //c echo $path`
27250  fi
27251
27252
27253  input_path="$new_path"
27254  # Check if we need to convert this using DOS-style short mode. If the path
27255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27256  # take no chances and rewrite it.
27257  # Note: m4 eats our [], so we need to use [ and ] instead.
27258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27259  if test "x$has_forbidden_chars" != x; then
27260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27262  fi
27263
27264
27265  windows_path="$new_path"
27266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27267    unix_path=`$CYGPATH -u "$windows_path"`
27268    new_path="$unix_path"
27269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27271    new_path="$unix_path"
27272  fi
27273
27274  if test "x$path" != "x$new_path"; then
27275    BOOT_JDK="$new_path"
27276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27278  fi
27279
27280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27282
27283    else
27284      # We're on a unix platform. Hooray! :)
27285      path="$BOOT_JDK"
27286      has_space=`$ECHO "$path" | $GREP " "`
27287      if test "x$has_space" != x; then
27288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27291      fi
27292
27293      # Use eval to expand a potential ~
27294      eval path="$path"
27295      if test ! -f "$path" && test ! -d "$path"; then
27296        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27297      fi
27298
27299      if test -d "$path"; then
27300        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27301      else
27302        dir="`$DIRNAME "$path"`"
27303        base="`$BASENAME "$path"`"
27304        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27305      fi
27306    fi
27307  fi
27308
27309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27310$as_echo_n "checking for Boot JDK... " >&6; }
27311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27312$as_echo "$BOOT_JDK" >&6; }
27313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27314$as_echo_n "checking Boot JDK version... " >&6; }
27315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27317$as_echo "$BOOT_JDK_VERSION" >&6; }
27318          fi # end check jdk version
27319        fi # end check javac
27320      fi # end check java
27321    fi # end check boot jdk found
27322  fi
27323
27324    done
27325  fi
27326
27327
27328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27330      # Do we have a bin/java?
27331      if test ! -x "$BOOT_JDK/bin/java"; then
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27334        BOOT_JDK_FOUND=no
27335      else
27336        # Do we have a bin/javac?
27337        if test ! -x "$BOOT_JDK/bin/javac"; then
27338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27342          BOOT_JDK_FOUND=no
27343        else
27344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27346
27347          # Extra M4 quote needed to protect [] in grep expression.
27348          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27349          if test "x$FOUND_CORRECT_VERSION" = x; then
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27354            BOOT_JDK_FOUND=no
27355          else
27356            # We're done! :-)
27357            BOOT_JDK_FOUND=yes
27358
27359  # Only process if variable expands to non-empty
27360
27361  if test "x$BOOT_JDK" != x; then
27362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27363
27364  # Input might be given as Windows format, start by converting to
27365  # unix format.
27366  path="$BOOT_JDK"
27367  new_path=`$CYGPATH -u "$path"`
27368
27369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27372  # "foo.exe" is OK but "foo" is an error.
27373  #
27374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27375  # It is also a way to make sure we got the proper file name for the real test later on.
27376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27377  if test "x$test_shortpath" = x; then
27378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27381  fi
27382
27383  # Call helper function which possibly converts this using DOS-style short mode.
27384  # If so, the updated path is stored in $new_path.
27385
27386  input_path="$new_path"
27387  # Check if we need to convert this using DOS-style short mode. If the path
27388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27389  # take no chances and rewrite it.
27390  # Note: m4 eats our [], so we need to use [ and ] instead.
27391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27392  if test "x$has_forbidden_chars" != x; then
27393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27397      # Going to short mode and back again did indeed matter. Since short mode is
27398      # case insensitive, let's make it lowercase to improve readability.
27399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27400      # Now convert it back to Unix-style (cygpath)
27401      input_path=`$CYGPATH -u "$shortmode_path"`
27402      new_path="$input_path"
27403    fi
27404  fi
27405
27406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27407  if test "x$test_cygdrive_prefix" = x; then
27408    # As a simple fix, exclude /usr/bin since it's not a real path.
27409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27411      # a path prefixed by /cygdrive for fixpath to work.
27412      new_path="$CYGWIN_ROOT_PATH$input_path"
27413    fi
27414  fi
27415
27416
27417  if test "x$path" != "x$new_path"; then
27418    BOOT_JDK="$new_path"
27419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27421  fi
27422
27423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27424
27425  path="$BOOT_JDK"
27426  has_colon=`$ECHO $path | $GREP ^.:`
27427  new_path="$path"
27428  if test "x$has_colon" = x; then
27429    # Not in mixed or Windows style, start by that.
27430    new_path=`cmd //c echo $path`
27431  fi
27432
27433
27434  input_path="$new_path"
27435  # Check if we need to convert this using DOS-style short mode. If the path
27436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27437  # take no chances and rewrite it.
27438  # Note: m4 eats our [], so we need to use [ and ] instead.
27439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27440  if test "x$has_forbidden_chars" != x; then
27441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27443  fi
27444
27445
27446  windows_path="$new_path"
27447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448    unix_path=`$CYGPATH -u "$windows_path"`
27449    new_path="$unix_path"
27450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27452    new_path="$unix_path"
27453  fi
27454
27455  if test "x$path" != "x$new_path"; then
27456    BOOT_JDK="$new_path"
27457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27459  fi
27460
27461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27463
27464    else
27465      # We're on a unix platform. Hooray! :)
27466      path="$BOOT_JDK"
27467      has_space=`$ECHO "$path" | $GREP " "`
27468      if test "x$has_space" != x; then
27469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27472      fi
27473
27474      # Use eval to expand a potential ~
27475      eval path="$path"
27476      if test ! -f "$path" && test ! -d "$path"; then
27477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27478      fi
27479
27480      if test -d "$path"; then
27481        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27482      else
27483        dir="`$DIRNAME "$path"`"
27484        base="`$BASENAME "$path"`"
27485        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27486      fi
27487    fi
27488  fi
27489
27490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27491$as_echo_n "checking for Boot JDK... " >&6; }
27492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27493$as_echo "$BOOT_JDK" >&6; }
27494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27495$as_echo_n "checking Boot JDK version... " >&6; }
27496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27498$as_echo "$BOOT_JDK_VERSION" >&6; }
27499          fi # end check jdk version
27500        fi # end check javac
27501      fi # end check java
27502    fi # end check boot jdk found
27503  fi
27504
27505  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27506
27507  if test "x$BOOT_JDK_FOUND" = xno; then
27508    # Now execute the test
27509
27510  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27511  BOOT_JDK_SUFFIX="/Contents/Home"
27512  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27513  if test "x$ALL_JDKS_FOUND" != x; then
27514    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27515
27516  if test "x$BOOT_JDK_FOUND" = xno; then
27517    # Now execute the test
27518
27519        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27520        if test -d "$BOOT_JDK"; then
27521          BOOT_JDK_FOUND=maybe
27522          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27523$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27524        fi
27525
27526
27527    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27528    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27529      # Do we have a bin/java?
27530      if test ! -x "$BOOT_JDK/bin/java"; then
27531        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27533        BOOT_JDK_FOUND=no
27534      else
27535        # Do we have a bin/javac?
27536        if test ! -x "$BOOT_JDK/bin/javac"; then
27537          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27539          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27540$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27541          BOOT_JDK_FOUND=no
27542        else
27543          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27544          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27545
27546          # Extra M4 quote needed to protect [] in grep expression.
27547          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27548          if test "x$FOUND_CORRECT_VERSION" = x; then
27549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27551            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27553            BOOT_JDK_FOUND=no
27554          else
27555            # We're done! :-)
27556            BOOT_JDK_FOUND=yes
27557
27558  # Only process if variable expands to non-empty
27559
27560  if test "x$BOOT_JDK" != x; then
27561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27562
27563  # Input might be given as Windows format, start by converting to
27564  # unix format.
27565  path="$BOOT_JDK"
27566  new_path=`$CYGPATH -u "$path"`
27567
27568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27571  # "foo.exe" is OK but "foo" is an error.
27572  #
27573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27574  # It is also a way to make sure we got the proper file name for the real test later on.
27575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27576  if test "x$test_shortpath" = x; then
27577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27580  fi
27581
27582  # Call helper function which possibly converts this using DOS-style short mode.
27583  # If so, the updated path is stored in $new_path.
27584
27585  input_path="$new_path"
27586  # Check if we need to convert this using DOS-style short mode. If the path
27587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27588  # take no chances and rewrite it.
27589  # Note: m4 eats our [], so we need to use [ and ] instead.
27590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27591  if test "x$has_forbidden_chars" != x; then
27592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27596      # Going to short mode and back again did indeed matter. Since short mode is
27597      # case insensitive, let's make it lowercase to improve readability.
27598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27599      # Now convert it back to Unix-style (cygpath)
27600      input_path=`$CYGPATH -u "$shortmode_path"`
27601      new_path="$input_path"
27602    fi
27603  fi
27604
27605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27606  if test "x$test_cygdrive_prefix" = x; then
27607    # As a simple fix, exclude /usr/bin since it's not a real path.
27608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27610      # a path prefixed by /cygdrive for fixpath to work.
27611      new_path="$CYGWIN_ROOT_PATH$input_path"
27612    fi
27613  fi
27614
27615
27616  if test "x$path" != "x$new_path"; then
27617    BOOT_JDK="$new_path"
27618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27620  fi
27621
27622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27623
27624  path="$BOOT_JDK"
27625  has_colon=`$ECHO $path | $GREP ^.:`
27626  new_path="$path"
27627  if test "x$has_colon" = x; then
27628    # Not in mixed or Windows style, start by that.
27629    new_path=`cmd //c echo $path`
27630  fi
27631
27632
27633  input_path="$new_path"
27634  # Check if we need to convert this using DOS-style short mode. If the path
27635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27636  # take no chances and rewrite it.
27637  # Note: m4 eats our [], so we need to use [ and ] instead.
27638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27639  if test "x$has_forbidden_chars" != x; then
27640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27642  fi
27643
27644
27645  windows_path="$new_path"
27646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27647    unix_path=`$CYGPATH -u "$windows_path"`
27648    new_path="$unix_path"
27649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27651    new_path="$unix_path"
27652  fi
27653
27654  if test "x$path" != "x$new_path"; then
27655    BOOT_JDK="$new_path"
27656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27658  fi
27659
27660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27662
27663    else
27664      # We're on a unix platform. Hooray! :)
27665      path="$BOOT_JDK"
27666      has_space=`$ECHO "$path" | $GREP " "`
27667      if test "x$has_space" != x; then
27668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27671      fi
27672
27673      # Use eval to expand a potential ~
27674      eval path="$path"
27675      if test ! -f "$path" && test ! -d "$path"; then
27676        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27677      fi
27678
27679      if test -d "$path"; then
27680        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27681      else
27682        dir="`$DIRNAME "$path"`"
27683        base="`$BASENAME "$path"`"
27684        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27685      fi
27686    fi
27687  fi
27688
27689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27690$as_echo_n "checking for Boot JDK... " >&6; }
27691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27692$as_echo "$BOOT_JDK" >&6; }
27693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27694$as_echo_n "checking Boot JDK version... " >&6; }
27695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27697$as_echo "$BOOT_JDK_VERSION" >&6; }
27698          fi # end check jdk version
27699        fi # end check javac
27700      fi # end check java
27701    fi # end check boot jdk found
27702  fi
27703
27704    done
27705  fi
27706
27707
27708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27710      # Do we have a bin/java?
27711      if test ! -x "$BOOT_JDK/bin/java"; then
27712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27714        BOOT_JDK_FOUND=no
27715      else
27716        # Do we have a bin/javac?
27717        if test ! -x "$BOOT_JDK/bin/javac"; then
27718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27722          BOOT_JDK_FOUND=no
27723        else
27724          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27725          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27726
27727          # Extra M4 quote needed to protect [] in grep expression.
27728          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27729          if test "x$FOUND_CORRECT_VERSION" = x; then
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27732            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27733$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27734            BOOT_JDK_FOUND=no
27735          else
27736            # We're done! :-)
27737            BOOT_JDK_FOUND=yes
27738
27739  # Only process if variable expands to non-empty
27740
27741  if test "x$BOOT_JDK" != x; then
27742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27743
27744  # Input might be given as Windows format, start by converting to
27745  # unix format.
27746  path="$BOOT_JDK"
27747  new_path=`$CYGPATH -u "$path"`
27748
27749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27752  # "foo.exe" is OK but "foo" is an error.
27753  #
27754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27755  # It is also a way to make sure we got the proper file name for the real test later on.
27756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27757  if test "x$test_shortpath" = x; then
27758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27760    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27761  fi
27762
27763  # Call helper function which possibly converts this using DOS-style short mode.
27764  # If so, the updated path is stored in $new_path.
27765
27766  input_path="$new_path"
27767  # Check if we need to convert this using DOS-style short mode. If the path
27768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27769  # take no chances and rewrite it.
27770  # Note: m4 eats our [], so we need to use [ and ] instead.
27771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27772  if test "x$has_forbidden_chars" != x; then
27773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27777      # Going to short mode and back again did indeed matter. Since short mode is
27778      # case insensitive, let's make it lowercase to improve readability.
27779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27780      # Now convert it back to Unix-style (cygpath)
27781      input_path=`$CYGPATH -u "$shortmode_path"`
27782      new_path="$input_path"
27783    fi
27784  fi
27785
27786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27787  if test "x$test_cygdrive_prefix" = x; then
27788    # As a simple fix, exclude /usr/bin since it's not a real path.
27789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27791      # a path prefixed by /cygdrive for fixpath to work.
27792      new_path="$CYGWIN_ROOT_PATH$input_path"
27793    fi
27794  fi
27795
27796
27797  if test "x$path" != "x$new_path"; then
27798    BOOT_JDK="$new_path"
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27801  fi
27802
27803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27804
27805  path="$BOOT_JDK"
27806  has_colon=`$ECHO $path | $GREP ^.:`
27807  new_path="$path"
27808  if test "x$has_colon" = x; then
27809    # Not in mixed or Windows style, start by that.
27810    new_path=`cmd //c echo $path`
27811  fi
27812
27813
27814  input_path="$new_path"
27815  # Check if we need to convert this using DOS-style short mode. If the path
27816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27817  # take no chances and rewrite it.
27818  # Note: m4 eats our [], so we need to use [ and ] instead.
27819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27820  if test "x$has_forbidden_chars" != x; then
27821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27823  fi
27824
27825
27826  windows_path="$new_path"
27827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828    unix_path=`$CYGPATH -u "$windows_path"`
27829    new_path="$unix_path"
27830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27832    new_path="$unix_path"
27833  fi
27834
27835  if test "x$path" != "x$new_path"; then
27836    BOOT_JDK="$new_path"
27837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27839  fi
27840
27841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27843
27844    else
27845      # We're on a unix platform. Hooray! :)
27846      path="$BOOT_JDK"
27847      has_space=`$ECHO "$path" | $GREP " "`
27848      if test "x$has_space" != x; then
27849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27852      fi
27853
27854      # Use eval to expand a potential ~
27855      eval path="$path"
27856      if test ! -f "$path" && test ! -d "$path"; then
27857        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27858      fi
27859
27860      if test -d "$path"; then
27861        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27862      else
27863        dir="`$DIRNAME "$path"`"
27864        base="`$BASENAME "$path"`"
27865        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27866      fi
27867    fi
27868  fi
27869
27870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27871$as_echo_n "checking for Boot JDK... " >&6; }
27872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27873$as_echo "$BOOT_JDK" >&6; }
27874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27875$as_echo_n "checking Boot JDK version... " >&6; }
27876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27878$as_echo "$BOOT_JDK_VERSION" >&6; }
27879          fi # end check jdk version
27880        fi # end check javac
27881      fi # end check java
27882    fi # end check boot jdk found
27883  fi
27884
27885
27886  if test "x$BOOT_JDK_FOUND" = xno; then
27887    # Now execute the test
27888
27889  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27890  BOOT_JDK_SUFFIX="/Contents/Home"
27891  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27892  if test "x$ALL_JDKS_FOUND" != x; then
27893    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27894
27895  if test "x$BOOT_JDK_FOUND" = xno; then
27896    # Now execute the test
27897
27898        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27899        if test -d "$BOOT_JDK"; then
27900          BOOT_JDK_FOUND=maybe
27901          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27902$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27903        fi
27904
27905
27906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27908      # Do we have a bin/java?
27909      if test ! -x "$BOOT_JDK/bin/java"; then
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27912        BOOT_JDK_FOUND=no
27913      else
27914        # Do we have a bin/javac?
27915        if test ! -x "$BOOT_JDK/bin/javac"; then
27916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27920          BOOT_JDK_FOUND=no
27921        else
27922          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27923          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27924
27925          # Extra M4 quote needed to protect [] in grep expression.
27926          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27927          if test "x$FOUND_CORRECT_VERSION" = x; then
27928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27930            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27931$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27932            BOOT_JDK_FOUND=no
27933          else
27934            # We're done! :-)
27935            BOOT_JDK_FOUND=yes
27936
27937  # Only process if variable expands to non-empty
27938
27939  if test "x$BOOT_JDK" != x; then
27940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941
27942  # Input might be given as Windows format, start by converting to
27943  # unix format.
27944  path="$BOOT_JDK"
27945  new_path=`$CYGPATH -u "$path"`
27946
27947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27950  # "foo.exe" is OK but "foo" is an error.
27951  #
27952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27953  # It is also a way to make sure we got the proper file name for the real test later on.
27954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27955  if test "x$test_shortpath" = x; then
27956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27959  fi
27960
27961  # Call helper function which possibly converts this using DOS-style short mode.
27962  # If so, the updated path is stored in $new_path.
27963
27964  input_path="$new_path"
27965  # Check if we need to convert this using DOS-style short mode. If the path
27966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27967  # take no chances and rewrite it.
27968  # Note: m4 eats our [], so we need to use [ and ] instead.
27969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27970  if test "x$has_forbidden_chars" != x; then
27971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27975      # Going to short mode and back again did indeed matter. Since short mode is
27976      # case insensitive, let's make it lowercase to improve readability.
27977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27978      # Now convert it back to Unix-style (cygpath)
27979      input_path=`$CYGPATH -u "$shortmode_path"`
27980      new_path="$input_path"
27981    fi
27982  fi
27983
27984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27985  if test "x$test_cygdrive_prefix" = x; then
27986    # As a simple fix, exclude /usr/bin since it's not a real path.
27987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27989      # a path prefixed by /cygdrive for fixpath to work.
27990      new_path="$CYGWIN_ROOT_PATH$input_path"
27991    fi
27992  fi
27993
27994
27995  if test "x$path" != "x$new_path"; then
27996    BOOT_JDK="$new_path"
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27999  fi
28000
28001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28002
28003  path="$BOOT_JDK"
28004  has_colon=`$ECHO $path | $GREP ^.:`
28005  new_path="$path"
28006  if test "x$has_colon" = x; then
28007    # Not in mixed or Windows style, start by that.
28008    new_path=`cmd //c echo $path`
28009  fi
28010
28011
28012  input_path="$new_path"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28021  fi
28022
28023
28024  windows_path="$new_path"
28025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28026    unix_path=`$CYGPATH -u "$windows_path"`
28027    new_path="$unix_path"
28028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28030    new_path="$unix_path"
28031  fi
28032
28033  if test "x$path" != "x$new_path"; then
28034    BOOT_JDK="$new_path"
28035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28037  fi
28038
28039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28041
28042    else
28043      # We're on a unix platform. Hooray! :)
28044      path="$BOOT_JDK"
28045      has_space=`$ECHO "$path" | $GREP " "`
28046      if test "x$has_space" != x; then
28047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28050      fi
28051
28052      # Use eval to expand a potential ~
28053      eval path="$path"
28054      if test ! -f "$path" && test ! -d "$path"; then
28055        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28056      fi
28057
28058      if test -d "$path"; then
28059        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28060      else
28061        dir="`$DIRNAME "$path"`"
28062        base="`$BASENAME "$path"`"
28063        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28064      fi
28065    fi
28066  fi
28067
28068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28069$as_echo_n "checking for Boot JDK... " >&6; }
28070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28071$as_echo "$BOOT_JDK" >&6; }
28072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28073$as_echo_n "checking Boot JDK version... " >&6; }
28074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28076$as_echo "$BOOT_JDK_VERSION" >&6; }
28077          fi # end check jdk version
28078        fi # end check javac
28079      fi # end check java
28080    fi # end check boot jdk found
28081  fi
28082
28083    done
28084  fi
28085
28086
28087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28089      # Do we have a bin/java?
28090      if test ! -x "$BOOT_JDK/bin/java"; then
28091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28093        BOOT_JDK_FOUND=no
28094      else
28095        # Do we have a bin/javac?
28096        if test ! -x "$BOOT_JDK/bin/javac"; then
28097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28101          BOOT_JDK_FOUND=no
28102        else
28103          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28104          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28105
28106          # Extra M4 quote needed to protect [] in grep expression.
28107          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28108          if test "x$FOUND_CORRECT_VERSION" = x; then
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28111            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28113            BOOT_JDK_FOUND=no
28114          else
28115            # We're done! :-)
28116            BOOT_JDK_FOUND=yes
28117
28118  # Only process if variable expands to non-empty
28119
28120  if test "x$BOOT_JDK" != x; then
28121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28122
28123  # Input might be given as Windows format, start by converting to
28124  # unix format.
28125  path="$BOOT_JDK"
28126  new_path=`$CYGPATH -u "$path"`
28127
28128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28131  # "foo.exe" is OK but "foo" is an error.
28132  #
28133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28134  # It is also a way to make sure we got the proper file name for the real test later on.
28135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28136  if test "x$test_shortpath" = x; then
28137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28139    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28140  fi
28141
28142  # Call helper function which possibly converts this using DOS-style short mode.
28143  # If so, the updated path is stored in $new_path.
28144
28145  input_path="$new_path"
28146  # Check if we need to convert this using DOS-style short mode. If the path
28147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148  # take no chances and rewrite it.
28149  # Note: m4 eats our [], so we need to use [ and ] instead.
28150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28151  if test "x$has_forbidden_chars" != x; then
28152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28156      # Going to short mode and back again did indeed matter. Since short mode is
28157      # case insensitive, let's make it lowercase to improve readability.
28158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28159      # Now convert it back to Unix-style (cygpath)
28160      input_path=`$CYGPATH -u "$shortmode_path"`
28161      new_path="$input_path"
28162    fi
28163  fi
28164
28165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28166  if test "x$test_cygdrive_prefix" = x; then
28167    # As a simple fix, exclude /usr/bin since it's not a real path.
28168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28170      # a path prefixed by /cygdrive for fixpath to work.
28171      new_path="$CYGWIN_ROOT_PATH$input_path"
28172    fi
28173  fi
28174
28175
28176  if test "x$path" != "x$new_path"; then
28177    BOOT_JDK="$new_path"
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28180  fi
28181
28182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28183
28184  path="$BOOT_JDK"
28185  has_colon=`$ECHO $path | $GREP ^.:`
28186  new_path="$path"
28187  if test "x$has_colon" = x; then
28188    # Not in mixed or Windows style, start by that.
28189    new_path=`cmd //c echo $path`
28190  fi
28191
28192
28193  input_path="$new_path"
28194  # Check if we need to convert this using DOS-style short mode. If the path
28195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28196  # take no chances and rewrite it.
28197  # Note: m4 eats our [], so we need to use [ and ] instead.
28198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28199  if test "x$has_forbidden_chars" != x; then
28200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28202  fi
28203
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214  if test "x$path" != "x$new_path"; then
28215    BOOT_JDK="$new_path"
28216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28218  fi
28219
28220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28222
28223    else
28224      # We're on a unix platform. Hooray! :)
28225      path="$BOOT_JDK"
28226      has_space=`$ECHO "$path" | $GREP " "`
28227      if test "x$has_space" != x; then
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28231      fi
28232
28233      # Use eval to expand a potential ~
28234      eval path="$path"
28235      if test ! -f "$path" && test ! -d "$path"; then
28236        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28237      fi
28238
28239      if test -d "$path"; then
28240        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28241      else
28242        dir="`$DIRNAME "$path"`"
28243        base="`$BASENAME "$path"`"
28244        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28245      fi
28246    fi
28247  fi
28248
28249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28250$as_echo_n "checking for Boot JDK... " >&6; }
28251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28252$as_echo "$BOOT_JDK" >&6; }
28253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28254$as_echo_n "checking Boot JDK version... " >&6; }
28255            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28257$as_echo "$BOOT_JDK_VERSION" >&6; }
28258          fi # end check jdk version
28259        fi # end check javac
28260      fi # end check java
28261    fi # end check boot jdk found
28262  fi
28263
28264  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28265
28266  if test "x$BOOT_JDK_FOUND" = xno; then
28267    # Now execute the test
28268
28269  BOOT_JDK_PREFIX="/usr/lib/jvm"
28270  BOOT_JDK_SUFFIX=""
28271  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28272  if test "x$ALL_JDKS_FOUND" != x; then
28273    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28274
28275  if test "x$BOOT_JDK_FOUND" = xno; then
28276    # Now execute the test
28277
28278        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28279        if test -d "$BOOT_JDK"; then
28280          BOOT_JDK_FOUND=maybe
28281          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28282$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28283        fi
28284
28285
28286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28288      # Do we have a bin/java?
28289      if test ! -x "$BOOT_JDK/bin/java"; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28292        BOOT_JDK_FOUND=no
28293      else
28294        # Do we have a bin/javac?
28295        if test ! -x "$BOOT_JDK/bin/javac"; then
28296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28300          BOOT_JDK_FOUND=no
28301        else
28302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28304
28305          # Extra M4 quote needed to protect [] in grep expression.
28306          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28307          if test "x$FOUND_CORRECT_VERSION" = x; then
28308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28312            BOOT_JDK_FOUND=no
28313          else
28314            # We're done! :-)
28315            BOOT_JDK_FOUND=yes
28316
28317  # Only process if variable expands to non-empty
28318
28319  if test "x$BOOT_JDK" != x; then
28320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321
28322  # Input might be given as Windows format, start by converting to
28323  # unix format.
28324  path="$BOOT_JDK"
28325  new_path=`$CYGPATH -u "$path"`
28326
28327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28330  # "foo.exe" is OK but "foo" is an error.
28331  #
28332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28333  # It is also a way to make sure we got the proper file name for the real test later on.
28334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28335  if test "x$test_shortpath" = x; then
28336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28339  fi
28340
28341  # Call helper function which possibly converts this using DOS-style short mode.
28342  # If so, the updated path is stored in $new_path.
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28355      # Going to short mode and back again did indeed matter. Since short mode is
28356      # case insensitive, let's make it lowercase to improve readability.
28357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28358      # Now convert it back to Unix-style (cygpath)
28359      input_path=`$CYGPATH -u "$shortmode_path"`
28360      new_path="$input_path"
28361    fi
28362  fi
28363
28364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28365  if test "x$test_cygdrive_prefix" = x; then
28366    # As a simple fix, exclude /usr/bin since it's not a real path.
28367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28369      # a path prefixed by /cygdrive for fixpath to work.
28370      new_path="$CYGWIN_ROOT_PATH$input_path"
28371    fi
28372  fi
28373
28374
28375  if test "x$path" != "x$new_path"; then
28376    BOOT_JDK="$new_path"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379  fi
28380
28381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382
28383  path="$BOOT_JDK"
28384  has_colon=`$ECHO $path | $GREP ^.:`
28385  new_path="$path"
28386  if test "x$has_colon" = x; then
28387    # Not in mixed or Windows style, start by that.
28388    new_path=`cmd //c echo $path`
28389  fi
28390
28391
28392  input_path="$new_path"
28393  # Check if we need to convert this using DOS-style short mode. If the path
28394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28395  # take no chances and rewrite it.
28396  # Note: m4 eats our [], so we need to use [ and ] instead.
28397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28398  if test "x$has_forbidden_chars" != x; then
28399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28401  fi
28402
28403
28404  windows_path="$new_path"
28405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28406    unix_path=`$CYGPATH -u "$windows_path"`
28407    new_path="$unix_path"
28408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28410    new_path="$unix_path"
28411  fi
28412
28413  if test "x$path" != "x$new_path"; then
28414    BOOT_JDK="$new_path"
28415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28417  fi
28418
28419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28421
28422    else
28423      # We're on a unix platform. Hooray! :)
28424      path="$BOOT_JDK"
28425      has_space=`$ECHO "$path" | $GREP " "`
28426      if test "x$has_space" != x; then
28427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28430      fi
28431
28432      # Use eval to expand a potential ~
28433      eval path="$path"
28434      if test ! -f "$path" && test ! -d "$path"; then
28435        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28436      fi
28437
28438      if test -d "$path"; then
28439        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28440      else
28441        dir="`$DIRNAME "$path"`"
28442        base="`$BASENAME "$path"`"
28443        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28444      fi
28445    fi
28446  fi
28447
28448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28449$as_echo_n "checking for Boot JDK... " >&6; }
28450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28451$as_echo "$BOOT_JDK" >&6; }
28452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28453$as_echo_n "checking Boot JDK version... " >&6; }
28454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28456$as_echo "$BOOT_JDK_VERSION" >&6; }
28457          fi # end check jdk version
28458        fi # end check javac
28459      fi # end check java
28460    fi # end check boot jdk found
28461  fi
28462
28463    done
28464  fi
28465
28466
28467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28469      # Do we have a bin/java?
28470      if test ! -x "$BOOT_JDK/bin/java"; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28473        BOOT_JDK_FOUND=no
28474      else
28475        # Do we have a bin/javac?
28476        if test ! -x "$BOOT_JDK/bin/javac"; then
28477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28481          BOOT_JDK_FOUND=no
28482        else
28483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28485
28486          # Extra M4 quote needed to protect [] in grep expression.
28487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28488          if test "x$FOUND_CORRECT_VERSION" = x; then
28489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28493            BOOT_JDK_FOUND=no
28494          else
28495            # We're done! :-)
28496            BOOT_JDK_FOUND=yes
28497
28498  # Only process if variable expands to non-empty
28499
28500  if test "x$BOOT_JDK" != x; then
28501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28502
28503  # Input might be given as Windows format, start by converting to
28504  # unix format.
28505  path="$BOOT_JDK"
28506  new_path=`$CYGPATH -u "$path"`
28507
28508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28511  # "foo.exe" is OK but "foo" is an error.
28512  #
28513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28514  # It is also a way to make sure we got the proper file name for the real test later on.
28515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28516  if test "x$test_shortpath" = x; then
28517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28520  fi
28521
28522  # Call helper function which possibly converts this using DOS-style short mode.
28523  # If so, the updated path is stored in $new_path.
28524
28525  input_path="$new_path"
28526  # Check if we need to convert this using DOS-style short mode. If the path
28527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28528  # take no chances and rewrite it.
28529  # Note: m4 eats our [], so we need to use [ and ] instead.
28530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28531  if test "x$has_forbidden_chars" != x; then
28532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28536      # Going to short mode and back again did indeed matter. Since short mode is
28537      # case insensitive, let's make it lowercase to improve readability.
28538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28539      # Now convert it back to Unix-style (cygpath)
28540      input_path=`$CYGPATH -u "$shortmode_path"`
28541      new_path="$input_path"
28542    fi
28543  fi
28544
28545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28546  if test "x$test_cygdrive_prefix" = x; then
28547    # As a simple fix, exclude /usr/bin since it's not a real path.
28548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28550      # a path prefixed by /cygdrive for fixpath to work.
28551      new_path="$CYGWIN_ROOT_PATH$input_path"
28552    fi
28553  fi
28554
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563
28564  path="$BOOT_JDK"
28565  has_colon=`$ECHO $path | $GREP ^.:`
28566  new_path="$path"
28567  if test "x$has_colon" = x; then
28568    # Not in mixed or Windows style, start by that.
28569    new_path=`cmd //c echo $path`
28570  fi
28571
28572
28573  input_path="$new_path"
28574  # Check if we need to convert this using DOS-style short mode. If the path
28575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28576  # take no chances and rewrite it.
28577  # Note: m4 eats our [], so we need to use [ and ] instead.
28578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28579  if test "x$has_forbidden_chars" != x; then
28580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28582  fi
28583
28584
28585  windows_path="$new_path"
28586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28587    unix_path=`$CYGPATH -u "$windows_path"`
28588    new_path="$unix_path"
28589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28591    new_path="$unix_path"
28592  fi
28593
28594  if test "x$path" != "x$new_path"; then
28595    BOOT_JDK="$new_path"
28596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28598  fi
28599
28600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28602
28603    else
28604      # We're on a unix platform. Hooray! :)
28605      path="$BOOT_JDK"
28606      has_space=`$ECHO "$path" | $GREP " "`
28607      if test "x$has_space" != x; then
28608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28611      fi
28612
28613      # Use eval to expand a potential ~
28614      eval path="$path"
28615      if test ! -f "$path" && test ! -d "$path"; then
28616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28617      fi
28618
28619      if test -d "$path"; then
28620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28621      else
28622        dir="`$DIRNAME "$path"`"
28623        base="`$BASENAME "$path"`"
28624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28625      fi
28626    fi
28627  fi
28628
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28630$as_echo_n "checking for Boot JDK... " >&6; }
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28632$as_echo "$BOOT_JDK" >&6; }
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28634$as_echo_n "checking Boot JDK version... " >&6; }
28635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28637$as_echo "$BOOT_JDK_VERSION" >&6; }
28638          fi # end check jdk version
28639        fi # end check javac
28640      fi # end check java
28641    fi # end check boot jdk found
28642  fi
28643
28644  fi
28645
28646
28647    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28648    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28649      # Do we have a bin/java?
28650      if test ! -x "$BOOT_JDK/bin/java"; then
28651        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28653        BOOT_JDK_FOUND=no
28654      else
28655        # Do we have a bin/javac?
28656        if test ! -x "$BOOT_JDK/bin/javac"; then
28657          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28659          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28660$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28661          BOOT_JDK_FOUND=no
28662        else
28663          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28664          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28665
28666          # Extra M4 quote needed to protect [] in grep expression.
28667          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28668          if test "x$FOUND_CORRECT_VERSION" = x; then
28669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28671            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28672$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28673            BOOT_JDK_FOUND=no
28674          else
28675            # We're done! :-)
28676            BOOT_JDK_FOUND=yes
28677
28678  # Only process if variable expands to non-empty
28679
28680  if test "x$BOOT_JDK" != x; then
28681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682
28683  # Input might be given as Windows format, start by converting to
28684  # unix format.
28685  path="$BOOT_JDK"
28686  new_path=`$CYGPATH -u "$path"`
28687
28688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28691  # "foo.exe" is OK but "foo" is an error.
28692  #
28693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28694  # It is also a way to make sure we got the proper file name for the real test later on.
28695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28696  if test "x$test_shortpath" = x; then
28697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28700  fi
28701
28702  # Call helper function which possibly converts this using DOS-style short mode.
28703  # If so, the updated path is stored in $new_path.
28704
28705  input_path="$new_path"
28706  # Check if we need to convert this using DOS-style short mode. If the path
28707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28708  # take no chances and rewrite it.
28709  # Note: m4 eats our [], so we need to use [ and ] instead.
28710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28711  if test "x$has_forbidden_chars" != x; then
28712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28716      # Going to short mode and back again did indeed matter. Since short mode is
28717      # case insensitive, let's make it lowercase to improve readability.
28718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28719      # Now convert it back to Unix-style (cygpath)
28720      input_path=`$CYGPATH -u "$shortmode_path"`
28721      new_path="$input_path"
28722    fi
28723  fi
28724
28725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28726  if test "x$test_cygdrive_prefix" = x; then
28727    # As a simple fix, exclude /usr/bin since it's not a real path.
28728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28730      # a path prefixed by /cygdrive for fixpath to work.
28731      new_path="$CYGWIN_ROOT_PATH$input_path"
28732    fi
28733  fi
28734
28735
28736  if test "x$path" != "x$new_path"; then
28737    BOOT_JDK="$new_path"
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28740  fi
28741
28742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28743
28744  path="$BOOT_JDK"
28745  has_colon=`$ECHO $path | $GREP ^.:`
28746  new_path="$path"
28747  if test "x$has_colon" = x; then
28748    # Not in mixed or Windows style, start by that.
28749    new_path=`cmd //c echo $path`
28750  fi
28751
28752
28753  input_path="$new_path"
28754  # Check if we need to convert this using DOS-style short mode. If the path
28755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28756  # take no chances and rewrite it.
28757  # Note: m4 eats our [], so we need to use [ and ] instead.
28758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28759  if test "x$has_forbidden_chars" != x; then
28760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28762  fi
28763
28764
28765  windows_path="$new_path"
28766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767    unix_path=`$CYGPATH -u "$windows_path"`
28768    new_path="$unix_path"
28769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28771    new_path="$unix_path"
28772  fi
28773
28774  if test "x$path" != "x$new_path"; then
28775    BOOT_JDK="$new_path"
28776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28778  fi
28779
28780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28782
28783    else
28784      # We're on a unix platform. Hooray! :)
28785      path="$BOOT_JDK"
28786      has_space=`$ECHO "$path" | $GREP " "`
28787      if test "x$has_space" != x; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28791      fi
28792
28793      # Use eval to expand a potential ~
28794      eval path="$path"
28795      if test ! -f "$path" && test ! -d "$path"; then
28796        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28797      fi
28798
28799      if test -d "$path"; then
28800        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28801      else
28802        dir="`$DIRNAME "$path"`"
28803        base="`$BASENAME "$path"`"
28804        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28805      fi
28806    fi
28807  fi
28808
28809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28810$as_echo_n "checking for Boot JDK... " >&6; }
28811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28812$as_echo "$BOOT_JDK" >&6; }
28813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28814$as_echo_n "checking Boot JDK version... " >&6; }
28815            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28817$as_echo "$BOOT_JDK_VERSION" >&6; }
28818          fi # end check jdk version
28819        fi # end check javac
28820      fi # end check java
28821    fi # end check boot jdk found
28822  fi
28823
28824
28825  # If we haven't found anything yet, we've truly lost. Give up.
28826  if test "x$BOOT_JDK_FOUND" = xno; then
28827
28828  # Print a helpful message on how to acquire the necessary build dependency.
28829  # openjdk is the help tag: freetype, cups, alsa etc
28830  MISSING_DEPENDENCY=openjdk
28831
28832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28833    cygwin_help $MISSING_DEPENDENCY
28834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28835    msys_help $MISSING_DEPENDENCY
28836  else
28837    PKGHANDLER_COMMAND=
28838
28839    case $PKGHANDLER in
28840      apt-get)
28841        apt_help     $MISSING_DEPENDENCY ;;
28842      yum)
28843        yum_help     $MISSING_DEPENDENCY ;;
28844      port)
28845        port_help    $MISSING_DEPENDENCY ;;
28846      pkgutil)
28847        pkgutil_help $MISSING_DEPENDENCY ;;
28848      pkgadd)
28849        pkgadd_help  $MISSING_DEPENDENCY ;;
28850    esac
28851
28852    if test "x$PKGHANDLER_COMMAND" != x; then
28853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28854    fi
28855  fi
28856
28857    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28858$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28859    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28860$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28861    as_fn_error $? "Cannot continue" "$LINENO" 5
28862  fi
28863
28864
28865
28866  # Setup tools from the Boot JDK.
28867
28868  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28869
28870  # Publish this variable in the help.
28871
28872
28873  if [ -z "${JAVA+x}" ]; then
28874    # The variable is not set by user, try to locate tool using the code snippet
28875
28876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28877$as_echo_n "checking for java in Boot JDK... " >&6; }
28878      JAVA=$BOOT_JDK/bin/java
28879      if test ! -x $JAVA; then
28880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28881$as_echo "not found" >&6; }
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28883$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28884        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28885      fi
28886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28887$as_echo "ok" >&6; }
28888
28889
28890  else
28891    # The variable is set, but is it from the command line or the environment?
28892
28893    # Try to remove the string !JAVA! from our list.
28894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28896      # If it failed, the variable was not from the command line. Ignore it,
28897      # but warn the user (except for BASH, which is always set by the calling BASH).
28898      if test "xJAVA" != xBASH; then
28899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28900$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28901      fi
28902      # Try to locate tool using the code snippet
28903
28904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28905$as_echo_n "checking for java in Boot JDK... " >&6; }
28906      JAVA=$BOOT_JDK/bin/java
28907      if test ! -x $JAVA; then
28908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28909$as_echo "not found" >&6; }
28910        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28911$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28912        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28913      fi
28914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28915$as_echo "ok" >&6; }
28916
28917
28918    else
28919      # If it succeeded, then it was overridden by the user. We will use it
28920      # for the tool.
28921
28922      # First remove it from the list of overridden variables, so we can test
28923      # for unknown variables in the end.
28924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28925
28926      # Check if we try to supply an empty value
28927      if test "x$JAVA" = x; then
28928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28929$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28931$as_echo_n "checking for JAVA... " >&6; }
28932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28933$as_echo "disabled" >&6; }
28934      else
28935        # Check if the provided tool contains a complete path.
28936        tool_specified="$JAVA"
28937        tool_basename="${tool_specified##*/}"
28938        if test "x$tool_basename" = "x$tool_specified"; then
28939          # A command without a complete path is provided, search $PATH.
28940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28941$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28942          # Extract the first word of "$tool_basename", so it can be a program name with args.
28943set dummy $tool_basename; ac_word=$2
28944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28945$as_echo_n "checking for $ac_word... " >&6; }
28946if ${ac_cv_path_JAVA+:} false; then :
28947  $as_echo_n "(cached) " >&6
28948else
28949  case $JAVA in
28950  [\\/]* | ?:[\\/]*)
28951  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28952  ;;
28953  *)
28954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28955for as_dir in $PATH
28956do
28957  IFS=$as_save_IFS
28958  test -z "$as_dir" && as_dir=.
28959    for ac_exec_ext in '' $ac_executable_extensions; do
28960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28961    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28963    break 2
28964  fi
28965done
28966  done
28967IFS=$as_save_IFS
28968
28969  ;;
28970esac
28971fi
28972JAVA=$ac_cv_path_JAVA
28973if test -n "$JAVA"; then
28974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28975$as_echo "$JAVA" >&6; }
28976else
28977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28978$as_echo "no" >&6; }
28979fi
28980
28981
28982          if test "x$JAVA" = x; then
28983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28984          fi
28985        else
28986          # Otherwise we believe it is a complete path. Use it as it is.
28987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28988$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28990$as_echo_n "checking for JAVA... " >&6; }
28991          if test ! -x "$tool_specified"; then
28992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28993$as_echo "not found" >&6; }
28994            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28995          fi
28996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28997$as_echo "$tool_specified" >&6; }
28998        fi
28999      fi
29000    fi
29001
29002  fi
29003
29004
29005
29006  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29007
29008  # Publish this variable in the help.
29009
29010
29011  if [ -z "${JAVAC+x}" ]; then
29012    # The variable is not set by user, try to locate tool using the code snippet
29013
29014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29015$as_echo_n "checking for javac in Boot JDK... " >&6; }
29016      JAVAC=$BOOT_JDK/bin/javac
29017      if test ! -x $JAVAC; then
29018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29019$as_echo "not found" >&6; }
29020        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29021$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29022        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29023      fi
29024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29025$as_echo "ok" >&6; }
29026
29027
29028  else
29029    # The variable is set, but is it from the command line or the environment?
29030
29031    # Try to remove the string !JAVAC! from our list.
29032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29034      # If it failed, the variable was not from the command line. Ignore it,
29035      # but warn the user (except for BASH, which is always set by the calling BASH).
29036      if test "xJAVAC" != xBASH; then
29037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29038$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29039      fi
29040      # Try to locate tool using the code snippet
29041
29042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29043$as_echo_n "checking for javac in Boot JDK... " >&6; }
29044      JAVAC=$BOOT_JDK/bin/javac
29045      if test ! -x $JAVAC; then
29046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29047$as_echo "not found" >&6; }
29048        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29049$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29050        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29051      fi
29052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29053$as_echo "ok" >&6; }
29054
29055
29056    else
29057      # If it succeeded, then it was overridden by the user. We will use it
29058      # for the tool.
29059
29060      # First remove it from the list of overridden variables, so we can test
29061      # for unknown variables in the end.
29062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29063
29064      # Check if we try to supply an empty value
29065      if test "x$JAVAC" = x; then
29066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29067$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29069$as_echo_n "checking for JAVAC... " >&6; }
29070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29071$as_echo "disabled" >&6; }
29072      else
29073        # Check if the provided tool contains a complete path.
29074        tool_specified="$JAVAC"
29075        tool_basename="${tool_specified##*/}"
29076        if test "x$tool_basename" = "x$tool_specified"; then
29077          # A command without a complete path is provided, search $PATH.
29078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29079$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29080          # Extract the first word of "$tool_basename", so it can be a program name with args.
29081set dummy $tool_basename; ac_word=$2
29082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29083$as_echo_n "checking for $ac_word... " >&6; }
29084if ${ac_cv_path_JAVAC+:} false; then :
29085  $as_echo_n "(cached) " >&6
29086else
29087  case $JAVAC in
29088  [\\/]* | ?:[\\/]*)
29089  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29090  ;;
29091  *)
29092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29093for as_dir in $PATH
29094do
29095  IFS=$as_save_IFS
29096  test -z "$as_dir" && as_dir=.
29097    for ac_exec_ext in '' $ac_executable_extensions; do
29098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29099    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29101    break 2
29102  fi
29103done
29104  done
29105IFS=$as_save_IFS
29106
29107  ;;
29108esac
29109fi
29110JAVAC=$ac_cv_path_JAVAC
29111if test -n "$JAVAC"; then
29112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29113$as_echo "$JAVAC" >&6; }
29114else
29115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29116$as_echo "no" >&6; }
29117fi
29118
29119
29120          if test "x$JAVAC" = x; then
29121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29122          fi
29123        else
29124          # Otherwise we believe it is a complete path. Use it as it is.
29125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29126$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29128$as_echo_n "checking for JAVAC... " >&6; }
29129          if test ! -x "$tool_specified"; then
29130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29131$as_echo "not found" >&6; }
29132            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29133          fi
29134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29135$as_echo "$tool_specified" >&6; }
29136        fi
29137      fi
29138    fi
29139
29140  fi
29141
29142
29143
29144  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29145
29146  # Publish this variable in the help.
29147
29148
29149  if [ -z "${JAVAH+x}" ]; then
29150    # The variable is not set by user, try to locate tool using the code snippet
29151
29152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29153$as_echo_n "checking for javah in Boot JDK... " >&6; }
29154      JAVAH=$BOOT_JDK/bin/javah
29155      if test ! -x $JAVAH; then
29156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29157$as_echo "not found" >&6; }
29158        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29159$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29160        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29161      fi
29162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29163$as_echo "ok" >&6; }
29164
29165
29166  else
29167    # The variable is set, but is it from the command line or the environment?
29168
29169    # Try to remove the string !JAVAH! from our list.
29170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29172      # If it failed, the variable was not from the command line. Ignore it,
29173      # but warn the user (except for BASH, which is always set by the calling BASH).
29174      if test "xJAVAH" != xBASH; then
29175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29176$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29177      fi
29178      # Try to locate tool using the code snippet
29179
29180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29181$as_echo_n "checking for javah in Boot JDK... " >&6; }
29182      JAVAH=$BOOT_JDK/bin/javah
29183      if test ! -x $JAVAH; then
29184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29185$as_echo "not found" >&6; }
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29187$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29188        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29189      fi
29190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29191$as_echo "ok" >&6; }
29192
29193
29194    else
29195      # If it succeeded, then it was overridden by the user. We will use it
29196      # for the tool.
29197
29198      # First remove it from the list of overridden variables, so we can test
29199      # for unknown variables in the end.
29200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29201
29202      # Check if we try to supply an empty value
29203      if test "x$JAVAH" = x; then
29204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29205$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29207$as_echo_n "checking for JAVAH... " >&6; }
29208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29209$as_echo "disabled" >&6; }
29210      else
29211        # Check if the provided tool contains a complete path.
29212        tool_specified="$JAVAH"
29213        tool_basename="${tool_specified##*/}"
29214        if test "x$tool_basename" = "x$tool_specified"; then
29215          # A command without a complete path is provided, search $PATH.
29216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29217$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29218          # Extract the first word of "$tool_basename", so it can be a program name with args.
29219set dummy $tool_basename; ac_word=$2
29220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29221$as_echo_n "checking for $ac_word... " >&6; }
29222if ${ac_cv_path_JAVAH+:} false; then :
29223  $as_echo_n "(cached) " >&6
29224else
29225  case $JAVAH in
29226  [\\/]* | ?:[\\/]*)
29227  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29228  ;;
29229  *)
29230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29231for as_dir in $PATH
29232do
29233  IFS=$as_save_IFS
29234  test -z "$as_dir" && as_dir=.
29235    for ac_exec_ext in '' $ac_executable_extensions; do
29236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29237    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29239    break 2
29240  fi
29241done
29242  done
29243IFS=$as_save_IFS
29244
29245  ;;
29246esac
29247fi
29248JAVAH=$ac_cv_path_JAVAH
29249if test -n "$JAVAH"; then
29250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29251$as_echo "$JAVAH" >&6; }
29252else
29253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29254$as_echo "no" >&6; }
29255fi
29256
29257
29258          if test "x$JAVAH" = x; then
29259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29260          fi
29261        else
29262          # Otherwise we believe it is a complete path. Use it as it is.
29263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29264$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29266$as_echo_n "checking for JAVAH... " >&6; }
29267          if test ! -x "$tool_specified"; then
29268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29269$as_echo "not found" >&6; }
29270            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29271          fi
29272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29273$as_echo "$tool_specified" >&6; }
29274        fi
29275      fi
29276    fi
29277
29278  fi
29279
29280
29281
29282  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29283
29284  # Publish this variable in the help.
29285
29286
29287  if [ -z "${JAR+x}" ]; then
29288    # The variable is not set by user, try to locate tool using the code snippet
29289
29290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29291$as_echo_n "checking for jar in Boot JDK... " >&6; }
29292      JAR=$BOOT_JDK/bin/jar
29293      if test ! -x $JAR; then
29294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29295$as_echo "not found" >&6; }
29296        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29297$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29298        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29299      fi
29300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29301$as_echo "ok" >&6; }
29302
29303
29304  else
29305    # The variable is set, but is it from the command line or the environment?
29306
29307    # Try to remove the string !JAR! from our list.
29308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29310      # If it failed, the variable was not from the command line. Ignore it,
29311      # but warn the user (except for BASH, which is always set by the calling BASH).
29312      if test "xJAR" != xBASH; then
29313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29314$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29315      fi
29316      # Try to locate tool using the code snippet
29317
29318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29319$as_echo_n "checking for jar in Boot JDK... " >&6; }
29320      JAR=$BOOT_JDK/bin/jar
29321      if test ! -x $JAR; then
29322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29323$as_echo "not found" >&6; }
29324        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29325$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29326        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29327      fi
29328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29329$as_echo "ok" >&6; }
29330
29331
29332    else
29333      # If it succeeded, then it was overridden by the user. We will use it
29334      # for the tool.
29335
29336      # First remove it from the list of overridden variables, so we can test
29337      # for unknown variables in the end.
29338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29339
29340      # Check if we try to supply an empty value
29341      if test "x$JAR" = x; then
29342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29343$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29345$as_echo_n "checking for JAR... " >&6; }
29346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29347$as_echo "disabled" >&6; }
29348      else
29349        # Check if the provided tool contains a complete path.
29350        tool_specified="$JAR"
29351        tool_basename="${tool_specified##*/}"
29352        if test "x$tool_basename" = "x$tool_specified"; then
29353          # A command without a complete path is provided, search $PATH.
29354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29355$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29356          # Extract the first word of "$tool_basename", so it can be a program name with args.
29357set dummy $tool_basename; ac_word=$2
29358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29359$as_echo_n "checking for $ac_word... " >&6; }
29360if ${ac_cv_path_JAR+:} false; then :
29361  $as_echo_n "(cached) " >&6
29362else
29363  case $JAR in
29364  [\\/]* | ?:[\\/]*)
29365  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29366  ;;
29367  *)
29368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29369for as_dir in $PATH
29370do
29371  IFS=$as_save_IFS
29372  test -z "$as_dir" && as_dir=.
29373    for ac_exec_ext in '' $ac_executable_extensions; do
29374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29375    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29377    break 2
29378  fi
29379done
29380  done
29381IFS=$as_save_IFS
29382
29383  ;;
29384esac
29385fi
29386JAR=$ac_cv_path_JAR
29387if test -n "$JAR"; then
29388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29389$as_echo "$JAR" >&6; }
29390else
29391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29392$as_echo "no" >&6; }
29393fi
29394
29395
29396          if test "x$JAR" = x; then
29397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29398          fi
29399        else
29400          # Otherwise we believe it is a complete path. Use it as it is.
29401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29402$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29404$as_echo_n "checking for JAR... " >&6; }
29405          if test ! -x "$tool_specified"; then
29406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29407$as_echo "not found" >&6; }
29408            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29409          fi
29410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29411$as_echo "$tool_specified" >&6; }
29412        fi
29413      fi
29414    fi
29415
29416  fi
29417
29418
29419
29420  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29421
29422  # Publish this variable in the help.
29423
29424
29425  if [ -z "${JARSIGNER+x}" ]; then
29426    # The variable is not set by user, try to locate tool using the code snippet
29427
29428      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29429$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29430      JARSIGNER=$BOOT_JDK/bin/jarsigner
29431      if test ! -x $JARSIGNER; then
29432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29433$as_echo "not found" >&6; }
29434        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29435$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29436        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29437      fi
29438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29439$as_echo "ok" >&6; }
29440
29441
29442  else
29443    # The variable is set, but is it from the command line or the environment?
29444
29445    # Try to remove the string !JARSIGNER! from our list.
29446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29448      # If it failed, the variable was not from the command line. Ignore it,
29449      # but warn the user (except for BASH, which is always set by the calling BASH).
29450      if test "xJARSIGNER" != xBASH; then
29451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29452$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29453      fi
29454      # Try to locate tool using the code snippet
29455
29456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29457$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29458      JARSIGNER=$BOOT_JDK/bin/jarsigner
29459      if test ! -x $JARSIGNER; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29461$as_echo "not found" >&6; }
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29464        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29465      fi
29466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29467$as_echo "ok" >&6; }
29468
29469
29470    else
29471      # If it succeeded, then it was overridden by the user. We will use it
29472      # for the tool.
29473
29474      # First remove it from the list of overridden variables, so we can test
29475      # for unknown variables in the end.
29476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29477
29478      # Check if we try to supply an empty value
29479      if test "x$JARSIGNER" = x; then
29480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29481$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29483$as_echo_n "checking for JARSIGNER... " >&6; }
29484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29485$as_echo "disabled" >&6; }
29486      else
29487        # Check if the provided tool contains a complete path.
29488        tool_specified="$JARSIGNER"
29489        tool_basename="${tool_specified##*/}"
29490        if test "x$tool_basename" = "x$tool_specified"; then
29491          # A command without a complete path is provided, search $PATH.
29492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29493$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29494          # Extract the first word of "$tool_basename", so it can be a program name with args.
29495set dummy $tool_basename; ac_word=$2
29496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29497$as_echo_n "checking for $ac_word... " >&6; }
29498if ${ac_cv_path_JARSIGNER+:} false; then :
29499  $as_echo_n "(cached) " >&6
29500else
29501  case $JARSIGNER in
29502  [\\/]* | ?:[\\/]*)
29503  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29504  ;;
29505  *)
29506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29507for as_dir in $PATH
29508do
29509  IFS=$as_save_IFS
29510  test -z "$as_dir" && as_dir=.
29511    for ac_exec_ext in '' $ac_executable_extensions; do
29512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29513    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29515    break 2
29516  fi
29517done
29518  done
29519IFS=$as_save_IFS
29520
29521  ;;
29522esac
29523fi
29524JARSIGNER=$ac_cv_path_JARSIGNER
29525if test -n "$JARSIGNER"; then
29526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29527$as_echo "$JARSIGNER" >&6; }
29528else
29529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29530$as_echo "no" >&6; }
29531fi
29532
29533
29534          if test "x$JARSIGNER" = x; then
29535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29536          fi
29537        else
29538          # Otherwise we believe it is a complete path. Use it as it is.
29539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29540$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29542$as_echo_n "checking for JARSIGNER... " >&6; }
29543          if test ! -x "$tool_specified"; then
29544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29545$as_echo "not found" >&6; }
29546            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29547          fi
29548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29549$as_echo "$tool_specified" >&6; }
29550        fi
29551      fi
29552    fi
29553
29554  fi
29555
29556
29557
29558  # Finally, set some other options...
29559
29560  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29561  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29562
29563
29564
29565  # Check if the boot jdk is 32 or 64 bit
29566  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29567    BOOT_JDK_BITS="64"
29568  else
29569    BOOT_JDK_BITS="32"
29570  fi
29571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29572$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29574$as_echo "$BOOT_JDK_BITS" >&6; }
29575
29576
29577
29578###############################################################################
29579#
29580# Configure the sources to use. We can add or override individual directories.
29581#
29582###############################################################################
29583
29584
29585  # Where are the sources.
29586  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29587  CORBA_TOPDIR="$SRC_ROOT/corba"
29588  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29589  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29590  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29591  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29592  JDK_TOPDIR="$SRC_ROOT/jdk"
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602  # This feature is no longer supported.
29603
29604
29605
29606# Check whether --with-add-source-root was given.
29607if test "${with_add_source_root+set}" = set; then :
29608  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29609$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29610fi
29611
29612
29613
29614
29615# Check whether --with-override-source-root was given.
29616if test "${with_override_source_root+set}" = set; then :
29617  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29618$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29619fi
29620
29621
29622
29623
29624# Check whether --with-adds-and-overrides was given.
29625if test "${with_adds_and_overrides+set}" = set; then :
29626  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29627$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29628fi
29629
29630
29631
29632
29633# Check whether --with-override-langtools was given.
29634if test "${with_override_langtools+set}" = set; then :
29635  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29636$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29637fi
29638
29639
29640
29641
29642# Check whether --with-override-corba was given.
29643if test "${with_override_corba+set}" = set; then :
29644  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29645$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29646fi
29647
29648
29649
29650
29651# Check whether --with-override-jaxp was given.
29652if test "${with_override_jaxp+set}" = set; then :
29653  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29654$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29655fi
29656
29657
29658
29659
29660# Check whether --with-override-jaxws was given.
29661if test "${with_override_jaxws+set}" = set; then :
29662  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29663$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29664fi
29665
29666
29667
29668
29669# Check whether --with-override-hotspot was given.
29670if test "${with_override_hotspot+set}" = set; then :
29671  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29672$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29673fi
29674
29675
29676
29677
29678# Check whether --with-override-nashorn was given.
29679if test "${with_override_nashorn+set}" = set; then :
29680  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29681$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29682fi
29683
29684
29685
29686
29687# Check whether --with-override-jdk was given.
29688if test "${with_override_jdk+set}" = set; then :
29689  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29690$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29691fi
29692
29693
29694
29695
29696  BUILD_OUTPUT="$OUTPUT_ROOT"
29697
29698
29699  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29700  BUILD_HOTSPOT=true
29701
29702
29703
29704# Check whether --with-import-hotspot was given.
29705if test "${with_import_hotspot+set}" = set; then :
29706  withval=$with_import_hotspot;
29707fi
29708
29709  if test "x$with_import_hotspot" != x; then
29710    CURDIR="$PWD"
29711    cd "$with_import_hotspot"
29712    HOTSPOT_DIST="`pwd`"
29713    cd "$CURDIR"
29714    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29715      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29716    fi
29717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29718$as_echo_n "checking if hotspot should be imported... " >&6; }
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29720$as_echo "yes from $HOTSPOT_DIST" >&6; }
29721    BUILD_HOTSPOT=false
29722  fi
29723
29724  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29725
29726
29727###############################################################################
29728#
29729# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29730# native code.
29731#
29732###############################################################################
29733
29734# See if we are doing a complete static build or not
29735
29736  # Check whether --enable-static-build was given.
29737if test "${enable_static_build+set}" = set; then :
29738  enableval=$enable_static_build;
29739fi
29740
29741  STATIC_BUILD=false
29742  if test "x$enable_static_build" = "xyes"; then
29743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29744$as_echo_n "checking if static build is enabled... " >&6; }
29745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29746$as_echo "yes" >&6; }
29747    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29748      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29749    fi
29750    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29751    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29752    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29753    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29754    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29755    STATIC_BUILD=true
29756  elif test "x$enable_static_build" = "xno"; then
29757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29758$as_echo_n "checking if static build is enabled... " >&6; }
29759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29760$as_echo "no" >&6; }
29761  elif test "x$enable_static_build" != "x"; then
29762    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29763  fi
29764
29765
29766
29767
29768# First determine the toolchain type (compiler family)
29769
29770
29771# Check whether --with-toolchain-type was given.
29772if test "${with_toolchain_type+set}" = set; then :
29773  withval=$with_toolchain_type;
29774fi
29775
29776
29777  # Use indirect variable referencing
29778  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29779  VALID_TOOLCHAINS=${!toolchain_var_name}
29780
29781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29782    if test -n "$XCODEBUILD"; then
29783      # On Mac OS X, default toolchain to clang after Xcode 5
29784      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29785      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29786      if test $? -ne 0; then
29787        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29788      fi
29789      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29790          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29791          $CUT -f 1 -d .`
29792      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29793$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29794      if test $XCODE_MAJOR_VERSION -ge 5; then
29795          DEFAULT_TOOLCHAIN="clang"
29796      else
29797          DEFAULT_TOOLCHAIN="gcc"
29798      fi
29799    else
29800      # If Xcode is not installed, but the command line tools are
29801      # then we can't run xcodebuild. On these systems we should
29802      # default to clang
29803      DEFAULT_TOOLCHAIN="clang"
29804    fi
29805  else
29806    # First toolchain type in the list is the default
29807    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29808  fi
29809
29810  if test "x$with_toolchain_type" = xlist; then
29811    # List all toolchains
29812    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29813$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29814    for toolchain in $VALID_TOOLCHAINS; do
29815      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29816      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29817      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29818    done
29819
29820    exit 0
29821  elif test "x$with_toolchain_type" != x; then
29822    # User override; check that it is valid
29823    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29824      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29825$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29826      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29827$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29828      as_fn_error $? "Cannot continue." "$LINENO" 5
29829    fi
29830    TOOLCHAIN_TYPE=$with_toolchain_type
29831  else
29832    # No flag given, use default
29833    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29834  fi
29835
29836
29837  TOOLCHAIN_CC_BINARY_clang="clang"
29838  TOOLCHAIN_CC_BINARY_gcc="gcc"
29839  TOOLCHAIN_CC_BINARY_microsoft="cl"
29840  TOOLCHAIN_CC_BINARY_solstudio="cc"
29841  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29842
29843  TOOLCHAIN_CXX_BINARY_clang="clang++"
29844  TOOLCHAIN_CXX_BINARY_gcc="g++"
29845  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29846  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29847  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29848
29849  # Use indirect variable referencing
29850  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29851  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29852  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29853  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29854  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29855  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29856
29857
29858  # Define filename patterns
29859  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29860    LIBRARY_PREFIX=
29861    SHARED_LIBRARY_SUFFIX='.dll'
29862    STATIC_LIBRARY_SUFFIX='.lib'
29863    SHARED_LIBRARY='$1.dll'
29864    STATIC_LIBRARY='$1.lib'
29865    OBJ_SUFFIX='.obj'
29866    EXE_SUFFIX='.exe'
29867  else
29868    LIBRARY_PREFIX=lib
29869    SHARED_LIBRARY_SUFFIX='.so'
29870    STATIC_LIBRARY_SUFFIX='.a'
29871    SHARED_LIBRARY='lib$1.so'
29872    STATIC_LIBRARY='lib$1.a'
29873    OBJ_SUFFIX='.o'
29874    EXE_SUFFIX=''
29875    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29876      # For full static builds, we're overloading the SHARED_LIBRARY
29877      # variables in order to limit the amount of changes required.
29878      # It would be better to remove SHARED and just use LIBRARY and
29879      # LIBRARY_SUFFIX for libraries that can be built either
29880      # shared or static and use STATIC_* for libraries that are
29881      # always built statically.
29882      if test "x$STATIC_BUILD" = xtrue; then
29883        SHARED_LIBRARY='lib$1.a'
29884        SHARED_LIBRARY_SUFFIX='.a'
29885      else
29886        SHARED_LIBRARY='lib$1.dylib'
29887        SHARED_LIBRARY_SUFFIX='.dylib'
29888      fi
29889    fi
29890  fi
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29902    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29903$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29904  else
29905    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29906$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29907  fi
29908
29909
29910# User supplied flags should be used when configure detects compilers
29911
29912  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29913    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29914$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29915  fi
29916
29917  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29918    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29919$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29920  fi
29921
29922  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29924$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29925  fi
29926
29927
29928# Check whether --with-extra-cflags was given.
29929if test "${with_extra_cflags+set}" = set; then :
29930  withval=$with_extra_cflags;
29931fi
29932
29933
29934
29935# Check whether --with-extra-cxxflags was given.
29936if test "${with_extra_cxxflags+set}" = set; then :
29937  withval=$with_extra_cxxflags;
29938fi
29939
29940
29941
29942# Check whether --with-extra-ldflags was given.
29943if test "${with_extra_ldflags+set}" = set; then :
29944  withval=$with_extra_ldflags;
29945fi
29946
29947
29948  EXTRA_CFLAGS="$with_extra_cflags"
29949  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29950  EXTRA_LDFLAGS="$with_extra_ldflags"
29951
29952  # Hotspot needs these set in their legacy form
29953  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29954  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29955  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29956
29957
29958
29959
29960
29961  # The global CFLAGS and LDLAGS variables are used by configure tests and
29962  # should include the extra parameters
29963  CFLAGS="$EXTRA_CFLAGS"
29964  CXXFLAGS="$EXTRA_CXXFLAGS"
29965  LDFLAGS="$EXTRA_LDFLAGS"
29966  CPPFLAGS=""
29967
29968# The sysroot cflags are needed for configure to be able to run the compilers
29969
29970  if test "x$SYSROOT" != "x"; then
29971    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29972      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29973        # Solaris Studio does not have a concept of sysroot. Instead we must
29974        # make sure the default include and lib dirs are appended to each
29975        # compile and link command line.
29976        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29977        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29978            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29979            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29980      fi
29981    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29982      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29983      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29984    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29985      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29986      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29987    fi
29988    # Propagate the sysroot args to hotspot
29989    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29990    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29991    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29992    # The global CFLAGS and LDFLAGS variables need these for configure to function
29993    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29994    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29995    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29996    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29997  fi
29998
29999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30000    # We also need -iframework<path>/System/Library/Frameworks
30001    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30002    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30003    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30004    # set this here so it doesn't have to be peppered throughout the forest
30005    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30006    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30007  fi
30008
30009
30010
30011
30012
30013# Then detect the actual binaries needed
30014
30015  # FIXME: Is this needed?
30016  ac_ext=cpp
30017ac_cpp='$CXXCPP $CPPFLAGS'
30018ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30019ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30020ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30021
30022
30023  # Store the CFLAGS etc passed to the configure script.
30024  ORG_CFLAGS="$CFLAGS"
30025  ORG_CXXFLAGS="$CXXFLAGS"
30026
30027  # autoconf magic only relies on PATH, so update it if tools dir is specified
30028  OLD_PATH="$PATH"
30029
30030  # On Windows, we need to detect the visual studio installation first.
30031  # This will change the PATH, but we need to keep that new PATH even
30032  # after toolchain detection is done, since the compiler (on x86) uses
30033  # it for DLL resolution in runtime.
30034  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30035      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30036
30037  # Store path to cygwin link.exe to help excluding it when searching for
30038  # VS linker. This must be done before changing the PATH when looking for VS.
30039  # Extract the first word of "link", so it can be a program name with args.
30040set dummy link; ac_word=$2
30041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30042$as_echo_n "checking for $ac_word... " >&6; }
30043if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30044  $as_echo_n "(cached) " >&6
30045else
30046  case $CYGWIN_LINK in
30047  [\\/]* | ?:[\\/]*)
30048  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30049  ;;
30050  *)
30051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30052for as_dir in $PATH
30053do
30054  IFS=$as_save_IFS
30055  test -z "$as_dir" && as_dir=.
30056    for ac_exec_ext in '' $ac_executable_extensions; do
30057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30058    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30060    break 2
30061  fi
30062done
30063  done
30064IFS=$as_save_IFS
30065
30066  ;;
30067esac
30068fi
30069CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30070if test -n "$CYGWIN_LINK"; then
30071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30072$as_echo "$CYGWIN_LINK" >&6; }
30073else
30074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30075$as_echo "no" >&6; }
30076fi
30077
30078
30079  if test "x$CYGWIN_LINK" != x; then
30080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30081$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30082    "$CYGWIN_LINK" --version > /dev/null
30083    if test $? -eq 0 ; then
30084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30085$as_echo "yes" >&6; }
30086    else
30087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30088$as_echo "no" >&6; }
30089      # This might be the VS linker. Don't exclude it later on.
30090      CYGWIN_LINK=""
30091    fi
30092  fi
30093
30094  # First-hand choice is to locate and run the vsvars bat file.
30095
30096
30097# Check whether --with-toolchain-version was given.
30098if test "${with_toolchain_version+set}" = set; then :
30099  withval=$with_toolchain_version;
30100fi
30101
30102
30103  if test "x$with_toolchain_version" = xlist; then
30104    # List all toolchains
30105    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30106$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30107    for version in $VALID_VS_VERSIONS; do
30108      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30109      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30110    done
30111
30112    exit 0
30113  elif test "x$DEVKIT_VS_VERSION" != x; then
30114    VS_VERSION=$DEVKIT_VS_VERSION
30115    TOOLCHAIN_VERSION=$VS_VERSION
30116    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30117    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30118    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30119    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30120    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30121    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30122
30123    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30124    # can still be exported as INCLUDE for compiler invocations without
30125    # SYSROOT_CFLAGS
30126    OLDIFS="$IFS"
30127    IFS=";"
30128    for i in $DEVKIT_VS_INCLUDE; do
30129      ipath=$i
30130
30131  unix_path="$ipath"
30132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30133    windows_path=`$CYGPATH -m "$unix_path"`
30134    ipath="$windows_path"
30135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30136    windows_path=`cmd //c echo $unix_path`
30137    ipath="$windows_path"
30138  fi
30139
30140      VS_INCLUDE="$VS_INCLUDE;$ipath"
30141    done
30142    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30143    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30144    for i in $DEVKIT_VS_LIB; do
30145      libpath=$i
30146
30147  unix_path="$libpath"
30148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30149    windows_path=`$CYGPATH -m "$unix_path"`
30150    libpath="$windows_path"
30151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30152    windows_path=`cmd //c echo $unix_path`
30153    libpath="$windows_path"
30154  fi
30155
30156      VS_LIB="$VS_LIB;$libpath"
30157    done
30158    IFS="$OLDIFS"
30159
30160    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30161$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30162
30163  elif test "x$with_toolchain_version" != x; then
30164    # User override; check that it is valid
30165    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30166      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30167$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30168      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30169$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30170      as_fn_error $? "Cannot continue." "$LINENO" 5
30171    fi
30172    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30173  else
30174    # No flag given, use default
30175    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30176  fi
30177
30178  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30179
30180  VS_VERSION="$VS_VERSION"
30181  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30182  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30183  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30184  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30185
30186  # When using --with-tools-dir, assume it points to the correct and default
30187  # version of Visual Studio or that --with-toolchain-version was also set.
30188  if test "x$with_tools_dir" != x; then
30189
30190  if test "x$VS_ENV_CMD" = x; then
30191    VS_VERSION="${VS_VERSION}"
30192    VS_BASE="$with_tools_dir/../.."
30193    METHOD="--with-tools-dir"
30194
30195    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30196      VCVARSFILE="vc/bin/vcvars32.bat"
30197    else
30198      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30199    fi
30200
30201
30202  windows_path="$VS_BASE"
30203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30204    unix_path=`$CYGPATH -u "$windows_path"`
30205    VS_BASE="$unix_path"
30206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30208    VS_BASE="$unix_path"
30209  fi
30210
30211    if test -d "$VS_BASE"; then
30212      if test -f "$VS_BASE/$VCVARSFILE"; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30214$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30215        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30216        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30217        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30218        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30219      else
30220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30221$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30223$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30224      fi
30225    fi
30226  fi
30227
30228
30229  if test "x$VS_ENV_CMD" = x; then
30230    VS_VERSION="${VS_VERSION}"
30231    VS_BASE="$with_tools_dir/../../.."
30232    METHOD="--with-tools-dir"
30233
30234    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30235      VCVARSFILE="vc/bin/vcvars32.bat"
30236    else
30237      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30238    fi
30239
30240
30241  windows_path="$VS_BASE"
30242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30243    unix_path=`$CYGPATH -u "$windows_path"`
30244    VS_BASE="$unix_path"
30245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30247    VS_BASE="$unix_path"
30248  fi
30249
30250    if test -d "$VS_BASE"; then
30251      if test -f "$VS_BASE/$VCVARSFILE"; then
30252        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30253$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30254        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30255        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30256        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30257        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30258      else
30259        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30260$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30261        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30262$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30263      fi
30264    fi
30265  fi
30266
30267    if test "x$VS_ENV_CMD" = x; then
30268      # Having specified an argument which is incorrect will produce an instant failure;
30269      # we should not go on looking
30270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30271$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30272      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30273$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30274      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30275$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30276      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30277    fi
30278  fi
30279
30280  VS_ENV_CMD=""
30281  VS_ENV_ARGS=""
30282
30283  if test "x$VS_COMNTOOLS" != x; then
30284
30285  if test "x$VS_ENV_CMD" = x; then
30286    VS_VERSION="${VS_VERSION}"
30287    VS_BASE="$VS_COMNTOOLS/../.."
30288    METHOD="$VS_COMNTOOLS_VAR variable"
30289
30290    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30291      VCVARSFILE="vc/bin/vcvars32.bat"
30292    else
30293      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30294    fi
30295
30296
30297  windows_path="$VS_BASE"
30298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30299    unix_path=`$CYGPATH -u "$windows_path"`
30300    VS_BASE="$unix_path"
30301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30303    VS_BASE="$unix_path"
30304  fi
30305
30306    if test -d "$VS_BASE"; then
30307      if test -f "$VS_BASE/$VCVARSFILE"; then
30308        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30309$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30310        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30311        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30312        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30313        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30314      else
30315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30316$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30317        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30318$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30319      fi
30320    fi
30321  fi
30322
30323  fi
30324  if test "x$PROGRAMFILES" != x; then
30325
30326  if test "x$VS_ENV_CMD" = x; then
30327    VS_VERSION="${VS_VERSION}"
30328    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30329    METHOD="well-known name"
30330
30331    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30332      VCVARSFILE="vc/bin/vcvars32.bat"
30333    else
30334      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30335    fi
30336
30337
30338  windows_path="$VS_BASE"
30339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30340    unix_path=`$CYGPATH -u "$windows_path"`
30341    VS_BASE="$unix_path"
30342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30344    VS_BASE="$unix_path"
30345  fi
30346
30347    if test -d "$VS_BASE"; then
30348      if test -f "$VS_BASE/$VCVARSFILE"; then
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30350$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30351        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30352        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30353        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30354        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30355      else
30356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30357$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30358        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30359$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30360      fi
30361    fi
30362  fi
30363
30364  fi
30365  # Work around the insanely named ProgramFiles(x86) env variable
30366  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30367  if test "x$PROGRAMFILES_X86" != x; then
30368
30369  if test "x$VS_ENV_CMD" = x; then
30370    VS_VERSION="${VS_VERSION}"
30371    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30372    METHOD="well-known name"
30373
30374    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30375      VCVARSFILE="vc/bin/vcvars32.bat"
30376    else
30377      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30378    fi
30379
30380
30381  windows_path="$VS_BASE"
30382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30383    unix_path=`$CYGPATH -u "$windows_path"`
30384    VS_BASE="$unix_path"
30385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30387    VS_BASE="$unix_path"
30388  fi
30389
30390    if test -d "$VS_BASE"; then
30391      if test -f "$VS_BASE/$VCVARSFILE"; then
30392        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30393$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30394        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30395        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30396        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30397        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30398      else
30399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30400$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30402$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30403      fi
30404    fi
30405  fi
30406
30407  fi
30408
30409  if test "x$VS_ENV_CMD" = x; then
30410    VS_VERSION="${VS_VERSION}"
30411    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30412    METHOD="well-known name"
30413
30414    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30415      VCVARSFILE="vc/bin/vcvars32.bat"
30416    else
30417      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30418    fi
30419
30420
30421  windows_path="$VS_BASE"
30422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30423    unix_path=`$CYGPATH -u "$windows_path"`
30424    VS_BASE="$unix_path"
30425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30427    VS_BASE="$unix_path"
30428  fi
30429
30430    if test -d "$VS_BASE"; then
30431      if test -f "$VS_BASE/$VCVARSFILE"; then
30432        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30433$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30434        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30435        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30436        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30437        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30438      else
30439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30440$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30441        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30442$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30443      fi
30444    fi
30445  fi
30446
30447
30448  if test "x$VS_ENV_CMD" = x; then
30449    VS_VERSION="${VS_VERSION}"
30450    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30451    METHOD="well-known name"
30452
30453    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30454      VCVARSFILE="vc/bin/vcvars32.bat"
30455    else
30456      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30457    fi
30458
30459
30460  windows_path="$VS_BASE"
30461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30462    unix_path=`$CYGPATH -u "$windows_path"`
30463    VS_BASE="$unix_path"
30464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30466    VS_BASE="$unix_path"
30467  fi
30468
30469    if test -d "$VS_BASE"; then
30470      if test -f "$VS_BASE/$VCVARSFILE"; then
30471        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30472$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30473        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30474        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30475        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30476        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30477      else
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30479$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30481$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30482      fi
30483    fi
30484  fi
30485
30486
30487  if test "x$SDK_INSTALL_DIR" != x; then
30488    if test "x$ProgramW6432" != x; then
30489
30490  if test "x$VS_ENV_CMD" = x; then
30491    VS_VERSION="${VS_VERSION}"
30492    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30493    METHOD="well-known name"
30494
30495  windows_path="$WIN_SDK_BASE"
30496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30497    unix_path=`$CYGPATH -u "$windows_path"`
30498    WIN_SDK_BASE="$unix_path"
30499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30501    WIN_SDK_BASE="$unix_path"
30502  fi
30503
30504    if test -d "$WIN_SDK_BASE"; then
30505      # There have been cases of partial or broken SDK installations. A missing
30506      # lib dir is not going to work.
30507      if test ! -d "$WIN_SDK_BASE/lib"; then
30508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30509$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30510        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30511$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30512      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30514$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30515        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30516        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30517          VS_ENV_ARGS="/x86"
30518        else
30519          VS_ENV_ARGS="/x64"
30520        fi
30521        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30522        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30523        # TODO: improve detection for other versions of SDK
30524        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30525      else
30526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30529$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30530      fi
30531    fi
30532  fi
30533
30534    fi
30535    if test "x$PROGRAMW6432" != x; then
30536
30537  if test "x$VS_ENV_CMD" = x; then
30538    VS_VERSION="${VS_VERSION}"
30539    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30540    METHOD="well-known name"
30541
30542  windows_path="$WIN_SDK_BASE"
30543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30544    unix_path=`$CYGPATH -u "$windows_path"`
30545    WIN_SDK_BASE="$unix_path"
30546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30548    WIN_SDK_BASE="$unix_path"
30549  fi
30550
30551    if test -d "$WIN_SDK_BASE"; then
30552      # There have been cases of partial or broken SDK installations. A missing
30553      # lib dir is not going to work.
30554      if test ! -d "$WIN_SDK_BASE/lib"; then
30555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30556$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30557        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30558$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30559      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30560        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30561$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30562        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30563        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30564          VS_ENV_ARGS="/x86"
30565        else
30566          VS_ENV_ARGS="/x64"
30567        fi
30568        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30569        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30570        # TODO: improve detection for other versions of SDK
30571        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30572      else
30573        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30574$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30576$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30577      fi
30578    fi
30579  fi
30580
30581    fi
30582    if test "x$PROGRAMFILES" != x; then
30583
30584  if test "x$VS_ENV_CMD" = x; then
30585    VS_VERSION="${VS_VERSION}"
30586    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30587    METHOD="well-known name"
30588
30589  windows_path="$WIN_SDK_BASE"
30590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30591    unix_path=`$CYGPATH -u "$windows_path"`
30592    WIN_SDK_BASE="$unix_path"
30593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30595    WIN_SDK_BASE="$unix_path"
30596  fi
30597
30598    if test -d "$WIN_SDK_BASE"; then
30599      # There have been cases of partial or broken SDK installations. A missing
30600      # lib dir is not going to work.
30601      if test ! -d "$WIN_SDK_BASE/lib"; then
30602        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30603$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30605$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30606      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30607        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30608$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30609        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30610        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30611          VS_ENV_ARGS="/x86"
30612        else
30613          VS_ENV_ARGS="/x64"
30614        fi
30615        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30616        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30617        # TODO: improve detection for other versions of SDK
30618        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30619      else
30620        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30621$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30622        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30623$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30624      fi
30625    fi
30626  fi
30627
30628    fi
30629
30630  if test "x$VS_ENV_CMD" = x; then
30631    VS_VERSION="${VS_VERSION}"
30632    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30633    METHOD="well-known name"
30634
30635  windows_path="$WIN_SDK_BASE"
30636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30637    unix_path=`$CYGPATH -u "$windows_path"`
30638    WIN_SDK_BASE="$unix_path"
30639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30641    WIN_SDK_BASE="$unix_path"
30642  fi
30643
30644    if test -d "$WIN_SDK_BASE"; then
30645      # There have been cases of partial or broken SDK installations. A missing
30646      # lib dir is not going to work.
30647      if test ! -d "$WIN_SDK_BASE/lib"; then
30648        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30649$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30650        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30651$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30652      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30653        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30654$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30655        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30656        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30657          VS_ENV_ARGS="/x86"
30658        else
30659          VS_ENV_ARGS="/x64"
30660        fi
30661        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30662        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30663        # TODO: improve detection for other versions of SDK
30664        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30665      else
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30667$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30669$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30670      fi
30671    fi
30672  fi
30673
30674
30675  if test "x$VS_ENV_CMD" = x; then
30676    VS_VERSION="${VS_VERSION}"
30677    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30678    METHOD="well-known name"
30679
30680  windows_path="$WIN_SDK_BASE"
30681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30682    unix_path=`$CYGPATH -u "$windows_path"`
30683    WIN_SDK_BASE="$unix_path"
30684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30686    WIN_SDK_BASE="$unix_path"
30687  fi
30688
30689    if test -d "$WIN_SDK_BASE"; then
30690      # There have been cases of partial or broken SDK installations. A missing
30691      # lib dir is not going to work.
30692      if test ! -d "$WIN_SDK_BASE/lib"; then
30693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30694$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30695        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30696$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30697      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30698        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30699$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30700        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30701        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30702          VS_ENV_ARGS="/x86"
30703        else
30704          VS_ENV_ARGS="/x64"
30705        fi
30706        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30707        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30708        # TODO: improve detection for other versions of SDK
30709        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30710      else
30711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30712$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30713        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30714$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30715      fi
30716    fi
30717  fi
30718
30719  fi
30720
30721    if test "x$VS_ENV_CMD" != x; then
30722      TOOLCHAIN_VERSION=$VS_VERSION
30723      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30724      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30725      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30726      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30727      # The rest of the variables are already evaled while probing
30728      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30729$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30730      break
30731    fi
30732  done
30733
30734
30735  # If we have a devkit, skip all of the below.
30736  if test "x$DEVKIT_VS_VERSION" = x; then
30737    if test "x$VS_ENV_CMD" != x; then
30738      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30739
30740  # Only process if variable expands to non-empty
30741
30742  if test "x$VS_ENV_CMD" != x; then
30743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30744
30745  # First separate the path from the arguments. This will split at the first
30746  # space.
30747  complete="$VS_ENV_CMD"
30748  path="${complete%% *}"
30749  tmp="$complete EOL"
30750  arguments="${tmp#* }"
30751
30752  # Input might be given as Windows format, start by converting to
30753  # unix format.
30754  new_path=`$CYGPATH -u "$path"`
30755
30756  # Now try to locate executable using which
30757  new_path=`$WHICH "$new_path" 2> /dev/null`
30758  # bat and cmd files are not always considered executable in cygwin causing which
30759  # to not find them
30760  if test "x$new_path" = x \
30761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30763    new_path=`$CYGPATH -u "$path"`
30764  fi
30765  if test "x$new_path" = x; then
30766    # Oops. Which didn't find the executable.
30767    # The splitting of arguments from the executable at a space might have been incorrect,
30768    # since paths with space are more likely in Windows. Give it another try with the whole
30769    # argument.
30770    path="$complete"
30771    arguments="EOL"
30772    new_path=`$CYGPATH -u "$path"`
30773    new_path=`$WHICH "$new_path" 2> /dev/null`
30774    # bat and cmd files are not always considered executable in cygwin causing which
30775    # to not find them
30776    if test "x$new_path" = x \
30777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30779      new_path=`$CYGPATH -u "$path"`
30780    fi
30781    if test "x$new_path" = x; then
30782      # It's still not found. Now this is an unrecoverable error.
30783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30784$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30785      has_space=`$ECHO "$complete" | $GREP " "`
30786      if test "x$has_space" != x; then
30787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30789      fi
30790      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30791    fi
30792  fi
30793
30794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30797  # "foo.exe" is OK but "foo" is an error.
30798  #
30799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30800  # It is also a way to make sure we got the proper file name for the real test later on.
30801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30802  if test "x$test_shortpath" = x; then
30803    # Short path failed, file does not exist as specified.
30804    # Try adding .exe or .cmd
30805    if test -f "${new_path}.exe"; then
30806      input_to_shortpath="${new_path}.exe"
30807    elif test -f "${new_path}.cmd"; then
30808      input_to_shortpath="${new_path}.cmd"
30809    else
30810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30811$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30814      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30815    fi
30816  else
30817    input_to_shortpath="$new_path"
30818  fi
30819
30820  # Call helper function which possibly converts this using DOS-style short mode.
30821  # If so, the updated path is stored in $new_path.
30822  new_path="$input_to_shortpath"
30823
30824  input_path="$input_to_shortpath"
30825  # Check if we need to convert this using DOS-style short mode. If the path
30826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30827  # take no chances and rewrite it.
30828  # Note: m4 eats our [], so we need to use [ and ] instead.
30829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30830  if test "x$has_forbidden_chars" != x; then
30831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30835      # Going to short mode and back again did indeed matter. Since short mode is
30836      # case insensitive, let's make it lowercase to improve readability.
30837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30838      # Now convert it back to Unix-style (cygpath)
30839      input_path=`$CYGPATH -u "$shortmode_path"`
30840      new_path="$input_path"
30841    fi
30842  fi
30843
30844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30845  if test "x$test_cygdrive_prefix" = x; then
30846    # As a simple fix, exclude /usr/bin since it's not a real path.
30847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30849      # a path prefixed by /cygdrive for fixpath to work.
30850      new_path="$CYGWIN_ROOT_PATH$input_path"
30851    fi
30852  fi
30853
30854  # remove trailing .exe if any
30855  new_path="${new_path/%.exe/}"
30856
30857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858
30859  # First separate the path from the arguments. This will split at the first
30860  # space.
30861  complete="$VS_ENV_CMD"
30862  path="${complete%% *}"
30863  tmp="$complete EOL"
30864  arguments="${tmp#* }"
30865
30866  # Input might be given as Windows format, start by converting to
30867  # unix format.
30868  new_path="$path"
30869
30870  windows_path="$new_path"
30871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30872    unix_path=`$CYGPATH -u "$windows_path"`
30873    new_path="$unix_path"
30874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30876    new_path="$unix_path"
30877  fi
30878
30879
30880  # Now try to locate executable using which
30881  new_path=`$WHICH "$new_path" 2> /dev/null`
30882
30883  if test "x$new_path" = x; then
30884    # Oops. Which didn't find the executable.
30885    # The splitting of arguments from the executable at a space might have been incorrect,
30886    # since paths with space are more likely in Windows. Give it another try with the whole
30887    # argument.
30888    path="$complete"
30889    arguments="EOL"
30890    new_path="$path"
30891
30892  windows_path="$new_path"
30893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30894    unix_path=`$CYGPATH -u "$windows_path"`
30895    new_path="$unix_path"
30896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30898    new_path="$unix_path"
30899  fi
30900
30901
30902    new_path=`$WHICH "$new_path" 2> /dev/null`
30903    # bat and cmd files are not always considered executable in MSYS causing which
30904    # to not find them
30905    if test "x$new_path" = x \
30906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30908      new_path="$path"
30909
30910  windows_path="$new_path"
30911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30912    unix_path=`$CYGPATH -u "$windows_path"`
30913    new_path="$unix_path"
30914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30916    new_path="$unix_path"
30917  fi
30918
30919    fi
30920
30921    if test "x$new_path" = x; then
30922      # It's still not found. Now this is an unrecoverable error.
30923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30924$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30925      has_space=`$ECHO "$complete" | $GREP " "`
30926      if test "x$has_space" != x; then
30927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30929      fi
30930      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30931    fi
30932  fi
30933
30934  # Now new_path has a complete unix path to the binary
30935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30936    # Keep paths in /bin as-is, but remove trailing .exe if any
30937    new_path="${new_path/%.exe/}"
30938    # Do not save /bin paths to all_fixpath_prefixes!
30939  else
30940    # Not in mixed or Windows style, start by that.
30941    new_path=`cmd //c echo $new_path`
30942
30943  input_path="$new_path"
30944  # Check if we need to convert this using DOS-style short mode. If the path
30945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30946  # take no chances and rewrite it.
30947  # Note: m4 eats our [], so we need to use [ and ] instead.
30948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30949  if test "x$has_forbidden_chars" != x; then
30950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30952  fi
30953
30954    # Output is in $new_path
30955
30956  windows_path="$new_path"
30957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30958    unix_path=`$CYGPATH -u "$windows_path"`
30959    new_path="$unix_path"
30960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30962    new_path="$unix_path"
30963  fi
30964
30965    # remove trailing .exe if any
30966    new_path="${new_path/%.exe/}"
30967
30968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30970  fi
30971
30972    else
30973      # We're on a unix platform. Hooray! :)
30974      # First separate the path from the arguments. This will split at the first
30975      # space.
30976      complete="$VS_ENV_CMD"
30977      path="${complete%% *}"
30978      tmp="$complete EOL"
30979      arguments="${tmp#* }"
30980
30981      # Cannot rely on the command "which" here since it doesn't always work.
30982      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30983      if test -z "$is_absolute_path"; then
30984        # Path to executable is not absolute. Find it.
30985        IFS_save="$IFS"
30986        IFS=:
30987        for p in $PATH; do
30988          if test -f "$p/$path" && test -x "$p/$path"; then
30989            new_path="$p/$path"
30990            break
30991          fi
30992        done
30993        IFS="$IFS_save"
30994      else
30995        # This is an absolute path, we can use it without further modifications.
30996        new_path="$path"
30997      fi
30998
30999      if test "x$new_path" = x; then
31000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31001$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31002        has_space=`$ECHO "$complete" | $GREP " "`
31003        if test "x$has_space" != x; then
31004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31006        fi
31007        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31008      fi
31009    fi
31010
31011    # Now join together the path and the arguments once again
31012    if test "x$arguments" != xEOL; then
31013      new_complete="$new_path ${arguments% *}"
31014    else
31015      new_complete="$new_path"
31016    fi
31017
31018    if test "x$complete" != "x$new_complete"; then
31019      VS_ENV_CMD="$new_complete"
31020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31021$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31022    fi
31023  fi
31024
31025
31026      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31027      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31028$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31029
31030      # We need to create a couple of temporary files.
31031      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31032      $MKDIR -p $VS_ENV_TMP_DIR
31033
31034      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31035      # Instead create a shell script which will set the relevant variables when run.
31036      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31037
31038  unix_path="$WINPATH_VS_ENV_CMD"
31039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31040    windows_path=`$CYGPATH -m "$unix_path"`
31041    WINPATH_VS_ENV_CMD="$windows_path"
31042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31043    windows_path=`cmd //c echo $unix_path`
31044    WINPATH_VS_ENV_CMD="$windows_path"
31045  fi
31046
31047      WINPATH_BASH="$BASH"
31048
31049  unix_path="$WINPATH_BASH"
31050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31051    windows_path=`$CYGPATH -m "$unix_path"`
31052    WINPATH_BASH="$windows_path"
31053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31054    windows_path=`cmd //c echo $unix_path`
31055    WINPATH_BASH="$windows_path"
31056  fi
31057
31058
31059      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31060      # script (executable by bash) that will setup the important variables.
31061      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31062      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31063      # This will end up something like:
31064      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31065      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31066      # These will end up something like:
31067      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31068      # The trailing space for everyone except PATH is no typo, but is needed due
31069      # to trailing \ in the Windows paths. These will be stripped later.
31070      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31071          >> $EXTRACT_VC_ENV_BAT_FILE
31072      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31073          >> $EXTRACT_VC_ENV_BAT_FILE
31074      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31075          >> $EXTRACT_VC_ENV_BAT_FILE
31076      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31077          >> $EXTRACT_VC_ENV_BAT_FILE
31078      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31079          >> $EXTRACT_VC_ENV_BAT_FILE
31080      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31081          >> $EXTRACT_VC_ENV_BAT_FILE
31082
31083      # Now execute the newly created bat file.
31084      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31085      # Change directory so we don't need to mess with Windows paths in redirects.
31086      cd $VS_ENV_TMP_DIR
31087      cmd /c extract-vs-env.bat | $CAT
31088      cd $CURDIR
31089
31090      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31091        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31092$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31093        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31094$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31096$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31097        as_fn_error $? "Cannot continue" "$LINENO" 5
31098      fi
31099
31100      # Now set all paths and other env variables. This will allow the rest of
31101      # the configure script to find and run the compiler in the proper way.
31102      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31103$as_echo "$as_me: Setting extracted environment variables" >&6;}
31104      . $VS_ENV_TMP_DIR/set-vs-env.sh
31105      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31106      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31107    else
31108      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31109      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31110$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31111    fi
31112  fi
31113
31114  # At this point, we should have correct variables in the environment, or we can't continue.
31115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31116$as_echo_n "checking for Visual Studio variables... " >&6; }
31117
31118  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31119      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31120    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31122$as_echo "present but broken" >&6; }
31123      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31124    else
31125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31126$as_echo "ok" >&6; }
31127      # Remove any trailing "\" ";" and " " from the variables.
31128      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31129      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31130      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31131      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31132      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31133      # Remove any paths containing # (typically F#) as that messes up make. This
31134      # is needed if visual studio was installed with F# support.
31135      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31136
31137
31138
31139
31140
31141      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31142      OLDIFS="$IFS"
31143      IFS=";"
31144      for i in $VS_INCLUDE; do
31145        ipath=$i
31146        # Only process non-empty elements
31147        if test "x$ipath" != x; then
31148          IFS="$OLDIFS"
31149          # Check that directory exists before calling fixup_path
31150          testpath=$ipath
31151
31152  windows_path="$testpath"
31153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31154    unix_path=`$CYGPATH -u "$windows_path"`
31155    testpath="$unix_path"
31156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31158    testpath="$unix_path"
31159  fi
31160
31161          if test -d "$testpath"; then
31162
31163  # Only process if variable expands to non-empty
31164
31165  if test "x$ipath" != x; then
31166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31167
31168  # Input might be given as Windows format, start by converting to
31169  # unix format.
31170  path="$ipath"
31171  new_path=`$CYGPATH -u "$path"`
31172
31173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31176  # "foo.exe" is OK but "foo" is an error.
31177  #
31178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31179  # It is also a way to make sure we got the proper file name for the real test later on.
31180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31181  if test "x$test_shortpath" = x; then
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31183$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31184    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31185  fi
31186
31187  # Call helper function which possibly converts this using DOS-style short mode.
31188  # If so, the updated path is stored in $new_path.
31189
31190  input_path="$new_path"
31191  # Check if we need to convert this using DOS-style short mode. If the path
31192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31193  # take no chances and rewrite it.
31194  # Note: m4 eats our [], so we need to use [ and ] instead.
31195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31196  if test "x$has_forbidden_chars" != x; then
31197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31201      # Going to short mode and back again did indeed matter. Since short mode is
31202      # case insensitive, let's make it lowercase to improve readability.
31203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31204      # Now convert it back to Unix-style (cygpath)
31205      input_path=`$CYGPATH -u "$shortmode_path"`
31206      new_path="$input_path"
31207    fi
31208  fi
31209
31210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31211  if test "x$test_cygdrive_prefix" = x; then
31212    # As a simple fix, exclude /usr/bin since it's not a real path.
31213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31215      # a path prefixed by /cygdrive for fixpath to work.
31216      new_path="$CYGWIN_ROOT_PATH$input_path"
31217    fi
31218  fi
31219
31220
31221  if test "x$path" != "x$new_path"; then
31222    ipath="$new_path"
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31224$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31225  fi
31226
31227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31228
31229  path="$ipath"
31230  has_colon=`$ECHO $path | $GREP ^.:`
31231  new_path="$path"
31232  if test "x$has_colon" = x; then
31233    # Not in mixed or Windows style, start by that.
31234    new_path=`cmd //c echo $path`
31235  fi
31236
31237
31238  input_path="$new_path"
31239  # Check if we need to convert this using DOS-style short mode. If the path
31240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31241  # take no chances and rewrite it.
31242  # Note: m4 eats our [], so we need to use [ and ] instead.
31243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31244  if test "x$has_forbidden_chars" != x; then
31245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31247  fi
31248
31249
31250  windows_path="$new_path"
31251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31252    unix_path=`$CYGPATH -u "$windows_path"`
31253    new_path="$unix_path"
31254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31256    new_path="$unix_path"
31257  fi
31258
31259  if test "x$path" != "x$new_path"; then
31260    ipath="$new_path"
31261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31262$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31263  fi
31264
31265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31267
31268    else
31269      # We're on a unix platform. Hooray! :)
31270      path="$ipath"
31271      has_space=`$ECHO "$path" | $GREP " "`
31272      if test "x$has_space" != x; then
31273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31274$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31276      fi
31277
31278      # Use eval to expand a potential ~
31279      eval path="$path"
31280      if test ! -f "$path" && test ! -d "$path"; then
31281        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31282      fi
31283
31284      if test -d "$path"; then
31285        ipath="`cd "$path"; $THEPWDCMD -L`"
31286      else
31287        dir="`$DIRNAME "$path"`"
31288        base="`$BASENAME "$path"`"
31289        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31290      fi
31291    fi
31292  fi
31293
31294            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31295          fi
31296          IFS=";"
31297        fi
31298      done
31299      # Convert VS_LIB into SYSROOT_LDFLAGS
31300      for i in $VS_LIB; do
31301        libpath=$i
31302        # Only process non-empty elements
31303        if test "x$libpath" != x; then
31304          IFS="$OLDIFS"
31305          # Check that directory exists before calling fixup_path
31306          testpath=$libpath
31307
31308  windows_path="$testpath"
31309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31310    unix_path=`$CYGPATH -u "$windows_path"`
31311    testpath="$unix_path"
31312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31314    testpath="$unix_path"
31315  fi
31316
31317          if test -d "$testpath"; then
31318
31319  # Only process if variable expands to non-empty
31320
31321  if test "x$libpath" != x; then
31322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31323
31324  # Input might be given as Windows format, start by converting to
31325  # unix format.
31326  path="$libpath"
31327  new_path=`$CYGPATH -u "$path"`
31328
31329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31332  # "foo.exe" is OK but "foo" is an error.
31333  #
31334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31335  # It is also a way to make sure we got the proper file name for the real test later on.
31336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31337  if test "x$test_shortpath" = x; then
31338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31339$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31340    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31341  fi
31342
31343  # Call helper function which possibly converts this using DOS-style short mode.
31344  # If so, the updated path is stored in $new_path.
31345
31346  input_path="$new_path"
31347  # Check if we need to convert this using DOS-style short mode. If the path
31348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31349  # take no chances and rewrite it.
31350  # Note: m4 eats our [], so we need to use [ and ] instead.
31351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31352  if test "x$has_forbidden_chars" != x; then
31353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31357      # Going to short mode and back again did indeed matter. Since short mode is
31358      # case insensitive, let's make it lowercase to improve readability.
31359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31360      # Now convert it back to Unix-style (cygpath)
31361      input_path=`$CYGPATH -u "$shortmode_path"`
31362      new_path="$input_path"
31363    fi
31364  fi
31365
31366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31367  if test "x$test_cygdrive_prefix" = x; then
31368    # As a simple fix, exclude /usr/bin since it's not a real path.
31369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31371      # a path prefixed by /cygdrive for fixpath to work.
31372      new_path="$CYGWIN_ROOT_PATH$input_path"
31373    fi
31374  fi
31375
31376
31377  if test "x$path" != "x$new_path"; then
31378    libpath="$new_path"
31379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31380$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31381  fi
31382
31383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31384
31385  path="$libpath"
31386  has_colon=`$ECHO $path | $GREP ^.:`
31387  new_path="$path"
31388  if test "x$has_colon" = x; then
31389    # Not in mixed or Windows style, start by that.
31390    new_path=`cmd //c echo $path`
31391  fi
31392
31393
31394  input_path="$new_path"
31395  # Check if we need to convert this using DOS-style short mode. If the path
31396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31397  # take no chances and rewrite it.
31398  # Note: m4 eats our [], so we need to use [ and ] instead.
31399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31400  if test "x$has_forbidden_chars" != x; then
31401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31403  fi
31404
31405
31406  windows_path="$new_path"
31407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31408    unix_path=`$CYGPATH -u "$windows_path"`
31409    new_path="$unix_path"
31410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31412    new_path="$unix_path"
31413  fi
31414
31415  if test "x$path" != "x$new_path"; then
31416    libpath="$new_path"
31417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31418$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31419  fi
31420
31421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31423
31424    else
31425      # We're on a unix platform. Hooray! :)
31426      path="$libpath"
31427      has_space=`$ECHO "$path" | $GREP " "`
31428      if test "x$has_space" != x; then
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31430$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31432      fi
31433
31434      # Use eval to expand a potential ~
31435      eval path="$path"
31436      if test ! -f "$path" && test ! -d "$path"; then
31437        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31438      fi
31439
31440      if test -d "$path"; then
31441        libpath="`cd "$path"; $THEPWDCMD -L`"
31442      else
31443        dir="`$DIRNAME "$path"`"
31444        base="`$BASENAME "$path"`"
31445        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31446      fi
31447    fi
31448  fi
31449
31450            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31451          fi
31452          IFS=";"
31453        fi
31454      done
31455      IFS="$OLDIFS"
31456    fi
31457  else
31458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31459$as_echo "not found" >&6; }
31460
31461    if test "x$VS_ENV_CMD" = x; then
31462      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31463$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31464      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31465$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31466    else
31467      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31468$as_echo "$as_me: Running the extraction script failed." >&6;}
31469    fi
31470    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31471$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31472    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31473$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31474    as_fn_error $? "Cannot continue" "$LINENO" 5
31475  fi
31476
31477    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31478    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31479    PATH="$VS_PATH"
31480    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31481    export INCLUDE="$VS_INCLUDE"
31482    export LIB="$VS_LIB"
31483  else
31484    # Currently we do not define this for other toolchains. This might change as the need arise.
31485    TOOLCHAIN_VERSION=
31486  fi
31487
31488
31489  # For solaris we really need solaris tools, and not the GNU equivalent.
31490  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31491  # so add that to path before starting to probe.
31492  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31493  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31494    PATH="/usr/ccs/bin:$PATH"
31495  fi
31496
31497  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31498  # override all other locations.
31499  if test "x$TOOLCHAIN_PATH" != x; then
31500    PATH=$TOOLCHAIN_PATH:$PATH
31501  fi
31502
31503
31504  #
31505  # Setup the compilers (CC and CXX)
31506  #
31507
31508  COMPILER_NAME=C
31509  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31510
31511  if test "x$CC" != x; then
31512    # User has supplied compiler name already, always let that override.
31513    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31514$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31515    if test "x`basename $CC`" = "x$CC"; then
31516      # A command without a complete path is provided, search $PATH.
31517
31518      for ac_prog in $CC
31519do
31520  # Extract the first word of "$ac_prog", so it can be a program name with args.
31521set dummy $ac_prog; ac_word=$2
31522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31523$as_echo_n "checking for $ac_word... " >&6; }
31524if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31525  $as_echo_n "(cached) " >&6
31526else
31527  case $POTENTIAL_CC in
31528  [\\/]* | ?:[\\/]*)
31529  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31530  ;;
31531  *)
31532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31533for as_dir in $PATH
31534do
31535  IFS=$as_save_IFS
31536  test -z "$as_dir" && as_dir=.
31537    for ac_exec_ext in '' $ac_executable_extensions; do
31538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31539    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31541    break 2
31542  fi
31543done
31544  done
31545IFS=$as_save_IFS
31546
31547  ;;
31548esac
31549fi
31550POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31551if test -n "$POTENTIAL_CC"; then
31552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31553$as_echo "$POTENTIAL_CC" >&6; }
31554else
31555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31556$as_echo "no" >&6; }
31557fi
31558
31559
31560  test -n "$POTENTIAL_CC" && break
31561done
31562
31563      if test "x$POTENTIAL_CC" != x; then
31564        CC=$POTENTIAL_CC
31565      else
31566        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31567      fi
31568    else
31569      # Otherwise it might already be a complete path
31570      if test ! -x "$CC"; then
31571        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31572      fi
31573    fi
31574  else
31575    # No user supplied value. Locate compiler ourselves.
31576
31577    # If we are cross compiling, assume cross compilation tools follows the
31578    # cross compilation standard where they are prefixed with the autoconf
31579    # standard name for the target. For example the binary
31580    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31581    # If we are not cross compiling, then the default compiler name will be
31582    # used.
31583
31584    CC=
31585    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31586    # before checking the rest of the PATH.
31587    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31588    # step, this should not be necessary.
31589    if test -n "$TOOLCHAIN_PATH"; then
31590      PATH_save="$PATH"
31591      PATH="$TOOLCHAIN_PATH"
31592      for ac_prog in $SEARCH_LIST
31593do
31594  # Extract the first word of "$ac_prog", so it can be a program name with args.
31595set dummy $ac_prog; ac_word=$2
31596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31597$as_echo_n "checking for $ac_word... " >&6; }
31598if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31599  $as_echo_n "(cached) " >&6
31600else
31601  case $TOOLCHAIN_PATH_CC in
31602  [\\/]* | ?:[\\/]*)
31603  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31604  ;;
31605  *)
31606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31607for as_dir in $PATH
31608do
31609  IFS=$as_save_IFS
31610  test -z "$as_dir" && as_dir=.
31611    for ac_exec_ext in '' $ac_executable_extensions; do
31612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31613    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31615    break 2
31616  fi
31617done
31618  done
31619IFS=$as_save_IFS
31620
31621  ;;
31622esac
31623fi
31624TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31625if test -n "$TOOLCHAIN_PATH_CC"; then
31626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31627$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31628else
31629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31630$as_echo "no" >&6; }
31631fi
31632
31633
31634  test -n "$TOOLCHAIN_PATH_CC" && break
31635done
31636
31637      CC=$TOOLCHAIN_PATH_CC
31638      PATH="$PATH_save"
31639    fi
31640
31641    # AC_PATH_PROGS can't be run multiple times with the same variable,
31642    # so create a new name for this run.
31643    if test "x$CC" = x; then
31644      for ac_prog in $SEARCH_LIST
31645do
31646  # Extract the first word of "$ac_prog", so it can be a program name with args.
31647set dummy $ac_prog; ac_word=$2
31648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31649$as_echo_n "checking for $ac_word... " >&6; }
31650if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31651  $as_echo_n "(cached) " >&6
31652else
31653  case $POTENTIAL_CC in
31654  [\\/]* | ?:[\\/]*)
31655  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31656  ;;
31657  *)
31658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31659for as_dir in $PATH
31660do
31661  IFS=$as_save_IFS
31662  test -z "$as_dir" && as_dir=.
31663    for ac_exec_ext in '' $ac_executable_extensions; do
31664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31665    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31667    break 2
31668  fi
31669done
31670  done
31671IFS=$as_save_IFS
31672
31673  ;;
31674esac
31675fi
31676POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31677if test -n "$POTENTIAL_CC"; then
31678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31679$as_echo "$POTENTIAL_CC" >&6; }
31680else
31681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31682$as_echo "no" >&6; }
31683fi
31684
31685
31686  test -n "$POTENTIAL_CC" && break
31687done
31688
31689      CC=$POTENTIAL_CC
31690    fi
31691
31692    if test "x$CC" = x; then
31693
31694  # Print a helpful message on how to acquire the necessary build dependency.
31695  # devkit is the help tag: freetype, cups, alsa etc
31696  MISSING_DEPENDENCY=devkit
31697
31698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31699    cygwin_help $MISSING_DEPENDENCY
31700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31701    msys_help $MISSING_DEPENDENCY
31702  else
31703    PKGHANDLER_COMMAND=
31704
31705    case $PKGHANDLER in
31706      apt-get)
31707        apt_help     $MISSING_DEPENDENCY ;;
31708      yum)
31709        yum_help     $MISSING_DEPENDENCY ;;
31710      port)
31711        port_help    $MISSING_DEPENDENCY ;;
31712      pkgutil)
31713        pkgutil_help $MISSING_DEPENDENCY ;;
31714      pkgadd)
31715        pkgadd_help  $MISSING_DEPENDENCY ;;
31716    esac
31717
31718    if test "x$PKGHANDLER_COMMAND" != x; then
31719      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31720    fi
31721  fi
31722
31723      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31724    fi
31725  fi
31726
31727  # Now we have a compiler binary in CC. Make sure it's okay.
31728
31729  # Only process if variable expands to non-empty
31730
31731  if test "x$CC" != x; then
31732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31733
31734  # First separate the path from the arguments. This will split at the first
31735  # space.
31736  complete="$CC"
31737  path="${complete%% *}"
31738  tmp="$complete EOL"
31739  arguments="${tmp#* }"
31740
31741  # Input might be given as Windows format, start by converting to
31742  # unix format.
31743  new_path=`$CYGPATH -u "$path"`
31744
31745  # Now try to locate executable using which
31746  new_path=`$WHICH "$new_path" 2> /dev/null`
31747  # bat and cmd files are not always considered executable in cygwin causing which
31748  # to not find them
31749  if test "x$new_path" = x \
31750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31752    new_path=`$CYGPATH -u "$path"`
31753  fi
31754  if test "x$new_path" = x; then
31755    # Oops. Which didn't find the executable.
31756    # The splitting of arguments from the executable at a space might have been incorrect,
31757    # since paths with space are more likely in Windows. Give it another try with the whole
31758    # argument.
31759    path="$complete"
31760    arguments="EOL"
31761    new_path=`$CYGPATH -u "$path"`
31762    new_path=`$WHICH "$new_path" 2> /dev/null`
31763    # bat and cmd files are not always considered executable in cygwin causing which
31764    # to not find them
31765    if test "x$new_path" = x \
31766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31768      new_path=`$CYGPATH -u "$path"`
31769    fi
31770    if test "x$new_path" = x; then
31771      # It's still not found. Now this is an unrecoverable error.
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31773$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31774      has_space=`$ECHO "$complete" | $GREP " "`
31775      if test "x$has_space" != x; then
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31778      fi
31779      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31780    fi
31781  fi
31782
31783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31786  # "foo.exe" is OK but "foo" is an error.
31787  #
31788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31789  # It is also a way to make sure we got the proper file name for the real test later on.
31790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31791  if test "x$test_shortpath" = x; then
31792    # Short path failed, file does not exist as specified.
31793    # Try adding .exe or .cmd
31794    if test -f "${new_path}.exe"; then
31795      input_to_shortpath="${new_path}.exe"
31796    elif test -f "${new_path}.cmd"; then
31797      input_to_shortpath="${new_path}.cmd"
31798    else
31799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31800$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31803      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31804    fi
31805  else
31806    input_to_shortpath="$new_path"
31807  fi
31808
31809  # Call helper function which possibly converts this using DOS-style short mode.
31810  # If so, the updated path is stored in $new_path.
31811  new_path="$input_to_shortpath"
31812
31813  input_path="$input_to_shortpath"
31814  # Check if we need to convert this using DOS-style short mode. If the path
31815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31816  # take no chances and rewrite it.
31817  # Note: m4 eats our [], so we need to use [ and ] instead.
31818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31819  if test "x$has_forbidden_chars" != x; then
31820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31824      # Going to short mode and back again did indeed matter. Since short mode is
31825      # case insensitive, let's make it lowercase to improve readability.
31826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31827      # Now convert it back to Unix-style (cygpath)
31828      input_path=`$CYGPATH -u "$shortmode_path"`
31829      new_path="$input_path"
31830    fi
31831  fi
31832
31833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31834  if test "x$test_cygdrive_prefix" = x; then
31835    # As a simple fix, exclude /usr/bin since it's not a real path.
31836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31838      # a path prefixed by /cygdrive for fixpath to work.
31839      new_path="$CYGWIN_ROOT_PATH$input_path"
31840    fi
31841  fi
31842
31843  # remove trailing .exe if any
31844  new_path="${new_path/%.exe/}"
31845
31846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31847
31848  # First separate the path from the arguments. This will split at the first
31849  # space.
31850  complete="$CC"
31851  path="${complete%% *}"
31852  tmp="$complete EOL"
31853  arguments="${tmp#* }"
31854
31855  # Input might be given as Windows format, start by converting to
31856  # unix format.
31857  new_path="$path"
31858
31859  windows_path="$new_path"
31860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861    unix_path=`$CYGPATH -u "$windows_path"`
31862    new_path="$unix_path"
31863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31865    new_path="$unix_path"
31866  fi
31867
31868
31869  # Now try to locate executable using which
31870  new_path=`$WHICH "$new_path" 2> /dev/null`
31871
31872  if test "x$new_path" = x; then
31873    # Oops. Which didn't find the executable.
31874    # The splitting of arguments from the executable at a space might have been incorrect,
31875    # since paths with space are more likely in Windows. Give it another try with the whole
31876    # argument.
31877    path="$complete"
31878    arguments="EOL"
31879    new_path="$path"
31880
31881  windows_path="$new_path"
31882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31883    unix_path=`$CYGPATH -u "$windows_path"`
31884    new_path="$unix_path"
31885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31887    new_path="$unix_path"
31888  fi
31889
31890
31891    new_path=`$WHICH "$new_path" 2> /dev/null`
31892    # bat and cmd files are not always considered executable in MSYS causing which
31893    # to not find them
31894    if test "x$new_path" = x \
31895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31897      new_path="$path"
31898
31899  windows_path="$new_path"
31900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31901    unix_path=`$CYGPATH -u "$windows_path"`
31902    new_path="$unix_path"
31903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31905    new_path="$unix_path"
31906  fi
31907
31908    fi
31909
31910    if test "x$new_path" = x; then
31911      # It's still not found. Now this is an unrecoverable error.
31912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31913$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31914      has_space=`$ECHO "$complete" | $GREP " "`
31915      if test "x$has_space" != x; then
31916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31918      fi
31919      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31920    fi
31921  fi
31922
31923  # Now new_path has a complete unix path to the binary
31924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31925    # Keep paths in /bin as-is, but remove trailing .exe if any
31926    new_path="${new_path/%.exe/}"
31927    # Do not save /bin paths to all_fixpath_prefixes!
31928  else
31929    # Not in mixed or Windows style, start by that.
31930    new_path=`cmd //c echo $new_path`
31931
31932  input_path="$new_path"
31933  # Check if we need to convert this using DOS-style short mode. If the path
31934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31935  # take no chances and rewrite it.
31936  # Note: m4 eats our [], so we need to use [ and ] instead.
31937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31938  if test "x$has_forbidden_chars" != x; then
31939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31941  fi
31942
31943    # Output is in $new_path
31944
31945  windows_path="$new_path"
31946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947    unix_path=`$CYGPATH -u "$windows_path"`
31948    new_path="$unix_path"
31949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951    new_path="$unix_path"
31952  fi
31953
31954    # remove trailing .exe if any
31955    new_path="${new_path/%.exe/}"
31956
31957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31959  fi
31960
31961    else
31962      # We're on a unix platform. Hooray! :)
31963      # First separate the path from the arguments. This will split at the first
31964      # space.
31965      complete="$CC"
31966      path="${complete%% *}"
31967      tmp="$complete EOL"
31968      arguments="${tmp#* }"
31969
31970      # Cannot rely on the command "which" here since it doesn't always work.
31971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31972      if test -z "$is_absolute_path"; then
31973        # Path to executable is not absolute. Find it.
31974        IFS_save="$IFS"
31975        IFS=:
31976        for p in $PATH; do
31977          if test -f "$p/$path" && test -x "$p/$path"; then
31978            new_path="$p/$path"
31979            break
31980          fi
31981        done
31982        IFS="$IFS_save"
31983      else
31984        # This is an absolute path, we can use it without further modifications.
31985        new_path="$path"
31986      fi
31987
31988      if test "x$new_path" = x; then
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31990$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31991        has_space=`$ECHO "$complete" | $GREP " "`
31992        if test "x$has_space" != x; then
31993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31995        fi
31996        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31997      fi
31998    fi
31999
32000    # Now join together the path and the arguments once again
32001    if test "x$arguments" != xEOL; then
32002      new_complete="$new_path ${arguments% *}"
32003    else
32004      new_complete="$new_path"
32005    fi
32006
32007    if test "x$complete" != "x$new_complete"; then
32008      CC="$new_complete"
32009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32010$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32011    fi
32012  fi
32013
32014  TEST_COMPILER="$CC"
32015  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
32016  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
32017  if test "x$OPENJDK_BUILD_OS" != xaix; then
32018    # FIXME: This test should not be needed anymore; we don't do that for any platform.
32019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32020$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32021
32022  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32023    # Follow a chain of symbolic links. Use readlink
32024    # where it exists, else fall back to horribly
32025    # complicated shell code.
32026    if test "x$READLINK_TESTED" != yes; then
32027      # On MacOSX there is a readlink tool with a different
32028      # purpose than the GNU readlink tool. Check the found readlink.
32029      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32030      if test "x$ISGNU" = x; then
32031        # A readlink that we do not know how to use.
32032        # Are there other non-GNU readlinks out there?
32033        READLINK_TESTED=yes
32034        READLINK=
32035      fi
32036    fi
32037
32038    if test "x$READLINK" != x; then
32039      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
32040    else
32041      # Save the current directory for restoring afterwards
32042      STARTDIR=$PWD
32043      COUNTER=0
32044      sym_link_dir=`$DIRNAME $TEST_COMPILER`
32045      sym_link_file=`$BASENAME $TEST_COMPILER`
32046      cd $sym_link_dir
32047      # Use -P flag to resolve symlinks in directories.
32048      cd `$THEPWDCMD -P`
32049      sym_link_dir=`$THEPWDCMD -P`
32050      # Resolve file symlinks
32051      while test $COUNTER -lt 20; do
32052        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32053        if test "x$ISLINK" == x; then
32054          # This is not a symbolic link! We are done!
32055          break
32056        fi
32057        # Again resolve directory symlinks since the target of the just found
32058        # link could be in a different directory
32059        cd `$DIRNAME $ISLINK`
32060        sym_link_dir=`$THEPWDCMD -P`
32061        sym_link_file=`$BASENAME $ISLINK`
32062        let COUNTER=COUNTER+1
32063      done
32064      cd $STARTDIR
32065      TEST_COMPILER=$sym_link_dir/$sym_link_file
32066    fi
32067  fi
32068
32069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32070$as_echo "$TEST_COMPILER" >&6; }
32071  fi
32072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32073$as_echo_n "checking if CC is disguised ccache... " >&6; }
32074
32075  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32076  if test "x$COMPILER_BASENAME" = "xccache"; then
32077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32078$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32079    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32080    # We want to control ccache invocation ourselves, so ignore this cc and try
32081    # searching again.
32082
32083    # Remove the path to the fake ccache cc from the PATH
32084    RETRY_COMPILER_SAVED_PATH="$PATH"
32085    COMPILER_DIRNAME=`$DIRNAME $CC`
32086    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32087
32088    # Try again looking for our compiler
32089    if test -n "$ac_tool_prefix"; then
32090  for ac_prog in $TOOLCHAIN_CC_BINARY
32091  do
32092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32095$as_echo_n "checking for $ac_word... " >&6; }
32096if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32097  $as_echo_n "(cached) " >&6
32098else
32099  if test -n "$PROPER_COMPILER_CC"; then
32100  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32101else
32102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32103for as_dir in $PATH
32104do
32105  IFS=$as_save_IFS
32106  test -z "$as_dir" && as_dir=.
32107    for ac_exec_ext in '' $ac_executable_extensions; do
32108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32109    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32111    break 2
32112  fi
32113done
32114  done
32115IFS=$as_save_IFS
32116
32117fi
32118fi
32119PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32120if test -n "$PROPER_COMPILER_CC"; then
32121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32122$as_echo "$PROPER_COMPILER_CC" >&6; }
32123else
32124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32125$as_echo "no" >&6; }
32126fi
32127
32128
32129    test -n "$PROPER_COMPILER_CC" && break
32130  done
32131fi
32132if test -z "$PROPER_COMPILER_CC"; then
32133  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32134  for ac_prog in $TOOLCHAIN_CC_BINARY
32135do
32136  # Extract the first word of "$ac_prog", so it can be a program name with args.
32137set dummy $ac_prog; ac_word=$2
32138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32139$as_echo_n "checking for $ac_word... " >&6; }
32140if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32141  $as_echo_n "(cached) " >&6
32142else
32143  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32144  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32145else
32146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32147for as_dir in $PATH
32148do
32149  IFS=$as_save_IFS
32150  test -z "$as_dir" && as_dir=.
32151    for ac_exec_ext in '' $ac_executable_extensions; do
32152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32153    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32155    break 2
32156  fi
32157done
32158  done
32159IFS=$as_save_IFS
32160
32161fi
32162fi
32163ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32164if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32166$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32167else
32168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32169$as_echo "no" >&6; }
32170fi
32171
32172
32173  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32174done
32175
32176  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32177    PROPER_COMPILER_CC=""
32178  else
32179    case $cross_compiling:$ac_tool_warned in
32180yes:)
32181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32183ac_tool_warned=yes ;;
32184esac
32185    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32186  fi
32187fi
32188
32189
32190  # Only process if variable expands to non-empty
32191
32192  if test "x$PROPER_COMPILER_CC" != x; then
32193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194
32195  # First separate the path from the arguments. This will split at the first
32196  # space.
32197  complete="$PROPER_COMPILER_CC"
32198  path="${complete%% *}"
32199  tmp="$complete EOL"
32200  arguments="${tmp#* }"
32201
32202  # Input might be given as Windows format, start by converting to
32203  # unix format.
32204  new_path=`$CYGPATH -u "$path"`
32205
32206  # Now try to locate executable using which
32207  new_path=`$WHICH "$new_path" 2> /dev/null`
32208  # bat and cmd files are not always considered executable in cygwin causing which
32209  # to not find them
32210  if test "x$new_path" = x \
32211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32213    new_path=`$CYGPATH -u "$path"`
32214  fi
32215  if test "x$new_path" = x; then
32216    # Oops. Which didn't find the executable.
32217    # The splitting of arguments from the executable at a space might have been incorrect,
32218    # since paths with space are more likely in Windows. Give it another try with the whole
32219    # argument.
32220    path="$complete"
32221    arguments="EOL"
32222    new_path=`$CYGPATH -u "$path"`
32223    new_path=`$WHICH "$new_path" 2> /dev/null`
32224    # bat and cmd files are not always considered executable in cygwin causing which
32225    # to not find them
32226    if test "x$new_path" = x \
32227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32229      new_path=`$CYGPATH -u "$path"`
32230    fi
32231    if test "x$new_path" = x; then
32232      # It's still not found. Now this is an unrecoverable error.
32233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32234$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32235      has_space=`$ECHO "$complete" | $GREP " "`
32236      if test "x$has_space" != x; then
32237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32239      fi
32240      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32241    fi
32242  fi
32243
32244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32247  # "foo.exe" is OK but "foo" is an error.
32248  #
32249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32250  # It is also a way to make sure we got the proper file name for the real test later on.
32251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32252  if test "x$test_shortpath" = x; then
32253    # Short path failed, file does not exist as specified.
32254    # Try adding .exe or .cmd
32255    if test -f "${new_path}.exe"; then
32256      input_to_shortpath="${new_path}.exe"
32257    elif test -f "${new_path}.cmd"; then
32258      input_to_shortpath="${new_path}.cmd"
32259    else
32260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32261$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32264      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32265    fi
32266  else
32267    input_to_shortpath="$new_path"
32268  fi
32269
32270  # Call helper function which possibly converts this using DOS-style short mode.
32271  # If so, the updated path is stored in $new_path.
32272  new_path="$input_to_shortpath"
32273
32274  input_path="$input_to_shortpath"
32275  # Check if we need to convert this using DOS-style short mode. If the path
32276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32277  # take no chances and rewrite it.
32278  # Note: m4 eats our [], so we need to use [ and ] instead.
32279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32280  if test "x$has_forbidden_chars" != x; then
32281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32285      # Going to short mode and back again did indeed matter. Since short mode is
32286      # case insensitive, let's make it lowercase to improve readability.
32287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32288      # Now convert it back to Unix-style (cygpath)
32289      input_path=`$CYGPATH -u "$shortmode_path"`
32290      new_path="$input_path"
32291    fi
32292  fi
32293
32294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32295  if test "x$test_cygdrive_prefix" = x; then
32296    # As a simple fix, exclude /usr/bin since it's not a real path.
32297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32299      # a path prefixed by /cygdrive for fixpath to work.
32300      new_path="$CYGWIN_ROOT_PATH$input_path"
32301    fi
32302  fi
32303
32304  # remove trailing .exe if any
32305  new_path="${new_path/%.exe/}"
32306
32307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32308
32309  # First separate the path from the arguments. This will split at the first
32310  # space.
32311  complete="$PROPER_COMPILER_CC"
32312  path="${complete%% *}"
32313  tmp="$complete EOL"
32314  arguments="${tmp#* }"
32315
32316  # Input might be given as Windows format, start by converting to
32317  # unix format.
32318  new_path="$path"
32319
32320  windows_path="$new_path"
32321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32322    unix_path=`$CYGPATH -u "$windows_path"`
32323    new_path="$unix_path"
32324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32326    new_path="$unix_path"
32327  fi
32328
32329
32330  # Now try to locate executable using which
32331  new_path=`$WHICH "$new_path" 2> /dev/null`
32332
32333  if test "x$new_path" = x; then
32334    # Oops. Which didn't find the executable.
32335    # The splitting of arguments from the executable at a space might have been incorrect,
32336    # since paths with space are more likely in Windows. Give it another try with the whole
32337    # argument.
32338    path="$complete"
32339    arguments="EOL"
32340    new_path="$path"
32341
32342  windows_path="$new_path"
32343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32344    unix_path=`$CYGPATH -u "$windows_path"`
32345    new_path="$unix_path"
32346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32348    new_path="$unix_path"
32349  fi
32350
32351
32352    new_path=`$WHICH "$new_path" 2> /dev/null`
32353    # bat and cmd files are not always considered executable in MSYS causing which
32354    # to not find them
32355    if test "x$new_path" = x \
32356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32358      new_path="$path"
32359
32360  windows_path="$new_path"
32361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32362    unix_path=`$CYGPATH -u "$windows_path"`
32363    new_path="$unix_path"
32364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32366    new_path="$unix_path"
32367  fi
32368
32369    fi
32370
32371    if test "x$new_path" = x; then
32372      # It's still not found. Now this is an unrecoverable error.
32373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32374$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32375      has_space=`$ECHO "$complete" | $GREP " "`
32376      if test "x$has_space" != x; then
32377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32379      fi
32380      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32381    fi
32382  fi
32383
32384  # Now new_path has a complete unix path to the binary
32385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32386    # Keep paths in /bin as-is, but remove trailing .exe if any
32387    new_path="${new_path/%.exe/}"
32388    # Do not save /bin paths to all_fixpath_prefixes!
32389  else
32390    # Not in mixed or Windows style, start by that.
32391    new_path=`cmd //c echo $new_path`
32392
32393  input_path="$new_path"
32394  # Check if we need to convert this using DOS-style short mode. If the path
32395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32396  # take no chances and rewrite it.
32397  # Note: m4 eats our [], so we need to use [ and ] instead.
32398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32399  if test "x$has_forbidden_chars" != x; then
32400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32402  fi
32403
32404    # Output is in $new_path
32405
32406  windows_path="$new_path"
32407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408    unix_path=`$CYGPATH -u "$windows_path"`
32409    new_path="$unix_path"
32410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412    new_path="$unix_path"
32413  fi
32414
32415    # remove trailing .exe if any
32416    new_path="${new_path/%.exe/}"
32417
32418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32420  fi
32421
32422    else
32423      # We're on a unix platform. Hooray! :)
32424      # First separate the path from the arguments. This will split at the first
32425      # space.
32426      complete="$PROPER_COMPILER_CC"
32427      path="${complete%% *}"
32428      tmp="$complete EOL"
32429      arguments="${tmp#* }"
32430
32431      # Cannot rely on the command "which" here since it doesn't always work.
32432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32433      if test -z "$is_absolute_path"; then
32434        # Path to executable is not absolute. Find it.
32435        IFS_save="$IFS"
32436        IFS=:
32437        for p in $PATH; do
32438          if test -f "$p/$path" && test -x "$p/$path"; then
32439            new_path="$p/$path"
32440            break
32441          fi
32442        done
32443        IFS="$IFS_save"
32444      else
32445        # This is an absolute path, we can use it without further modifications.
32446        new_path="$path"
32447      fi
32448
32449      if test "x$new_path" = x; then
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32451$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32452        has_space=`$ECHO "$complete" | $GREP " "`
32453        if test "x$has_space" != x; then
32454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32456        fi
32457        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32458      fi
32459    fi
32460
32461    # Now join together the path and the arguments once again
32462    if test "x$arguments" != xEOL; then
32463      new_complete="$new_path ${arguments% *}"
32464    else
32465      new_complete="$new_path"
32466    fi
32467
32468    if test "x$complete" != "x$new_complete"; then
32469      PROPER_COMPILER_CC="$new_complete"
32470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32471$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32472    fi
32473  fi
32474
32475    PATH="$RETRY_COMPILER_SAVED_PATH"
32476
32477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32478$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32479
32480  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32481    # Follow a chain of symbolic links. Use readlink
32482    # where it exists, else fall back to horribly
32483    # complicated shell code.
32484    if test "x$READLINK_TESTED" != yes; then
32485      # On MacOSX there is a readlink tool with a different
32486      # purpose than the GNU readlink tool. Check the found readlink.
32487      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32488      if test "x$ISGNU" = x; then
32489        # A readlink that we do not know how to use.
32490        # Are there other non-GNU readlinks out there?
32491        READLINK_TESTED=yes
32492        READLINK=
32493      fi
32494    fi
32495
32496    if test "x$READLINK" != x; then
32497      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32498    else
32499      # Save the current directory for restoring afterwards
32500      STARTDIR=$PWD
32501      COUNTER=0
32502      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32503      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32504      cd $sym_link_dir
32505      # Use -P flag to resolve symlinks in directories.
32506      cd `$THEPWDCMD -P`
32507      sym_link_dir=`$THEPWDCMD -P`
32508      # Resolve file symlinks
32509      while test $COUNTER -lt 20; do
32510        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32511        if test "x$ISLINK" == x; then
32512          # This is not a symbolic link! We are done!
32513          break
32514        fi
32515        # Again resolve directory symlinks since the target of the just found
32516        # link could be in a different directory
32517        cd `$DIRNAME $ISLINK`
32518        sym_link_dir=`$THEPWDCMD -P`
32519        sym_link_file=`$BASENAME $ISLINK`
32520        let COUNTER=COUNTER+1
32521      done
32522      cd $STARTDIR
32523      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32524    fi
32525  fi
32526
32527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32528$as_echo "$PROPER_COMPILER_CC" >&6; }
32529    CC="$PROPER_COMPILER_CC"
32530  else
32531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32532$as_echo "no, keeping CC" >&6; }
32533  fi
32534
32535
32536  COMPILER=$CC
32537  COMPILER_NAME=$COMPILER_NAME
32538
32539  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32540    # cc -V output typically looks like
32541    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32542    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32543    # Check that this is likely to be the Solaris Studio cc.
32544    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32545    if test $? -ne 0; then
32546      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32547      { $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
32548$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32549      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32550$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32551      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32552$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32553      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32554    fi
32555    # Remove usage instructions (if present), and
32556    # collapse compiler output into a single line
32557    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32558        $SED -e 's/ *[Uu]sage:.*//'`
32559    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32560        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32561  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32562    # xlc -qversion output typically looks like
32563    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32564    #     Version: 11.01.0000.0015
32565    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32566    # Check that this is likely to be the IBM XL C compiler.
32567    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32568    if test $? -ne 0; then
32569      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32570      { $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
32571$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32572      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32573$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32575$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32576      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32577    fi
32578    # Collapse compiler output into a single line
32579    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32580    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32581        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32582  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32583    # There is no specific version flag, but all output starts with a version string.
32584    # First line typically looks something like:
32585    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32586    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32587    # Check that this is likely to be Microsoft CL.EXE.
32588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32589    if test $? -ne 0; then
32590      { $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
32591$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32593$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32594      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32595    fi
32596    # Collapse compiler output into a single line
32597    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32599        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32600  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32601    # gcc --version output typically looks like
32602    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32603    #     Copyright (C) 2013 Free Software Foundation, Inc.
32604    #     This is free software; see the source for copying conditions.  There is NO
32605    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32606    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32607    # Check that this is likely to be GCC.
32608    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32609    if test $? -ne 0; then
32610      { $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
32611$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32612      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32613$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32614      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32615    fi
32616    # Remove Copyright and legalese from version string, and
32617    # collapse into a single line
32618    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32619        $SED -e 's/ *Copyright .*//'`
32620    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32621        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32622  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32623    # clang --version output typically looks like
32624    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32625    #    clang version 3.3 (tags/RELEASE_33/final)
32626    # or
32627    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32628    #    Target: x86_64-pc-linux-gnu
32629    #    Thread model: posix
32630    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32631    # Check that this is likely to be clang
32632    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32633    if test $? -ne 0; then
32634      { $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
32635$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32636      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32637$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32638      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32639    fi
32640    # Collapse compiler output into a single line
32641    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32642    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32643        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32644  else
32645      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32646  fi
32647  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32648  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32649  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32650  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32651
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32653$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32654
32655
32656  # Now that we have resolved CC ourself, let autoconf have its go at it
32657  ac_ext=c
32658ac_cpp='$CPP $CPPFLAGS'
32659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32661ac_compiler_gnu=$ac_cv_c_compiler_gnu
32662if test -n "$ac_tool_prefix"; then
32663  for ac_prog in $CC
32664  do
32665    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32666set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32668$as_echo_n "checking for $ac_word... " >&6; }
32669if ${ac_cv_prog_CC+:} false; then :
32670  $as_echo_n "(cached) " >&6
32671else
32672  if test -n "$CC"; then
32673  ac_cv_prog_CC="$CC" # Let the user override the test.
32674else
32675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32676for as_dir in $PATH
32677do
32678  IFS=$as_save_IFS
32679  test -z "$as_dir" && as_dir=.
32680    for ac_exec_ext in '' $ac_executable_extensions; do
32681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32682    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32684    break 2
32685  fi
32686done
32687  done
32688IFS=$as_save_IFS
32689
32690fi
32691fi
32692CC=$ac_cv_prog_CC
32693if test -n "$CC"; then
32694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32695$as_echo "$CC" >&6; }
32696else
32697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32698$as_echo "no" >&6; }
32699fi
32700
32701
32702    test -n "$CC" && break
32703  done
32704fi
32705if test -z "$CC"; then
32706  ac_ct_CC=$CC
32707  for ac_prog in $CC
32708do
32709  # Extract the first word of "$ac_prog", so it can be a program name with args.
32710set dummy $ac_prog; ac_word=$2
32711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32712$as_echo_n "checking for $ac_word... " >&6; }
32713if ${ac_cv_prog_ac_ct_CC+:} false; then :
32714  $as_echo_n "(cached) " >&6
32715else
32716  if test -n "$ac_ct_CC"; then
32717  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32718else
32719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32720for as_dir in $PATH
32721do
32722  IFS=$as_save_IFS
32723  test -z "$as_dir" && as_dir=.
32724    for ac_exec_ext in '' $ac_executable_extensions; do
32725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32726    ac_cv_prog_ac_ct_CC="$ac_prog"
32727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32728    break 2
32729  fi
32730done
32731  done
32732IFS=$as_save_IFS
32733
32734fi
32735fi
32736ac_ct_CC=$ac_cv_prog_ac_ct_CC
32737if test -n "$ac_ct_CC"; then
32738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32739$as_echo "$ac_ct_CC" >&6; }
32740else
32741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32742$as_echo "no" >&6; }
32743fi
32744
32745
32746  test -n "$ac_ct_CC" && break
32747done
32748
32749  if test "x$ac_ct_CC" = x; then
32750    CC=""
32751  else
32752    case $cross_compiling:$ac_tool_warned in
32753yes:)
32754{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32755$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32756ac_tool_warned=yes ;;
32757esac
32758    CC=$ac_ct_CC
32759  fi
32760fi
32761
32762
32763test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32765as_fn_error $? "no acceptable C compiler found in \$PATH
32766See \`config.log' for more details" "$LINENO" 5; }
32767
32768# Provide some information about the compiler.
32769$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32770set X $ac_compile
32771ac_compiler=$2
32772for ac_option in --version -v -V -qversion; do
32773  { { ac_try="$ac_compiler $ac_option >&5"
32774case "(($ac_try" in
32775  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32776  *) ac_try_echo=$ac_try;;
32777esac
32778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32779$as_echo "$ac_try_echo"; } >&5
32780  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32781  ac_status=$?
32782  if test -s conftest.err; then
32783    sed '10a\
32784... rest of stderr output deleted ...
32785         10q' conftest.err >conftest.er1
32786    cat conftest.er1 >&5
32787  fi
32788  rm -f conftest.er1 conftest.err
32789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32790  test $ac_status = 0; }
32791done
32792
32793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32794/* end confdefs.h.  */
32795
32796int
32797main ()
32798{
32799
32800  ;
32801  return 0;
32802}
32803_ACEOF
32804ac_clean_files_save=$ac_clean_files
32805ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32806# Try to create an executable without -o first, disregard a.out.
32807# It will help us diagnose broken compilers, and finding out an intuition
32808# of exeext.
32809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32810$as_echo_n "checking whether the C compiler works... " >&6; }
32811ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32812
32813# The possible output files:
32814ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32815
32816ac_rmfiles=
32817for ac_file in $ac_files
32818do
32819  case $ac_file in
32820    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32821    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32822  esac
32823done
32824rm -f $ac_rmfiles
32825
32826if { { ac_try="$ac_link_default"
32827case "(($ac_try" in
32828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32829  *) ac_try_echo=$ac_try;;
32830esac
32831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32832$as_echo "$ac_try_echo"; } >&5
32833  (eval "$ac_link_default") 2>&5
32834  ac_status=$?
32835  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32836  test $ac_status = 0; }; then :
32837  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32838# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32839# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32840# so that the user can short-circuit this test for compilers unknown to
32841# Autoconf.
32842for ac_file in $ac_files ''
32843do
32844  test -f "$ac_file" || continue
32845  case $ac_file in
32846    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32847	;;
32848    [ab].out )
32849	# We found the default executable, but exeext='' is most
32850	# certainly right.
32851	break;;
32852    *.* )
32853	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32854	then :; else
32855	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32856	fi
32857	# We set ac_cv_exeext here because the later test for it is not
32858	# safe: cross compilers may not add the suffix if given an `-o'
32859	# argument, so we may need to know it at that point already.
32860	# Even if this section looks crufty: it has the advantage of
32861	# actually working.
32862	break;;
32863    * )
32864	break;;
32865  esac
32866done
32867test "$ac_cv_exeext" = no && ac_cv_exeext=
32868
32869else
32870  ac_file=''
32871fi
32872if test -z "$ac_file"; then :
32873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32874$as_echo "no" >&6; }
32875$as_echo "$as_me: failed program was:" >&5
32876sed 's/^/| /' conftest.$ac_ext >&5
32877
32878{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32880as_fn_error 77 "C compiler cannot create executables
32881See \`config.log' for more details" "$LINENO" 5; }
32882else
32883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32884$as_echo "yes" >&6; }
32885fi
32886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32887$as_echo_n "checking for C compiler default output file name... " >&6; }
32888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32889$as_echo "$ac_file" >&6; }
32890ac_exeext=$ac_cv_exeext
32891
32892rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32893ac_clean_files=$ac_clean_files_save
32894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32895$as_echo_n "checking for suffix of executables... " >&6; }
32896if { { ac_try="$ac_link"
32897case "(($ac_try" in
32898  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32899  *) ac_try_echo=$ac_try;;
32900esac
32901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32902$as_echo "$ac_try_echo"; } >&5
32903  (eval "$ac_link") 2>&5
32904  ac_status=$?
32905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32906  test $ac_status = 0; }; then :
32907  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32908# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32909# work properly (i.e., refer to `conftest.exe'), while it won't with
32910# `rm'.
32911for ac_file in conftest.exe conftest conftest.*; do
32912  test -f "$ac_file" || continue
32913  case $ac_file in
32914    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32915    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32916	  break;;
32917    * ) break;;
32918  esac
32919done
32920else
32921  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32923as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32924See \`config.log' for more details" "$LINENO" 5; }
32925fi
32926rm -f conftest conftest$ac_cv_exeext
32927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32928$as_echo "$ac_cv_exeext" >&6; }
32929
32930rm -f conftest.$ac_ext
32931EXEEXT=$ac_cv_exeext
32932ac_exeext=$EXEEXT
32933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32934/* end confdefs.h.  */
32935#include <stdio.h>
32936int
32937main ()
32938{
32939FILE *f = fopen ("conftest.out", "w");
32940 return ferror (f) || fclose (f) != 0;
32941
32942  ;
32943  return 0;
32944}
32945_ACEOF
32946ac_clean_files="$ac_clean_files conftest.out"
32947# Check that the compiler produces executables we can run.  If not, either
32948# the compiler is broken, or we cross compile.
32949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32950$as_echo_n "checking whether we are cross compiling... " >&6; }
32951if test "$cross_compiling" != yes; then
32952  { { ac_try="$ac_link"
32953case "(($ac_try" in
32954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32955  *) ac_try_echo=$ac_try;;
32956esac
32957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32958$as_echo "$ac_try_echo"; } >&5
32959  (eval "$ac_link") 2>&5
32960  ac_status=$?
32961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32962  test $ac_status = 0; }
32963  if { ac_try='./conftest$ac_cv_exeext'
32964  { { case "(($ac_try" in
32965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32966  *) ac_try_echo=$ac_try;;
32967esac
32968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32969$as_echo "$ac_try_echo"; } >&5
32970  (eval "$ac_try") 2>&5
32971  ac_status=$?
32972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32973  test $ac_status = 0; }; }; then
32974    cross_compiling=no
32975  else
32976    if test "$cross_compiling" = maybe; then
32977	cross_compiling=yes
32978    else
32979	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32981as_fn_error $? "cannot run C compiled programs.
32982If you meant to cross compile, use \`--host'.
32983See \`config.log' for more details" "$LINENO" 5; }
32984    fi
32985  fi
32986fi
32987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32988$as_echo "$cross_compiling" >&6; }
32989
32990rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32991ac_clean_files=$ac_clean_files_save
32992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32993$as_echo_n "checking for suffix of object files... " >&6; }
32994if ${ac_cv_objext+:} false; then :
32995  $as_echo_n "(cached) " >&6
32996else
32997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32998/* end confdefs.h.  */
32999
33000int
33001main ()
33002{
33003
33004  ;
33005  return 0;
33006}
33007_ACEOF
33008rm -f conftest.o conftest.obj
33009if { { ac_try="$ac_compile"
33010case "(($ac_try" in
33011  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33012  *) ac_try_echo=$ac_try;;
33013esac
33014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33015$as_echo "$ac_try_echo"; } >&5
33016  (eval "$ac_compile") 2>&5
33017  ac_status=$?
33018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33019  test $ac_status = 0; }; then :
33020  for ac_file in conftest.o conftest.obj conftest.*; do
33021  test -f "$ac_file" || continue;
33022  case $ac_file in
33023    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33024    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33025       break;;
33026  esac
33027done
33028else
33029  $as_echo "$as_me: failed program was:" >&5
33030sed 's/^/| /' conftest.$ac_ext >&5
33031
33032{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33034as_fn_error $? "cannot compute suffix of object files: cannot compile
33035See \`config.log' for more details" "$LINENO" 5; }
33036fi
33037rm -f conftest.$ac_cv_objext conftest.$ac_ext
33038fi
33039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33040$as_echo "$ac_cv_objext" >&6; }
33041OBJEXT=$ac_cv_objext
33042ac_objext=$OBJEXT
33043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33044$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33045if ${ac_cv_c_compiler_gnu+:} false; then :
33046  $as_echo_n "(cached) " >&6
33047else
33048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33049/* end confdefs.h.  */
33050
33051int
33052main ()
33053{
33054#ifndef __GNUC__
33055       choke me
33056#endif
33057
33058  ;
33059  return 0;
33060}
33061_ACEOF
33062if ac_fn_c_try_compile "$LINENO"; then :
33063  ac_compiler_gnu=yes
33064else
33065  ac_compiler_gnu=no
33066fi
33067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33068ac_cv_c_compiler_gnu=$ac_compiler_gnu
33069
33070fi
33071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33072$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33073if test $ac_compiler_gnu = yes; then
33074  GCC=yes
33075else
33076  GCC=
33077fi
33078ac_test_CFLAGS=${CFLAGS+set}
33079ac_save_CFLAGS=$CFLAGS
33080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33081$as_echo_n "checking whether $CC accepts -g... " >&6; }
33082if ${ac_cv_prog_cc_g+:} false; then :
33083  $as_echo_n "(cached) " >&6
33084else
33085  ac_save_c_werror_flag=$ac_c_werror_flag
33086   ac_c_werror_flag=yes
33087   ac_cv_prog_cc_g=no
33088   CFLAGS="-g"
33089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33090/* end confdefs.h.  */
33091
33092int
33093main ()
33094{
33095
33096  ;
33097  return 0;
33098}
33099_ACEOF
33100if ac_fn_c_try_compile "$LINENO"; then :
33101  ac_cv_prog_cc_g=yes
33102else
33103  CFLAGS=""
33104      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33105/* end confdefs.h.  */
33106
33107int
33108main ()
33109{
33110
33111  ;
33112  return 0;
33113}
33114_ACEOF
33115if ac_fn_c_try_compile "$LINENO"; then :
33116
33117else
33118  ac_c_werror_flag=$ac_save_c_werror_flag
33119	 CFLAGS="-g"
33120	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33121/* end confdefs.h.  */
33122
33123int
33124main ()
33125{
33126
33127  ;
33128  return 0;
33129}
33130_ACEOF
33131if ac_fn_c_try_compile "$LINENO"; then :
33132  ac_cv_prog_cc_g=yes
33133fi
33134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33135fi
33136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33137fi
33138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33139   ac_c_werror_flag=$ac_save_c_werror_flag
33140fi
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33142$as_echo "$ac_cv_prog_cc_g" >&6; }
33143if test "$ac_test_CFLAGS" = set; then
33144  CFLAGS=$ac_save_CFLAGS
33145elif test $ac_cv_prog_cc_g = yes; then
33146  if test "$GCC" = yes; then
33147    CFLAGS="-g -O2"
33148  else
33149    CFLAGS="-g"
33150  fi
33151else
33152  if test "$GCC" = yes; then
33153    CFLAGS="-O2"
33154  else
33155    CFLAGS=
33156  fi
33157fi
33158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33159$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33160if ${ac_cv_prog_cc_c89+:} false; then :
33161  $as_echo_n "(cached) " >&6
33162else
33163  ac_cv_prog_cc_c89=no
33164ac_save_CC=$CC
33165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33166/* end confdefs.h.  */
33167#include <stdarg.h>
33168#include <stdio.h>
33169struct stat;
33170/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33171struct buf { int x; };
33172FILE * (*rcsopen) (struct buf *, struct stat *, int);
33173static char *e (p, i)
33174     char **p;
33175     int i;
33176{
33177  return p[i];
33178}
33179static char *f (char * (*g) (char **, int), char **p, ...)
33180{
33181  char *s;
33182  va_list v;
33183  va_start (v,p);
33184  s = g (p, va_arg (v,int));
33185  va_end (v);
33186  return s;
33187}
33188
33189/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33190   function prototypes and stuff, but not '\xHH' hex character constants.
33191   These don't provoke an error unfortunately, instead are silently treated
33192   as 'x'.  The following induces an error, until -std is added to get
33193   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33194   array size at least.  It's necessary to write '\x00'==0 to get something
33195   that's true only with -std.  */
33196int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33197
33198/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33199   inside strings and character constants.  */
33200#define FOO(x) 'x'
33201int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33202
33203int test (int i, double x);
33204struct s1 {int (*f) (int a);};
33205struct s2 {int (*f) (double a);};
33206int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33207int argc;
33208char **argv;
33209int
33210main ()
33211{
33212return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33213  ;
33214  return 0;
33215}
33216_ACEOF
33217for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33218	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33219do
33220  CC="$ac_save_CC $ac_arg"
33221  if ac_fn_c_try_compile "$LINENO"; then :
33222  ac_cv_prog_cc_c89=$ac_arg
33223fi
33224rm -f core conftest.err conftest.$ac_objext
33225  test "x$ac_cv_prog_cc_c89" != "xno" && break
33226done
33227rm -f conftest.$ac_ext
33228CC=$ac_save_CC
33229
33230fi
33231# AC_CACHE_VAL
33232case "x$ac_cv_prog_cc_c89" in
33233  x)
33234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33235$as_echo "none needed" >&6; } ;;
33236  xno)
33237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33238$as_echo "unsupported" >&6; } ;;
33239  *)
33240    CC="$CC $ac_cv_prog_cc_c89"
33241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33242$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33243esac
33244if test "x$ac_cv_prog_cc_c89" != xno; then :
33245
33246fi
33247
33248ac_ext=cpp
33249ac_cpp='$CXXCPP $CPPFLAGS'
33250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33253
33254
33255
33256  COMPILER_NAME=C++
33257  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33258
33259  if test "x$CXX" != x; then
33260    # User has supplied compiler name already, always let that override.
33261    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33262$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33263    if test "x`basename $CXX`" = "x$CXX"; then
33264      # A command without a complete path is provided, search $PATH.
33265
33266      for ac_prog in $CXX
33267do
33268  # Extract the first word of "$ac_prog", so it can be a program name with args.
33269set dummy $ac_prog; ac_word=$2
33270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33271$as_echo_n "checking for $ac_word... " >&6; }
33272if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33273  $as_echo_n "(cached) " >&6
33274else
33275  case $POTENTIAL_CXX in
33276  [\\/]* | ?:[\\/]*)
33277  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33278  ;;
33279  *)
33280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33281for as_dir in $PATH
33282do
33283  IFS=$as_save_IFS
33284  test -z "$as_dir" && as_dir=.
33285    for ac_exec_ext in '' $ac_executable_extensions; do
33286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33287    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33289    break 2
33290  fi
33291done
33292  done
33293IFS=$as_save_IFS
33294
33295  ;;
33296esac
33297fi
33298POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33299if test -n "$POTENTIAL_CXX"; then
33300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33301$as_echo "$POTENTIAL_CXX" >&6; }
33302else
33303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33304$as_echo "no" >&6; }
33305fi
33306
33307
33308  test -n "$POTENTIAL_CXX" && break
33309done
33310
33311      if test "x$POTENTIAL_CXX" != x; then
33312        CXX=$POTENTIAL_CXX
33313      else
33314        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33315      fi
33316    else
33317      # Otherwise it might already be a complete path
33318      if test ! -x "$CXX"; then
33319        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33320      fi
33321    fi
33322  else
33323    # No user supplied value. Locate compiler ourselves.
33324
33325    # If we are cross compiling, assume cross compilation tools follows the
33326    # cross compilation standard where they are prefixed with the autoconf
33327    # standard name for the target. For example the binary
33328    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33329    # If we are not cross compiling, then the default compiler name will be
33330    # used.
33331
33332    CXX=
33333    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33334    # before checking the rest of the PATH.
33335    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33336    # step, this should not be necessary.
33337    if test -n "$TOOLCHAIN_PATH"; then
33338      PATH_save="$PATH"
33339      PATH="$TOOLCHAIN_PATH"
33340      for ac_prog in $SEARCH_LIST
33341do
33342  # Extract the first word of "$ac_prog", so it can be a program name with args.
33343set dummy $ac_prog; ac_word=$2
33344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33345$as_echo_n "checking for $ac_word... " >&6; }
33346if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33347  $as_echo_n "(cached) " >&6
33348else
33349  case $TOOLCHAIN_PATH_CXX in
33350  [\\/]* | ?:[\\/]*)
33351  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33352  ;;
33353  *)
33354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33355for as_dir in $PATH
33356do
33357  IFS=$as_save_IFS
33358  test -z "$as_dir" && as_dir=.
33359    for ac_exec_ext in '' $ac_executable_extensions; do
33360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33361    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33363    break 2
33364  fi
33365done
33366  done
33367IFS=$as_save_IFS
33368
33369  ;;
33370esac
33371fi
33372TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33373if test -n "$TOOLCHAIN_PATH_CXX"; then
33374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33375$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33376else
33377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33378$as_echo "no" >&6; }
33379fi
33380
33381
33382  test -n "$TOOLCHAIN_PATH_CXX" && break
33383done
33384
33385      CXX=$TOOLCHAIN_PATH_CXX
33386      PATH="$PATH_save"
33387    fi
33388
33389    # AC_PATH_PROGS can't be run multiple times with the same variable,
33390    # so create a new name for this run.
33391    if test "x$CXX" = x; then
33392      for ac_prog in $SEARCH_LIST
33393do
33394  # Extract the first word of "$ac_prog", so it can be a program name with args.
33395set dummy $ac_prog; ac_word=$2
33396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33397$as_echo_n "checking for $ac_word... " >&6; }
33398if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33399  $as_echo_n "(cached) " >&6
33400else
33401  case $POTENTIAL_CXX in
33402  [\\/]* | ?:[\\/]*)
33403  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33404  ;;
33405  *)
33406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33407for as_dir in $PATH
33408do
33409  IFS=$as_save_IFS
33410  test -z "$as_dir" && as_dir=.
33411    for ac_exec_ext in '' $ac_executable_extensions; do
33412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33413    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33415    break 2
33416  fi
33417done
33418  done
33419IFS=$as_save_IFS
33420
33421  ;;
33422esac
33423fi
33424POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33425if test -n "$POTENTIAL_CXX"; then
33426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33427$as_echo "$POTENTIAL_CXX" >&6; }
33428else
33429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33430$as_echo "no" >&6; }
33431fi
33432
33433
33434  test -n "$POTENTIAL_CXX" && break
33435done
33436
33437      CXX=$POTENTIAL_CXX
33438    fi
33439
33440    if test "x$CXX" = x; then
33441
33442  # Print a helpful message on how to acquire the necessary build dependency.
33443  # devkit is the help tag: freetype, cups, alsa etc
33444  MISSING_DEPENDENCY=devkit
33445
33446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33447    cygwin_help $MISSING_DEPENDENCY
33448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33449    msys_help $MISSING_DEPENDENCY
33450  else
33451    PKGHANDLER_COMMAND=
33452
33453    case $PKGHANDLER in
33454      apt-get)
33455        apt_help     $MISSING_DEPENDENCY ;;
33456      yum)
33457        yum_help     $MISSING_DEPENDENCY ;;
33458      port)
33459        port_help    $MISSING_DEPENDENCY ;;
33460      pkgutil)
33461        pkgutil_help $MISSING_DEPENDENCY ;;
33462      pkgadd)
33463        pkgadd_help  $MISSING_DEPENDENCY ;;
33464    esac
33465
33466    if test "x$PKGHANDLER_COMMAND" != x; then
33467      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33468    fi
33469  fi
33470
33471      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33472    fi
33473  fi
33474
33475  # Now we have a compiler binary in CXX. Make sure it's okay.
33476
33477  # Only process if variable expands to non-empty
33478
33479  if test "x$CXX" != x; then
33480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33481
33482  # First separate the path from the arguments. This will split at the first
33483  # space.
33484  complete="$CXX"
33485  path="${complete%% *}"
33486  tmp="$complete EOL"
33487  arguments="${tmp#* }"
33488
33489  # Input might be given as Windows format, start by converting to
33490  # unix format.
33491  new_path=`$CYGPATH -u "$path"`
33492
33493  # Now try to locate executable using which
33494  new_path=`$WHICH "$new_path" 2> /dev/null`
33495  # bat and cmd files are not always considered executable in cygwin causing which
33496  # to not find them
33497  if test "x$new_path" = x \
33498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33500    new_path=`$CYGPATH -u "$path"`
33501  fi
33502  if test "x$new_path" = x; then
33503    # Oops. Which didn't find the executable.
33504    # The splitting of arguments from the executable at a space might have been incorrect,
33505    # since paths with space are more likely in Windows. Give it another try with the whole
33506    # argument.
33507    path="$complete"
33508    arguments="EOL"
33509    new_path=`$CYGPATH -u "$path"`
33510    new_path=`$WHICH "$new_path" 2> /dev/null`
33511    # bat and cmd files are not always considered executable in cygwin causing which
33512    # to not find them
33513    if test "x$new_path" = x \
33514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33516      new_path=`$CYGPATH -u "$path"`
33517    fi
33518    if test "x$new_path" = x; then
33519      # It's still not found. Now this is an unrecoverable error.
33520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33521$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33522      has_space=`$ECHO "$complete" | $GREP " "`
33523      if test "x$has_space" != x; then
33524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33526      fi
33527      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33528    fi
33529  fi
33530
33531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33534  # "foo.exe" is OK but "foo" is an error.
33535  #
33536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33537  # It is also a way to make sure we got the proper file name for the real test later on.
33538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33539  if test "x$test_shortpath" = x; then
33540    # Short path failed, file does not exist as specified.
33541    # Try adding .exe or .cmd
33542    if test -f "${new_path}.exe"; then
33543      input_to_shortpath="${new_path}.exe"
33544    elif test -f "${new_path}.cmd"; then
33545      input_to_shortpath="${new_path}.cmd"
33546    else
33547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33548$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33551      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33552    fi
33553  else
33554    input_to_shortpath="$new_path"
33555  fi
33556
33557  # Call helper function which possibly converts this using DOS-style short mode.
33558  # If so, the updated path is stored in $new_path.
33559  new_path="$input_to_shortpath"
33560
33561  input_path="$input_to_shortpath"
33562  # Check if we need to convert this using DOS-style short mode. If the path
33563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33564  # take no chances and rewrite it.
33565  # Note: m4 eats our [], so we need to use [ and ] instead.
33566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33567  if test "x$has_forbidden_chars" != x; then
33568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33572      # Going to short mode and back again did indeed matter. Since short mode is
33573      # case insensitive, let's make it lowercase to improve readability.
33574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33575      # Now convert it back to Unix-style (cygpath)
33576      input_path=`$CYGPATH -u "$shortmode_path"`
33577      new_path="$input_path"
33578    fi
33579  fi
33580
33581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33582  if test "x$test_cygdrive_prefix" = x; then
33583    # As a simple fix, exclude /usr/bin since it's not a real path.
33584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33586      # a path prefixed by /cygdrive for fixpath to work.
33587      new_path="$CYGWIN_ROOT_PATH$input_path"
33588    fi
33589  fi
33590
33591  # remove trailing .exe if any
33592  new_path="${new_path/%.exe/}"
33593
33594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33595
33596  # First separate the path from the arguments. This will split at the first
33597  # space.
33598  complete="$CXX"
33599  path="${complete%% *}"
33600  tmp="$complete EOL"
33601  arguments="${tmp#* }"
33602
33603  # Input might be given as Windows format, start by converting to
33604  # unix format.
33605  new_path="$path"
33606
33607  windows_path="$new_path"
33608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33609    unix_path=`$CYGPATH -u "$windows_path"`
33610    new_path="$unix_path"
33611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33613    new_path="$unix_path"
33614  fi
33615
33616
33617  # Now try to locate executable using which
33618  new_path=`$WHICH "$new_path" 2> /dev/null`
33619
33620  if test "x$new_path" = x; then
33621    # Oops. Which didn't find the executable.
33622    # The splitting of arguments from the executable at a space might have been incorrect,
33623    # since paths with space are more likely in Windows. Give it another try with the whole
33624    # argument.
33625    path="$complete"
33626    arguments="EOL"
33627    new_path="$path"
33628
33629  windows_path="$new_path"
33630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33631    unix_path=`$CYGPATH -u "$windows_path"`
33632    new_path="$unix_path"
33633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33635    new_path="$unix_path"
33636  fi
33637
33638
33639    new_path=`$WHICH "$new_path" 2> /dev/null`
33640    # bat and cmd files are not always considered executable in MSYS causing which
33641    # to not find them
33642    if test "x$new_path" = x \
33643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33645      new_path="$path"
33646
33647  windows_path="$new_path"
33648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33649    unix_path=`$CYGPATH -u "$windows_path"`
33650    new_path="$unix_path"
33651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33653    new_path="$unix_path"
33654  fi
33655
33656    fi
33657
33658    if test "x$new_path" = x; then
33659      # It's still not found. Now this is an unrecoverable error.
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33661$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33662      has_space=`$ECHO "$complete" | $GREP " "`
33663      if test "x$has_space" != x; then
33664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33666      fi
33667      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33668    fi
33669  fi
33670
33671  # Now new_path has a complete unix path to the binary
33672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33673    # Keep paths in /bin as-is, but remove trailing .exe if any
33674    new_path="${new_path/%.exe/}"
33675    # Do not save /bin paths to all_fixpath_prefixes!
33676  else
33677    # Not in mixed or Windows style, start by that.
33678    new_path=`cmd //c echo $new_path`
33679
33680  input_path="$new_path"
33681  # Check if we need to convert this using DOS-style short mode. If the path
33682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33683  # take no chances and rewrite it.
33684  # Note: m4 eats our [], so we need to use [ and ] instead.
33685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33686  if test "x$has_forbidden_chars" != x; then
33687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33689  fi
33690
33691    # Output is in $new_path
33692
33693  windows_path="$new_path"
33694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33695    unix_path=`$CYGPATH -u "$windows_path"`
33696    new_path="$unix_path"
33697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33699    new_path="$unix_path"
33700  fi
33701
33702    # remove trailing .exe if any
33703    new_path="${new_path/%.exe/}"
33704
33705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33707  fi
33708
33709    else
33710      # We're on a unix platform. Hooray! :)
33711      # First separate the path from the arguments. This will split at the first
33712      # space.
33713      complete="$CXX"
33714      path="${complete%% *}"
33715      tmp="$complete EOL"
33716      arguments="${tmp#* }"
33717
33718      # Cannot rely on the command "which" here since it doesn't always work.
33719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33720      if test -z "$is_absolute_path"; then
33721        # Path to executable is not absolute. Find it.
33722        IFS_save="$IFS"
33723        IFS=:
33724        for p in $PATH; do
33725          if test -f "$p/$path" && test -x "$p/$path"; then
33726            new_path="$p/$path"
33727            break
33728          fi
33729        done
33730        IFS="$IFS_save"
33731      else
33732        # This is an absolute path, we can use it without further modifications.
33733        new_path="$path"
33734      fi
33735
33736      if test "x$new_path" = x; then
33737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33738$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33739        has_space=`$ECHO "$complete" | $GREP " "`
33740        if test "x$has_space" != x; then
33741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33743        fi
33744        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33745      fi
33746    fi
33747
33748    # Now join together the path and the arguments once again
33749    if test "x$arguments" != xEOL; then
33750      new_complete="$new_path ${arguments% *}"
33751    else
33752      new_complete="$new_path"
33753    fi
33754
33755    if test "x$complete" != "x$new_complete"; then
33756      CXX="$new_complete"
33757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33758$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33759    fi
33760  fi
33761
33762  TEST_COMPILER="$CXX"
33763  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33764  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33765  if test "x$OPENJDK_BUILD_OS" != xaix; then
33766    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33768$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33769
33770  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33771    # Follow a chain of symbolic links. Use readlink
33772    # where it exists, else fall back to horribly
33773    # complicated shell code.
33774    if test "x$READLINK_TESTED" != yes; then
33775      # On MacOSX there is a readlink tool with a different
33776      # purpose than the GNU readlink tool. Check the found readlink.
33777      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33778      if test "x$ISGNU" = x; then
33779        # A readlink that we do not know how to use.
33780        # Are there other non-GNU readlinks out there?
33781        READLINK_TESTED=yes
33782        READLINK=
33783      fi
33784    fi
33785
33786    if test "x$READLINK" != x; then
33787      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33788    else
33789      # Save the current directory for restoring afterwards
33790      STARTDIR=$PWD
33791      COUNTER=0
33792      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33793      sym_link_file=`$BASENAME $TEST_COMPILER`
33794      cd $sym_link_dir
33795      # Use -P flag to resolve symlinks in directories.
33796      cd `$THEPWDCMD -P`
33797      sym_link_dir=`$THEPWDCMD -P`
33798      # Resolve file symlinks
33799      while test $COUNTER -lt 20; do
33800        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33801        if test "x$ISLINK" == x; then
33802          # This is not a symbolic link! We are done!
33803          break
33804        fi
33805        # Again resolve directory symlinks since the target of the just found
33806        # link could be in a different directory
33807        cd `$DIRNAME $ISLINK`
33808        sym_link_dir=`$THEPWDCMD -P`
33809        sym_link_file=`$BASENAME $ISLINK`
33810        let COUNTER=COUNTER+1
33811      done
33812      cd $STARTDIR
33813      TEST_COMPILER=$sym_link_dir/$sym_link_file
33814    fi
33815  fi
33816
33817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33818$as_echo "$TEST_COMPILER" >&6; }
33819  fi
33820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33821$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33822
33823  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33824  if test "x$COMPILER_BASENAME" = "xccache"; then
33825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33826$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33827    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33828    # We want to control ccache invocation ourselves, so ignore this cc and try
33829    # searching again.
33830
33831    # Remove the path to the fake ccache cc from the PATH
33832    RETRY_COMPILER_SAVED_PATH="$PATH"
33833    COMPILER_DIRNAME=`$DIRNAME $CXX`
33834    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33835
33836    # Try again looking for our compiler
33837    if test -n "$ac_tool_prefix"; then
33838  for ac_prog in $TOOLCHAIN_CXX_BINARY
33839  do
33840    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33841set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33843$as_echo_n "checking for $ac_word... " >&6; }
33844if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33845  $as_echo_n "(cached) " >&6
33846else
33847  if test -n "$PROPER_COMPILER_CXX"; then
33848  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33849else
33850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33851for as_dir in $PATH
33852do
33853  IFS=$as_save_IFS
33854  test -z "$as_dir" && as_dir=.
33855    for ac_exec_ext in '' $ac_executable_extensions; do
33856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33857    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33859    break 2
33860  fi
33861done
33862  done
33863IFS=$as_save_IFS
33864
33865fi
33866fi
33867PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33868if test -n "$PROPER_COMPILER_CXX"; then
33869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33870$as_echo "$PROPER_COMPILER_CXX" >&6; }
33871else
33872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33873$as_echo "no" >&6; }
33874fi
33875
33876
33877    test -n "$PROPER_COMPILER_CXX" && break
33878  done
33879fi
33880if test -z "$PROPER_COMPILER_CXX"; then
33881  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33882  for ac_prog in $TOOLCHAIN_CXX_BINARY
33883do
33884  # Extract the first word of "$ac_prog", so it can be a program name with args.
33885set dummy $ac_prog; ac_word=$2
33886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33887$as_echo_n "checking for $ac_word... " >&6; }
33888if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33889  $as_echo_n "(cached) " >&6
33890else
33891  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33892  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33893else
33894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33895for as_dir in $PATH
33896do
33897  IFS=$as_save_IFS
33898  test -z "$as_dir" && as_dir=.
33899    for ac_exec_ext in '' $ac_executable_extensions; do
33900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33901    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33903    break 2
33904  fi
33905done
33906  done
33907IFS=$as_save_IFS
33908
33909fi
33910fi
33911ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33912if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33914$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33915else
33916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917$as_echo "no" >&6; }
33918fi
33919
33920
33921  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33922done
33923
33924  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33925    PROPER_COMPILER_CXX=""
33926  else
33927    case $cross_compiling:$ac_tool_warned in
33928yes:)
33929{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33930$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33931ac_tool_warned=yes ;;
33932esac
33933    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33934  fi
33935fi
33936
33937
33938  # Only process if variable expands to non-empty
33939
33940  if test "x$PROPER_COMPILER_CXX" != x; then
33941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33942
33943  # First separate the path from the arguments. This will split at the first
33944  # space.
33945  complete="$PROPER_COMPILER_CXX"
33946  path="${complete%% *}"
33947  tmp="$complete EOL"
33948  arguments="${tmp#* }"
33949
33950  # Input might be given as Windows format, start by converting to
33951  # unix format.
33952  new_path=`$CYGPATH -u "$path"`
33953
33954  # Now try to locate executable using which
33955  new_path=`$WHICH "$new_path" 2> /dev/null`
33956  # bat and cmd files are not always considered executable in cygwin causing which
33957  # to not find them
33958  if test "x$new_path" = x \
33959      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33960      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33961    new_path=`$CYGPATH -u "$path"`
33962  fi
33963  if test "x$new_path" = x; then
33964    # Oops. Which didn't find the executable.
33965    # The splitting of arguments from the executable at a space might have been incorrect,
33966    # since paths with space are more likely in Windows. Give it another try with the whole
33967    # argument.
33968    path="$complete"
33969    arguments="EOL"
33970    new_path=`$CYGPATH -u "$path"`
33971    new_path=`$WHICH "$new_path" 2> /dev/null`
33972    # bat and cmd files are not always considered executable in cygwin causing which
33973    # to not find them
33974    if test "x$new_path" = x \
33975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33977      new_path=`$CYGPATH -u "$path"`
33978    fi
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 PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33982$as_echo "$as_me: The path of PROPER_COMPILER_CXX, 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 PROPER_COMPILER_CXX" "$LINENO" 5
33989    fi
33990  fi
33991
33992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33995  # "foo.exe" is OK but "foo" is an error.
33996  #
33997  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33998  # It is also a way to make sure we got the proper file name for the real test later on.
33999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34000  if test "x$test_shortpath" = x; then
34001    # Short path failed, file does not exist as specified.
34002    # Try adding .exe or .cmd
34003    if test -f "${new_path}.exe"; then
34004      input_to_shortpath="${new_path}.exe"
34005    elif test -f "${new_path}.cmd"; then
34006      input_to_shortpath="${new_path}.cmd"
34007    else
34008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
34009$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
34010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34012      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34013    fi
34014  else
34015    input_to_shortpath="$new_path"
34016  fi
34017
34018  # Call helper function which possibly converts this using DOS-style short mode.
34019  # If so, the updated path is stored in $new_path.
34020  new_path="$input_to_shortpath"
34021
34022  input_path="$input_to_shortpath"
34023  # Check if we need to convert this using DOS-style short mode. If the path
34024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34025  # take no chances and rewrite it.
34026  # Note: m4 eats our [], so we need to use [ and ] instead.
34027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34028  if test "x$has_forbidden_chars" != x; then
34029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34033      # Going to short mode and back again did indeed matter. Since short mode is
34034      # case insensitive, let's make it lowercase to improve readability.
34035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34036      # Now convert it back to Unix-style (cygpath)
34037      input_path=`$CYGPATH -u "$shortmode_path"`
34038      new_path="$input_path"
34039    fi
34040  fi
34041
34042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34043  if test "x$test_cygdrive_prefix" = x; then
34044    # As a simple fix, exclude /usr/bin since it's not a real path.
34045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34047      # a path prefixed by /cygdrive for fixpath to work.
34048      new_path="$CYGWIN_ROOT_PATH$input_path"
34049    fi
34050  fi
34051
34052  # remove trailing .exe if any
34053  new_path="${new_path/%.exe/}"
34054
34055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34056
34057  # First separate the path from the arguments. This will split at the first
34058  # space.
34059  complete="$PROPER_COMPILER_CXX"
34060  path="${complete%% *}"
34061  tmp="$complete EOL"
34062  arguments="${tmp#* }"
34063
34064  # Input might be given as Windows format, start by converting to
34065  # unix format.
34066  new_path="$path"
34067
34068  windows_path="$new_path"
34069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34070    unix_path=`$CYGPATH -u "$windows_path"`
34071    new_path="$unix_path"
34072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34074    new_path="$unix_path"
34075  fi
34076
34077
34078  # Now try to locate executable using which
34079  new_path=`$WHICH "$new_path" 2> /dev/null`
34080
34081  if test "x$new_path" = x; then
34082    # Oops. Which didn't find the executable.
34083    # The splitting of arguments from the executable at a space might have been incorrect,
34084    # since paths with space are more likely in Windows. Give it another try with the whole
34085    # argument.
34086    path="$complete"
34087    arguments="EOL"
34088    new_path="$path"
34089
34090  windows_path="$new_path"
34091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34092    unix_path=`$CYGPATH -u "$windows_path"`
34093    new_path="$unix_path"
34094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34096    new_path="$unix_path"
34097  fi
34098
34099
34100    new_path=`$WHICH "$new_path" 2> /dev/null`
34101    # bat and cmd files are not always considered executable in MSYS causing which
34102    # to not find them
34103    if test "x$new_path" = x \
34104        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34105        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34106      new_path="$path"
34107
34108  windows_path="$new_path"
34109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34110    unix_path=`$CYGPATH -u "$windows_path"`
34111    new_path="$unix_path"
34112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34114    new_path="$unix_path"
34115  fi
34116
34117    fi
34118
34119    if test "x$new_path" = x; then
34120      # It's still not found. Now this is an unrecoverable error.
34121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34122$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34123      has_space=`$ECHO "$complete" | $GREP " "`
34124      if test "x$has_space" != x; then
34125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34127      fi
34128      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34129    fi
34130  fi
34131
34132  # Now new_path has a complete unix path to the binary
34133  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34134    # Keep paths in /bin as-is, but remove trailing .exe if any
34135    new_path="${new_path/%.exe/}"
34136    # Do not save /bin paths to all_fixpath_prefixes!
34137  else
34138    # Not in mixed or Windows style, start by that.
34139    new_path=`cmd //c echo $new_path`
34140
34141  input_path="$new_path"
34142  # Check if we need to convert this using DOS-style short mode. If the path
34143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34144  # take no chances and rewrite it.
34145  # Note: m4 eats our [], so we need to use [ and ] instead.
34146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34147  if test "x$has_forbidden_chars" != x; then
34148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34150  fi
34151
34152    # Output is in $new_path
34153
34154  windows_path="$new_path"
34155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34156    unix_path=`$CYGPATH -u "$windows_path"`
34157    new_path="$unix_path"
34158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34160    new_path="$unix_path"
34161  fi
34162
34163    # remove trailing .exe if any
34164    new_path="${new_path/%.exe/}"
34165
34166    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34167    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34168  fi
34169
34170    else
34171      # We're on a unix platform. Hooray! :)
34172      # First separate the path from the arguments. This will split at the first
34173      # space.
34174      complete="$PROPER_COMPILER_CXX"
34175      path="${complete%% *}"
34176      tmp="$complete EOL"
34177      arguments="${tmp#* }"
34178
34179      # Cannot rely on the command "which" here since it doesn't always work.
34180      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34181      if test -z "$is_absolute_path"; then
34182        # Path to executable is not absolute. Find it.
34183        IFS_save="$IFS"
34184        IFS=:
34185        for p in $PATH; do
34186          if test -f "$p/$path" && test -x "$p/$path"; then
34187            new_path="$p/$path"
34188            break
34189          fi
34190        done
34191        IFS="$IFS_save"
34192      else
34193        # This is an absolute path, we can use it without further modifications.
34194        new_path="$path"
34195      fi
34196
34197      if test "x$new_path" = x; then
34198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34199$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34200        has_space=`$ECHO "$complete" | $GREP " "`
34201        if test "x$has_space" != x; then
34202          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34203$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34204        fi
34205        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34206      fi
34207    fi
34208
34209    # Now join together the path and the arguments once again
34210    if test "x$arguments" != xEOL; then
34211      new_complete="$new_path ${arguments% *}"
34212    else
34213      new_complete="$new_path"
34214    fi
34215
34216    if test "x$complete" != "x$new_complete"; then
34217      PROPER_COMPILER_CXX="$new_complete"
34218      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34219$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34220    fi
34221  fi
34222
34223    PATH="$RETRY_COMPILER_SAVED_PATH"
34224
34225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34226$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34227
34228  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34229    # Follow a chain of symbolic links. Use readlink
34230    # where it exists, else fall back to horribly
34231    # complicated shell code.
34232    if test "x$READLINK_TESTED" != yes; then
34233      # On MacOSX there is a readlink tool with a different
34234      # purpose than the GNU readlink tool. Check the found readlink.
34235      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34236      if test "x$ISGNU" = x; then
34237        # A readlink that we do not know how to use.
34238        # Are there other non-GNU readlinks out there?
34239        READLINK_TESTED=yes
34240        READLINK=
34241      fi
34242    fi
34243
34244    if test "x$READLINK" != x; then
34245      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34246    else
34247      # Save the current directory for restoring afterwards
34248      STARTDIR=$PWD
34249      COUNTER=0
34250      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34251      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34252      cd $sym_link_dir
34253      # Use -P flag to resolve symlinks in directories.
34254      cd `$THEPWDCMD -P`
34255      sym_link_dir=`$THEPWDCMD -P`
34256      # Resolve file symlinks
34257      while test $COUNTER -lt 20; do
34258        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34259        if test "x$ISLINK" == x; then
34260          # This is not a symbolic link! We are done!
34261          break
34262        fi
34263        # Again resolve directory symlinks since the target of the just found
34264        # link could be in a different directory
34265        cd `$DIRNAME $ISLINK`
34266        sym_link_dir=`$THEPWDCMD -P`
34267        sym_link_file=`$BASENAME $ISLINK`
34268        let COUNTER=COUNTER+1
34269      done
34270      cd $STARTDIR
34271      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34272    fi
34273  fi
34274
34275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34276$as_echo "$PROPER_COMPILER_CXX" >&6; }
34277    CXX="$PROPER_COMPILER_CXX"
34278  else
34279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34280$as_echo "no, keeping CXX" >&6; }
34281  fi
34282
34283
34284  COMPILER=$CXX
34285  COMPILER_NAME=$COMPILER_NAME
34286
34287  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34288    # cc -V output typically looks like
34289    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34290    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34291    # Check that this is likely to be the Solaris Studio cc.
34292    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34293    if test $? -ne 0; then
34294      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34295      { $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
34296$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34297      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34298$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34299      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34300$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34301      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34302    fi
34303    # Remove usage instructions (if present), and
34304    # collapse compiler output into a single line
34305    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34306        $SED -e 's/ *[Uu]sage:.*//'`
34307    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34308        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34309  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34310    # xlc -qversion output typically looks like
34311    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34312    #     Version: 11.01.0000.0015
34313    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34314    # Check that this is likely to be the IBM XL C compiler.
34315    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34316    if test $? -ne 0; then
34317      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34318      { $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
34319$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34320      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34321$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34322      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34323$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34324      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34325    fi
34326    # Collapse compiler output into a single line
34327    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34328    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34329        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34330  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34331    # There is no specific version flag, but all output starts with a version string.
34332    # First line typically looks something like:
34333    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34334    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34335    # Check that this is likely to be Microsoft CL.EXE.
34336    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34337    if test $? -ne 0; then
34338      { $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
34339$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34340      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34341$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34342      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34343    fi
34344    # Collapse compiler output into a single line
34345    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34346    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34347        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34348  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34349    # gcc --version output typically looks like
34350    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34351    #     Copyright (C) 2013 Free Software Foundation, Inc.
34352    #     This is free software; see the source for copying conditions.  There is NO
34353    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34354    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34355    # Check that this is likely to be GCC.
34356    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34357    if test $? -ne 0; then
34358      { $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
34359$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34360      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34361$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34362      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34363    fi
34364    # Remove Copyright and legalese from version string, and
34365    # collapse into a single line
34366    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34367        $SED -e 's/ *Copyright .*//'`
34368    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34369        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34370  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34371    # clang --version output typically looks like
34372    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34373    #    clang version 3.3 (tags/RELEASE_33/final)
34374    # or
34375    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34376    #    Target: x86_64-pc-linux-gnu
34377    #    Thread model: posix
34378    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34379    # Check that this is likely to be clang
34380    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34381    if test $? -ne 0; then
34382      { $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
34383$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34384      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34385$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34386      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34387    fi
34388    # Collapse compiler output into a single line
34389    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34390    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34391        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34392  else
34393      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34394  fi
34395  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34396  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34397  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34398  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34399
34400  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34401$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34402
34403
34404  # Now that we have resolved CXX ourself, let autoconf have its go at it
34405  ac_ext=cpp
34406ac_cpp='$CXXCPP $CPPFLAGS'
34407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34410if test -z "$CXX"; then
34411  if test -n "$CCC"; then
34412    CXX=$CCC
34413  else
34414    if test -n "$ac_tool_prefix"; then
34415  for ac_prog in $CXX
34416  do
34417    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34418set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34420$as_echo_n "checking for $ac_word... " >&6; }
34421if ${ac_cv_prog_CXX+:} false; then :
34422  $as_echo_n "(cached) " >&6
34423else
34424  if test -n "$CXX"; then
34425  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34426else
34427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34428for as_dir in $PATH
34429do
34430  IFS=$as_save_IFS
34431  test -z "$as_dir" && as_dir=.
34432    for ac_exec_ext in '' $ac_executable_extensions; do
34433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34434    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34436    break 2
34437  fi
34438done
34439  done
34440IFS=$as_save_IFS
34441
34442fi
34443fi
34444CXX=$ac_cv_prog_CXX
34445if test -n "$CXX"; then
34446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34447$as_echo "$CXX" >&6; }
34448else
34449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34450$as_echo "no" >&6; }
34451fi
34452
34453
34454    test -n "$CXX" && break
34455  done
34456fi
34457if test -z "$CXX"; then
34458  ac_ct_CXX=$CXX
34459  for ac_prog in $CXX
34460do
34461  # Extract the first word of "$ac_prog", so it can be a program name with args.
34462set dummy $ac_prog; ac_word=$2
34463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34464$as_echo_n "checking for $ac_word... " >&6; }
34465if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34466  $as_echo_n "(cached) " >&6
34467else
34468  if test -n "$ac_ct_CXX"; then
34469  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34470else
34471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34472for as_dir in $PATH
34473do
34474  IFS=$as_save_IFS
34475  test -z "$as_dir" && as_dir=.
34476    for ac_exec_ext in '' $ac_executable_extensions; do
34477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34478    ac_cv_prog_ac_ct_CXX="$ac_prog"
34479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34480    break 2
34481  fi
34482done
34483  done
34484IFS=$as_save_IFS
34485
34486fi
34487fi
34488ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34489if test -n "$ac_ct_CXX"; then
34490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34491$as_echo "$ac_ct_CXX" >&6; }
34492else
34493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34494$as_echo "no" >&6; }
34495fi
34496
34497
34498  test -n "$ac_ct_CXX" && break
34499done
34500
34501  if test "x$ac_ct_CXX" = x; then
34502    CXX="g++"
34503  else
34504    case $cross_compiling:$ac_tool_warned in
34505yes:)
34506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34508ac_tool_warned=yes ;;
34509esac
34510    CXX=$ac_ct_CXX
34511  fi
34512fi
34513
34514  fi
34515fi
34516# Provide some information about the compiler.
34517$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34518set X $ac_compile
34519ac_compiler=$2
34520for ac_option in --version -v -V -qversion; do
34521  { { ac_try="$ac_compiler $ac_option >&5"
34522case "(($ac_try" in
34523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34524  *) ac_try_echo=$ac_try;;
34525esac
34526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34527$as_echo "$ac_try_echo"; } >&5
34528  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34529  ac_status=$?
34530  if test -s conftest.err; then
34531    sed '10a\
34532... rest of stderr output deleted ...
34533         10q' conftest.err >conftest.er1
34534    cat conftest.er1 >&5
34535  fi
34536  rm -f conftest.er1 conftest.err
34537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34538  test $ac_status = 0; }
34539done
34540
34541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34542$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34543if ${ac_cv_cxx_compiler_gnu+:} false; then :
34544  $as_echo_n "(cached) " >&6
34545else
34546  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34547/* end confdefs.h.  */
34548
34549int
34550main ()
34551{
34552#ifndef __GNUC__
34553       choke me
34554#endif
34555
34556  ;
34557  return 0;
34558}
34559_ACEOF
34560if ac_fn_cxx_try_compile "$LINENO"; then :
34561  ac_compiler_gnu=yes
34562else
34563  ac_compiler_gnu=no
34564fi
34565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34566ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34567
34568fi
34569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34570$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34571if test $ac_compiler_gnu = yes; then
34572  GXX=yes
34573else
34574  GXX=
34575fi
34576ac_test_CXXFLAGS=${CXXFLAGS+set}
34577ac_save_CXXFLAGS=$CXXFLAGS
34578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34579$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34580if ${ac_cv_prog_cxx_g+:} false; then :
34581  $as_echo_n "(cached) " >&6
34582else
34583  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34584   ac_cxx_werror_flag=yes
34585   ac_cv_prog_cxx_g=no
34586   CXXFLAGS="-g"
34587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34588/* end confdefs.h.  */
34589
34590int
34591main ()
34592{
34593
34594  ;
34595  return 0;
34596}
34597_ACEOF
34598if ac_fn_cxx_try_compile "$LINENO"; then :
34599  ac_cv_prog_cxx_g=yes
34600else
34601  CXXFLAGS=""
34602      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34603/* end confdefs.h.  */
34604
34605int
34606main ()
34607{
34608
34609  ;
34610  return 0;
34611}
34612_ACEOF
34613if ac_fn_cxx_try_compile "$LINENO"; then :
34614
34615else
34616  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34617	 CXXFLAGS="-g"
34618	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34619/* end confdefs.h.  */
34620
34621int
34622main ()
34623{
34624
34625  ;
34626  return 0;
34627}
34628_ACEOF
34629if ac_fn_cxx_try_compile "$LINENO"; then :
34630  ac_cv_prog_cxx_g=yes
34631fi
34632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34633fi
34634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34635fi
34636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34637   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34638fi
34639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34640$as_echo "$ac_cv_prog_cxx_g" >&6; }
34641if test "$ac_test_CXXFLAGS" = set; then
34642  CXXFLAGS=$ac_save_CXXFLAGS
34643elif test $ac_cv_prog_cxx_g = yes; then
34644  if test "$GXX" = yes; then
34645    CXXFLAGS="-g -O2"
34646  else
34647    CXXFLAGS="-g"
34648  fi
34649else
34650  if test "$GXX" = yes; then
34651    CXXFLAGS="-O2"
34652  else
34653    CXXFLAGS=
34654  fi
34655fi
34656ac_ext=cpp
34657ac_cpp='$CXXCPP $CPPFLAGS'
34658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34661
34662
34663  #
34664  # Setup the preprocessor (CPP and CXXCPP)
34665  #
34666  ac_ext=c
34667ac_cpp='$CPP $CPPFLAGS'
34668ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34669ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34670ac_compiler_gnu=$ac_cv_c_compiler_gnu
34671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34672$as_echo_n "checking how to run the C preprocessor... " >&6; }
34673# On Suns, sometimes $CPP names a directory.
34674if test -n "$CPP" && test -d "$CPP"; then
34675  CPP=
34676fi
34677if test -z "$CPP"; then
34678  if ${ac_cv_prog_CPP+:} false; then :
34679  $as_echo_n "(cached) " >&6
34680else
34681      # Double quotes because CPP needs to be expanded
34682    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34683    do
34684      ac_preproc_ok=false
34685for ac_c_preproc_warn_flag in '' yes
34686do
34687  # Use a header file that comes with gcc, so configuring glibc
34688  # with a fresh cross-compiler works.
34689  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34690  # <limits.h> exists even on freestanding compilers.
34691  # On the NeXT, cc -E runs the code through the compiler's parser,
34692  # not just through cpp. "Syntax error" is here to catch this case.
34693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34694/* end confdefs.h.  */
34695#ifdef __STDC__
34696# include <limits.h>
34697#else
34698# include <assert.h>
34699#endif
34700		     Syntax error
34701_ACEOF
34702if ac_fn_c_try_cpp "$LINENO"; then :
34703
34704else
34705  # Broken: fails on valid input.
34706continue
34707fi
34708rm -f conftest.err conftest.i conftest.$ac_ext
34709
34710  # OK, works on sane cases.  Now check whether nonexistent headers
34711  # can be detected and how.
34712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34713/* end confdefs.h.  */
34714#include <ac_nonexistent.h>
34715_ACEOF
34716if ac_fn_c_try_cpp "$LINENO"; then :
34717  # Broken: success on invalid input.
34718continue
34719else
34720  # Passes both tests.
34721ac_preproc_ok=:
34722break
34723fi
34724rm -f conftest.err conftest.i conftest.$ac_ext
34725
34726done
34727# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34728rm -f conftest.i conftest.err conftest.$ac_ext
34729if $ac_preproc_ok; then :
34730  break
34731fi
34732
34733    done
34734    ac_cv_prog_CPP=$CPP
34735
34736fi
34737  CPP=$ac_cv_prog_CPP
34738else
34739  ac_cv_prog_CPP=$CPP
34740fi
34741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34742$as_echo "$CPP" >&6; }
34743ac_preproc_ok=false
34744for ac_c_preproc_warn_flag in '' yes
34745do
34746  # Use a header file that comes with gcc, so configuring glibc
34747  # with a fresh cross-compiler works.
34748  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34749  # <limits.h> exists even on freestanding compilers.
34750  # On the NeXT, cc -E runs the code through the compiler's parser,
34751  # not just through cpp. "Syntax error" is here to catch this case.
34752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34753/* end confdefs.h.  */
34754#ifdef __STDC__
34755# include <limits.h>
34756#else
34757# include <assert.h>
34758#endif
34759		     Syntax error
34760_ACEOF
34761if ac_fn_c_try_cpp "$LINENO"; then :
34762
34763else
34764  # Broken: fails on valid input.
34765continue
34766fi
34767rm -f conftest.err conftest.i conftest.$ac_ext
34768
34769  # OK, works on sane cases.  Now check whether nonexistent headers
34770  # can be detected and how.
34771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34772/* end confdefs.h.  */
34773#include <ac_nonexistent.h>
34774_ACEOF
34775if ac_fn_c_try_cpp "$LINENO"; then :
34776  # Broken: success on invalid input.
34777continue
34778else
34779  # Passes both tests.
34780ac_preproc_ok=:
34781break
34782fi
34783rm -f conftest.err conftest.i conftest.$ac_ext
34784
34785done
34786# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34787rm -f conftest.i conftest.err conftest.$ac_ext
34788if $ac_preproc_ok; then :
34789
34790else
34791  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34793as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34794See \`config.log' for more details" "$LINENO" 5; }
34795fi
34796
34797ac_ext=cpp
34798ac_cpp='$CXXCPP $CPPFLAGS'
34799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34802
34803
34804  # Only process if variable expands to non-empty
34805
34806  if test "x$CPP" != x; then
34807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34808
34809  # First separate the path from the arguments. This will split at the first
34810  # space.
34811  complete="$CPP"
34812  path="${complete%% *}"
34813  tmp="$complete EOL"
34814  arguments="${tmp#* }"
34815
34816  # Input might be given as Windows format, start by converting to
34817  # unix format.
34818  new_path=`$CYGPATH -u "$path"`
34819
34820  # Now try to locate executable using which
34821  new_path=`$WHICH "$new_path" 2> /dev/null`
34822  # bat and cmd files are not always considered executable in cygwin causing which
34823  # to not find them
34824  if test "x$new_path" = x \
34825      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34826      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34827    new_path=`$CYGPATH -u "$path"`
34828  fi
34829  if test "x$new_path" = x; then
34830    # Oops. Which didn't find the executable.
34831    # The splitting of arguments from the executable at a space might have been incorrect,
34832    # since paths with space are more likely in Windows. Give it another try with the whole
34833    # argument.
34834    path="$complete"
34835    arguments="EOL"
34836    new_path=`$CYGPATH -u "$path"`
34837    new_path=`$WHICH "$new_path" 2> /dev/null`
34838    # bat and cmd files are not always considered executable in cygwin causing which
34839    # to not find them
34840    if test "x$new_path" = x \
34841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34843      new_path=`$CYGPATH -u "$path"`
34844    fi
34845    if test "x$new_path" = x; then
34846      # It's still not found. Now this is an unrecoverable error.
34847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34848$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34849      has_space=`$ECHO "$complete" | $GREP " "`
34850      if test "x$has_space" != x; then
34851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34853      fi
34854      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34855    fi
34856  fi
34857
34858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34861  # "foo.exe" is OK but "foo" is an error.
34862  #
34863  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34864  # It is also a way to make sure we got the proper file name for the real test later on.
34865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34866  if test "x$test_shortpath" = x; then
34867    # Short path failed, file does not exist as specified.
34868    # Try adding .exe or .cmd
34869    if test -f "${new_path}.exe"; then
34870      input_to_shortpath="${new_path}.exe"
34871    elif test -f "${new_path}.cmd"; then
34872      input_to_shortpath="${new_path}.cmd"
34873    else
34874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34875$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34878      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34879    fi
34880  else
34881    input_to_shortpath="$new_path"
34882  fi
34883
34884  # Call helper function which possibly converts this using DOS-style short mode.
34885  # If so, the updated path is stored in $new_path.
34886  new_path="$input_to_shortpath"
34887
34888  input_path="$input_to_shortpath"
34889  # Check if we need to convert this using DOS-style short mode. If the path
34890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34891  # take no chances and rewrite it.
34892  # Note: m4 eats our [], so we need to use [ and ] instead.
34893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34894  if test "x$has_forbidden_chars" != x; then
34895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34899      # Going to short mode and back again did indeed matter. Since short mode is
34900      # case insensitive, let's make it lowercase to improve readability.
34901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34902      # Now convert it back to Unix-style (cygpath)
34903      input_path=`$CYGPATH -u "$shortmode_path"`
34904      new_path="$input_path"
34905    fi
34906  fi
34907
34908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34909  if test "x$test_cygdrive_prefix" = x; then
34910    # As a simple fix, exclude /usr/bin since it's not a real path.
34911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34913      # a path prefixed by /cygdrive for fixpath to work.
34914      new_path="$CYGWIN_ROOT_PATH$input_path"
34915    fi
34916  fi
34917
34918  # remove trailing .exe if any
34919  new_path="${new_path/%.exe/}"
34920
34921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34922
34923  # First separate the path from the arguments. This will split at the first
34924  # space.
34925  complete="$CPP"
34926  path="${complete%% *}"
34927  tmp="$complete EOL"
34928  arguments="${tmp#* }"
34929
34930  # Input might be given as Windows format, start by converting to
34931  # unix format.
34932  new_path="$path"
34933
34934  windows_path="$new_path"
34935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34936    unix_path=`$CYGPATH -u "$windows_path"`
34937    new_path="$unix_path"
34938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34940    new_path="$unix_path"
34941  fi
34942
34943
34944  # Now try to locate executable using which
34945  new_path=`$WHICH "$new_path" 2> /dev/null`
34946
34947  if test "x$new_path" = x; then
34948    # Oops. Which didn't find the executable.
34949    # The splitting of arguments from the executable at a space might have been incorrect,
34950    # since paths with space are more likely in Windows. Give it another try with the whole
34951    # argument.
34952    path="$complete"
34953    arguments="EOL"
34954    new_path="$path"
34955
34956  windows_path="$new_path"
34957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34958    unix_path=`$CYGPATH -u "$windows_path"`
34959    new_path="$unix_path"
34960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34962    new_path="$unix_path"
34963  fi
34964
34965
34966    new_path=`$WHICH "$new_path" 2> /dev/null`
34967    # bat and cmd files are not always considered executable in MSYS causing which
34968    # to not find them
34969    if test "x$new_path" = x \
34970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34972      new_path="$path"
34973
34974  windows_path="$new_path"
34975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34976    unix_path=`$CYGPATH -u "$windows_path"`
34977    new_path="$unix_path"
34978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34980    new_path="$unix_path"
34981  fi
34982
34983    fi
34984
34985    if test "x$new_path" = x; then
34986      # It's still not found. Now this is an unrecoverable error.
34987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34988$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34989      has_space=`$ECHO "$complete" | $GREP " "`
34990      if test "x$has_space" != x; then
34991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34993      fi
34994      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34995    fi
34996  fi
34997
34998  # Now new_path has a complete unix path to the binary
34999  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35000    # Keep paths in /bin as-is, but remove trailing .exe if any
35001    new_path="${new_path/%.exe/}"
35002    # Do not save /bin paths to all_fixpath_prefixes!
35003  else
35004    # Not in mixed or Windows style, start by that.
35005    new_path=`cmd //c echo $new_path`
35006
35007  input_path="$new_path"
35008  # Check if we need to convert this using DOS-style short mode. If the path
35009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35010  # take no chances and rewrite it.
35011  # Note: m4 eats our [], so we need to use [ and ] instead.
35012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35013  if test "x$has_forbidden_chars" != x; then
35014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35016  fi
35017
35018    # Output is in $new_path
35019
35020  windows_path="$new_path"
35021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35022    unix_path=`$CYGPATH -u "$windows_path"`
35023    new_path="$unix_path"
35024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35026    new_path="$unix_path"
35027  fi
35028
35029    # remove trailing .exe if any
35030    new_path="${new_path/%.exe/}"
35031
35032    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35033    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35034  fi
35035
35036    else
35037      # We're on a unix platform. Hooray! :)
35038      # First separate the path from the arguments. This will split at the first
35039      # space.
35040      complete="$CPP"
35041      path="${complete%% *}"
35042      tmp="$complete EOL"
35043      arguments="${tmp#* }"
35044
35045      # Cannot rely on the command "which" here since it doesn't always work.
35046      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35047      if test -z "$is_absolute_path"; then
35048        # Path to executable is not absolute. Find it.
35049        IFS_save="$IFS"
35050        IFS=:
35051        for p in $PATH; do
35052          if test -f "$p/$path" && test -x "$p/$path"; then
35053            new_path="$p/$path"
35054            break
35055          fi
35056        done
35057        IFS="$IFS_save"
35058      else
35059        # This is an absolute path, we can use it without further modifications.
35060        new_path="$path"
35061      fi
35062
35063      if test "x$new_path" = x; then
35064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35065$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35066        has_space=`$ECHO "$complete" | $GREP " "`
35067        if test "x$has_space" != x; then
35068          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35069$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35070        fi
35071        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35072      fi
35073    fi
35074
35075    # Now join together the path and the arguments once again
35076    if test "x$arguments" != xEOL; then
35077      new_complete="$new_path ${arguments% *}"
35078    else
35079      new_complete="$new_path"
35080    fi
35081
35082    if test "x$complete" != "x$new_complete"; then
35083      CPP="$new_complete"
35084      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35085$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35086    fi
35087  fi
35088
35089  ac_ext=cpp
35090ac_cpp='$CXXCPP $CPPFLAGS'
35091ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35092ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35093ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35095$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35096if test -z "$CXXCPP"; then
35097  if ${ac_cv_prog_CXXCPP+:} false; then :
35098  $as_echo_n "(cached) " >&6
35099else
35100      # Double quotes because CXXCPP needs to be expanded
35101    for CXXCPP in "$CXX -E" "/lib/cpp"
35102    do
35103      ac_preproc_ok=false
35104for ac_cxx_preproc_warn_flag in '' yes
35105do
35106  # Use a header file that comes with gcc, so configuring glibc
35107  # with a fresh cross-compiler works.
35108  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35109  # <limits.h> exists even on freestanding compilers.
35110  # On the NeXT, cc -E runs the code through the compiler's parser,
35111  # not just through cpp. "Syntax error" is here to catch this case.
35112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35113/* end confdefs.h.  */
35114#ifdef __STDC__
35115# include <limits.h>
35116#else
35117# include <assert.h>
35118#endif
35119		     Syntax error
35120_ACEOF
35121if ac_fn_cxx_try_cpp "$LINENO"; then :
35122
35123else
35124  # Broken: fails on valid input.
35125continue
35126fi
35127rm -f conftest.err conftest.i conftest.$ac_ext
35128
35129  # OK, works on sane cases.  Now check whether nonexistent headers
35130  # can be detected and how.
35131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35132/* end confdefs.h.  */
35133#include <ac_nonexistent.h>
35134_ACEOF
35135if ac_fn_cxx_try_cpp "$LINENO"; then :
35136  # Broken: success on invalid input.
35137continue
35138else
35139  # Passes both tests.
35140ac_preproc_ok=:
35141break
35142fi
35143rm -f conftest.err conftest.i conftest.$ac_ext
35144
35145done
35146# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35147rm -f conftest.i conftest.err conftest.$ac_ext
35148if $ac_preproc_ok; then :
35149  break
35150fi
35151
35152    done
35153    ac_cv_prog_CXXCPP=$CXXCPP
35154
35155fi
35156  CXXCPP=$ac_cv_prog_CXXCPP
35157else
35158  ac_cv_prog_CXXCPP=$CXXCPP
35159fi
35160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35161$as_echo "$CXXCPP" >&6; }
35162ac_preproc_ok=false
35163for ac_cxx_preproc_warn_flag in '' yes
35164do
35165  # Use a header file that comes with gcc, so configuring glibc
35166  # with a fresh cross-compiler works.
35167  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35168  # <limits.h> exists even on freestanding compilers.
35169  # On the NeXT, cc -E runs the code through the compiler's parser,
35170  # not just through cpp. "Syntax error" is here to catch this case.
35171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35172/* end confdefs.h.  */
35173#ifdef __STDC__
35174# include <limits.h>
35175#else
35176# include <assert.h>
35177#endif
35178		     Syntax error
35179_ACEOF
35180if ac_fn_cxx_try_cpp "$LINENO"; then :
35181
35182else
35183  # Broken: fails on valid input.
35184continue
35185fi
35186rm -f conftest.err conftest.i conftest.$ac_ext
35187
35188  # OK, works on sane cases.  Now check whether nonexistent headers
35189  # can be detected and how.
35190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35191/* end confdefs.h.  */
35192#include <ac_nonexistent.h>
35193_ACEOF
35194if ac_fn_cxx_try_cpp "$LINENO"; then :
35195  # Broken: success on invalid input.
35196continue
35197else
35198  # Passes both tests.
35199ac_preproc_ok=:
35200break
35201fi
35202rm -f conftest.err conftest.i conftest.$ac_ext
35203
35204done
35205# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35206rm -f conftest.i conftest.err conftest.$ac_ext
35207if $ac_preproc_ok; then :
35208
35209else
35210  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35212as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35213See \`config.log' for more details" "$LINENO" 5; }
35214fi
35215
35216ac_ext=cpp
35217ac_cpp='$CXXCPP $CPPFLAGS'
35218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35221
35222
35223  # Only process if variable expands to non-empty
35224
35225  if test "x$CXXCPP" != x; then
35226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35227
35228  # First separate the path from the arguments. This will split at the first
35229  # space.
35230  complete="$CXXCPP"
35231  path="${complete%% *}"
35232  tmp="$complete EOL"
35233  arguments="${tmp#* }"
35234
35235  # Input might be given as Windows format, start by converting to
35236  # unix format.
35237  new_path=`$CYGPATH -u "$path"`
35238
35239  # Now try to locate executable using which
35240  new_path=`$WHICH "$new_path" 2> /dev/null`
35241  # bat and cmd files are not always considered executable in cygwin causing which
35242  # to not find them
35243  if test "x$new_path" = x \
35244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35246    new_path=`$CYGPATH -u "$path"`
35247  fi
35248  if test "x$new_path" = x; then
35249    # Oops. Which didn't find the executable.
35250    # The splitting of arguments from the executable at a space might have been incorrect,
35251    # since paths with space are more likely in Windows. Give it another try with the whole
35252    # argument.
35253    path="$complete"
35254    arguments="EOL"
35255    new_path=`$CYGPATH -u "$path"`
35256    new_path=`$WHICH "$new_path" 2> /dev/null`
35257    # bat and cmd files are not always considered executable in cygwin causing which
35258    # to not find them
35259    if test "x$new_path" = x \
35260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35262      new_path=`$CYGPATH -u "$path"`
35263    fi
35264    if test "x$new_path" = x; then
35265      # It's still not found. Now this is an unrecoverable error.
35266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35267$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35268      has_space=`$ECHO "$complete" | $GREP " "`
35269      if test "x$has_space" != x; then
35270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35272      fi
35273      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35274    fi
35275  fi
35276
35277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35280  # "foo.exe" is OK but "foo" is an error.
35281  #
35282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35283  # It is also a way to make sure we got the proper file name for the real test later on.
35284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35285  if test "x$test_shortpath" = x; then
35286    # Short path failed, file does not exist as specified.
35287    # Try adding .exe or .cmd
35288    if test -f "${new_path}.exe"; then
35289      input_to_shortpath="${new_path}.exe"
35290    elif test -f "${new_path}.cmd"; then
35291      input_to_shortpath="${new_path}.cmd"
35292    else
35293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35294$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35297      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35298    fi
35299  else
35300    input_to_shortpath="$new_path"
35301  fi
35302
35303  # Call helper function which possibly converts this using DOS-style short mode.
35304  # If so, the updated path is stored in $new_path.
35305  new_path="$input_to_shortpath"
35306
35307  input_path="$input_to_shortpath"
35308  # Check if we need to convert this using DOS-style short mode. If the path
35309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35310  # take no chances and rewrite it.
35311  # Note: m4 eats our [], so we need to use [ and ] instead.
35312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35313  if test "x$has_forbidden_chars" != x; then
35314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35318      # Going to short mode and back again did indeed matter. Since short mode is
35319      # case insensitive, let's make it lowercase to improve readability.
35320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35321      # Now convert it back to Unix-style (cygpath)
35322      input_path=`$CYGPATH -u "$shortmode_path"`
35323      new_path="$input_path"
35324    fi
35325  fi
35326
35327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35328  if test "x$test_cygdrive_prefix" = x; then
35329    # As a simple fix, exclude /usr/bin since it's not a real path.
35330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35332      # a path prefixed by /cygdrive for fixpath to work.
35333      new_path="$CYGWIN_ROOT_PATH$input_path"
35334    fi
35335  fi
35336
35337  # remove trailing .exe if any
35338  new_path="${new_path/%.exe/}"
35339
35340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35341
35342  # First separate the path from the arguments. This will split at the first
35343  # space.
35344  complete="$CXXCPP"
35345  path="${complete%% *}"
35346  tmp="$complete EOL"
35347  arguments="${tmp#* }"
35348
35349  # Input might be given as Windows format, start by converting to
35350  # unix format.
35351  new_path="$path"
35352
35353  windows_path="$new_path"
35354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35355    unix_path=`$CYGPATH -u "$windows_path"`
35356    new_path="$unix_path"
35357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35359    new_path="$unix_path"
35360  fi
35361
35362
35363  # Now try to locate executable using which
35364  new_path=`$WHICH "$new_path" 2> /dev/null`
35365
35366  if test "x$new_path" = x; then
35367    # Oops. Which didn't find the executable.
35368    # The splitting of arguments from the executable at a space might have been incorrect,
35369    # since paths with space are more likely in Windows. Give it another try with the whole
35370    # argument.
35371    path="$complete"
35372    arguments="EOL"
35373    new_path="$path"
35374
35375  windows_path="$new_path"
35376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35377    unix_path=`$CYGPATH -u "$windows_path"`
35378    new_path="$unix_path"
35379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35381    new_path="$unix_path"
35382  fi
35383
35384
35385    new_path=`$WHICH "$new_path" 2> /dev/null`
35386    # bat and cmd files are not always considered executable in MSYS causing which
35387    # to not find them
35388    if test "x$new_path" = x \
35389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35391      new_path="$path"
35392
35393  windows_path="$new_path"
35394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35395    unix_path=`$CYGPATH -u "$windows_path"`
35396    new_path="$unix_path"
35397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35399    new_path="$unix_path"
35400  fi
35401
35402    fi
35403
35404    if test "x$new_path" = x; then
35405      # It's still not found. Now this is an unrecoverable error.
35406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35407$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35408      has_space=`$ECHO "$complete" | $GREP " "`
35409      if test "x$has_space" != x; then
35410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35412      fi
35413      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35414    fi
35415  fi
35416
35417  # Now new_path has a complete unix path to the binary
35418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35419    # Keep paths in /bin as-is, but remove trailing .exe if any
35420    new_path="${new_path/%.exe/}"
35421    # Do not save /bin paths to all_fixpath_prefixes!
35422  else
35423    # Not in mixed or Windows style, start by that.
35424    new_path=`cmd //c echo $new_path`
35425
35426  input_path="$new_path"
35427  # Check if we need to convert this using DOS-style short mode. If the path
35428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35429  # take no chances and rewrite it.
35430  # Note: m4 eats our [], so we need to use [ and ] instead.
35431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35432  if test "x$has_forbidden_chars" != x; then
35433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35435  fi
35436
35437    # Output is in $new_path
35438
35439  windows_path="$new_path"
35440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35441    unix_path=`$CYGPATH -u "$windows_path"`
35442    new_path="$unix_path"
35443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35445    new_path="$unix_path"
35446  fi
35447
35448    # remove trailing .exe if any
35449    new_path="${new_path/%.exe/}"
35450
35451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35453  fi
35454
35455    else
35456      # We're on a unix platform. Hooray! :)
35457      # First separate the path from the arguments. This will split at the first
35458      # space.
35459      complete="$CXXCPP"
35460      path="${complete%% *}"
35461      tmp="$complete EOL"
35462      arguments="${tmp#* }"
35463
35464      # Cannot rely on the command "which" here since it doesn't always work.
35465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35466      if test -z "$is_absolute_path"; then
35467        # Path to executable is not absolute. Find it.
35468        IFS_save="$IFS"
35469        IFS=:
35470        for p in $PATH; do
35471          if test -f "$p/$path" && test -x "$p/$path"; then
35472            new_path="$p/$path"
35473            break
35474          fi
35475        done
35476        IFS="$IFS_save"
35477      else
35478        # This is an absolute path, we can use it without further modifications.
35479        new_path="$path"
35480      fi
35481
35482      if test "x$new_path" = x; then
35483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35484$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35485        has_space=`$ECHO "$complete" | $GREP " "`
35486        if test "x$has_space" != x; then
35487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35489        fi
35490        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35491      fi
35492    fi
35493
35494    # Now join together the path and the arguments once again
35495    if test "x$arguments" != xEOL; then
35496      new_complete="$new_path ${arguments% *}"
35497    else
35498      new_complete="$new_path"
35499    fi
35500
35501    if test "x$complete" != "x$new_complete"; then
35502      CXXCPP="$new_complete"
35503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35504$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35505    fi
35506  fi
35507
35508
35509  #
35510  # Setup the linker (LD)
35511  #
35512  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35513    # In the Microsoft toolchain we have a separate LD command "link".
35514    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35515    # a cygwin program for something completely different.
35516    # Extract the first word of "link", so it can be a program name with args.
35517set dummy link; ac_word=$2
35518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35519$as_echo_n "checking for $ac_word... " >&6; }
35520if ${ac_cv_prog_LD+:} false; then :
35521  $as_echo_n "(cached) " >&6
35522else
35523  if test -n "$LD"; then
35524  ac_cv_prog_LD="$LD" # Let the user override the test.
35525else
35526  ac_prog_rejected=no
35527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35528for as_dir in $PATH
35529do
35530  IFS=$as_save_IFS
35531  test -z "$as_dir" && as_dir=.
35532    for ac_exec_ext in '' $ac_executable_extensions; do
35533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35534    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35535       ac_prog_rejected=yes
35536       continue
35537     fi
35538    ac_cv_prog_LD="link"
35539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35540    break 2
35541  fi
35542done
35543  done
35544IFS=$as_save_IFS
35545
35546if test $ac_prog_rejected = yes; then
35547  # We found a bogon in the path, so make sure we never use it.
35548  set dummy $ac_cv_prog_LD
35549  shift
35550  if test $# != 0; then
35551    # We chose a different compiler from the bogus one.
35552    # However, it has the same basename, so the bogon will be chosen
35553    # first if we set LD to just the basename; use the full file name.
35554    shift
35555    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35556  fi
35557fi
35558fi
35559fi
35560LD=$ac_cv_prog_LD
35561if test -n "$LD"; then
35562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35563$as_echo "$LD" >&6; }
35564else
35565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35566$as_echo "no" >&6; }
35567fi
35568
35569
35570
35571  # Only process if variable expands to non-empty
35572
35573  if test "x$LD" != x; then
35574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35575
35576  # First separate the path from the arguments. This will split at the first
35577  # space.
35578  complete="$LD"
35579  path="${complete%% *}"
35580  tmp="$complete EOL"
35581  arguments="${tmp#* }"
35582
35583  # Input might be given as Windows format, start by converting to
35584  # unix format.
35585  new_path=`$CYGPATH -u "$path"`
35586
35587  # Now try to locate executable using which
35588  new_path=`$WHICH "$new_path" 2> /dev/null`
35589  # bat and cmd files are not always considered executable in cygwin causing which
35590  # to not find them
35591  if test "x$new_path" = x \
35592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35594    new_path=`$CYGPATH -u "$path"`
35595  fi
35596  if test "x$new_path" = x; then
35597    # Oops. Which didn't find the executable.
35598    # The splitting of arguments from the executable at a space might have been incorrect,
35599    # since paths with space are more likely in Windows. Give it another try with the whole
35600    # argument.
35601    path="$complete"
35602    arguments="EOL"
35603    new_path=`$CYGPATH -u "$path"`
35604    new_path=`$WHICH "$new_path" 2> /dev/null`
35605    # bat and cmd files are not always considered executable in cygwin causing which
35606    # to not find them
35607    if test "x$new_path" = x \
35608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35610      new_path=`$CYGPATH -u "$path"`
35611    fi
35612    if test "x$new_path" = x; then
35613      # It's still not found. Now this is an unrecoverable error.
35614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35615$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35616      has_space=`$ECHO "$complete" | $GREP " "`
35617      if test "x$has_space" != x; then
35618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35620      fi
35621      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35622    fi
35623  fi
35624
35625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35628  # "foo.exe" is OK but "foo" is an error.
35629  #
35630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35631  # It is also a way to make sure we got the proper file name for the real test later on.
35632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35633  if test "x$test_shortpath" = x; then
35634    # Short path failed, file does not exist as specified.
35635    # Try adding .exe or .cmd
35636    if test -f "${new_path}.exe"; then
35637      input_to_shortpath="${new_path}.exe"
35638    elif test -f "${new_path}.cmd"; then
35639      input_to_shortpath="${new_path}.cmd"
35640    else
35641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35642$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35645      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35646    fi
35647  else
35648    input_to_shortpath="$new_path"
35649  fi
35650
35651  # Call helper function which possibly converts this using DOS-style short mode.
35652  # If so, the updated path is stored in $new_path.
35653  new_path="$input_to_shortpath"
35654
35655  input_path="$input_to_shortpath"
35656  # Check if we need to convert this using DOS-style short mode. If the path
35657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35658  # take no chances and rewrite it.
35659  # Note: m4 eats our [], so we need to use [ and ] instead.
35660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35661  if test "x$has_forbidden_chars" != x; then
35662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35666      # Going to short mode and back again did indeed matter. Since short mode is
35667      # case insensitive, let's make it lowercase to improve readability.
35668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35669      # Now convert it back to Unix-style (cygpath)
35670      input_path=`$CYGPATH -u "$shortmode_path"`
35671      new_path="$input_path"
35672    fi
35673  fi
35674
35675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35676  if test "x$test_cygdrive_prefix" = x; then
35677    # As a simple fix, exclude /usr/bin since it's not a real path.
35678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35680      # a path prefixed by /cygdrive for fixpath to work.
35681      new_path="$CYGWIN_ROOT_PATH$input_path"
35682    fi
35683  fi
35684
35685  # remove trailing .exe if any
35686  new_path="${new_path/%.exe/}"
35687
35688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689
35690  # First separate the path from the arguments. This will split at the first
35691  # space.
35692  complete="$LD"
35693  path="${complete%% *}"
35694  tmp="$complete EOL"
35695  arguments="${tmp#* }"
35696
35697  # Input might be given as Windows format, start by converting to
35698  # unix format.
35699  new_path="$path"
35700
35701  windows_path="$new_path"
35702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35703    unix_path=`$CYGPATH -u "$windows_path"`
35704    new_path="$unix_path"
35705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35707    new_path="$unix_path"
35708  fi
35709
35710
35711  # Now try to locate executable using which
35712  new_path=`$WHICH "$new_path" 2> /dev/null`
35713
35714  if test "x$new_path" = x; then
35715    # Oops. Which didn't find the executable.
35716    # The splitting of arguments from the executable at a space might have been incorrect,
35717    # since paths with space are more likely in Windows. Give it another try with the whole
35718    # argument.
35719    path="$complete"
35720    arguments="EOL"
35721    new_path="$path"
35722
35723  windows_path="$new_path"
35724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35725    unix_path=`$CYGPATH -u "$windows_path"`
35726    new_path="$unix_path"
35727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35729    new_path="$unix_path"
35730  fi
35731
35732
35733    new_path=`$WHICH "$new_path" 2> /dev/null`
35734    # bat and cmd files are not always considered executable in MSYS causing which
35735    # to not find them
35736    if test "x$new_path" = x \
35737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35739      new_path="$path"
35740
35741  windows_path="$new_path"
35742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35743    unix_path=`$CYGPATH -u "$windows_path"`
35744    new_path="$unix_path"
35745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35747    new_path="$unix_path"
35748  fi
35749
35750    fi
35751
35752    if test "x$new_path" = x; then
35753      # It's still not found. Now this is an unrecoverable error.
35754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35755$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35756      has_space=`$ECHO "$complete" | $GREP " "`
35757      if test "x$has_space" != x; then
35758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35760      fi
35761      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35762    fi
35763  fi
35764
35765  # Now new_path has a complete unix path to the binary
35766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35767    # Keep paths in /bin as-is, but remove trailing .exe if any
35768    new_path="${new_path/%.exe/}"
35769    # Do not save /bin paths to all_fixpath_prefixes!
35770  else
35771    # Not in mixed or Windows style, start by that.
35772    new_path=`cmd //c echo $new_path`
35773
35774  input_path="$new_path"
35775  # Check if we need to convert this using DOS-style short mode. If the path
35776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35777  # take no chances and rewrite it.
35778  # Note: m4 eats our [], so we need to use [ and ] instead.
35779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35780  if test "x$has_forbidden_chars" != x; then
35781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35783  fi
35784
35785    # Output is in $new_path
35786
35787  windows_path="$new_path"
35788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35789    unix_path=`$CYGPATH -u "$windows_path"`
35790    new_path="$unix_path"
35791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35793    new_path="$unix_path"
35794  fi
35795
35796    # remove trailing .exe if any
35797    new_path="${new_path/%.exe/}"
35798
35799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35801  fi
35802
35803    else
35804      # We're on a unix platform. Hooray! :)
35805      # First separate the path from the arguments. This will split at the first
35806      # space.
35807      complete="$LD"
35808      path="${complete%% *}"
35809      tmp="$complete EOL"
35810      arguments="${tmp#* }"
35811
35812      # Cannot rely on the command "which" here since it doesn't always work.
35813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35814      if test -z "$is_absolute_path"; then
35815        # Path to executable is not absolute. Find it.
35816        IFS_save="$IFS"
35817        IFS=:
35818        for p in $PATH; do
35819          if test -f "$p/$path" && test -x "$p/$path"; then
35820            new_path="$p/$path"
35821            break
35822          fi
35823        done
35824        IFS="$IFS_save"
35825      else
35826        # This is an absolute path, we can use it without further modifications.
35827        new_path="$path"
35828      fi
35829
35830      if test "x$new_path" = x; then
35831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35832$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35833        has_space=`$ECHO "$complete" | $GREP " "`
35834        if test "x$has_space" != x; then
35835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35837        fi
35838        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35839      fi
35840    fi
35841
35842    # Now join together the path and the arguments once again
35843    if test "x$arguments" != xEOL; then
35844      new_complete="$new_path ${arguments% *}"
35845    else
35846      new_complete="$new_path"
35847    fi
35848
35849    if test "x$complete" != "x$new_complete"; then
35850      LD="$new_complete"
35851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35852$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35853    fi
35854  fi
35855
35856    # Verify that we indeed succeeded with this trick.
35857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35858$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35859    "$LD" --version > /dev/null
35860    if test $? -eq 0 ; then
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35862$as_echo "no" >&6; }
35863      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35864    else
35865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35866$as_echo "yes" >&6; }
35867    fi
35868    LDCXX="$LD"
35869  else
35870    # All other toolchains use the compiler to link.
35871    LD="$CC"
35872    LDCXX="$CXX"
35873  fi
35874
35875  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35876
35877
35878  #
35879  # Setup the assembler (AS)
35880  #
35881  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35882    # FIXME: should this really be solaris, or solstudio?
35883
35884
35885  # Publish this variable in the help.
35886
35887
35888  if [ -z "${AS+x}" ]; then
35889    # The variable is not set by user, try to locate tool using the code snippet
35890    for ac_prog in as
35891do
35892  # Extract the first word of "$ac_prog", so it can be a program name with args.
35893set dummy $ac_prog; ac_word=$2
35894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35895$as_echo_n "checking for $ac_word... " >&6; }
35896if ${ac_cv_path_AS+:} false; then :
35897  $as_echo_n "(cached) " >&6
35898else
35899  case $AS in
35900  [\\/]* | ?:[\\/]*)
35901  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35902  ;;
35903  *)
35904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35905for as_dir in $PATH
35906do
35907  IFS=$as_save_IFS
35908  test -z "$as_dir" && as_dir=.
35909    for ac_exec_ext in '' $ac_executable_extensions; do
35910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35911    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35913    break 2
35914  fi
35915done
35916  done
35917IFS=$as_save_IFS
35918
35919  ;;
35920esac
35921fi
35922AS=$ac_cv_path_AS
35923if test -n "$AS"; then
35924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35925$as_echo "$AS" >&6; }
35926else
35927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35928$as_echo "no" >&6; }
35929fi
35930
35931
35932  test -n "$AS" && break
35933done
35934
35935  else
35936    # The variable is set, but is it from the command line or the environment?
35937
35938    # Try to remove the string !AS! from our list.
35939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35941      # If it failed, the variable was not from the command line. Ignore it,
35942      # but warn the user (except for BASH, which is always set by the calling BASH).
35943      if test "xAS" != xBASH; then
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35945$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35946      fi
35947      # Try to locate tool using the code snippet
35948      for ac_prog in as
35949do
35950  # Extract the first word of "$ac_prog", so it can be a program name with args.
35951set dummy $ac_prog; ac_word=$2
35952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35953$as_echo_n "checking for $ac_word... " >&6; }
35954if ${ac_cv_path_AS+:} false; then :
35955  $as_echo_n "(cached) " >&6
35956else
35957  case $AS in
35958  [\\/]* | ?:[\\/]*)
35959  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35960  ;;
35961  *)
35962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35963for as_dir in $PATH
35964do
35965  IFS=$as_save_IFS
35966  test -z "$as_dir" && as_dir=.
35967    for ac_exec_ext in '' $ac_executable_extensions; do
35968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35969    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35971    break 2
35972  fi
35973done
35974  done
35975IFS=$as_save_IFS
35976
35977  ;;
35978esac
35979fi
35980AS=$ac_cv_path_AS
35981if test -n "$AS"; then
35982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35983$as_echo "$AS" >&6; }
35984else
35985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35986$as_echo "no" >&6; }
35987fi
35988
35989
35990  test -n "$AS" && break
35991done
35992
35993    else
35994      # If it succeeded, then it was overridden by the user. We will use it
35995      # for the tool.
35996
35997      # First remove it from the list of overridden variables, so we can test
35998      # for unknown variables in the end.
35999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36000
36001      # Check if we try to supply an empty value
36002      if test "x$AS" = x; then
36003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36004$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36006$as_echo_n "checking for AS... " >&6; }
36007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36008$as_echo "disabled" >&6; }
36009      else
36010        # Check if the provided tool contains a complete path.
36011        tool_specified="$AS"
36012        tool_basename="${tool_specified##*/}"
36013        if test "x$tool_basename" = "x$tool_specified"; then
36014          # A command without a complete path is provided, search $PATH.
36015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36016$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36017          # Extract the first word of "$tool_basename", so it can be a program name with args.
36018set dummy $tool_basename; ac_word=$2
36019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36020$as_echo_n "checking for $ac_word... " >&6; }
36021if ${ac_cv_path_AS+:} false; then :
36022  $as_echo_n "(cached) " >&6
36023else
36024  case $AS in
36025  [\\/]* | ?:[\\/]*)
36026  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36027  ;;
36028  *)
36029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36030for as_dir in $PATH
36031do
36032  IFS=$as_save_IFS
36033  test -z "$as_dir" && as_dir=.
36034    for ac_exec_ext in '' $ac_executable_extensions; do
36035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36036    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36038    break 2
36039  fi
36040done
36041  done
36042IFS=$as_save_IFS
36043
36044  ;;
36045esac
36046fi
36047AS=$ac_cv_path_AS
36048if test -n "$AS"; then
36049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36050$as_echo "$AS" >&6; }
36051else
36052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36053$as_echo "no" >&6; }
36054fi
36055
36056
36057          if test "x$AS" = x; then
36058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36059          fi
36060        else
36061          # Otherwise we believe it is a complete path. Use it as it is.
36062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36063$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36065$as_echo_n "checking for AS... " >&6; }
36066          if test ! -x "$tool_specified"; then
36067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36068$as_echo "not found" >&6; }
36069            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36070          fi
36071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36072$as_echo "$tool_specified" >&6; }
36073        fi
36074      fi
36075    fi
36076
36077  fi
36078
36079
36080
36081  # Only process if variable expands to non-empty
36082
36083  if test "x$AS" != x; then
36084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36085
36086  # First separate the path from the arguments. This will split at the first
36087  # space.
36088  complete="$AS"
36089  path="${complete%% *}"
36090  tmp="$complete EOL"
36091  arguments="${tmp#* }"
36092
36093  # Input might be given as Windows format, start by converting to
36094  # unix format.
36095  new_path=`$CYGPATH -u "$path"`
36096
36097  # Now try to locate executable using which
36098  new_path=`$WHICH "$new_path" 2> /dev/null`
36099  # bat and cmd files are not always considered executable in cygwin causing which
36100  # to not find them
36101  if test "x$new_path" = x \
36102      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36103      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36104    new_path=`$CYGPATH -u "$path"`
36105  fi
36106  if test "x$new_path" = x; then
36107    # Oops. Which didn't find the executable.
36108    # The splitting of arguments from the executable at a space might have been incorrect,
36109    # since paths with space are more likely in Windows. Give it another try with the whole
36110    # argument.
36111    path="$complete"
36112    arguments="EOL"
36113    new_path=`$CYGPATH -u "$path"`
36114    new_path=`$WHICH "$new_path" 2> /dev/null`
36115    # bat and cmd files are not always considered executable in cygwin causing which
36116    # to not find them
36117    if test "x$new_path" = x \
36118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36120      new_path=`$CYGPATH -u "$path"`
36121    fi
36122    if test "x$new_path" = x; then
36123      # It's still not found. Now this is an unrecoverable error.
36124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36125$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36126      has_space=`$ECHO "$complete" | $GREP " "`
36127      if test "x$has_space" != x; then
36128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36130      fi
36131      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36132    fi
36133  fi
36134
36135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36138  # "foo.exe" is OK but "foo" is an error.
36139  #
36140  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36141  # It is also a way to make sure we got the proper file name for the real test later on.
36142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36143  if test "x$test_shortpath" = x; then
36144    # Short path failed, file does not exist as specified.
36145    # Try adding .exe or .cmd
36146    if test -f "${new_path}.exe"; then
36147      input_to_shortpath="${new_path}.exe"
36148    elif test -f "${new_path}.cmd"; then
36149      input_to_shortpath="${new_path}.cmd"
36150    else
36151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36152$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36155      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36156    fi
36157  else
36158    input_to_shortpath="$new_path"
36159  fi
36160
36161  # Call helper function which possibly converts this using DOS-style short mode.
36162  # If so, the updated path is stored in $new_path.
36163  new_path="$input_to_shortpath"
36164
36165  input_path="$input_to_shortpath"
36166  # Check if we need to convert this using DOS-style short mode. If the path
36167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36168  # take no chances and rewrite it.
36169  # Note: m4 eats our [], so we need to use [ and ] instead.
36170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36171  if test "x$has_forbidden_chars" != x; then
36172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36176      # Going to short mode and back again did indeed matter. Since short mode is
36177      # case insensitive, let's make it lowercase to improve readability.
36178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36179      # Now convert it back to Unix-style (cygpath)
36180      input_path=`$CYGPATH -u "$shortmode_path"`
36181      new_path="$input_path"
36182    fi
36183  fi
36184
36185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36186  if test "x$test_cygdrive_prefix" = x; then
36187    # As a simple fix, exclude /usr/bin since it's not a real path.
36188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36190      # a path prefixed by /cygdrive for fixpath to work.
36191      new_path="$CYGWIN_ROOT_PATH$input_path"
36192    fi
36193  fi
36194
36195  # remove trailing .exe if any
36196  new_path="${new_path/%.exe/}"
36197
36198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36199
36200  # First separate the path from the arguments. This will split at the first
36201  # space.
36202  complete="$AS"
36203  path="${complete%% *}"
36204  tmp="$complete EOL"
36205  arguments="${tmp#* }"
36206
36207  # Input might be given as Windows format, start by converting to
36208  # unix format.
36209  new_path="$path"
36210
36211  windows_path="$new_path"
36212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36213    unix_path=`$CYGPATH -u "$windows_path"`
36214    new_path="$unix_path"
36215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36217    new_path="$unix_path"
36218  fi
36219
36220
36221  # Now try to locate executable using which
36222  new_path=`$WHICH "$new_path" 2> /dev/null`
36223
36224  if test "x$new_path" = x; then
36225    # Oops. Which didn't find the executable.
36226    # The splitting of arguments from the executable at a space might have been incorrect,
36227    # since paths with space are more likely in Windows. Give it another try with the whole
36228    # argument.
36229    path="$complete"
36230    arguments="EOL"
36231    new_path="$path"
36232
36233  windows_path="$new_path"
36234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36235    unix_path=`$CYGPATH -u "$windows_path"`
36236    new_path="$unix_path"
36237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36239    new_path="$unix_path"
36240  fi
36241
36242
36243    new_path=`$WHICH "$new_path" 2> /dev/null`
36244    # bat and cmd files are not always considered executable in MSYS causing which
36245    # to not find them
36246    if test "x$new_path" = x \
36247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36249      new_path="$path"
36250
36251  windows_path="$new_path"
36252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36253    unix_path=`$CYGPATH -u "$windows_path"`
36254    new_path="$unix_path"
36255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36257    new_path="$unix_path"
36258  fi
36259
36260    fi
36261
36262    if test "x$new_path" = x; then
36263      # It's still not found. Now this is an unrecoverable error.
36264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36265$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36266      has_space=`$ECHO "$complete" | $GREP " "`
36267      if test "x$has_space" != x; then
36268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36270      fi
36271      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36272    fi
36273  fi
36274
36275  # Now new_path has a complete unix path to the binary
36276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36277    # Keep paths in /bin as-is, but remove trailing .exe if any
36278    new_path="${new_path/%.exe/}"
36279    # Do not save /bin paths to all_fixpath_prefixes!
36280  else
36281    # Not in mixed or Windows style, start by that.
36282    new_path=`cmd //c echo $new_path`
36283
36284  input_path="$new_path"
36285  # Check if we need to convert this using DOS-style short mode. If the path
36286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36287  # take no chances and rewrite it.
36288  # Note: m4 eats our [], so we need to use [ and ] instead.
36289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36290  if test "x$has_forbidden_chars" != x; then
36291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36293  fi
36294
36295    # Output is in $new_path
36296
36297  windows_path="$new_path"
36298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36299    unix_path=`$CYGPATH -u "$windows_path"`
36300    new_path="$unix_path"
36301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36303    new_path="$unix_path"
36304  fi
36305
36306    # remove trailing .exe if any
36307    new_path="${new_path/%.exe/}"
36308
36309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36311  fi
36312
36313    else
36314      # We're on a unix platform. Hooray! :)
36315      # First separate the path from the arguments. This will split at the first
36316      # space.
36317      complete="$AS"
36318      path="${complete%% *}"
36319      tmp="$complete EOL"
36320      arguments="${tmp#* }"
36321
36322      # Cannot rely on the command "which" here since it doesn't always work.
36323      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36324      if test -z "$is_absolute_path"; then
36325        # Path to executable is not absolute. Find it.
36326        IFS_save="$IFS"
36327        IFS=:
36328        for p in $PATH; do
36329          if test -f "$p/$path" && test -x "$p/$path"; then
36330            new_path="$p/$path"
36331            break
36332          fi
36333        done
36334        IFS="$IFS_save"
36335      else
36336        # This is an absolute path, we can use it without further modifications.
36337        new_path="$path"
36338      fi
36339
36340      if test "x$new_path" = x; then
36341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36342$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36343        has_space=`$ECHO "$complete" | $GREP " "`
36344        if test "x$has_space" != x; then
36345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36347        fi
36348        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36349      fi
36350    fi
36351
36352    # Now join together the path and the arguments once again
36353    if test "x$arguments" != xEOL; then
36354      new_complete="$new_path ${arguments% *}"
36355    else
36356      new_complete="$new_path"
36357    fi
36358
36359    if test "x$complete" != "x$new_complete"; then
36360      AS="$new_complete"
36361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36362$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36363    fi
36364  fi
36365
36366  else
36367    # FIXME: is this correct for microsoft?
36368    AS="$CC -c"
36369  fi
36370
36371
36372  #
36373  # Setup the archiver (AR)
36374  #
36375  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36376    # The corresponding ar tool is lib.exe (used to create static libraries)
36377    # Extract the first word of "lib", so it can be a program name with args.
36378set dummy lib; ac_word=$2
36379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36380$as_echo_n "checking for $ac_word... " >&6; }
36381if ${ac_cv_prog_AR+:} false; then :
36382  $as_echo_n "(cached) " >&6
36383else
36384  if test -n "$AR"; then
36385  ac_cv_prog_AR="$AR" # Let the user override the test.
36386else
36387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36388for as_dir in $PATH
36389do
36390  IFS=$as_save_IFS
36391  test -z "$as_dir" && as_dir=.
36392    for ac_exec_ext in '' $ac_executable_extensions; do
36393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36394    ac_cv_prog_AR="lib"
36395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36396    break 2
36397  fi
36398done
36399  done
36400IFS=$as_save_IFS
36401
36402fi
36403fi
36404AR=$ac_cv_prog_AR
36405if test -n "$AR"; then
36406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36407$as_echo "$AR" >&6; }
36408else
36409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36410$as_echo "no" >&6; }
36411fi
36412
36413
36414  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36415
36416
36417  # Publish this variable in the help.
36418
36419
36420  if [ -z "${AR+x}" ]; then
36421    # The variable is not set by user, try to locate tool using the code snippet
36422    if test -n "$ac_tool_prefix"; then
36423  for ac_prog in ar gcc-ar
36424  do
36425    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36426set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36428$as_echo_n "checking for $ac_word... " >&6; }
36429if ${ac_cv_prog_AR+:} false; then :
36430  $as_echo_n "(cached) " >&6
36431else
36432  if test -n "$AR"; then
36433  ac_cv_prog_AR="$AR" # Let the user override the test.
36434else
36435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36436for as_dir in $PATH
36437do
36438  IFS=$as_save_IFS
36439  test -z "$as_dir" && as_dir=.
36440    for ac_exec_ext in '' $ac_executable_extensions; do
36441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36442    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36444    break 2
36445  fi
36446done
36447  done
36448IFS=$as_save_IFS
36449
36450fi
36451fi
36452AR=$ac_cv_prog_AR
36453if test -n "$AR"; then
36454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36455$as_echo "$AR" >&6; }
36456else
36457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36458$as_echo "no" >&6; }
36459fi
36460
36461
36462    test -n "$AR" && break
36463  done
36464fi
36465if test -z "$AR"; then
36466  ac_ct_AR=$AR
36467  for ac_prog in ar gcc-ar
36468do
36469  # Extract the first word of "$ac_prog", so it can be a program name with args.
36470set dummy $ac_prog; ac_word=$2
36471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36472$as_echo_n "checking for $ac_word... " >&6; }
36473if ${ac_cv_prog_ac_ct_AR+:} false; then :
36474  $as_echo_n "(cached) " >&6
36475else
36476  if test -n "$ac_ct_AR"; then
36477  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36478else
36479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36480for as_dir in $PATH
36481do
36482  IFS=$as_save_IFS
36483  test -z "$as_dir" && as_dir=.
36484    for ac_exec_ext in '' $ac_executable_extensions; do
36485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36486    ac_cv_prog_ac_ct_AR="$ac_prog"
36487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36488    break 2
36489  fi
36490done
36491  done
36492IFS=$as_save_IFS
36493
36494fi
36495fi
36496ac_ct_AR=$ac_cv_prog_ac_ct_AR
36497if test -n "$ac_ct_AR"; then
36498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36499$as_echo "$ac_ct_AR" >&6; }
36500else
36501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36502$as_echo "no" >&6; }
36503fi
36504
36505
36506  test -n "$ac_ct_AR" && break
36507done
36508
36509  if test "x$ac_ct_AR" = x; then
36510    AR=""
36511  else
36512    case $cross_compiling:$ac_tool_warned in
36513yes:)
36514{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36515$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36516ac_tool_warned=yes ;;
36517esac
36518    AR=$ac_ct_AR
36519  fi
36520fi
36521
36522  else
36523    # The variable is set, but is it from the command line or the environment?
36524
36525    # Try to remove the string !AR! from our list.
36526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36528      # If it failed, the variable was not from the command line. Ignore it,
36529      # but warn the user (except for BASH, which is always set by the calling BASH).
36530      if test "xAR" != xBASH; then
36531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36532$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36533      fi
36534      # Try to locate tool using the code snippet
36535      if test -n "$ac_tool_prefix"; then
36536  for ac_prog in ar gcc-ar
36537  do
36538    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36539set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36541$as_echo_n "checking for $ac_word... " >&6; }
36542if ${ac_cv_prog_AR+:} false; then :
36543  $as_echo_n "(cached) " >&6
36544else
36545  if test -n "$AR"; then
36546  ac_cv_prog_AR="$AR" # Let the user override the test.
36547else
36548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36549for as_dir in $PATH
36550do
36551  IFS=$as_save_IFS
36552  test -z "$as_dir" && as_dir=.
36553    for ac_exec_ext in '' $ac_executable_extensions; do
36554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36555    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36557    break 2
36558  fi
36559done
36560  done
36561IFS=$as_save_IFS
36562
36563fi
36564fi
36565AR=$ac_cv_prog_AR
36566if test -n "$AR"; then
36567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36568$as_echo "$AR" >&6; }
36569else
36570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36571$as_echo "no" >&6; }
36572fi
36573
36574
36575    test -n "$AR" && break
36576  done
36577fi
36578if test -z "$AR"; then
36579  ac_ct_AR=$AR
36580  for ac_prog in ar gcc-ar
36581do
36582  # Extract the first word of "$ac_prog", so it can be a program name with args.
36583set dummy $ac_prog; ac_word=$2
36584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36585$as_echo_n "checking for $ac_word... " >&6; }
36586if ${ac_cv_prog_ac_ct_AR+:} false; then :
36587  $as_echo_n "(cached) " >&6
36588else
36589  if test -n "$ac_ct_AR"; then
36590  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36591else
36592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36593for as_dir in $PATH
36594do
36595  IFS=$as_save_IFS
36596  test -z "$as_dir" && as_dir=.
36597    for ac_exec_ext in '' $ac_executable_extensions; do
36598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36599    ac_cv_prog_ac_ct_AR="$ac_prog"
36600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36601    break 2
36602  fi
36603done
36604  done
36605IFS=$as_save_IFS
36606
36607fi
36608fi
36609ac_ct_AR=$ac_cv_prog_ac_ct_AR
36610if test -n "$ac_ct_AR"; then
36611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36612$as_echo "$ac_ct_AR" >&6; }
36613else
36614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36615$as_echo "no" >&6; }
36616fi
36617
36618
36619  test -n "$ac_ct_AR" && break
36620done
36621
36622  if test "x$ac_ct_AR" = x; then
36623    AR=""
36624  else
36625    case $cross_compiling:$ac_tool_warned in
36626yes:)
36627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36629ac_tool_warned=yes ;;
36630esac
36631    AR=$ac_ct_AR
36632  fi
36633fi
36634
36635    else
36636      # If it succeeded, then it was overridden by the user. We will use it
36637      # for the tool.
36638
36639      # First remove it from the list of overridden variables, so we can test
36640      # for unknown variables in the end.
36641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36642
36643      # Check if we try to supply an empty value
36644      if test "x$AR" = x; then
36645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36646$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36648$as_echo_n "checking for AR... " >&6; }
36649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36650$as_echo "disabled" >&6; }
36651      else
36652        # Check if the provided tool contains a complete path.
36653        tool_specified="$AR"
36654        tool_basename="${tool_specified##*/}"
36655        if test "x$tool_basename" = "x$tool_specified"; then
36656          # A command without a complete path is provided, search $PATH.
36657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36658$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36659          # Extract the first word of "$tool_basename", so it can be a program name with args.
36660set dummy $tool_basename; ac_word=$2
36661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36662$as_echo_n "checking for $ac_word... " >&6; }
36663if ${ac_cv_path_AR+:} false; then :
36664  $as_echo_n "(cached) " >&6
36665else
36666  case $AR in
36667  [\\/]* | ?:[\\/]*)
36668  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36669  ;;
36670  *)
36671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36672for as_dir in $PATH
36673do
36674  IFS=$as_save_IFS
36675  test -z "$as_dir" && as_dir=.
36676    for ac_exec_ext in '' $ac_executable_extensions; do
36677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36678    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36680    break 2
36681  fi
36682done
36683  done
36684IFS=$as_save_IFS
36685
36686  ;;
36687esac
36688fi
36689AR=$ac_cv_path_AR
36690if test -n "$AR"; then
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36692$as_echo "$AR" >&6; }
36693else
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36695$as_echo "no" >&6; }
36696fi
36697
36698
36699          if test "x$AR" = x; then
36700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36701          fi
36702        else
36703          # Otherwise we believe it is a complete path. Use it as it is.
36704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36705$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36707$as_echo_n "checking for AR... " >&6; }
36708          if test ! -x "$tool_specified"; then
36709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36710$as_echo "not found" >&6; }
36711            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36712          fi
36713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36714$as_echo "$tool_specified" >&6; }
36715        fi
36716      fi
36717    fi
36718
36719  fi
36720
36721
36722  else
36723
36724
36725  # Publish this variable in the help.
36726
36727
36728  if [ -z "${AR+x}" ]; then
36729    # The variable is not set by user, try to locate tool using the code snippet
36730    if test -n "$ac_tool_prefix"; then
36731  for ac_prog in ar
36732  do
36733    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36736$as_echo_n "checking for $ac_word... " >&6; }
36737if ${ac_cv_prog_AR+:} false; then :
36738  $as_echo_n "(cached) " >&6
36739else
36740  if test -n "$AR"; then
36741  ac_cv_prog_AR="$AR" # Let the user override the test.
36742else
36743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36744for as_dir in $PATH
36745do
36746  IFS=$as_save_IFS
36747  test -z "$as_dir" && as_dir=.
36748    for ac_exec_ext in '' $ac_executable_extensions; do
36749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36750    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36752    break 2
36753  fi
36754done
36755  done
36756IFS=$as_save_IFS
36757
36758fi
36759fi
36760AR=$ac_cv_prog_AR
36761if test -n "$AR"; then
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36763$as_echo "$AR" >&6; }
36764else
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36766$as_echo "no" >&6; }
36767fi
36768
36769
36770    test -n "$AR" && break
36771  done
36772fi
36773if test -z "$AR"; then
36774  ac_ct_AR=$AR
36775  for ac_prog in ar
36776do
36777  # Extract the first word of "$ac_prog", so it can be a program name with args.
36778set dummy $ac_prog; ac_word=$2
36779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36780$as_echo_n "checking for $ac_word... " >&6; }
36781if ${ac_cv_prog_ac_ct_AR+:} false; then :
36782  $as_echo_n "(cached) " >&6
36783else
36784  if test -n "$ac_ct_AR"; then
36785  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36786else
36787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36788for as_dir in $PATH
36789do
36790  IFS=$as_save_IFS
36791  test -z "$as_dir" && as_dir=.
36792    for ac_exec_ext in '' $ac_executable_extensions; do
36793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36794    ac_cv_prog_ac_ct_AR="$ac_prog"
36795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36796    break 2
36797  fi
36798done
36799  done
36800IFS=$as_save_IFS
36801
36802fi
36803fi
36804ac_ct_AR=$ac_cv_prog_ac_ct_AR
36805if test -n "$ac_ct_AR"; then
36806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36807$as_echo "$ac_ct_AR" >&6; }
36808else
36809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36810$as_echo "no" >&6; }
36811fi
36812
36813
36814  test -n "$ac_ct_AR" && break
36815done
36816
36817  if test "x$ac_ct_AR" = x; then
36818    AR=""
36819  else
36820    case $cross_compiling:$ac_tool_warned in
36821yes:)
36822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36824ac_tool_warned=yes ;;
36825esac
36826    AR=$ac_ct_AR
36827  fi
36828fi
36829
36830  else
36831    # The variable is set, but is it from the command line or the environment?
36832
36833    # Try to remove the string !AR! from our list.
36834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36836      # If it failed, the variable was not from the command line. Ignore it,
36837      # but warn the user (except for BASH, which is always set by the calling BASH).
36838      if test "xAR" != xBASH; then
36839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36840$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36841      fi
36842      # Try to locate tool using the code snippet
36843      if test -n "$ac_tool_prefix"; then
36844  for ac_prog in ar
36845  do
36846    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36847set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36849$as_echo_n "checking for $ac_word... " >&6; }
36850if ${ac_cv_prog_AR+:} false; then :
36851  $as_echo_n "(cached) " >&6
36852else
36853  if test -n "$AR"; then
36854  ac_cv_prog_AR="$AR" # Let the user override the test.
36855else
36856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36857for as_dir in $PATH
36858do
36859  IFS=$as_save_IFS
36860  test -z "$as_dir" && as_dir=.
36861    for ac_exec_ext in '' $ac_executable_extensions; do
36862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36863    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36865    break 2
36866  fi
36867done
36868  done
36869IFS=$as_save_IFS
36870
36871fi
36872fi
36873AR=$ac_cv_prog_AR
36874if test -n "$AR"; then
36875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36876$as_echo "$AR" >&6; }
36877else
36878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36879$as_echo "no" >&6; }
36880fi
36881
36882
36883    test -n "$AR" && break
36884  done
36885fi
36886if test -z "$AR"; then
36887  ac_ct_AR=$AR
36888  for ac_prog in ar
36889do
36890  # Extract the first word of "$ac_prog", so it can be a program name with args.
36891set dummy $ac_prog; ac_word=$2
36892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36893$as_echo_n "checking for $ac_word... " >&6; }
36894if ${ac_cv_prog_ac_ct_AR+:} false; then :
36895  $as_echo_n "(cached) " >&6
36896else
36897  if test -n "$ac_ct_AR"; then
36898  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36899else
36900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36901for as_dir in $PATH
36902do
36903  IFS=$as_save_IFS
36904  test -z "$as_dir" && as_dir=.
36905    for ac_exec_ext in '' $ac_executable_extensions; do
36906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36907    ac_cv_prog_ac_ct_AR="$ac_prog"
36908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36909    break 2
36910  fi
36911done
36912  done
36913IFS=$as_save_IFS
36914
36915fi
36916fi
36917ac_ct_AR=$ac_cv_prog_ac_ct_AR
36918if test -n "$ac_ct_AR"; then
36919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36920$as_echo "$ac_ct_AR" >&6; }
36921else
36922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36923$as_echo "no" >&6; }
36924fi
36925
36926
36927  test -n "$ac_ct_AR" && break
36928done
36929
36930  if test "x$ac_ct_AR" = x; then
36931    AR=""
36932  else
36933    case $cross_compiling:$ac_tool_warned in
36934yes:)
36935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36937ac_tool_warned=yes ;;
36938esac
36939    AR=$ac_ct_AR
36940  fi
36941fi
36942
36943    else
36944      # If it succeeded, then it was overridden by the user. We will use it
36945      # for the tool.
36946
36947      # First remove it from the list of overridden variables, so we can test
36948      # for unknown variables in the end.
36949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36950
36951      # Check if we try to supply an empty value
36952      if test "x$AR" = x; then
36953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36954$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36956$as_echo_n "checking for AR... " >&6; }
36957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36958$as_echo "disabled" >&6; }
36959      else
36960        # Check if the provided tool contains a complete path.
36961        tool_specified="$AR"
36962        tool_basename="${tool_specified##*/}"
36963        if test "x$tool_basename" = "x$tool_specified"; then
36964          # A command without a complete path is provided, search $PATH.
36965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36966$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36967          # Extract the first word of "$tool_basename", so it can be a program name with args.
36968set dummy $tool_basename; ac_word=$2
36969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36970$as_echo_n "checking for $ac_word... " >&6; }
36971if ${ac_cv_path_AR+:} false; then :
36972  $as_echo_n "(cached) " >&6
36973else
36974  case $AR in
36975  [\\/]* | ?:[\\/]*)
36976  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36977  ;;
36978  *)
36979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36980for as_dir in $PATH
36981do
36982  IFS=$as_save_IFS
36983  test -z "$as_dir" && as_dir=.
36984    for ac_exec_ext in '' $ac_executable_extensions; do
36985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36986    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36988    break 2
36989  fi
36990done
36991  done
36992IFS=$as_save_IFS
36993
36994  ;;
36995esac
36996fi
36997AR=$ac_cv_path_AR
36998if test -n "$AR"; then
36999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37000$as_echo "$AR" >&6; }
37001else
37002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37003$as_echo "no" >&6; }
37004fi
37005
37006
37007          if test "x$AR" = x; then
37008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37009          fi
37010        else
37011          # Otherwise we believe it is a complete path. Use it as it is.
37012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37013$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37015$as_echo_n "checking for AR... " >&6; }
37016          if test ! -x "$tool_specified"; then
37017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37018$as_echo "not found" >&6; }
37019            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37020          fi
37021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37022$as_echo "$tool_specified" >&6; }
37023        fi
37024      fi
37025    fi
37026
37027  fi
37028
37029
37030  fi
37031
37032  # Only process if variable expands to non-empty
37033
37034  if test "x$AR" != x; then
37035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37036
37037  # First separate the path from the arguments. This will split at the first
37038  # space.
37039  complete="$AR"
37040  path="${complete%% *}"
37041  tmp="$complete EOL"
37042  arguments="${tmp#* }"
37043
37044  # Input might be given as Windows format, start by converting to
37045  # unix format.
37046  new_path=`$CYGPATH -u "$path"`
37047
37048  # Now try to locate executable using which
37049  new_path=`$WHICH "$new_path" 2> /dev/null`
37050  # bat and cmd files are not always considered executable in cygwin causing which
37051  # to not find them
37052  if test "x$new_path" = x \
37053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37055    new_path=`$CYGPATH -u "$path"`
37056  fi
37057  if test "x$new_path" = x; then
37058    # Oops. Which didn't find the executable.
37059    # The splitting of arguments from the executable at a space might have been incorrect,
37060    # since paths with space are more likely in Windows. Give it another try with the whole
37061    # argument.
37062    path="$complete"
37063    arguments="EOL"
37064    new_path=`$CYGPATH -u "$path"`
37065    new_path=`$WHICH "$new_path" 2> /dev/null`
37066    # bat and cmd files are not always considered executable in cygwin causing which
37067    # to not find them
37068    if test "x$new_path" = x \
37069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37071      new_path=`$CYGPATH -u "$path"`
37072    fi
37073    if test "x$new_path" = x; then
37074      # It's still not found. Now this is an unrecoverable error.
37075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37076$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37077      has_space=`$ECHO "$complete" | $GREP " "`
37078      if test "x$has_space" != x; then
37079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37081      fi
37082      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37083    fi
37084  fi
37085
37086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37089  # "foo.exe" is OK but "foo" is an error.
37090  #
37091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37092  # It is also a way to make sure we got the proper file name for the real test later on.
37093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37094  if test "x$test_shortpath" = x; then
37095    # Short path failed, file does not exist as specified.
37096    # Try adding .exe or .cmd
37097    if test -f "${new_path}.exe"; then
37098      input_to_shortpath="${new_path}.exe"
37099    elif test -f "${new_path}.cmd"; then
37100      input_to_shortpath="${new_path}.cmd"
37101    else
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37103$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37106      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37107    fi
37108  else
37109    input_to_shortpath="$new_path"
37110  fi
37111
37112  # Call helper function which possibly converts this using DOS-style short mode.
37113  # If so, the updated path is stored in $new_path.
37114  new_path="$input_to_shortpath"
37115
37116  input_path="$input_to_shortpath"
37117  # Check if we need to convert this using DOS-style short mode. If the path
37118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37119  # take no chances and rewrite it.
37120  # Note: m4 eats our [], so we need to use [ and ] instead.
37121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37122  if test "x$has_forbidden_chars" != x; then
37123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37127      # Going to short mode and back again did indeed matter. Since short mode is
37128      # case insensitive, let's make it lowercase to improve readability.
37129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37130      # Now convert it back to Unix-style (cygpath)
37131      input_path=`$CYGPATH -u "$shortmode_path"`
37132      new_path="$input_path"
37133    fi
37134  fi
37135
37136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37137  if test "x$test_cygdrive_prefix" = x; then
37138    # As a simple fix, exclude /usr/bin since it's not a real path.
37139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37141      # a path prefixed by /cygdrive for fixpath to work.
37142      new_path="$CYGWIN_ROOT_PATH$input_path"
37143    fi
37144  fi
37145
37146  # remove trailing .exe if any
37147  new_path="${new_path/%.exe/}"
37148
37149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37150
37151  # First separate the path from the arguments. This will split at the first
37152  # space.
37153  complete="$AR"
37154  path="${complete%% *}"
37155  tmp="$complete EOL"
37156  arguments="${tmp#* }"
37157
37158  # Input might be given as Windows format, start by converting to
37159  # unix format.
37160  new_path="$path"
37161
37162  windows_path="$new_path"
37163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37164    unix_path=`$CYGPATH -u "$windows_path"`
37165    new_path="$unix_path"
37166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37168    new_path="$unix_path"
37169  fi
37170
37171
37172  # Now try to locate executable using which
37173  new_path=`$WHICH "$new_path" 2> /dev/null`
37174
37175  if test "x$new_path" = x; then
37176    # Oops. Which didn't find the executable.
37177    # The splitting of arguments from the executable at a space might have been incorrect,
37178    # since paths with space are more likely in Windows. Give it another try with the whole
37179    # argument.
37180    path="$complete"
37181    arguments="EOL"
37182    new_path="$path"
37183
37184  windows_path="$new_path"
37185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37186    unix_path=`$CYGPATH -u "$windows_path"`
37187    new_path="$unix_path"
37188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37190    new_path="$unix_path"
37191  fi
37192
37193
37194    new_path=`$WHICH "$new_path" 2> /dev/null`
37195    # bat and cmd files are not always considered executable in MSYS causing which
37196    # to not find them
37197    if test "x$new_path" = x \
37198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37200      new_path="$path"
37201
37202  windows_path="$new_path"
37203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37204    unix_path=`$CYGPATH -u "$windows_path"`
37205    new_path="$unix_path"
37206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37208    new_path="$unix_path"
37209  fi
37210
37211    fi
37212
37213    if test "x$new_path" = x; then
37214      # It's still not found. Now this is an unrecoverable error.
37215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37216$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37217      has_space=`$ECHO "$complete" | $GREP " "`
37218      if test "x$has_space" != x; then
37219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37221      fi
37222      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37223    fi
37224  fi
37225
37226  # Now new_path has a complete unix path to the binary
37227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37228    # Keep paths in /bin as-is, but remove trailing .exe if any
37229    new_path="${new_path/%.exe/}"
37230    # Do not save /bin paths to all_fixpath_prefixes!
37231  else
37232    # Not in mixed or Windows style, start by that.
37233    new_path=`cmd //c echo $new_path`
37234
37235  input_path="$new_path"
37236  # Check if we need to convert this using DOS-style short mode. If the path
37237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37238  # take no chances and rewrite it.
37239  # Note: m4 eats our [], so we need to use [ and ] instead.
37240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37241  if test "x$has_forbidden_chars" != x; then
37242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37244  fi
37245
37246    # Output is in $new_path
37247
37248  windows_path="$new_path"
37249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37250    unix_path=`$CYGPATH -u "$windows_path"`
37251    new_path="$unix_path"
37252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37254    new_path="$unix_path"
37255  fi
37256
37257    # remove trailing .exe if any
37258    new_path="${new_path/%.exe/}"
37259
37260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37262  fi
37263
37264    else
37265      # We're on a unix platform. Hooray! :)
37266      # First separate the path from the arguments. This will split at the first
37267      # space.
37268      complete="$AR"
37269      path="${complete%% *}"
37270      tmp="$complete EOL"
37271      arguments="${tmp#* }"
37272
37273      # Cannot rely on the command "which" here since it doesn't always work.
37274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37275      if test -z "$is_absolute_path"; then
37276        # Path to executable is not absolute. Find it.
37277        IFS_save="$IFS"
37278        IFS=:
37279        for p in $PATH; do
37280          if test -f "$p/$path" && test -x "$p/$path"; then
37281            new_path="$p/$path"
37282            break
37283          fi
37284        done
37285        IFS="$IFS_save"
37286      else
37287        # This is an absolute path, we can use it without further modifications.
37288        new_path="$path"
37289      fi
37290
37291      if test "x$new_path" = x; then
37292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37293$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37294        has_space=`$ECHO "$complete" | $GREP " "`
37295        if test "x$has_space" != x; then
37296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37298        fi
37299        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37300      fi
37301    fi
37302
37303    # Now join together the path and the arguments once again
37304    if test "x$arguments" != xEOL; then
37305      new_complete="$new_path ${arguments% *}"
37306    else
37307      new_complete="$new_path"
37308    fi
37309
37310    if test "x$complete" != "x$new_complete"; then
37311      AR="$new_complete"
37312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37313$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37314    fi
37315  fi
37316
37317
37318
37319  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37320
37321
37322  # Publish this variable in the help.
37323
37324
37325  if [ -z "${LIPO+x}" ]; then
37326    # The variable is not set by user, try to locate tool using the code snippet
37327    for ac_prog in lipo
37328do
37329  # Extract the first word of "$ac_prog", so it can be a program name with args.
37330set dummy $ac_prog; ac_word=$2
37331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37332$as_echo_n "checking for $ac_word... " >&6; }
37333if ${ac_cv_path_LIPO+:} false; then :
37334  $as_echo_n "(cached) " >&6
37335else
37336  case $LIPO in
37337  [\\/]* | ?:[\\/]*)
37338  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37339  ;;
37340  *)
37341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37342for as_dir in $PATH
37343do
37344  IFS=$as_save_IFS
37345  test -z "$as_dir" && as_dir=.
37346    for ac_exec_ext in '' $ac_executable_extensions; do
37347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37348    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37350    break 2
37351  fi
37352done
37353  done
37354IFS=$as_save_IFS
37355
37356  ;;
37357esac
37358fi
37359LIPO=$ac_cv_path_LIPO
37360if test -n "$LIPO"; then
37361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37362$as_echo "$LIPO" >&6; }
37363else
37364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37365$as_echo "no" >&6; }
37366fi
37367
37368
37369  test -n "$LIPO" && break
37370done
37371
37372  else
37373    # The variable is set, but is it from the command line or the environment?
37374
37375    # Try to remove the string !LIPO! from our list.
37376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37378      # If it failed, the variable was not from the command line. Ignore it,
37379      # but warn the user (except for BASH, which is always set by the calling BASH).
37380      if test "xLIPO" != xBASH; then
37381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37382$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37383      fi
37384      # Try to locate tool using the code snippet
37385      for ac_prog in lipo
37386do
37387  # Extract the first word of "$ac_prog", so it can be a program name with args.
37388set dummy $ac_prog; ac_word=$2
37389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37390$as_echo_n "checking for $ac_word... " >&6; }
37391if ${ac_cv_path_LIPO+:} false; then :
37392  $as_echo_n "(cached) " >&6
37393else
37394  case $LIPO in
37395  [\\/]* | ?:[\\/]*)
37396  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37397  ;;
37398  *)
37399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37400for as_dir in $PATH
37401do
37402  IFS=$as_save_IFS
37403  test -z "$as_dir" && as_dir=.
37404    for ac_exec_ext in '' $ac_executable_extensions; do
37405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37406    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37408    break 2
37409  fi
37410done
37411  done
37412IFS=$as_save_IFS
37413
37414  ;;
37415esac
37416fi
37417LIPO=$ac_cv_path_LIPO
37418if test -n "$LIPO"; then
37419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37420$as_echo "$LIPO" >&6; }
37421else
37422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37423$as_echo "no" >&6; }
37424fi
37425
37426
37427  test -n "$LIPO" && break
37428done
37429
37430    else
37431      # If it succeeded, then it was overridden by the user. We will use it
37432      # for the tool.
37433
37434      # First remove it from the list of overridden variables, so we can test
37435      # for unknown variables in the end.
37436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37437
37438      # Check if we try to supply an empty value
37439      if test "x$LIPO" = x; then
37440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37441$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37443$as_echo_n "checking for LIPO... " >&6; }
37444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37445$as_echo "disabled" >&6; }
37446      else
37447        # Check if the provided tool contains a complete path.
37448        tool_specified="$LIPO"
37449        tool_basename="${tool_specified##*/}"
37450        if test "x$tool_basename" = "x$tool_specified"; then
37451          # A command without a complete path is provided, search $PATH.
37452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37453$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37454          # Extract the first word of "$tool_basename", so it can be a program name with args.
37455set dummy $tool_basename; ac_word=$2
37456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457$as_echo_n "checking for $ac_word... " >&6; }
37458if ${ac_cv_path_LIPO+:} false; then :
37459  $as_echo_n "(cached) " >&6
37460else
37461  case $LIPO in
37462  [\\/]* | ?:[\\/]*)
37463  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37464  ;;
37465  *)
37466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37467for as_dir in $PATH
37468do
37469  IFS=$as_save_IFS
37470  test -z "$as_dir" && as_dir=.
37471    for ac_exec_ext in '' $ac_executable_extensions; do
37472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37473    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37475    break 2
37476  fi
37477done
37478  done
37479IFS=$as_save_IFS
37480
37481  ;;
37482esac
37483fi
37484LIPO=$ac_cv_path_LIPO
37485if test -n "$LIPO"; then
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37487$as_echo "$LIPO" >&6; }
37488else
37489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37490$as_echo "no" >&6; }
37491fi
37492
37493
37494          if test "x$LIPO" = x; then
37495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37496          fi
37497        else
37498          # Otherwise we believe it is a complete path. Use it as it is.
37499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37500$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37502$as_echo_n "checking for LIPO... " >&6; }
37503          if test ! -x "$tool_specified"; then
37504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37505$as_echo "not found" >&6; }
37506            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37507          fi
37508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37509$as_echo "$tool_specified" >&6; }
37510        fi
37511      fi
37512    fi
37513
37514  fi
37515
37516
37517
37518  # Only process if variable expands to non-empty
37519
37520  if test "x$LIPO" != x; then
37521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37522
37523  # First separate the path from the arguments. This will split at the first
37524  # space.
37525  complete="$LIPO"
37526  path="${complete%% *}"
37527  tmp="$complete EOL"
37528  arguments="${tmp#* }"
37529
37530  # Input might be given as Windows format, start by converting to
37531  # unix format.
37532  new_path=`$CYGPATH -u "$path"`
37533
37534  # Now try to locate executable using which
37535  new_path=`$WHICH "$new_path" 2> /dev/null`
37536  # bat and cmd files are not always considered executable in cygwin causing which
37537  # to not find them
37538  if test "x$new_path" = x \
37539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37541    new_path=`$CYGPATH -u "$path"`
37542  fi
37543  if test "x$new_path" = x; then
37544    # Oops. Which didn't find the executable.
37545    # The splitting of arguments from the executable at a space might have been incorrect,
37546    # since paths with space are more likely in Windows. Give it another try with the whole
37547    # argument.
37548    path="$complete"
37549    arguments="EOL"
37550    new_path=`$CYGPATH -u "$path"`
37551    new_path=`$WHICH "$new_path" 2> /dev/null`
37552    # bat and cmd files are not always considered executable in cygwin causing which
37553    # to not find them
37554    if test "x$new_path" = x \
37555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37557      new_path=`$CYGPATH -u "$path"`
37558    fi
37559    if test "x$new_path" = x; then
37560      # It's still not found. Now this is an unrecoverable error.
37561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37562$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37563      has_space=`$ECHO "$complete" | $GREP " "`
37564      if test "x$has_space" != x; then
37565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37567      fi
37568      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37569    fi
37570  fi
37571
37572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37575  # "foo.exe" is OK but "foo" is an error.
37576  #
37577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37578  # It is also a way to make sure we got the proper file name for the real test later on.
37579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37580  if test "x$test_shortpath" = x; then
37581    # Short path failed, file does not exist as specified.
37582    # Try adding .exe or .cmd
37583    if test -f "${new_path}.exe"; then
37584      input_to_shortpath="${new_path}.exe"
37585    elif test -f "${new_path}.cmd"; then
37586      input_to_shortpath="${new_path}.cmd"
37587    else
37588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37589$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37592      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37593    fi
37594  else
37595    input_to_shortpath="$new_path"
37596  fi
37597
37598  # Call helper function which possibly converts this using DOS-style short mode.
37599  # If so, the updated path is stored in $new_path.
37600  new_path="$input_to_shortpath"
37601
37602  input_path="$input_to_shortpath"
37603  # Check if we need to convert this using DOS-style short mode. If the path
37604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37605  # take no chances and rewrite it.
37606  # Note: m4 eats our [], so we need to use [ and ] instead.
37607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37608  if test "x$has_forbidden_chars" != x; then
37609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37613      # Going to short mode and back again did indeed matter. Since short mode is
37614      # case insensitive, let's make it lowercase to improve readability.
37615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37616      # Now convert it back to Unix-style (cygpath)
37617      input_path=`$CYGPATH -u "$shortmode_path"`
37618      new_path="$input_path"
37619    fi
37620  fi
37621
37622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37623  if test "x$test_cygdrive_prefix" = x; then
37624    # As a simple fix, exclude /usr/bin since it's not a real path.
37625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37627      # a path prefixed by /cygdrive for fixpath to work.
37628      new_path="$CYGWIN_ROOT_PATH$input_path"
37629    fi
37630  fi
37631
37632  # remove trailing .exe if any
37633  new_path="${new_path/%.exe/}"
37634
37635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37636
37637  # First separate the path from the arguments. This will split at the first
37638  # space.
37639  complete="$LIPO"
37640  path="${complete%% *}"
37641  tmp="$complete EOL"
37642  arguments="${tmp#* }"
37643
37644  # Input might be given as Windows format, start by converting to
37645  # unix format.
37646  new_path="$path"
37647
37648  windows_path="$new_path"
37649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37650    unix_path=`$CYGPATH -u "$windows_path"`
37651    new_path="$unix_path"
37652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37654    new_path="$unix_path"
37655  fi
37656
37657
37658  # Now try to locate executable using which
37659  new_path=`$WHICH "$new_path" 2> /dev/null`
37660
37661  if test "x$new_path" = x; then
37662    # Oops. Which didn't find the executable.
37663    # The splitting of arguments from the executable at a space might have been incorrect,
37664    # since paths with space are more likely in Windows. Give it another try with the whole
37665    # argument.
37666    path="$complete"
37667    arguments="EOL"
37668    new_path="$path"
37669
37670  windows_path="$new_path"
37671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37672    unix_path=`$CYGPATH -u "$windows_path"`
37673    new_path="$unix_path"
37674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37676    new_path="$unix_path"
37677  fi
37678
37679
37680    new_path=`$WHICH "$new_path" 2> /dev/null`
37681    # bat and cmd files are not always considered executable in MSYS causing which
37682    # to not find them
37683    if test "x$new_path" = x \
37684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37686      new_path="$path"
37687
37688  windows_path="$new_path"
37689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37690    unix_path=`$CYGPATH -u "$windows_path"`
37691    new_path="$unix_path"
37692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37694    new_path="$unix_path"
37695  fi
37696
37697    fi
37698
37699    if test "x$new_path" = x; then
37700      # It's still not found. Now this is an unrecoverable error.
37701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37702$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37703      has_space=`$ECHO "$complete" | $GREP " "`
37704      if test "x$has_space" != x; then
37705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37707      fi
37708      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37709    fi
37710  fi
37711
37712  # Now new_path has a complete unix path to the binary
37713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37714    # Keep paths in /bin as-is, but remove trailing .exe if any
37715    new_path="${new_path/%.exe/}"
37716    # Do not save /bin paths to all_fixpath_prefixes!
37717  else
37718    # Not in mixed or Windows style, start by that.
37719    new_path=`cmd //c echo $new_path`
37720
37721  input_path="$new_path"
37722  # Check if we need to convert this using DOS-style short mode. If the path
37723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37724  # take no chances and rewrite it.
37725  # Note: m4 eats our [], so we need to use [ and ] instead.
37726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37727  if test "x$has_forbidden_chars" != x; then
37728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37730  fi
37731
37732    # Output is in $new_path
37733
37734  windows_path="$new_path"
37735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37736    unix_path=`$CYGPATH -u "$windows_path"`
37737    new_path="$unix_path"
37738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37740    new_path="$unix_path"
37741  fi
37742
37743    # remove trailing .exe if any
37744    new_path="${new_path/%.exe/}"
37745
37746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37748  fi
37749
37750    else
37751      # We're on a unix platform. Hooray! :)
37752      # First separate the path from the arguments. This will split at the first
37753      # space.
37754      complete="$LIPO"
37755      path="${complete%% *}"
37756      tmp="$complete EOL"
37757      arguments="${tmp#* }"
37758
37759      # Cannot rely on the command "which" here since it doesn't always work.
37760      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37761      if test -z "$is_absolute_path"; then
37762        # Path to executable is not absolute. Find it.
37763        IFS_save="$IFS"
37764        IFS=:
37765        for p in $PATH; do
37766          if test -f "$p/$path" && test -x "$p/$path"; then
37767            new_path="$p/$path"
37768            break
37769          fi
37770        done
37771        IFS="$IFS_save"
37772      else
37773        # This is an absolute path, we can use it without further modifications.
37774        new_path="$path"
37775      fi
37776
37777      if test "x$new_path" = x; then
37778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37779$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37780        has_space=`$ECHO "$complete" | $GREP " "`
37781        if test "x$has_space" != x; then
37782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37784        fi
37785        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37786      fi
37787    fi
37788
37789    # Now join together the path and the arguments once again
37790    if test "x$arguments" != xEOL; then
37791      new_complete="$new_path ${arguments% *}"
37792    else
37793      new_complete="$new_path"
37794    fi
37795
37796    if test "x$complete" != "x$new_complete"; then
37797      LIPO="$new_complete"
37798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37799$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37800    fi
37801  fi
37802
37803  fi
37804
37805  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37806    # Extract the first word of "mt", so it can be a program name with args.
37807set dummy mt; ac_word=$2
37808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37809$as_echo_n "checking for $ac_word... " >&6; }
37810if ${ac_cv_prog_MT+:} false; then :
37811  $as_echo_n "(cached) " >&6
37812else
37813  if test -n "$MT"; then
37814  ac_cv_prog_MT="$MT" # Let the user override the test.
37815else
37816  ac_prog_rejected=no
37817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37818for as_dir in $PATH
37819do
37820  IFS=$as_save_IFS
37821  test -z "$as_dir" && as_dir=.
37822    for ac_exec_ext in '' $ac_executable_extensions; do
37823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37824    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37825       ac_prog_rejected=yes
37826       continue
37827     fi
37828    ac_cv_prog_MT="mt"
37829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37830    break 2
37831  fi
37832done
37833  done
37834IFS=$as_save_IFS
37835
37836if test $ac_prog_rejected = yes; then
37837  # We found a bogon in the path, so make sure we never use it.
37838  set dummy $ac_cv_prog_MT
37839  shift
37840  if test $# != 0; then
37841    # We chose a different compiler from the bogus one.
37842    # However, it has the same basename, so the bogon will be chosen
37843    # first if we set MT to just the basename; use the full file name.
37844    shift
37845    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37846  fi
37847fi
37848fi
37849fi
37850MT=$ac_cv_prog_MT
37851if test -n "$MT"; then
37852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37853$as_echo "$MT" >&6; }
37854else
37855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37856$as_echo "no" >&6; }
37857fi
37858
37859
37860
37861  # Only process if variable expands to non-empty
37862
37863  if test "x$MT" != x; then
37864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37865
37866  # First separate the path from the arguments. This will split at the first
37867  # space.
37868  complete="$MT"
37869  path="${complete%% *}"
37870  tmp="$complete EOL"
37871  arguments="${tmp#* }"
37872
37873  # Input might be given as Windows format, start by converting to
37874  # unix format.
37875  new_path=`$CYGPATH -u "$path"`
37876
37877  # Now try to locate executable using which
37878  new_path=`$WHICH "$new_path" 2> /dev/null`
37879  # bat and cmd files are not always considered executable in cygwin causing which
37880  # to not find them
37881  if test "x$new_path" = x \
37882      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37883      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37884    new_path=`$CYGPATH -u "$path"`
37885  fi
37886  if test "x$new_path" = x; then
37887    # Oops. Which didn't find the executable.
37888    # The splitting of arguments from the executable at a space might have been incorrect,
37889    # since paths with space are more likely in Windows. Give it another try with the whole
37890    # argument.
37891    path="$complete"
37892    arguments="EOL"
37893    new_path=`$CYGPATH -u "$path"`
37894    new_path=`$WHICH "$new_path" 2> /dev/null`
37895    # bat and cmd files are not always considered executable in cygwin causing which
37896    # to not find them
37897    if test "x$new_path" = x \
37898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37900      new_path=`$CYGPATH -u "$path"`
37901    fi
37902    if test "x$new_path" = x; then
37903      # It's still not found. Now this is an unrecoverable error.
37904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37905$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37906      has_space=`$ECHO "$complete" | $GREP " "`
37907      if test "x$has_space" != x; then
37908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37910      fi
37911      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37912    fi
37913  fi
37914
37915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37918  # "foo.exe" is OK but "foo" is an error.
37919  #
37920  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37921  # It is also a way to make sure we got the proper file name for the real test later on.
37922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37923  if test "x$test_shortpath" = x; then
37924    # Short path failed, file does not exist as specified.
37925    # Try adding .exe or .cmd
37926    if test -f "${new_path}.exe"; then
37927      input_to_shortpath="${new_path}.exe"
37928    elif test -f "${new_path}.cmd"; then
37929      input_to_shortpath="${new_path}.cmd"
37930    else
37931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37932$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37935      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37936    fi
37937  else
37938    input_to_shortpath="$new_path"
37939  fi
37940
37941  # Call helper function which possibly converts this using DOS-style short mode.
37942  # If so, the updated path is stored in $new_path.
37943  new_path="$input_to_shortpath"
37944
37945  input_path="$input_to_shortpath"
37946  # Check if we need to convert this using DOS-style short mode. If the path
37947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37948  # take no chances and rewrite it.
37949  # Note: m4 eats our [], so we need to use [ and ] instead.
37950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37951  if test "x$has_forbidden_chars" != x; then
37952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37956      # Going to short mode and back again did indeed matter. Since short mode is
37957      # case insensitive, let's make it lowercase to improve readability.
37958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37959      # Now convert it back to Unix-style (cygpath)
37960      input_path=`$CYGPATH -u "$shortmode_path"`
37961      new_path="$input_path"
37962    fi
37963  fi
37964
37965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37966  if test "x$test_cygdrive_prefix" = x; then
37967    # As a simple fix, exclude /usr/bin since it's not a real path.
37968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37970      # a path prefixed by /cygdrive for fixpath to work.
37971      new_path="$CYGWIN_ROOT_PATH$input_path"
37972    fi
37973  fi
37974
37975  # remove trailing .exe if any
37976  new_path="${new_path/%.exe/}"
37977
37978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37979
37980  # First separate the path from the arguments. This will split at the first
37981  # space.
37982  complete="$MT"
37983  path="${complete%% *}"
37984  tmp="$complete EOL"
37985  arguments="${tmp#* }"
37986
37987  # Input might be given as Windows format, start by converting to
37988  # unix format.
37989  new_path="$path"
37990
37991  windows_path="$new_path"
37992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37993    unix_path=`$CYGPATH -u "$windows_path"`
37994    new_path="$unix_path"
37995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37997    new_path="$unix_path"
37998  fi
37999
38000
38001  # Now try to locate executable using which
38002  new_path=`$WHICH "$new_path" 2> /dev/null`
38003
38004  if test "x$new_path" = x; then
38005    # Oops. Which didn't find the executable.
38006    # The splitting of arguments from the executable at a space might have been incorrect,
38007    # since paths with space are more likely in Windows. Give it another try with the whole
38008    # argument.
38009    path="$complete"
38010    arguments="EOL"
38011    new_path="$path"
38012
38013  windows_path="$new_path"
38014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38015    unix_path=`$CYGPATH -u "$windows_path"`
38016    new_path="$unix_path"
38017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38019    new_path="$unix_path"
38020  fi
38021
38022
38023    new_path=`$WHICH "$new_path" 2> /dev/null`
38024    # bat and cmd files are not always considered executable in MSYS causing which
38025    # to not find them
38026    if test "x$new_path" = x \
38027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38029      new_path="$path"
38030
38031  windows_path="$new_path"
38032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38033    unix_path=`$CYGPATH -u "$windows_path"`
38034    new_path="$unix_path"
38035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38037    new_path="$unix_path"
38038  fi
38039
38040    fi
38041
38042    if test "x$new_path" = x; then
38043      # It's still not found. Now this is an unrecoverable error.
38044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38045$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38046      has_space=`$ECHO "$complete" | $GREP " "`
38047      if test "x$has_space" != x; then
38048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38050      fi
38051      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38052    fi
38053  fi
38054
38055  # Now new_path has a complete unix path to the binary
38056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38057    # Keep paths in /bin as-is, but remove trailing .exe if any
38058    new_path="${new_path/%.exe/}"
38059    # Do not save /bin paths to all_fixpath_prefixes!
38060  else
38061    # Not in mixed or Windows style, start by that.
38062    new_path=`cmd //c echo $new_path`
38063
38064  input_path="$new_path"
38065  # Check if we need to convert this using DOS-style short mode. If the path
38066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38067  # take no chances and rewrite it.
38068  # Note: m4 eats our [], so we need to use [ and ] instead.
38069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38070  if test "x$has_forbidden_chars" != x; then
38071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38073  fi
38074
38075    # Output is in $new_path
38076
38077  windows_path="$new_path"
38078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38079    unix_path=`$CYGPATH -u "$windows_path"`
38080    new_path="$unix_path"
38081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38083    new_path="$unix_path"
38084  fi
38085
38086    # remove trailing .exe if any
38087    new_path="${new_path/%.exe/}"
38088
38089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38091  fi
38092
38093    else
38094      # We're on a unix platform. Hooray! :)
38095      # First separate the path from the arguments. This will split at the first
38096      # space.
38097      complete="$MT"
38098      path="${complete%% *}"
38099      tmp="$complete EOL"
38100      arguments="${tmp#* }"
38101
38102      # Cannot rely on the command "which" here since it doesn't always work.
38103      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38104      if test -z "$is_absolute_path"; then
38105        # Path to executable is not absolute. Find it.
38106        IFS_save="$IFS"
38107        IFS=:
38108        for p in $PATH; do
38109          if test -f "$p/$path" && test -x "$p/$path"; then
38110            new_path="$p/$path"
38111            break
38112          fi
38113        done
38114        IFS="$IFS_save"
38115      else
38116        # This is an absolute path, we can use it without further modifications.
38117        new_path="$path"
38118      fi
38119
38120      if test "x$new_path" = x; then
38121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38122$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38123        has_space=`$ECHO "$complete" | $GREP " "`
38124        if test "x$has_space" != x; then
38125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38127        fi
38128        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38129      fi
38130    fi
38131
38132    # Now join together the path and the arguments once again
38133    if test "x$arguments" != xEOL; then
38134      new_complete="$new_path ${arguments% *}"
38135    else
38136      new_complete="$new_path"
38137    fi
38138
38139    if test "x$complete" != "x$new_complete"; then
38140      MT="$new_complete"
38141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38142$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38143    fi
38144  fi
38145
38146    # Setup the resource compiler (RC)
38147    # Extract the first word of "rc", so it can be a program name with args.
38148set dummy rc; ac_word=$2
38149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38150$as_echo_n "checking for $ac_word... " >&6; }
38151if ${ac_cv_prog_RC+:} false; then :
38152  $as_echo_n "(cached) " >&6
38153else
38154  if test -n "$RC"; then
38155  ac_cv_prog_RC="$RC" # Let the user override the test.
38156else
38157  ac_prog_rejected=no
38158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38159for as_dir in $PATH
38160do
38161  IFS=$as_save_IFS
38162  test -z "$as_dir" && as_dir=.
38163    for ac_exec_ext in '' $ac_executable_extensions; do
38164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38165    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38166       ac_prog_rejected=yes
38167       continue
38168     fi
38169    ac_cv_prog_RC="rc"
38170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38171    break 2
38172  fi
38173done
38174  done
38175IFS=$as_save_IFS
38176
38177if test $ac_prog_rejected = yes; then
38178  # We found a bogon in the path, so make sure we never use it.
38179  set dummy $ac_cv_prog_RC
38180  shift
38181  if test $# != 0; then
38182    # We chose a different compiler from the bogus one.
38183    # However, it has the same basename, so the bogon will be chosen
38184    # first if we set RC to just the basename; use the full file name.
38185    shift
38186    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38187  fi
38188fi
38189fi
38190fi
38191RC=$ac_cv_prog_RC
38192if test -n "$RC"; then
38193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38194$as_echo "$RC" >&6; }
38195else
38196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38197$as_echo "no" >&6; }
38198fi
38199
38200
38201
38202  # Only process if variable expands to non-empty
38203
38204  if test "x$RC" != x; then
38205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38206
38207  # First separate the path from the arguments. This will split at the first
38208  # space.
38209  complete="$RC"
38210  path="${complete%% *}"
38211  tmp="$complete EOL"
38212  arguments="${tmp#* }"
38213
38214  # Input might be given as Windows format, start by converting to
38215  # unix format.
38216  new_path=`$CYGPATH -u "$path"`
38217
38218  # Now try to locate executable using which
38219  new_path=`$WHICH "$new_path" 2> /dev/null`
38220  # bat and cmd files are not always considered executable in cygwin causing which
38221  # to not find them
38222  if test "x$new_path" = x \
38223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38225    new_path=`$CYGPATH -u "$path"`
38226  fi
38227  if test "x$new_path" = x; then
38228    # Oops. Which didn't find the executable.
38229    # The splitting of arguments from the executable at a space might have been incorrect,
38230    # since paths with space are more likely in Windows. Give it another try with the whole
38231    # argument.
38232    path="$complete"
38233    arguments="EOL"
38234    new_path=`$CYGPATH -u "$path"`
38235    new_path=`$WHICH "$new_path" 2> /dev/null`
38236    # bat and cmd files are not always considered executable in cygwin causing which
38237    # to not find them
38238    if test "x$new_path" = x \
38239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38241      new_path=`$CYGPATH -u "$path"`
38242    fi
38243    if test "x$new_path" = x; then
38244      # It's still not found. Now this is an unrecoverable error.
38245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38246$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38247      has_space=`$ECHO "$complete" | $GREP " "`
38248      if test "x$has_space" != x; then
38249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38251      fi
38252      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38253    fi
38254  fi
38255
38256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38259  # "foo.exe" is OK but "foo" is an error.
38260  #
38261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38262  # It is also a way to make sure we got the proper file name for the real test later on.
38263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38264  if test "x$test_shortpath" = x; then
38265    # Short path failed, file does not exist as specified.
38266    # Try adding .exe or .cmd
38267    if test -f "${new_path}.exe"; then
38268      input_to_shortpath="${new_path}.exe"
38269    elif test -f "${new_path}.cmd"; then
38270      input_to_shortpath="${new_path}.cmd"
38271    else
38272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38273$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38276      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38277    fi
38278  else
38279    input_to_shortpath="$new_path"
38280  fi
38281
38282  # Call helper function which possibly converts this using DOS-style short mode.
38283  # If so, the updated path is stored in $new_path.
38284  new_path="$input_to_shortpath"
38285
38286  input_path="$input_to_shortpath"
38287  # Check if we need to convert this using DOS-style short mode. If the path
38288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38289  # take no chances and rewrite it.
38290  # Note: m4 eats our [], so we need to use [ and ] instead.
38291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38292  if test "x$has_forbidden_chars" != x; then
38293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38297      # Going to short mode and back again did indeed matter. Since short mode is
38298      # case insensitive, let's make it lowercase to improve readability.
38299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38300      # Now convert it back to Unix-style (cygpath)
38301      input_path=`$CYGPATH -u "$shortmode_path"`
38302      new_path="$input_path"
38303    fi
38304  fi
38305
38306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38307  if test "x$test_cygdrive_prefix" = x; then
38308    # As a simple fix, exclude /usr/bin since it's not a real path.
38309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38311      # a path prefixed by /cygdrive for fixpath to work.
38312      new_path="$CYGWIN_ROOT_PATH$input_path"
38313    fi
38314  fi
38315
38316  # remove trailing .exe if any
38317  new_path="${new_path/%.exe/}"
38318
38319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38320
38321  # First separate the path from the arguments. This will split at the first
38322  # space.
38323  complete="$RC"
38324  path="${complete%% *}"
38325  tmp="$complete EOL"
38326  arguments="${tmp#* }"
38327
38328  # Input might be given as Windows format, start by converting to
38329  # unix format.
38330  new_path="$path"
38331
38332  windows_path="$new_path"
38333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38334    unix_path=`$CYGPATH -u "$windows_path"`
38335    new_path="$unix_path"
38336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38338    new_path="$unix_path"
38339  fi
38340
38341
38342  # Now try to locate executable using which
38343  new_path=`$WHICH "$new_path" 2> /dev/null`
38344
38345  if test "x$new_path" = x; then
38346    # Oops. Which didn't find the executable.
38347    # The splitting of arguments from the executable at a space might have been incorrect,
38348    # since paths with space are more likely in Windows. Give it another try with the whole
38349    # argument.
38350    path="$complete"
38351    arguments="EOL"
38352    new_path="$path"
38353
38354  windows_path="$new_path"
38355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38356    unix_path=`$CYGPATH -u "$windows_path"`
38357    new_path="$unix_path"
38358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38360    new_path="$unix_path"
38361  fi
38362
38363
38364    new_path=`$WHICH "$new_path" 2> /dev/null`
38365    # bat and cmd files are not always considered executable in MSYS causing which
38366    # to not find them
38367    if test "x$new_path" = x \
38368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38370      new_path="$path"
38371
38372  windows_path="$new_path"
38373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38374    unix_path=`$CYGPATH -u "$windows_path"`
38375    new_path="$unix_path"
38376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38378    new_path="$unix_path"
38379  fi
38380
38381    fi
38382
38383    if test "x$new_path" = x; then
38384      # It's still not found. Now this is an unrecoverable error.
38385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38386$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38387      has_space=`$ECHO "$complete" | $GREP " "`
38388      if test "x$has_space" != x; then
38389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38391      fi
38392      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38393    fi
38394  fi
38395
38396  # Now new_path has a complete unix path to the binary
38397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38398    # Keep paths in /bin as-is, but remove trailing .exe if any
38399    new_path="${new_path/%.exe/}"
38400    # Do not save /bin paths to all_fixpath_prefixes!
38401  else
38402    # Not in mixed or Windows style, start by that.
38403    new_path=`cmd //c echo $new_path`
38404
38405  input_path="$new_path"
38406  # Check if we need to convert this using DOS-style short mode. If the path
38407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38408  # take no chances and rewrite it.
38409  # Note: m4 eats our [], so we need to use [ and ] instead.
38410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38411  if test "x$has_forbidden_chars" != x; then
38412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38414  fi
38415
38416    # Output is in $new_path
38417
38418  windows_path="$new_path"
38419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38420    unix_path=`$CYGPATH -u "$windows_path"`
38421    new_path="$unix_path"
38422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38424    new_path="$unix_path"
38425  fi
38426
38427    # remove trailing .exe if any
38428    new_path="${new_path/%.exe/}"
38429
38430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38432  fi
38433
38434    else
38435      # We're on a unix platform. Hooray! :)
38436      # First separate the path from the arguments. This will split at the first
38437      # space.
38438      complete="$RC"
38439      path="${complete%% *}"
38440      tmp="$complete EOL"
38441      arguments="${tmp#* }"
38442
38443      # Cannot rely on the command "which" here since it doesn't always work.
38444      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38445      if test -z "$is_absolute_path"; then
38446        # Path to executable is not absolute. Find it.
38447        IFS_save="$IFS"
38448        IFS=:
38449        for p in $PATH; do
38450          if test -f "$p/$path" && test -x "$p/$path"; then
38451            new_path="$p/$path"
38452            break
38453          fi
38454        done
38455        IFS="$IFS_save"
38456      else
38457        # This is an absolute path, we can use it without further modifications.
38458        new_path="$path"
38459      fi
38460
38461      if test "x$new_path" = x; then
38462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38463$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38464        has_space=`$ECHO "$complete" | $GREP " "`
38465        if test "x$has_space" != x; then
38466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38468        fi
38469        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38470      fi
38471    fi
38472
38473    # Now join together the path and the arguments once again
38474    if test "x$arguments" != xEOL; then
38475      new_complete="$new_path ${arguments% *}"
38476    else
38477      new_complete="$new_path"
38478    fi
38479
38480    if test "x$complete" != "x$new_complete"; then
38481      RC="$new_complete"
38482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38483$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38484    fi
38485  fi
38486
38487    # Extract the first word of "dumpbin", so it can be a program name with args.
38488set dummy dumpbin; ac_word=$2
38489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38490$as_echo_n "checking for $ac_word... " >&6; }
38491if ${ac_cv_prog_DUMPBIN+:} false; then :
38492  $as_echo_n "(cached) " >&6
38493else
38494  if test -n "$DUMPBIN"; then
38495  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38496else
38497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38498for as_dir in $PATH
38499do
38500  IFS=$as_save_IFS
38501  test -z "$as_dir" && as_dir=.
38502    for ac_exec_ext in '' $ac_executable_extensions; do
38503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38504    ac_cv_prog_DUMPBIN="dumpbin"
38505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38506    break 2
38507  fi
38508done
38509  done
38510IFS=$as_save_IFS
38511
38512fi
38513fi
38514DUMPBIN=$ac_cv_prog_DUMPBIN
38515if test -n "$DUMPBIN"; then
38516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38517$as_echo "$DUMPBIN" >&6; }
38518else
38519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38520$as_echo "no" >&6; }
38521fi
38522
38523
38524
38525  # Only process if variable expands to non-empty
38526
38527  if test "x$DUMPBIN" != x; then
38528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38529
38530  # First separate the path from the arguments. This will split at the first
38531  # space.
38532  complete="$DUMPBIN"
38533  path="${complete%% *}"
38534  tmp="$complete EOL"
38535  arguments="${tmp#* }"
38536
38537  # Input might be given as Windows format, start by converting to
38538  # unix format.
38539  new_path=`$CYGPATH -u "$path"`
38540
38541  # Now try to locate executable using which
38542  new_path=`$WHICH "$new_path" 2> /dev/null`
38543  # bat and cmd files are not always considered executable in cygwin causing which
38544  # to not find them
38545  if test "x$new_path" = x \
38546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38548    new_path=`$CYGPATH -u "$path"`
38549  fi
38550  if test "x$new_path" = x; then
38551    # Oops. Which didn't find the executable.
38552    # The splitting of arguments from the executable at a space might have been incorrect,
38553    # since paths with space are more likely in Windows. Give it another try with the whole
38554    # argument.
38555    path="$complete"
38556    arguments="EOL"
38557    new_path=`$CYGPATH -u "$path"`
38558    new_path=`$WHICH "$new_path" 2> /dev/null`
38559    # bat and cmd files are not always considered executable in cygwin causing which
38560    # to not find them
38561    if test "x$new_path" = x \
38562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38564      new_path=`$CYGPATH -u "$path"`
38565    fi
38566    if test "x$new_path" = x; then
38567      # It's still not found. Now this is an unrecoverable error.
38568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38569$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38570      has_space=`$ECHO "$complete" | $GREP " "`
38571      if test "x$has_space" != x; then
38572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38574      fi
38575      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38576    fi
38577  fi
38578
38579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38582  # "foo.exe" is OK but "foo" is an error.
38583  #
38584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38585  # It is also a way to make sure we got the proper file name for the real test later on.
38586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38587  if test "x$test_shortpath" = x; then
38588    # Short path failed, file does not exist as specified.
38589    # Try adding .exe or .cmd
38590    if test -f "${new_path}.exe"; then
38591      input_to_shortpath="${new_path}.exe"
38592    elif test -f "${new_path}.cmd"; then
38593      input_to_shortpath="${new_path}.cmd"
38594    else
38595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38596$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38599      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38600    fi
38601  else
38602    input_to_shortpath="$new_path"
38603  fi
38604
38605  # Call helper function which possibly converts this using DOS-style short mode.
38606  # If so, the updated path is stored in $new_path.
38607  new_path="$input_to_shortpath"
38608
38609  input_path="$input_to_shortpath"
38610  # Check if we need to convert this using DOS-style short mode. If the path
38611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38612  # take no chances and rewrite it.
38613  # Note: m4 eats our [], so we need to use [ and ] instead.
38614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38615  if test "x$has_forbidden_chars" != x; then
38616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38620      # Going to short mode and back again did indeed matter. Since short mode is
38621      # case insensitive, let's make it lowercase to improve readability.
38622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38623      # Now convert it back to Unix-style (cygpath)
38624      input_path=`$CYGPATH -u "$shortmode_path"`
38625      new_path="$input_path"
38626    fi
38627  fi
38628
38629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38630  if test "x$test_cygdrive_prefix" = x; then
38631    # As a simple fix, exclude /usr/bin since it's not a real path.
38632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38634      # a path prefixed by /cygdrive for fixpath to work.
38635      new_path="$CYGWIN_ROOT_PATH$input_path"
38636    fi
38637  fi
38638
38639  # remove trailing .exe if any
38640  new_path="${new_path/%.exe/}"
38641
38642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38643
38644  # First separate the path from the arguments. This will split at the first
38645  # space.
38646  complete="$DUMPBIN"
38647  path="${complete%% *}"
38648  tmp="$complete EOL"
38649  arguments="${tmp#* }"
38650
38651  # Input might be given as Windows format, start by converting to
38652  # unix format.
38653  new_path="$path"
38654
38655  windows_path="$new_path"
38656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38657    unix_path=`$CYGPATH -u "$windows_path"`
38658    new_path="$unix_path"
38659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38661    new_path="$unix_path"
38662  fi
38663
38664
38665  # Now try to locate executable using which
38666  new_path=`$WHICH "$new_path" 2> /dev/null`
38667
38668  if test "x$new_path" = x; then
38669    # Oops. Which didn't find the executable.
38670    # The splitting of arguments from the executable at a space might have been incorrect,
38671    # since paths with space are more likely in Windows. Give it another try with the whole
38672    # argument.
38673    path="$complete"
38674    arguments="EOL"
38675    new_path="$path"
38676
38677  windows_path="$new_path"
38678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38679    unix_path=`$CYGPATH -u "$windows_path"`
38680    new_path="$unix_path"
38681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38683    new_path="$unix_path"
38684  fi
38685
38686
38687    new_path=`$WHICH "$new_path" 2> /dev/null`
38688    # bat and cmd files are not always considered executable in MSYS causing which
38689    # to not find them
38690    if test "x$new_path" = x \
38691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38693      new_path="$path"
38694
38695  windows_path="$new_path"
38696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38697    unix_path=`$CYGPATH -u "$windows_path"`
38698    new_path="$unix_path"
38699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38701    new_path="$unix_path"
38702  fi
38703
38704    fi
38705
38706    if test "x$new_path" = x; then
38707      # It's still not found. Now this is an unrecoverable error.
38708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38709$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38710      has_space=`$ECHO "$complete" | $GREP " "`
38711      if test "x$has_space" != x; then
38712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38714      fi
38715      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38716    fi
38717  fi
38718
38719  # Now new_path has a complete unix path to the binary
38720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38721    # Keep paths in /bin as-is, but remove trailing .exe if any
38722    new_path="${new_path/%.exe/}"
38723    # Do not save /bin paths to all_fixpath_prefixes!
38724  else
38725    # Not in mixed or Windows style, start by that.
38726    new_path=`cmd //c echo $new_path`
38727
38728  input_path="$new_path"
38729  # Check if we need to convert this using DOS-style short mode. If the path
38730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38731  # take no chances and rewrite it.
38732  # Note: m4 eats our [], so we need to use [ and ] instead.
38733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38734  if test "x$has_forbidden_chars" != x; then
38735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38737  fi
38738
38739    # Output is in $new_path
38740
38741  windows_path="$new_path"
38742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38743    unix_path=`$CYGPATH -u "$windows_path"`
38744    new_path="$unix_path"
38745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38747    new_path="$unix_path"
38748  fi
38749
38750    # remove trailing .exe if any
38751    new_path="${new_path/%.exe/}"
38752
38753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38755  fi
38756
38757    else
38758      # We're on a unix platform. Hooray! :)
38759      # First separate the path from the arguments. This will split at the first
38760      # space.
38761      complete="$DUMPBIN"
38762      path="${complete%% *}"
38763      tmp="$complete EOL"
38764      arguments="${tmp#* }"
38765
38766      # Cannot rely on the command "which" here since it doesn't always work.
38767      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38768      if test -z "$is_absolute_path"; then
38769        # Path to executable is not absolute. Find it.
38770        IFS_save="$IFS"
38771        IFS=:
38772        for p in $PATH; do
38773          if test -f "$p/$path" && test -x "$p/$path"; then
38774            new_path="$p/$path"
38775            break
38776          fi
38777        done
38778        IFS="$IFS_save"
38779      else
38780        # This is an absolute path, we can use it without further modifications.
38781        new_path="$path"
38782      fi
38783
38784      if test "x$new_path" = x; then
38785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38786$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38787        has_space=`$ECHO "$complete" | $GREP " "`
38788        if test "x$has_space" != x; then
38789          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38790$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38791        fi
38792        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38793      fi
38794    fi
38795
38796    # Now join together the path and the arguments once again
38797    if test "x$arguments" != xEOL; then
38798      new_complete="$new_path ${arguments% *}"
38799    else
38800      new_complete="$new_path"
38801    fi
38802
38803    if test "x$complete" != "x$new_complete"; then
38804      DUMPBIN="$new_complete"
38805      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38806$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38807    fi
38808  fi
38809
38810    # We need to check for 'msbuild.exe' because at the place where we expect to
38811    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38812    # won't find the 'msbuild.exe' executable in that case (and the
38813    # 'ac_executable_extensions' is unusable due to performance reasons).
38814    # Notice that we intentionally don't fix up the path to MSBUILD because we
38815    # will call it in a DOS shell during freetype detection on Windows (see
38816    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38817    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38818set dummy msbuild.exe; ac_word=$2
38819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38820$as_echo_n "checking for $ac_word... " >&6; }
38821if ${ac_cv_prog_MSBUILD+:} false; then :
38822  $as_echo_n "(cached) " >&6
38823else
38824  if test -n "$MSBUILD"; then
38825  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38826else
38827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38828for as_dir in $PATH
38829do
38830  IFS=$as_save_IFS
38831  test -z "$as_dir" && as_dir=.
38832    for ac_exec_ext in '' $ac_executable_extensions; do
38833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38834    ac_cv_prog_MSBUILD="msbuild.exe"
38835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38836    break 2
38837  fi
38838done
38839  done
38840IFS=$as_save_IFS
38841
38842fi
38843fi
38844MSBUILD=$ac_cv_prog_MSBUILD
38845if test -n "$MSBUILD"; then
38846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38847$as_echo "$MSBUILD" >&6; }
38848else
38849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38850$as_echo "no" >&6; }
38851fi
38852
38853
38854  fi
38855
38856  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38857
38858
38859  # Publish this variable in the help.
38860
38861
38862  if [ -z "${STRIP+x}" ]; then
38863    # The variable is not set by user, try to locate tool using the code snippet
38864    for ac_prog in strip
38865do
38866  # Extract the first word of "$ac_prog", so it can be a program name with args.
38867set dummy $ac_prog; ac_word=$2
38868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38869$as_echo_n "checking for $ac_word... " >&6; }
38870if ${ac_cv_path_STRIP+:} false; then :
38871  $as_echo_n "(cached) " >&6
38872else
38873  case $STRIP in
38874  [\\/]* | ?:[\\/]*)
38875  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38876  ;;
38877  *)
38878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38887    break 2
38888  fi
38889done
38890  done
38891IFS=$as_save_IFS
38892
38893  ;;
38894esac
38895fi
38896STRIP=$ac_cv_path_STRIP
38897if test -n "$STRIP"; then
38898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38899$as_echo "$STRIP" >&6; }
38900else
38901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38902$as_echo "no" >&6; }
38903fi
38904
38905
38906  test -n "$STRIP" && break
38907done
38908
38909  else
38910    # The variable is set, but is it from the command line or the environment?
38911
38912    # Try to remove the string !STRIP! from our list.
38913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38915      # If it failed, the variable was not from the command line. Ignore it,
38916      # but warn the user (except for BASH, which is always set by the calling BASH).
38917      if test "xSTRIP" != xBASH; then
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38919$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38920      fi
38921      # Try to locate tool using the code snippet
38922      for ac_prog in strip
38923do
38924  # Extract the first word of "$ac_prog", so it can be a program name with args.
38925set dummy $ac_prog; ac_word=$2
38926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38927$as_echo_n "checking for $ac_word... " >&6; }
38928if ${ac_cv_path_STRIP+:} false; then :
38929  $as_echo_n "(cached) " >&6
38930else
38931  case $STRIP in
38932  [\\/]* | ?:[\\/]*)
38933  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38934  ;;
38935  *)
38936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38937for as_dir in $PATH
38938do
38939  IFS=$as_save_IFS
38940  test -z "$as_dir" && as_dir=.
38941    for ac_exec_ext in '' $ac_executable_extensions; do
38942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38943    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38945    break 2
38946  fi
38947done
38948  done
38949IFS=$as_save_IFS
38950
38951  ;;
38952esac
38953fi
38954STRIP=$ac_cv_path_STRIP
38955if test -n "$STRIP"; then
38956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38957$as_echo "$STRIP" >&6; }
38958else
38959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38960$as_echo "no" >&6; }
38961fi
38962
38963
38964  test -n "$STRIP" && break
38965done
38966
38967    else
38968      # If it succeeded, then it was overridden by the user. We will use it
38969      # for the tool.
38970
38971      # First remove it from the list of overridden variables, so we can test
38972      # for unknown variables in the end.
38973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38974
38975      # Check if we try to supply an empty value
38976      if test "x$STRIP" = x; then
38977        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38978$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38980$as_echo_n "checking for STRIP... " >&6; }
38981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38982$as_echo "disabled" >&6; }
38983      else
38984        # Check if the provided tool contains a complete path.
38985        tool_specified="$STRIP"
38986        tool_basename="${tool_specified##*/}"
38987        if test "x$tool_basename" = "x$tool_specified"; then
38988          # A command without a complete path is provided, search $PATH.
38989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38990$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38991          # Extract the first word of "$tool_basename", so it can be a program name with args.
38992set dummy $tool_basename; ac_word=$2
38993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38994$as_echo_n "checking for $ac_word... " >&6; }
38995if ${ac_cv_path_STRIP+:} false; then :
38996  $as_echo_n "(cached) " >&6
38997else
38998  case $STRIP in
38999  [\\/]* | ?:[\\/]*)
39000  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39001  ;;
39002  *)
39003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39004for as_dir in $PATH
39005do
39006  IFS=$as_save_IFS
39007  test -z "$as_dir" && as_dir=.
39008    for ac_exec_ext in '' $ac_executable_extensions; do
39009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39010    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39012    break 2
39013  fi
39014done
39015  done
39016IFS=$as_save_IFS
39017
39018  ;;
39019esac
39020fi
39021STRIP=$ac_cv_path_STRIP
39022if test -n "$STRIP"; then
39023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39024$as_echo "$STRIP" >&6; }
39025else
39026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39027$as_echo "no" >&6; }
39028fi
39029
39030
39031          if test "x$STRIP" = x; then
39032            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39033          fi
39034        else
39035          # Otherwise we believe it is a complete path. Use it as it is.
39036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39037$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39038          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39039$as_echo_n "checking for STRIP... " >&6; }
39040          if test ! -x "$tool_specified"; then
39041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39042$as_echo "not found" >&6; }
39043            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39044          fi
39045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39046$as_echo "$tool_specified" >&6; }
39047        fi
39048      fi
39049    fi
39050
39051  fi
39052
39053
39054
39055  # Only process if variable expands to non-empty
39056
39057  if test "x$STRIP" != x; then
39058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39059
39060  # First separate the path from the arguments. This will split at the first
39061  # space.
39062  complete="$STRIP"
39063  path="${complete%% *}"
39064  tmp="$complete EOL"
39065  arguments="${tmp#* }"
39066
39067  # Input might be given as Windows format, start by converting to
39068  # unix format.
39069  new_path=`$CYGPATH -u "$path"`
39070
39071  # Now try to locate executable using which
39072  new_path=`$WHICH "$new_path" 2> /dev/null`
39073  # bat and cmd files are not always considered executable in cygwin causing which
39074  # to not find them
39075  if test "x$new_path" = x \
39076      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39077      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39078    new_path=`$CYGPATH -u "$path"`
39079  fi
39080  if test "x$new_path" = x; then
39081    # Oops. Which didn't find the executable.
39082    # The splitting of arguments from the executable at a space might have been incorrect,
39083    # since paths with space are more likely in Windows. Give it another try with the whole
39084    # argument.
39085    path="$complete"
39086    arguments="EOL"
39087    new_path=`$CYGPATH -u "$path"`
39088    new_path=`$WHICH "$new_path" 2> /dev/null`
39089    # bat and cmd files are not always considered executable in cygwin causing which
39090    # to not find them
39091    if test "x$new_path" = x \
39092        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39093        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39094      new_path=`$CYGPATH -u "$path"`
39095    fi
39096    if test "x$new_path" = x; then
39097      # It's still not found. Now this is an unrecoverable error.
39098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39099$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39100      has_space=`$ECHO "$complete" | $GREP " "`
39101      if test "x$has_space" != x; then
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39104      fi
39105      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39106    fi
39107  fi
39108
39109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39112  # "foo.exe" is OK but "foo" is an error.
39113  #
39114  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39115  # It is also a way to make sure we got the proper file name for the real test later on.
39116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39117  if test "x$test_shortpath" = x; then
39118    # Short path failed, file does not exist as specified.
39119    # Try adding .exe or .cmd
39120    if test -f "${new_path}.exe"; then
39121      input_to_shortpath="${new_path}.exe"
39122    elif test -f "${new_path}.cmd"; then
39123      input_to_shortpath="${new_path}.cmd"
39124    else
39125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39126$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39129      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39130    fi
39131  else
39132    input_to_shortpath="$new_path"
39133  fi
39134
39135  # Call helper function which possibly converts this using DOS-style short mode.
39136  # If so, the updated path is stored in $new_path.
39137  new_path="$input_to_shortpath"
39138
39139  input_path="$input_to_shortpath"
39140  # Check if we need to convert this using DOS-style short mode. If the path
39141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39142  # take no chances and rewrite it.
39143  # Note: m4 eats our [], so we need to use [ and ] instead.
39144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39145  if test "x$has_forbidden_chars" != x; then
39146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39150      # Going to short mode and back again did indeed matter. Since short mode is
39151      # case insensitive, let's make it lowercase to improve readability.
39152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39153      # Now convert it back to Unix-style (cygpath)
39154      input_path=`$CYGPATH -u "$shortmode_path"`
39155      new_path="$input_path"
39156    fi
39157  fi
39158
39159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39160  if test "x$test_cygdrive_prefix" = x; then
39161    # As a simple fix, exclude /usr/bin since it's not a real path.
39162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39164      # a path prefixed by /cygdrive for fixpath to work.
39165      new_path="$CYGWIN_ROOT_PATH$input_path"
39166    fi
39167  fi
39168
39169  # remove trailing .exe if any
39170  new_path="${new_path/%.exe/}"
39171
39172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173
39174  # First separate the path from the arguments. This will split at the first
39175  # space.
39176  complete="$STRIP"
39177  path="${complete%% *}"
39178  tmp="$complete EOL"
39179  arguments="${tmp#* }"
39180
39181  # Input might be given as Windows format, start by converting to
39182  # unix format.
39183  new_path="$path"
39184
39185  windows_path="$new_path"
39186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39187    unix_path=`$CYGPATH -u "$windows_path"`
39188    new_path="$unix_path"
39189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39191    new_path="$unix_path"
39192  fi
39193
39194
39195  # Now try to locate executable using which
39196  new_path=`$WHICH "$new_path" 2> /dev/null`
39197
39198  if test "x$new_path" = x; then
39199    # Oops. Which didn't find the executable.
39200    # The splitting of arguments from the executable at a space might have been incorrect,
39201    # since paths with space are more likely in Windows. Give it another try with the whole
39202    # argument.
39203    path="$complete"
39204    arguments="EOL"
39205    new_path="$path"
39206
39207  windows_path="$new_path"
39208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39209    unix_path=`$CYGPATH -u "$windows_path"`
39210    new_path="$unix_path"
39211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39213    new_path="$unix_path"
39214  fi
39215
39216
39217    new_path=`$WHICH "$new_path" 2> /dev/null`
39218    # bat and cmd files are not always considered executable in MSYS causing which
39219    # to not find them
39220    if test "x$new_path" = x \
39221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39223      new_path="$path"
39224
39225  windows_path="$new_path"
39226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39227    unix_path=`$CYGPATH -u "$windows_path"`
39228    new_path="$unix_path"
39229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39231    new_path="$unix_path"
39232  fi
39233
39234    fi
39235
39236    if test "x$new_path" = x; then
39237      # It's still not found. Now this is an unrecoverable error.
39238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39239$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39240      has_space=`$ECHO "$complete" | $GREP " "`
39241      if test "x$has_space" != x; then
39242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39244      fi
39245      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39246    fi
39247  fi
39248
39249  # Now new_path has a complete unix path to the binary
39250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39251    # Keep paths in /bin as-is, but remove trailing .exe if any
39252    new_path="${new_path/%.exe/}"
39253    # Do not save /bin paths to all_fixpath_prefixes!
39254  else
39255    # Not in mixed or Windows style, start by that.
39256    new_path=`cmd //c echo $new_path`
39257
39258  input_path="$new_path"
39259  # Check if we need to convert this using DOS-style short mode. If the path
39260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39261  # take no chances and rewrite it.
39262  # Note: m4 eats our [], so we need to use [ and ] instead.
39263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39264  if test "x$has_forbidden_chars" != x; then
39265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39267  fi
39268
39269    # Output is in $new_path
39270
39271  windows_path="$new_path"
39272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39273    unix_path=`$CYGPATH -u "$windows_path"`
39274    new_path="$unix_path"
39275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39277    new_path="$unix_path"
39278  fi
39279
39280    # remove trailing .exe if any
39281    new_path="${new_path/%.exe/}"
39282
39283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39285  fi
39286
39287    else
39288      # We're on a unix platform. Hooray! :)
39289      # First separate the path from the arguments. This will split at the first
39290      # space.
39291      complete="$STRIP"
39292      path="${complete%% *}"
39293      tmp="$complete EOL"
39294      arguments="${tmp#* }"
39295
39296      # Cannot rely on the command "which" here since it doesn't always work.
39297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39298      if test -z "$is_absolute_path"; then
39299        # Path to executable is not absolute. Find it.
39300        IFS_save="$IFS"
39301        IFS=:
39302        for p in $PATH; do
39303          if test -f "$p/$path" && test -x "$p/$path"; then
39304            new_path="$p/$path"
39305            break
39306          fi
39307        done
39308        IFS="$IFS_save"
39309      else
39310        # This is an absolute path, we can use it without further modifications.
39311        new_path="$path"
39312      fi
39313
39314      if test "x$new_path" = x; then
39315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39316$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39317        has_space=`$ECHO "$complete" | $GREP " "`
39318        if test "x$has_space" != x; then
39319          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39320$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39321        fi
39322        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39323      fi
39324    fi
39325
39326    # Now join together the path and the arguments once again
39327    if test "x$arguments" != xEOL; then
39328      new_complete="$new_path ${arguments% *}"
39329    else
39330      new_complete="$new_path"
39331    fi
39332
39333    if test "x$complete" != "x$new_complete"; then
39334      STRIP="$new_complete"
39335      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39336$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39337    fi
39338  fi
39339
39340
39341
39342  # Publish this variable in the help.
39343
39344
39345  if [ -z "${NM+x}" ]; then
39346    # The variable is not set by user, try to locate tool using the code snippet
39347    for ac_prog in nm
39348do
39349  # Extract the first word of "$ac_prog", so it can be a program name with args.
39350set dummy $ac_prog; ac_word=$2
39351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39352$as_echo_n "checking for $ac_word... " >&6; }
39353if ${ac_cv_path_NM+:} false; then :
39354  $as_echo_n "(cached) " >&6
39355else
39356  case $NM in
39357  [\\/]* | ?:[\\/]*)
39358  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39359  ;;
39360  *)
39361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39362for as_dir in $PATH
39363do
39364  IFS=$as_save_IFS
39365  test -z "$as_dir" && as_dir=.
39366    for ac_exec_ext in '' $ac_executable_extensions; do
39367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39368    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39370    break 2
39371  fi
39372done
39373  done
39374IFS=$as_save_IFS
39375
39376  ;;
39377esac
39378fi
39379NM=$ac_cv_path_NM
39380if test -n "$NM"; then
39381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39382$as_echo "$NM" >&6; }
39383else
39384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39385$as_echo "no" >&6; }
39386fi
39387
39388
39389  test -n "$NM" && break
39390done
39391
39392  else
39393    # The variable is set, but is it from the command line or the environment?
39394
39395    # Try to remove the string !NM! from our list.
39396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39398      # If it failed, the variable was not from the command line. Ignore it,
39399      # but warn the user (except for BASH, which is always set by the calling BASH).
39400      if test "xNM" != xBASH; then
39401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39402$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39403      fi
39404      # Try to locate tool using the code snippet
39405      for ac_prog in nm
39406do
39407  # Extract the first word of "$ac_prog", so it can be a program name with args.
39408set dummy $ac_prog; ac_word=$2
39409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39410$as_echo_n "checking for $ac_word... " >&6; }
39411if ${ac_cv_path_NM+:} false; then :
39412  $as_echo_n "(cached) " >&6
39413else
39414  case $NM in
39415  [\\/]* | ?:[\\/]*)
39416  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39417  ;;
39418  *)
39419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39420for as_dir in $PATH
39421do
39422  IFS=$as_save_IFS
39423  test -z "$as_dir" && as_dir=.
39424    for ac_exec_ext in '' $ac_executable_extensions; do
39425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39426    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39428    break 2
39429  fi
39430done
39431  done
39432IFS=$as_save_IFS
39433
39434  ;;
39435esac
39436fi
39437NM=$ac_cv_path_NM
39438if test -n "$NM"; then
39439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39440$as_echo "$NM" >&6; }
39441else
39442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39443$as_echo "no" >&6; }
39444fi
39445
39446
39447  test -n "$NM" && break
39448done
39449
39450    else
39451      # If it succeeded, then it was overridden by the user. We will use it
39452      # for the tool.
39453
39454      # First remove it from the list of overridden variables, so we can test
39455      # for unknown variables in the end.
39456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39457
39458      # Check if we try to supply an empty value
39459      if test "x$NM" = x; then
39460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39461$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39463$as_echo_n "checking for NM... " >&6; }
39464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39465$as_echo "disabled" >&6; }
39466      else
39467        # Check if the provided tool contains a complete path.
39468        tool_specified="$NM"
39469        tool_basename="${tool_specified##*/}"
39470        if test "x$tool_basename" = "x$tool_specified"; then
39471          # A command without a complete path is provided, search $PATH.
39472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39473$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39474          # Extract the first word of "$tool_basename", so it can be a program name with args.
39475set dummy $tool_basename; ac_word=$2
39476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39477$as_echo_n "checking for $ac_word... " >&6; }
39478if ${ac_cv_path_NM+:} false; then :
39479  $as_echo_n "(cached) " >&6
39480else
39481  case $NM in
39482  [\\/]* | ?:[\\/]*)
39483  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39484  ;;
39485  *)
39486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39487for as_dir in $PATH
39488do
39489  IFS=$as_save_IFS
39490  test -z "$as_dir" && as_dir=.
39491    for ac_exec_ext in '' $ac_executable_extensions; do
39492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39493    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39495    break 2
39496  fi
39497done
39498  done
39499IFS=$as_save_IFS
39500
39501  ;;
39502esac
39503fi
39504NM=$ac_cv_path_NM
39505if test -n "$NM"; then
39506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39507$as_echo "$NM" >&6; }
39508else
39509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39510$as_echo "no" >&6; }
39511fi
39512
39513
39514          if test "x$NM" = x; then
39515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39516          fi
39517        else
39518          # Otherwise we believe it is a complete path. Use it as it is.
39519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39520$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39522$as_echo_n "checking for NM... " >&6; }
39523          if test ! -x "$tool_specified"; then
39524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39525$as_echo "not found" >&6; }
39526            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39527          fi
39528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39529$as_echo "$tool_specified" >&6; }
39530        fi
39531      fi
39532    fi
39533
39534  fi
39535
39536
39537
39538  # Only process if variable expands to non-empty
39539
39540  if test "x$NM" != x; then
39541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39542
39543  # First separate the path from the arguments. This will split at the first
39544  # space.
39545  complete="$NM"
39546  path="${complete%% *}"
39547  tmp="$complete EOL"
39548  arguments="${tmp#* }"
39549
39550  # Input might be given as Windows format, start by converting to
39551  # unix format.
39552  new_path=`$CYGPATH -u "$path"`
39553
39554  # Now try to locate executable using which
39555  new_path=`$WHICH "$new_path" 2> /dev/null`
39556  # bat and cmd files are not always considered executable in cygwin causing which
39557  # to not find them
39558  if test "x$new_path" = x \
39559      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39560      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39561    new_path=`$CYGPATH -u "$path"`
39562  fi
39563  if test "x$new_path" = x; then
39564    # Oops. Which didn't find the executable.
39565    # The splitting of arguments from the executable at a space might have been incorrect,
39566    # since paths with space are more likely in Windows. Give it another try with the whole
39567    # argument.
39568    path="$complete"
39569    arguments="EOL"
39570    new_path=`$CYGPATH -u "$path"`
39571    new_path=`$WHICH "$new_path" 2> /dev/null`
39572    # bat and cmd files are not always considered executable in cygwin causing which
39573    # to not find them
39574    if test "x$new_path" = x \
39575        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39576        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39577      new_path=`$CYGPATH -u "$path"`
39578    fi
39579    if test "x$new_path" = x; then
39580      # It's still not found. Now this is an unrecoverable error.
39581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39582$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39583      has_space=`$ECHO "$complete" | $GREP " "`
39584      if test "x$has_space" != x; then
39585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39587      fi
39588      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39589    fi
39590  fi
39591
39592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39595  # "foo.exe" is OK but "foo" is an error.
39596  #
39597  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39598  # It is also a way to make sure we got the proper file name for the real test later on.
39599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39600  if test "x$test_shortpath" = x; then
39601    # Short path failed, file does not exist as specified.
39602    # Try adding .exe or .cmd
39603    if test -f "${new_path}.exe"; then
39604      input_to_shortpath="${new_path}.exe"
39605    elif test -f "${new_path}.cmd"; then
39606      input_to_shortpath="${new_path}.cmd"
39607    else
39608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39609$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39612      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39613    fi
39614  else
39615    input_to_shortpath="$new_path"
39616  fi
39617
39618  # Call helper function which possibly converts this using DOS-style short mode.
39619  # If so, the updated path is stored in $new_path.
39620  new_path="$input_to_shortpath"
39621
39622  input_path="$input_to_shortpath"
39623  # Check if we need to convert this using DOS-style short mode. If the path
39624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39625  # take no chances and rewrite it.
39626  # Note: m4 eats our [], so we need to use [ and ] instead.
39627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39628  if test "x$has_forbidden_chars" != x; then
39629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39633      # Going to short mode and back again did indeed matter. Since short mode is
39634      # case insensitive, let's make it lowercase to improve readability.
39635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39636      # Now convert it back to Unix-style (cygpath)
39637      input_path=`$CYGPATH -u "$shortmode_path"`
39638      new_path="$input_path"
39639    fi
39640  fi
39641
39642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39643  if test "x$test_cygdrive_prefix" = x; then
39644    # As a simple fix, exclude /usr/bin since it's not a real path.
39645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39647      # a path prefixed by /cygdrive for fixpath to work.
39648      new_path="$CYGWIN_ROOT_PATH$input_path"
39649    fi
39650  fi
39651
39652  # remove trailing .exe if any
39653  new_path="${new_path/%.exe/}"
39654
39655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39656
39657  # First separate the path from the arguments. This will split at the first
39658  # space.
39659  complete="$NM"
39660  path="${complete%% *}"
39661  tmp="$complete EOL"
39662  arguments="${tmp#* }"
39663
39664  # Input might be given as Windows format, start by converting to
39665  # unix format.
39666  new_path="$path"
39667
39668  windows_path="$new_path"
39669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39670    unix_path=`$CYGPATH -u "$windows_path"`
39671    new_path="$unix_path"
39672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39674    new_path="$unix_path"
39675  fi
39676
39677
39678  # Now try to locate executable using which
39679  new_path=`$WHICH "$new_path" 2> /dev/null`
39680
39681  if test "x$new_path" = x; then
39682    # Oops. Which didn't find the executable.
39683    # The splitting of arguments from the executable at a space might have been incorrect,
39684    # since paths with space are more likely in Windows. Give it another try with the whole
39685    # argument.
39686    path="$complete"
39687    arguments="EOL"
39688    new_path="$path"
39689
39690  windows_path="$new_path"
39691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39692    unix_path=`$CYGPATH -u "$windows_path"`
39693    new_path="$unix_path"
39694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39696    new_path="$unix_path"
39697  fi
39698
39699
39700    new_path=`$WHICH "$new_path" 2> /dev/null`
39701    # bat and cmd files are not always considered executable in MSYS causing which
39702    # to not find them
39703    if test "x$new_path" = x \
39704        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39705        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39706      new_path="$path"
39707
39708  windows_path="$new_path"
39709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39710    unix_path=`$CYGPATH -u "$windows_path"`
39711    new_path="$unix_path"
39712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39714    new_path="$unix_path"
39715  fi
39716
39717    fi
39718
39719    if test "x$new_path" = x; then
39720      # It's still not found. Now this is an unrecoverable error.
39721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39722$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39723      has_space=`$ECHO "$complete" | $GREP " "`
39724      if test "x$has_space" != x; then
39725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39727      fi
39728      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39729    fi
39730  fi
39731
39732  # Now new_path has a complete unix path to the binary
39733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39734    # Keep paths in /bin as-is, but remove trailing .exe if any
39735    new_path="${new_path/%.exe/}"
39736    # Do not save /bin paths to all_fixpath_prefixes!
39737  else
39738    # Not in mixed or Windows style, start by that.
39739    new_path=`cmd //c echo $new_path`
39740
39741  input_path="$new_path"
39742  # Check if we need to convert this using DOS-style short mode. If the path
39743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39744  # take no chances and rewrite it.
39745  # Note: m4 eats our [], so we need to use [ and ] instead.
39746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39747  if test "x$has_forbidden_chars" != x; then
39748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39750  fi
39751
39752    # Output is in $new_path
39753
39754  windows_path="$new_path"
39755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39756    unix_path=`$CYGPATH -u "$windows_path"`
39757    new_path="$unix_path"
39758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39760    new_path="$unix_path"
39761  fi
39762
39763    # remove trailing .exe if any
39764    new_path="${new_path/%.exe/}"
39765
39766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39768  fi
39769
39770    else
39771      # We're on a unix platform. Hooray! :)
39772      # First separate the path from the arguments. This will split at the first
39773      # space.
39774      complete="$NM"
39775      path="${complete%% *}"
39776      tmp="$complete EOL"
39777      arguments="${tmp#* }"
39778
39779      # Cannot rely on the command "which" here since it doesn't always work.
39780      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39781      if test -z "$is_absolute_path"; then
39782        # Path to executable is not absolute. Find it.
39783        IFS_save="$IFS"
39784        IFS=:
39785        for p in $PATH; do
39786          if test -f "$p/$path" && test -x "$p/$path"; then
39787            new_path="$p/$path"
39788            break
39789          fi
39790        done
39791        IFS="$IFS_save"
39792      else
39793        # This is an absolute path, we can use it without further modifications.
39794        new_path="$path"
39795      fi
39796
39797      if test "x$new_path" = x; then
39798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39799$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39800        has_space=`$ECHO "$complete" | $GREP " "`
39801        if test "x$has_space" != x; then
39802          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39804        fi
39805        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39806      fi
39807    fi
39808
39809    # Now join together the path and the arguments once again
39810    if test "x$arguments" != xEOL; then
39811      new_complete="$new_path ${arguments% *}"
39812    else
39813      new_complete="$new_path"
39814    fi
39815
39816    if test "x$complete" != "x$new_complete"; then
39817      NM="$new_complete"
39818      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39819$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39820    fi
39821  fi
39822
39823
39824
39825  # Publish this variable in the help.
39826
39827
39828  if [ -z "${GNM+x}" ]; then
39829    # The variable is not set by user, try to locate tool using the code snippet
39830    for ac_prog in gnm
39831do
39832  # Extract the first word of "$ac_prog", so it can be a program name with args.
39833set dummy $ac_prog; ac_word=$2
39834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39835$as_echo_n "checking for $ac_word... " >&6; }
39836if ${ac_cv_path_GNM+:} false; then :
39837  $as_echo_n "(cached) " >&6
39838else
39839  case $GNM in
39840  [\\/]* | ?:[\\/]*)
39841  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39842  ;;
39843  *)
39844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39845for as_dir in $PATH
39846do
39847  IFS=$as_save_IFS
39848  test -z "$as_dir" && as_dir=.
39849    for ac_exec_ext in '' $ac_executable_extensions; do
39850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39851    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39853    break 2
39854  fi
39855done
39856  done
39857IFS=$as_save_IFS
39858
39859  ;;
39860esac
39861fi
39862GNM=$ac_cv_path_GNM
39863if test -n "$GNM"; then
39864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39865$as_echo "$GNM" >&6; }
39866else
39867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39868$as_echo "no" >&6; }
39869fi
39870
39871
39872  test -n "$GNM" && break
39873done
39874
39875  else
39876    # The variable is set, but is it from the command line or the environment?
39877
39878    # Try to remove the string !GNM! from our list.
39879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39881      # If it failed, the variable was not from the command line. Ignore it,
39882      # but warn the user (except for BASH, which is always set by the calling BASH).
39883      if test "xGNM" != xBASH; then
39884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39885$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39886      fi
39887      # Try to locate tool using the code snippet
39888      for ac_prog in gnm
39889do
39890  # Extract the first word of "$ac_prog", so it can be a program name with args.
39891set dummy $ac_prog; ac_word=$2
39892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39893$as_echo_n "checking for $ac_word... " >&6; }
39894if ${ac_cv_path_GNM+:} false; then :
39895  $as_echo_n "(cached) " >&6
39896else
39897  case $GNM in
39898  [\\/]* | ?:[\\/]*)
39899  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39900  ;;
39901  *)
39902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39903for as_dir in $PATH
39904do
39905  IFS=$as_save_IFS
39906  test -z "$as_dir" && as_dir=.
39907    for ac_exec_ext in '' $ac_executable_extensions; do
39908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39909    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39911    break 2
39912  fi
39913done
39914  done
39915IFS=$as_save_IFS
39916
39917  ;;
39918esac
39919fi
39920GNM=$ac_cv_path_GNM
39921if test -n "$GNM"; then
39922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39923$as_echo "$GNM" >&6; }
39924else
39925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39926$as_echo "no" >&6; }
39927fi
39928
39929
39930  test -n "$GNM" && break
39931done
39932
39933    else
39934      # If it succeeded, then it was overridden by the user. We will use it
39935      # for the tool.
39936
39937      # First remove it from the list of overridden variables, so we can test
39938      # for unknown variables in the end.
39939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39940
39941      # Check if we try to supply an empty value
39942      if test "x$GNM" = x; then
39943        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39944$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39946$as_echo_n "checking for GNM... " >&6; }
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39948$as_echo "disabled" >&6; }
39949      else
39950        # Check if the provided tool contains a complete path.
39951        tool_specified="$GNM"
39952        tool_basename="${tool_specified##*/}"
39953        if test "x$tool_basename" = "x$tool_specified"; then
39954          # A command without a complete path is provided, search $PATH.
39955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39956$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39957          # Extract the first word of "$tool_basename", so it can be a program name with args.
39958set dummy $tool_basename; ac_word=$2
39959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39960$as_echo_n "checking for $ac_word... " >&6; }
39961if ${ac_cv_path_GNM+:} false; then :
39962  $as_echo_n "(cached) " >&6
39963else
39964  case $GNM in
39965  [\\/]* | ?:[\\/]*)
39966  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39967  ;;
39968  *)
39969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39970for as_dir in $PATH
39971do
39972  IFS=$as_save_IFS
39973  test -z "$as_dir" && as_dir=.
39974    for ac_exec_ext in '' $ac_executable_extensions; do
39975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39976    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39978    break 2
39979  fi
39980done
39981  done
39982IFS=$as_save_IFS
39983
39984  ;;
39985esac
39986fi
39987GNM=$ac_cv_path_GNM
39988if test -n "$GNM"; then
39989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39990$as_echo "$GNM" >&6; }
39991else
39992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39993$as_echo "no" >&6; }
39994fi
39995
39996
39997          if test "x$GNM" = x; then
39998            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39999          fi
40000        else
40001          # Otherwise we believe it is a complete path. Use it as it is.
40002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40003$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40004          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40005$as_echo_n "checking for GNM... " >&6; }
40006          if test ! -x "$tool_specified"; then
40007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40008$as_echo "not found" >&6; }
40009            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40010          fi
40011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40012$as_echo "$tool_specified" >&6; }
40013        fi
40014      fi
40015    fi
40016
40017  fi
40018
40019
40020
40021  # Only process if variable expands to non-empty
40022
40023  if test "x$GNM" != x; then
40024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40025
40026  # First separate the path from the arguments. This will split at the first
40027  # space.
40028  complete="$GNM"
40029  path="${complete%% *}"
40030  tmp="$complete EOL"
40031  arguments="${tmp#* }"
40032
40033  # Input might be given as Windows format, start by converting to
40034  # unix format.
40035  new_path=`$CYGPATH -u "$path"`
40036
40037  # Now try to locate executable using which
40038  new_path=`$WHICH "$new_path" 2> /dev/null`
40039  # bat and cmd files are not always considered executable in cygwin causing which
40040  # to not find them
40041  if test "x$new_path" = x \
40042      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40043      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40044    new_path=`$CYGPATH -u "$path"`
40045  fi
40046  if test "x$new_path" = x; then
40047    # Oops. Which didn't find the executable.
40048    # The splitting of arguments from the executable at a space might have been incorrect,
40049    # since paths with space are more likely in Windows. Give it another try with the whole
40050    # argument.
40051    path="$complete"
40052    arguments="EOL"
40053    new_path=`$CYGPATH -u "$path"`
40054    new_path=`$WHICH "$new_path" 2> /dev/null`
40055    # bat and cmd files are not always considered executable in cygwin causing which
40056    # to not find them
40057    if test "x$new_path" = x \
40058        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40059        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40060      new_path=`$CYGPATH -u "$path"`
40061    fi
40062    if test "x$new_path" = x; then
40063      # It's still not found. Now this is an unrecoverable error.
40064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40065$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40066      has_space=`$ECHO "$complete" | $GREP " "`
40067      if test "x$has_space" != x; then
40068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40070      fi
40071      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40072    fi
40073  fi
40074
40075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40078  # "foo.exe" is OK but "foo" is an error.
40079  #
40080  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40081  # It is also a way to make sure we got the proper file name for the real test later on.
40082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40083  if test "x$test_shortpath" = x; then
40084    # Short path failed, file does not exist as specified.
40085    # Try adding .exe or .cmd
40086    if test -f "${new_path}.exe"; then
40087      input_to_shortpath="${new_path}.exe"
40088    elif test -f "${new_path}.cmd"; then
40089      input_to_shortpath="${new_path}.cmd"
40090    else
40091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40092$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40095      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40096    fi
40097  else
40098    input_to_shortpath="$new_path"
40099  fi
40100
40101  # Call helper function which possibly converts this using DOS-style short mode.
40102  # If so, the updated path is stored in $new_path.
40103  new_path="$input_to_shortpath"
40104
40105  input_path="$input_to_shortpath"
40106  # Check if we need to convert this using DOS-style short mode. If the path
40107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40108  # take no chances and rewrite it.
40109  # Note: m4 eats our [], so we need to use [ and ] instead.
40110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40111  if test "x$has_forbidden_chars" != x; then
40112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40116      # Going to short mode and back again did indeed matter. Since short mode is
40117      # case insensitive, let's make it lowercase to improve readability.
40118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40119      # Now convert it back to Unix-style (cygpath)
40120      input_path=`$CYGPATH -u "$shortmode_path"`
40121      new_path="$input_path"
40122    fi
40123  fi
40124
40125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40126  if test "x$test_cygdrive_prefix" = x; then
40127    # As a simple fix, exclude /usr/bin since it's not a real path.
40128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40130      # a path prefixed by /cygdrive for fixpath to work.
40131      new_path="$CYGWIN_ROOT_PATH$input_path"
40132    fi
40133  fi
40134
40135  # remove trailing .exe if any
40136  new_path="${new_path/%.exe/}"
40137
40138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40139
40140  # First separate the path from the arguments. This will split at the first
40141  # space.
40142  complete="$GNM"
40143  path="${complete%% *}"
40144  tmp="$complete EOL"
40145  arguments="${tmp#* }"
40146
40147  # Input might be given as Windows format, start by converting to
40148  # unix format.
40149  new_path="$path"
40150
40151  windows_path="$new_path"
40152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40153    unix_path=`$CYGPATH -u "$windows_path"`
40154    new_path="$unix_path"
40155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40157    new_path="$unix_path"
40158  fi
40159
40160
40161  # Now try to locate executable using which
40162  new_path=`$WHICH "$new_path" 2> /dev/null`
40163
40164  if test "x$new_path" = x; then
40165    # Oops. Which didn't find the executable.
40166    # The splitting of arguments from the executable at a space might have been incorrect,
40167    # since paths with space are more likely in Windows. Give it another try with the whole
40168    # argument.
40169    path="$complete"
40170    arguments="EOL"
40171    new_path="$path"
40172
40173  windows_path="$new_path"
40174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40175    unix_path=`$CYGPATH -u "$windows_path"`
40176    new_path="$unix_path"
40177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40179    new_path="$unix_path"
40180  fi
40181
40182
40183    new_path=`$WHICH "$new_path" 2> /dev/null`
40184    # bat and cmd files are not always considered executable in MSYS causing which
40185    # to not find them
40186    if test "x$new_path" = x \
40187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40189      new_path="$path"
40190
40191  windows_path="$new_path"
40192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40193    unix_path=`$CYGPATH -u "$windows_path"`
40194    new_path="$unix_path"
40195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40197    new_path="$unix_path"
40198  fi
40199
40200    fi
40201
40202    if test "x$new_path" = x; then
40203      # It's still not found. Now this is an unrecoverable error.
40204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40205$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40206      has_space=`$ECHO "$complete" | $GREP " "`
40207      if test "x$has_space" != x; then
40208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40210      fi
40211      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40212    fi
40213  fi
40214
40215  # Now new_path has a complete unix path to the binary
40216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40217    # Keep paths in /bin as-is, but remove trailing .exe if any
40218    new_path="${new_path/%.exe/}"
40219    # Do not save /bin paths to all_fixpath_prefixes!
40220  else
40221    # Not in mixed or Windows style, start by that.
40222    new_path=`cmd //c echo $new_path`
40223
40224  input_path="$new_path"
40225  # Check if we need to convert this using DOS-style short mode. If the path
40226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40227  # take no chances and rewrite it.
40228  # Note: m4 eats our [], so we need to use [ and ] instead.
40229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40230  if test "x$has_forbidden_chars" != x; then
40231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40233  fi
40234
40235    # Output is in $new_path
40236
40237  windows_path="$new_path"
40238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40239    unix_path=`$CYGPATH -u "$windows_path"`
40240    new_path="$unix_path"
40241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40243    new_path="$unix_path"
40244  fi
40245
40246    # remove trailing .exe if any
40247    new_path="${new_path/%.exe/}"
40248
40249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40251  fi
40252
40253    else
40254      # We're on a unix platform. Hooray! :)
40255      # First separate the path from the arguments. This will split at the first
40256      # space.
40257      complete="$GNM"
40258      path="${complete%% *}"
40259      tmp="$complete EOL"
40260      arguments="${tmp#* }"
40261
40262      # Cannot rely on the command "which" here since it doesn't always work.
40263      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40264      if test -z "$is_absolute_path"; then
40265        # Path to executable is not absolute. Find it.
40266        IFS_save="$IFS"
40267        IFS=:
40268        for p in $PATH; do
40269          if test -f "$p/$path" && test -x "$p/$path"; then
40270            new_path="$p/$path"
40271            break
40272          fi
40273        done
40274        IFS="$IFS_save"
40275      else
40276        # This is an absolute path, we can use it without further modifications.
40277        new_path="$path"
40278      fi
40279
40280      if test "x$new_path" = x; then
40281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40282$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40283        has_space=`$ECHO "$complete" | $GREP " "`
40284        if test "x$has_space" != x; then
40285          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40287        fi
40288        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40289      fi
40290    fi
40291
40292    # Now join together the path and the arguments once again
40293    if test "x$arguments" != xEOL; then
40294      new_complete="$new_path ${arguments% *}"
40295    else
40296      new_complete="$new_path"
40297    fi
40298
40299    if test "x$complete" != "x$new_complete"; then
40300      GNM="$new_complete"
40301      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40302$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40303    fi
40304  fi
40305
40306  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40307    # FIXME: we should unify this with the solaris case above.
40308
40309
40310  # Publish this variable in the help.
40311
40312
40313  if [ -z "${STRIP+x}" ]; then
40314    # The variable is not set by user, try to locate tool using the code snippet
40315    if test -n "$ac_tool_prefix"; then
40316  for ac_prog in strip
40317  do
40318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40321$as_echo_n "checking for $ac_word... " >&6; }
40322if ${ac_cv_prog_STRIP+:} false; then :
40323  $as_echo_n "(cached) " >&6
40324else
40325  if test -n "$STRIP"; then
40326  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40327else
40328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40329for as_dir in $PATH
40330do
40331  IFS=$as_save_IFS
40332  test -z "$as_dir" && as_dir=.
40333    for ac_exec_ext in '' $ac_executable_extensions; do
40334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40335    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40337    break 2
40338  fi
40339done
40340  done
40341IFS=$as_save_IFS
40342
40343fi
40344fi
40345STRIP=$ac_cv_prog_STRIP
40346if test -n "$STRIP"; then
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40348$as_echo "$STRIP" >&6; }
40349else
40350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40351$as_echo "no" >&6; }
40352fi
40353
40354
40355    test -n "$STRIP" && break
40356  done
40357fi
40358if test -z "$STRIP"; then
40359  ac_ct_STRIP=$STRIP
40360  for ac_prog in strip
40361do
40362  # Extract the first word of "$ac_prog", so it can be a program name with args.
40363set dummy $ac_prog; ac_word=$2
40364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40365$as_echo_n "checking for $ac_word... " >&6; }
40366if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40367  $as_echo_n "(cached) " >&6
40368else
40369  if test -n "$ac_ct_STRIP"; then
40370  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40371else
40372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40373for as_dir in $PATH
40374do
40375  IFS=$as_save_IFS
40376  test -z "$as_dir" && as_dir=.
40377    for ac_exec_ext in '' $ac_executable_extensions; do
40378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40379    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40381    break 2
40382  fi
40383done
40384  done
40385IFS=$as_save_IFS
40386
40387fi
40388fi
40389ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40390if test -n "$ac_ct_STRIP"; then
40391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40392$as_echo "$ac_ct_STRIP" >&6; }
40393else
40394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40395$as_echo "no" >&6; }
40396fi
40397
40398
40399  test -n "$ac_ct_STRIP" && break
40400done
40401
40402  if test "x$ac_ct_STRIP" = x; then
40403    STRIP=""
40404  else
40405    case $cross_compiling:$ac_tool_warned in
40406yes:)
40407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40409ac_tool_warned=yes ;;
40410esac
40411    STRIP=$ac_ct_STRIP
40412  fi
40413fi
40414
40415  else
40416    # The variable is set, but is it from the command line or the environment?
40417
40418    # Try to remove the string !STRIP! from our list.
40419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40421      # If it failed, the variable was not from the command line. Ignore it,
40422      # but warn the user (except for BASH, which is always set by the calling BASH).
40423      if test "xSTRIP" != xBASH; then
40424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40425$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40426      fi
40427      # Try to locate tool using the code snippet
40428      if test -n "$ac_tool_prefix"; then
40429  for ac_prog in strip
40430  do
40431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40434$as_echo_n "checking for $ac_word... " >&6; }
40435if ${ac_cv_prog_STRIP+:} false; then :
40436  $as_echo_n "(cached) " >&6
40437else
40438  if test -n "$STRIP"; then
40439  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40440else
40441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40442for as_dir in $PATH
40443do
40444  IFS=$as_save_IFS
40445  test -z "$as_dir" && as_dir=.
40446    for ac_exec_ext in '' $ac_executable_extensions; do
40447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40448    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40450    break 2
40451  fi
40452done
40453  done
40454IFS=$as_save_IFS
40455
40456fi
40457fi
40458STRIP=$ac_cv_prog_STRIP
40459if test -n "$STRIP"; then
40460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40461$as_echo "$STRIP" >&6; }
40462else
40463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40464$as_echo "no" >&6; }
40465fi
40466
40467
40468    test -n "$STRIP" && break
40469  done
40470fi
40471if test -z "$STRIP"; then
40472  ac_ct_STRIP=$STRIP
40473  for ac_prog in strip
40474do
40475  # Extract the first word of "$ac_prog", so it can be a program name with args.
40476set dummy $ac_prog; ac_word=$2
40477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40478$as_echo_n "checking for $ac_word... " >&6; }
40479if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40480  $as_echo_n "(cached) " >&6
40481else
40482  if test -n "$ac_ct_STRIP"; then
40483  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40484else
40485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40486for as_dir in $PATH
40487do
40488  IFS=$as_save_IFS
40489  test -z "$as_dir" && as_dir=.
40490    for ac_exec_ext in '' $ac_executable_extensions; do
40491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40492    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40494    break 2
40495  fi
40496done
40497  done
40498IFS=$as_save_IFS
40499
40500fi
40501fi
40502ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40503if test -n "$ac_ct_STRIP"; then
40504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40505$as_echo "$ac_ct_STRIP" >&6; }
40506else
40507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40508$as_echo "no" >&6; }
40509fi
40510
40511
40512  test -n "$ac_ct_STRIP" && break
40513done
40514
40515  if test "x$ac_ct_STRIP" = x; then
40516    STRIP=""
40517  else
40518    case $cross_compiling:$ac_tool_warned in
40519yes:)
40520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40522ac_tool_warned=yes ;;
40523esac
40524    STRIP=$ac_ct_STRIP
40525  fi
40526fi
40527
40528    else
40529      # If it succeeded, then it was overridden by the user. We will use it
40530      # for the tool.
40531
40532      # First remove it from the list of overridden variables, so we can test
40533      # for unknown variables in the end.
40534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40535
40536      # Check if we try to supply an empty value
40537      if test "x$STRIP" = x; then
40538        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40539$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40541$as_echo_n "checking for STRIP... " >&6; }
40542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40543$as_echo "disabled" >&6; }
40544      else
40545        # Check if the provided tool contains a complete path.
40546        tool_specified="$STRIP"
40547        tool_basename="${tool_specified##*/}"
40548        if test "x$tool_basename" = "x$tool_specified"; then
40549          # A command without a complete path is provided, search $PATH.
40550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40551$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40552          # Extract the first word of "$tool_basename", so it can be a program name with args.
40553set dummy $tool_basename; ac_word=$2
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40555$as_echo_n "checking for $ac_word... " >&6; }
40556if ${ac_cv_path_STRIP+:} false; then :
40557  $as_echo_n "(cached) " >&6
40558else
40559  case $STRIP in
40560  [\\/]* | ?:[\\/]*)
40561  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40562  ;;
40563  *)
40564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40565for as_dir in $PATH
40566do
40567  IFS=$as_save_IFS
40568  test -z "$as_dir" && as_dir=.
40569    for ac_exec_ext in '' $ac_executable_extensions; do
40570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40571    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40573    break 2
40574  fi
40575done
40576  done
40577IFS=$as_save_IFS
40578
40579  ;;
40580esac
40581fi
40582STRIP=$ac_cv_path_STRIP
40583if test -n "$STRIP"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40585$as_echo "$STRIP" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592          if test "x$STRIP" = x; then
40593            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40594          fi
40595        else
40596          # Otherwise we believe it is a complete path. Use it as it is.
40597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40598$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40600$as_echo_n "checking for STRIP... " >&6; }
40601          if test ! -x "$tool_specified"; then
40602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40603$as_echo "not found" >&6; }
40604            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40605          fi
40606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40607$as_echo "$tool_specified" >&6; }
40608        fi
40609      fi
40610    fi
40611
40612  fi
40613
40614
40615
40616  # Only process if variable expands to non-empty
40617
40618  if test "x$STRIP" != x; then
40619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40620
40621  # First separate the path from the arguments. This will split at the first
40622  # space.
40623  complete="$STRIP"
40624  path="${complete%% *}"
40625  tmp="$complete EOL"
40626  arguments="${tmp#* }"
40627
40628  # Input might be given as Windows format, start by converting to
40629  # unix format.
40630  new_path=`$CYGPATH -u "$path"`
40631
40632  # Now try to locate executable using which
40633  new_path=`$WHICH "$new_path" 2> /dev/null`
40634  # bat and cmd files are not always considered executable in cygwin causing which
40635  # to not find them
40636  if test "x$new_path" = x \
40637      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40638      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40639    new_path=`$CYGPATH -u "$path"`
40640  fi
40641  if test "x$new_path" = x; then
40642    # Oops. Which didn't find the executable.
40643    # The splitting of arguments from the executable at a space might have been incorrect,
40644    # since paths with space are more likely in Windows. Give it another try with the whole
40645    # argument.
40646    path="$complete"
40647    arguments="EOL"
40648    new_path=`$CYGPATH -u "$path"`
40649    new_path=`$WHICH "$new_path" 2> /dev/null`
40650    # bat and cmd files are not always considered executable in cygwin causing which
40651    # to not find them
40652    if test "x$new_path" = x \
40653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40655      new_path=`$CYGPATH -u "$path"`
40656    fi
40657    if test "x$new_path" = x; then
40658      # It's still not found. Now this is an unrecoverable error.
40659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40660$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40661      has_space=`$ECHO "$complete" | $GREP " "`
40662      if test "x$has_space" != x; then
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40665      fi
40666      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40667    fi
40668  fi
40669
40670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40673  # "foo.exe" is OK but "foo" is an error.
40674  #
40675  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40676  # It is also a way to make sure we got the proper file name for the real test later on.
40677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40678  if test "x$test_shortpath" = x; then
40679    # Short path failed, file does not exist as specified.
40680    # Try adding .exe or .cmd
40681    if test -f "${new_path}.exe"; then
40682      input_to_shortpath="${new_path}.exe"
40683    elif test -f "${new_path}.cmd"; then
40684      input_to_shortpath="${new_path}.cmd"
40685    else
40686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40687$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40688      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40689$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40690      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40691    fi
40692  else
40693    input_to_shortpath="$new_path"
40694  fi
40695
40696  # Call helper function which possibly converts this using DOS-style short mode.
40697  # If so, the updated path is stored in $new_path.
40698  new_path="$input_to_shortpath"
40699
40700  input_path="$input_to_shortpath"
40701  # Check if we need to convert this using DOS-style short mode. If the path
40702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40703  # take no chances and rewrite it.
40704  # Note: m4 eats our [], so we need to use [ and ] instead.
40705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40706  if test "x$has_forbidden_chars" != x; then
40707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40711      # Going to short mode and back again did indeed matter. Since short mode is
40712      # case insensitive, let's make it lowercase to improve readability.
40713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40714      # Now convert it back to Unix-style (cygpath)
40715      input_path=`$CYGPATH -u "$shortmode_path"`
40716      new_path="$input_path"
40717    fi
40718  fi
40719
40720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40721  if test "x$test_cygdrive_prefix" = x; then
40722    # As a simple fix, exclude /usr/bin since it's not a real path.
40723    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40725      # a path prefixed by /cygdrive for fixpath to work.
40726      new_path="$CYGWIN_ROOT_PATH$input_path"
40727    fi
40728  fi
40729
40730  # remove trailing .exe if any
40731  new_path="${new_path/%.exe/}"
40732
40733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40734
40735  # First separate the path from the arguments. This will split at the first
40736  # space.
40737  complete="$STRIP"
40738  path="${complete%% *}"
40739  tmp="$complete EOL"
40740  arguments="${tmp#* }"
40741
40742  # Input might be given as Windows format, start by converting to
40743  # unix format.
40744  new_path="$path"
40745
40746  windows_path="$new_path"
40747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40748    unix_path=`$CYGPATH -u "$windows_path"`
40749    new_path="$unix_path"
40750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40752    new_path="$unix_path"
40753  fi
40754
40755
40756  # Now try to locate executable using which
40757  new_path=`$WHICH "$new_path" 2> /dev/null`
40758
40759  if test "x$new_path" = x; then
40760    # Oops. Which didn't find the executable.
40761    # The splitting of arguments from the executable at a space might have been incorrect,
40762    # since paths with space are more likely in Windows. Give it another try with the whole
40763    # argument.
40764    path="$complete"
40765    arguments="EOL"
40766    new_path="$path"
40767
40768  windows_path="$new_path"
40769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40770    unix_path=`$CYGPATH -u "$windows_path"`
40771    new_path="$unix_path"
40772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40774    new_path="$unix_path"
40775  fi
40776
40777
40778    new_path=`$WHICH "$new_path" 2> /dev/null`
40779    # bat and cmd files are not always considered executable in MSYS causing which
40780    # to not find them
40781    if test "x$new_path" = x \
40782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40784      new_path="$path"
40785
40786  windows_path="$new_path"
40787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40788    unix_path=`$CYGPATH -u "$windows_path"`
40789    new_path="$unix_path"
40790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40792    new_path="$unix_path"
40793  fi
40794
40795    fi
40796
40797    if test "x$new_path" = x; then
40798      # It's still not found. Now this is an unrecoverable error.
40799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40800$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40801      has_space=`$ECHO "$complete" | $GREP " "`
40802      if test "x$has_space" != x; then
40803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40805      fi
40806      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40807    fi
40808  fi
40809
40810  # Now new_path has a complete unix path to the binary
40811  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40812    # Keep paths in /bin as-is, but remove trailing .exe if any
40813    new_path="${new_path/%.exe/}"
40814    # Do not save /bin paths to all_fixpath_prefixes!
40815  else
40816    # Not in mixed or Windows style, start by that.
40817    new_path=`cmd //c echo $new_path`
40818
40819  input_path="$new_path"
40820  # Check if we need to convert this using DOS-style short mode. If the path
40821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40822  # take no chances and rewrite it.
40823  # Note: m4 eats our [], so we need to use [ and ] instead.
40824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40825  if test "x$has_forbidden_chars" != x; then
40826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40828  fi
40829
40830    # Output is in $new_path
40831
40832  windows_path="$new_path"
40833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40834    unix_path=`$CYGPATH -u "$windows_path"`
40835    new_path="$unix_path"
40836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40838    new_path="$unix_path"
40839  fi
40840
40841    # remove trailing .exe if any
40842    new_path="${new_path/%.exe/}"
40843
40844    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40845    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40846  fi
40847
40848    else
40849      # We're on a unix platform. Hooray! :)
40850      # First separate the path from the arguments. This will split at the first
40851      # space.
40852      complete="$STRIP"
40853      path="${complete%% *}"
40854      tmp="$complete EOL"
40855      arguments="${tmp#* }"
40856
40857      # Cannot rely on the command "which" here since it doesn't always work.
40858      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40859      if test -z "$is_absolute_path"; then
40860        # Path to executable is not absolute. Find it.
40861        IFS_save="$IFS"
40862        IFS=:
40863        for p in $PATH; do
40864          if test -f "$p/$path" && test -x "$p/$path"; then
40865            new_path="$p/$path"
40866            break
40867          fi
40868        done
40869        IFS="$IFS_save"
40870      else
40871        # This is an absolute path, we can use it without further modifications.
40872        new_path="$path"
40873      fi
40874
40875      if test "x$new_path" = x; then
40876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40877$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40878        has_space=`$ECHO "$complete" | $GREP " "`
40879        if test "x$has_space" != x; then
40880          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40882        fi
40883        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40884      fi
40885    fi
40886
40887    # Now join together the path and the arguments once again
40888    if test "x$arguments" != xEOL; then
40889      new_complete="$new_path ${arguments% *}"
40890    else
40891      new_complete="$new_path"
40892    fi
40893
40894    if test "x$complete" != "x$new_complete"; then
40895      STRIP="$new_complete"
40896      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40897$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40898    fi
40899  fi
40900
40901    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40902
40903
40904  # Publish this variable in the help.
40905
40906
40907  if [ -z "${NM+x}" ]; then
40908    # The variable is not set by user, try to locate tool using the code snippet
40909    if test -n "$ac_tool_prefix"; then
40910  for ac_prog in nm gcc-nm
40911  do
40912    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40915$as_echo_n "checking for $ac_word... " >&6; }
40916if ${ac_cv_prog_NM+:} false; then :
40917  $as_echo_n "(cached) " >&6
40918else
40919  if test -n "$NM"; then
40920  ac_cv_prog_NM="$NM" # Let the user override the test.
40921else
40922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40923for as_dir in $PATH
40924do
40925  IFS=$as_save_IFS
40926  test -z "$as_dir" && as_dir=.
40927    for ac_exec_ext in '' $ac_executable_extensions; do
40928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40929    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40931    break 2
40932  fi
40933done
40934  done
40935IFS=$as_save_IFS
40936
40937fi
40938fi
40939NM=$ac_cv_prog_NM
40940if test -n "$NM"; then
40941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40942$as_echo "$NM" >&6; }
40943else
40944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40945$as_echo "no" >&6; }
40946fi
40947
40948
40949    test -n "$NM" && break
40950  done
40951fi
40952if test -z "$NM"; then
40953  ac_ct_NM=$NM
40954  for ac_prog in nm gcc-nm
40955do
40956  # Extract the first word of "$ac_prog", so it can be a program name with args.
40957set dummy $ac_prog; ac_word=$2
40958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40959$as_echo_n "checking for $ac_word... " >&6; }
40960if ${ac_cv_prog_ac_ct_NM+:} false; then :
40961  $as_echo_n "(cached) " >&6
40962else
40963  if test -n "$ac_ct_NM"; then
40964  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40965else
40966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40967for as_dir in $PATH
40968do
40969  IFS=$as_save_IFS
40970  test -z "$as_dir" && as_dir=.
40971    for ac_exec_ext in '' $ac_executable_extensions; do
40972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40973    ac_cv_prog_ac_ct_NM="$ac_prog"
40974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40975    break 2
40976  fi
40977done
40978  done
40979IFS=$as_save_IFS
40980
40981fi
40982fi
40983ac_ct_NM=$ac_cv_prog_ac_ct_NM
40984if test -n "$ac_ct_NM"; then
40985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40986$as_echo "$ac_ct_NM" >&6; }
40987else
40988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40989$as_echo "no" >&6; }
40990fi
40991
40992
40993  test -n "$ac_ct_NM" && break
40994done
40995
40996  if test "x$ac_ct_NM" = x; then
40997    NM=""
40998  else
40999    case $cross_compiling:$ac_tool_warned in
41000yes:)
41001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41003ac_tool_warned=yes ;;
41004esac
41005    NM=$ac_ct_NM
41006  fi
41007fi
41008
41009  else
41010    # The variable is set, but is it from the command line or the environment?
41011
41012    # Try to remove the string !NM! from our list.
41013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41015      # If it failed, the variable was not from the command line. Ignore it,
41016      # but warn the user (except for BASH, which is always set by the calling BASH).
41017      if test "xNM" != xBASH; then
41018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41019$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41020      fi
41021      # Try to locate tool using the code snippet
41022      if test -n "$ac_tool_prefix"; then
41023  for ac_prog in nm gcc-nm
41024  do
41025    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41028$as_echo_n "checking for $ac_word... " >&6; }
41029if ${ac_cv_prog_NM+:} false; then :
41030  $as_echo_n "(cached) " >&6
41031else
41032  if test -n "$NM"; then
41033  ac_cv_prog_NM="$NM" # Let the user override the test.
41034else
41035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036for as_dir in $PATH
41037do
41038  IFS=$as_save_IFS
41039  test -z "$as_dir" && as_dir=.
41040    for ac_exec_ext in '' $ac_executable_extensions; do
41041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044    break 2
41045  fi
41046done
41047  done
41048IFS=$as_save_IFS
41049
41050fi
41051fi
41052NM=$ac_cv_prog_NM
41053if test -n "$NM"; then
41054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41055$as_echo "$NM" >&6; }
41056else
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41058$as_echo "no" >&6; }
41059fi
41060
41061
41062    test -n "$NM" && break
41063  done
41064fi
41065if test -z "$NM"; then
41066  ac_ct_NM=$NM
41067  for ac_prog in nm gcc-nm
41068do
41069  # Extract the first word of "$ac_prog", so it can be a program name with args.
41070set dummy $ac_prog; ac_word=$2
41071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072$as_echo_n "checking for $ac_word... " >&6; }
41073if ${ac_cv_prog_ac_ct_NM+:} false; then :
41074  $as_echo_n "(cached) " >&6
41075else
41076  if test -n "$ac_ct_NM"; then
41077  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41078else
41079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_prog_ac_ct_NM="$ac_prog"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094fi
41095fi
41096ac_ct_NM=$ac_cv_prog_ac_ct_NM
41097if test -n "$ac_ct_NM"; then
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41099$as_echo "$ac_ct_NM" >&6; }
41100else
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41102$as_echo "no" >&6; }
41103fi
41104
41105
41106  test -n "$ac_ct_NM" && break
41107done
41108
41109  if test "x$ac_ct_NM" = x; then
41110    NM=""
41111  else
41112    case $cross_compiling:$ac_tool_warned in
41113yes:)
41114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41116ac_tool_warned=yes ;;
41117esac
41118    NM=$ac_ct_NM
41119  fi
41120fi
41121
41122    else
41123      # If it succeeded, then it was overridden by the user. We will use it
41124      # for the tool.
41125
41126      # First remove it from the list of overridden variables, so we can test
41127      # for unknown variables in the end.
41128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41129
41130      # Check if we try to supply an empty value
41131      if test "x$NM" = x; then
41132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41133$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41135$as_echo_n "checking for NM... " >&6; }
41136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41137$as_echo "disabled" >&6; }
41138      else
41139        # Check if the provided tool contains a complete path.
41140        tool_specified="$NM"
41141        tool_basename="${tool_specified##*/}"
41142        if test "x$tool_basename" = "x$tool_specified"; then
41143          # A command without a complete path is provided, search $PATH.
41144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41145$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41146          # Extract the first word of "$tool_basename", so it can be a program name with args.
41147set dummy $tool_basename; ac_word=$2
41148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41149$as_echo_n "checking for $ac_word... " >&6; }
41150if ${ac_cv_path_NM+:} false; then :
41151  $as_echo_n "(cached) " >&6
41152else
41153  case $NM in
41154  [\\/]* | ?:[\\/]*)
41155  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41156  ;;
41157  *)
41158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41159for as_dir in $PATH
41160do
41161  IFS=$as_save_IFS
41162  test -z "$as_dir" && as_dir=.
41163    for ac_exec_ext in '' $ac_executable_extensions; do
41164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41165    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41167    break 2
41168  fi
41169done
41170  done
41171IFS=$as_save_IFS
41172
41173  ;;
41174esac
41175fi
41176NM=$ac_cv_path_NM
41177if test -n "$NM"; then
41178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41179$as_echo "$NM" >&6; }
41180else
41181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41182$as_echo "no" >&6; }
41183fi
41184
41185
41186          if test "x$NM" = x; then
41187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41188          fi
41189        else
41190          # Otherwise we believe it is a complete path. Use it as it is.
41191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41192$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41194$as_echo_n "checking for NM... " >&6; }
41195          if test ! -x "$tool_specified"; then
41196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41197$as_echo "not found" >&6; }
41198            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41199          fi
41200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41201$as_echo "$tool_specified" >&6; }
41202        fi
41203      fi
41204    fi
41205
41206  fi
41207
41208
41209    else
41210
41211
41212  # Publish this variable in the help.
41213
41214
41215  if [ -z "${NM+x}" ]; then
41216    # The variable is not set by user, try to locate tool using the code snippet
41217    if test -n "$ac_tool_prefix"; then
41218  for ac_prog in nm
41219  do
41220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41223$as_echo_n "checking for $ac_word... " >&6; }
41224if ${ac_cv_prog_NM+:} false; then :
41225  $as_echo_n "(cached) " >&6
41226else
41227  if test -n "$NM"; then
41228  ac_cv_prog_NM="$NM" # Let the user override the test.
41229else
41230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41231for as_dir in $PATH
41232do
41233  IFS=$as_save_IFS
41234  test -z "$as_dir" && as_dir=.
41235    for ac_exec_ext in '' $ac_executable_extensions; do
41236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41237    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41239    break 2
41240  fi
41241done
41242  done
41243IFS=$as_save_IFS
41244
41245fi
41246fi
41247NM=$ac_cv_prog_NM
41248if test -n "$NM"; then
41249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41250$as_echo "$NM" >&6; }
41251else
41252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41253$as_echo "no" >&6; }
41254fi
41255
41256
41257    test -n "$NM" && break
41258  done
41259fi
41260if test -z "$NM"; then
41261  ac_ct_NM=$NM
41262  for ac_prog in nm
41263do
41264  # Extract the first word of "$ac_prog", so it can be a program name with args.
41265set dummy $ac_prog; ac_word=$2
41266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41267$as_echo_n "checking for $ac_word... " >&6; }
41268if ${ac_cv_prog_ac_ct_NM+:} false; then :
41269  $as_echo_n "(cached) " >&6
41270else
41271  if test -n "$ac_ct_NM"; then
41272  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41273else
41274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41275for as_dir in $PATH
41276do
41277  IFS=$as_save_IFS
41278  test -z "$as_dir" && as_dir=.
41279    for ac_exec_ext in '' $ac_executable_extensions; do
41280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41281    ac_cv_prog_ac_ct_NM="$ac_prog"
41282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41283    break 2
41284  fi
41285done
41286  done
41287IFS=$as_save_IFS
41288
41289fi
41290fi
41291ac_ct_NM=$ac_cv_prog_ac_ct_NM
41292if test -n "$ac_ct_NM"; then
41293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41294$as_echo "$ac_ct_NM" >&6; }
41295else
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297$as_echo "no" >&6; }
41298fi
41299
41300
41301  test -n "$ac_ct_NM" && break
41302done
41303
41304  if test "x$ac_ct_NM" = x; then
41305    NM=""
41306  else
41307    case $cross_compiling:$ac_tool_warned in
41308yes:)
41309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41311ac_tool_warned=yes ;;
41312esac
41313    NM=$ac_ct_NM
41314  fi
41315fi
41316
41317  else
41318    # The variable is set, but is it from the command line or the environment?
41319
41320    # Try to remove the string !NM! from our list.
41321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41323      # If it failed, the variable was not from the command line. Ignore it,
41324      # but warn the user (except for BASH, which is always set by the calling BASH).
41325      if test "xNM" != xBASH; then
41326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41327$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41328      fi
41329      # Try to locate tool using the code snippet
41330      if test -n "$ac_tool_prefix"; then
41331  for ac_prog in nm
41332  do
41333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41336$as_echo_n "checking for $ac_word... " >&6; }
41337if ${ac_cv_prog_NM+:} false; then :
41338  $as_echo_n "(cached) " >&6
41339else
41340  if test -n "$NM"; then
41341  ac_cv_prog_NM="$NM" # Let the user override the test.
41342else
41343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41344for as_dir in $PATH
41345do
41346  IFS=$as_save_IFS
41347  test -z "$as_dir" && as_dir=.
41348    for ac_exec_ext in '' $ac_executable_extensions; do
41349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41350    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41352    break 2
41353  fi
41354done
41355  done
41356IFS=$as_save_IFS
41357
41358fi
41359fi
41360NM=$ac_cv_prog_NM
41361if test -n "$NM"; then
41362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41363$as_echo "$NM" >&6; }
41364else
41365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41366$as_echo "no" >&6; }
41367fi
41368
41369
41370    test -n "$NM" && break
41371  done
41372fi
41373if test -z "$NM"; then
41374  ac_ct_NM=$NM
41375  for ac_prog in nm
41376do
41377  # Extract the first word of "$ac_prog", so it can be a program name with args.
41378set dummy $ac_prog; ac_word=$2
41379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41380$as_echo_n "checking for $ac_word... " >&6; }
41381if ${ac_cv_prog_ac_ct_NM+:} false; then :
41382  $as_echo_n "(cached) " >&6
41383else
41384  if test -n "$ac_ct_NM"; then
41385  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41386else
41387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41388for as_dir in $PATH
41389do
41390  IFS=$as_save_IFS
41391  test -z "$as_dir" && as_dir=.
41392    for ac_exec_ext in '' $ac_executable_extensions; do
41393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41394    ac_cv_prog_ac_ct_NM="$ac_prog"
41395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41396    break 2
41397  fi
41398done
41399  done
41400IFS=$as_save_IFS
41401
41402fi
41403fi
41404ac_ct_NM=$ac_cv_prog_ac_ct_NM
41405if test -n "$ac_ct_NM"; then
41406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41407$as_echo "$ac_ct_NM" >&6; }
41408else
41409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41410$as_echo "no" >&6; }
41411fi
41412
41413
41414  test -n "$ac_ct_NM" && break
41415done
41416
41417  if test "x$ac_ct_NM" = x; then
41418    NM=""
41419  else
41420    case $cross_compiling:$ac_tool_warned in
41421yes:)
41422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41424ac_tool_warned=yes ;;
41425esac
41426    NM=$ac_ct_NM
41427  fi
41428fi
41429
41430    else
41431      # If it succeeded, then it was overridden by the user. We will use it
41432      # for the tool.
41433
41434      # First remove it from the list of overridden variables, so we can test
41435      # for unknown variables in the end.
41436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41437
41438      # Check if we try to supply an empty value
41439      if test "x$NM" = x; then
41440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41441$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41443$as_echo_n "checking for NM... " >&6; }
41444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41445$as_echo "disabled" >&6; }
41446      else
41447        # Check if the provided tool contains a complete path.
41448        tool_specified="$NM"
41449        tool_basename="${tool_specified##*/}"
41450        if test "x$tool_basename" = "x$tool_specified"; then
41451          # A command without a complete path is provided, search $PATH.
41452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41453$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41454          # Extract the first word of "$tool_basename", so it can be a program name with args.
41455set dummy $tool_basename; ac_word=$2
41456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41457$as_echo_n "checking for $ac_word... " >&6; }
41458if ${ac_cv_path_NM+:} false; then :
41459  $as_echo_n "(cached) " >&6
41460else
41461  case $NM in
41462  [\\/]* | ?:[\\/]*)
41463  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41464  ;;
41465  *)
41466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41467for as_dir in $PATH
41468do
41469  IFS=$as_save_IFS
41470  test -z "$as_dir" && as_dir=.
41471    for ac_exec_ext in '' $ac_executable_extensions; do
41472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41473    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41475    break 2
41476  fi
41477done
41478  done
41479IFS=$as_save_IFS
41480
41481  ;;
41482esac
41483fi
41484NM=$ac_cv_path_NM
41485if test -n "$NM"; then
41486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41487$as_echo "$NM" >&6; }
41488else
41489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41490$as_echo "no" >&6; }
41491fi
41492
41493
41494          if test "x$NM" = x; then
41495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41496          fi
41497        else
41498          # Otherwise we believe it is a complete path. Use it as it is.
41499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41500$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41502$as_echo_n "checking for NM... " >&6; }
41503          if test ! -x "$tool_specified"; then
41504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41505$as_echo "not found" >&6; }
41506            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41507          fi
41508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41509$as_echo "$tool_specified" >&6; }
41510        fi
41511      fi
41512    fi
41513
41514  fi
41515
41516
41517    fi
41518
41519  # Only process if variable expands to non-empty
41520
41521  if test "x$NM" != x; then
41522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41523
41524  # First separate the path from the arguments. This will split at the first
41525  # space.
41526  complete="$NM"
41527  path="${complete%% *}"
41528  tmp="$complete EOL"
41529  arguments="${tmp#* }"
41530
41531  # Input might be given as Windows format, start by converting to
41532  # unix format.
41533  new_path=`$CYGPATH -u "$path"`
41534
41535  # Now try to locate executable using which
41536  new_path=`$WHICH "$new_path" 2> /dev/null`
41537  # bat and cmd files are not always considered executable in cygwin causing which
41538  # to not find them
41539  if test "x$new_path" = x \
41540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41542    new_path=`$CYGPATH -u "$path"`
41543  fi
41544  if test "x$new_path" = x; then
41545    # Oops. Which didn't find the executable.
41546    # The splitting of arguments from the executable at a space might have been incorrect,
41547    # since paths with space are more likely in Windows. Give it another try with the whole
41548    # argument.
41549    path="$complete"
41550    arguments="EOL"
41551    new_path=`$CYGPATH -u "$path"`
41552    new_path=`$WHICH "$new_path" 2> /dev/null`
41553    # bat and cmd files are not always considered executable in cygwin causing which
41554    # to not find them
41555    if test "x$new_path" = x \
41556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41558      new_path=`$CYGPATH -u "$path"`
41559    fi
41560    if test "x$new_path" = x; then
41561      # It's still not found. Now this is an unrecoverable error.
41562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41563$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41564      has_space=`$ECHO "$complete" | $GREP " "`
41565      if test "x$has_space" != x; then
41566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41568      fi
41569      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41570    fi
41571  fi
41572
41573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41576  # "foo.exe" is OK but "foo" is an error.
41577  #
41578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41579  # It is also a way to make sure we got the proper file name for the real test later on.
41580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41581  if test "x$test_shortpath" = x; then
41582    # Short path failed, file does not exist as specified.
41583    # Try adding .exe or .cmd
41584    if test -f "${new_path}.exe"; then
41585      input_to_shortpath="${new_path}.exe"
41586    elif test -f "${new_path}.cmd"; then
41587      input_to_shortpath="${new_path}.cmd"
41588    else
41589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41590$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41593      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41594    fi
41595  else
41596    input_to_shortpath="$new_path"
41597  fi
41598
41599  # Call helper function which possibly converts this using DOS-style short mode.
41600  # If so, the updated path is stored in $new_path.
41601  new_path="$input_to_shortpath"
41602
41603  input_path="$input_to_shortpath"
41604  # Check if we need to convert this using DOS-style short mode. If the path
41605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41606  # take no chances and rewrite it.
41607  # Note: m4 eats our [], so we need to use [ and ] instead.
41608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41609  if test "x$has_forbidden_chars" != x; then
41610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41614      # Going to short mode and back again did indeed matter. Since short mode is
41615      # case insensitive, let's make it lowercase to improve readability.
41616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41617      # Now convert it back to Unix-style (cygpath)
41618      input_path=`$CYGPATH -u "$shortmode_path"`
41619      new_path="$input_path"
41620    fi
41621  fi
41622
41623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41624  if test "x$test_cygdrive_prefix" = x; then
41625    # As a simple fix, exclude /usr/bin since it's not a real path.
41626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41628      # a path prefixed by /cygdrive for fixpath to work.
41629      new_path="$CYGWIN_ROOT_PATH$input_path"
41630    fi
41631  fi
41632
41633  # remove trailing .exe if any
41634  new_path="${new_path/%.exe/}"
41635
41636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41637
41638  # First separate the path from the arguments. This will split at the first
41639  # space.
41640  complete="$NM"
41641  path="${complete%% *}"
41642  tmp="$complete EOL"
41643  arguments="${tmp#* }"
41644
41645  # Input might be given as Windows format, start by converting to
41646  # unix format.
41647  new_path="$path"
41648
41649  windows_path="$new_path"
41650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41651    unix_path=`$CYGPATH -u "$windows_path"`
41652    new_path="$unix_path"
41653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41655    new_path="$unix_path"
41656  fi
41657
41658
41659  # Now try to locate executable using which
41660  new_path=`$WHICH "$new_path" 2> /dev/null`
41661
41662  if test "x$new_path" = x; then
41663    # Oops. Which didn't find the executable.
41664    # The splitting of arguments from the executable at a space might have been incorrect,
41665    # since paths with space are more likely in Windows. Give it another try with the whole
41666    # argument.
41667    path="$complete"
41668    arguments="EOL"
41669    new_path="$path"
41670
41671  windows_path="$new_path"
41672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41673    unix_path=`$CYGPATH -u "$windows_path"`
41674    new_path="$unix_path"
41675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41677    new_path="$unix_path"
41678  fi
41679
41680
41681    new_path=`$WHICH "$new_path" 2> /dev/null`
41682    # bat and cmd files are not always considered executable in MSYS causing which
41683    # to not find them
41684    if test "x$new_path" = x \
41685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41687      new_path="$path"
41688
41689  windows_path="$new_path"
41690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41691    unix_path=`$CYGPATH -u "$windows_path"`
41692    new_path="$unix_path"
41693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41695    new_path="$unix_path"
41696  fi
41697
41698    fi
41699
41700    if test "x$new_path" = x; then
41701      # It's still not found. Now this is an unrecoverable error.
41702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41703$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41704      has_space=`$ECHO "$complete" | $GREP " "`
41705      if test "x$has_space" != x; then
41706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41708      fi
41709      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41710    fi
41711  fi
41712
41713  # Now new_path has a complete unix path to the binary
41714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41715    # Keep paths in /bin as-is, but remove trailing .exe if any
41716    new_path="${new_path/%.exe/}"
41717    # Do not save /bin paths to all_fixpath_prefixes!
41718  else
41719    # Not in mixed or Windows style, start by that.
41720    new_path=`cmd //c echo $new_path`
41721
41722  input_path="$new_path"
41723  # Check if we need to convert this using DOS-style short mode. If the path
41724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41725  # take no chances and rewrite it.
41726  # Note: m4 eats our [], so we need to use [ and ] instead.
41727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41728  if test "x$has_forbidden_chars" != x; then
41729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41731  fi
41732
41733    # Output is in $new_path
41734
41735  windows_path="$new_path"
41736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41737    unix_path=`$CYGPATH -u "$windows_path"`
41738    new_path="$unix_path"
41739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41741    new_path="$unix_path"
41742  fi
41743
41744    # remove trailing .exe if any
41745    new_path="${new_path/%.exe/}"
41746
41747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41749  fi
41750
41751    else
41752      # We're on a unix platform. Hooray! :)
41753      # First separate the path from the arguments. This will split at the first
41754      # space.
41755      complete="$NM"
41756      path="${complete%% *}"
41757      tmp="$complete EOL"
41758      arguments="${tmp#* }"
41759
41760      # Cannot rely on the command "which" here since it doesn't always work.
41761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41762      if test -z "$is_absolute_path"; then
41763        # Path to executable is not absolute. Find it.
41764        IFS_save="$IFS"
41765        IFS=:
41766        for p in $PATH; do
41767          if test -f "$p/$path" && test -x "$p/$path"; then
41768            new_path="$p/$path"
41769            break
41770          fi
41771        done
41772        IFS="$IFS_save"
41773      else
41774        # This is an absolute path, we can use it without further modifications.
41775        new_path="$path"
41776      fi
41777
41778      if test "x$new_path" = x; then
41779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41780$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41781        has_space=`$ECHO "$complete" | $GREP " "`
41782        if test "x$has_space" != x; then
41783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41785        fi
41786        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41787      fi
41788    fi
41789
41790    # Now join together the path and the arguments once again
41791    if test "x$arguments" != xEOL; then
41792      new_complete="$new_path ${arguments% *}"
41793    else
41794      new_complete="$new_path"
41795    fi
41796
41797    if test "x$complete" != "x$new_complete"; then
41798      NM="$new_complete"
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41800$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41801    fi
41802  fi
41803
41804    GNM="$NM"
41805
41806  fi
41807
41808  # objcopy is used for moving debug symbols to separate files when
41809  # full debug symbols are enabled.
41810  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41811
41812
41813  # Publish this variable in the help.
41814
41815
41816  if [ -z "${OBJCOPY+x}" ]; then
41817    # The variable is not set by user, try to locate tool using the code snippet
41818    if test -n "$ac_tool_prefix"; then
41819  for ac_prog in gobjcopy objcopy
41820  do
41821    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41822set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41824$as_echo_n "checking for $ac_word... " >&6; }
41825if ${ac_cv_prog_OBJCOPY+:} false; then :
41826  $as_echo_n "(cached) " >&6
41827else
41828  if test -n "$OBJCOPY"; then
41829  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41830else
41831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41832for as_dir in $PATH
41833do
41834  IFS=$as_save_IFS
41835  test -z "$as_dir" && as_dir=.
41836    for ac_exec_ext in '' $ac_executable_extensions; do
41837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41838    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41840    break 2
41841  fi
41842done
41843  done
41844IFS=$as_save_IFS
41845
41846fi
41847fi
41848OBJCOPY=$ac_cv_prog_OBJCOPY
41849if test -n "$OBJCOPY"; then
41850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41851$as_echo "$OBJCOPY" >&6; }
41852else
41853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41854$as_echo "no" >&6; }
41855fi
41856
41857
41858    test -n "$OBJCOPY" && break
41859  done
41860fi
41861if test -z "$OBJCOPY"; then
41862  ac_ct_OBJCOPY=$OBJCOPY
41863  for ac_prog in gobjcopy objcopy
41864do
41865  # Extract the first word of "$ac_prog", so it can be a program name with args.
41866set dummy $ac_prog; ac_word=$2
41867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41868$as_echo_n "checking for $ac_word... " >&6; }
41869if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41870  $as_echo_n "(cached) " >&6
41871else
41872  if test -n "$ac_ct_OBJCOPY"; then
41873  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41874else
41875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41876for as_dir in $PATH
41877do
41878  IFS=$as_save_IFS
41879  test -z "$as_dir" && as_dir=.
41880    for ac_exec_ext in '' $ac_executable_extensions; do
41881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41882    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41884    break 2
41885  fi
41886done
41887  done
41888IFS=$as_save_IFS
41889
41890fi
41891fi
41892ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41893if test -n "$ac_ct_OBJCOPY"; then
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41895$as_echo "$ac_ct_OBJCOPY" >&6; }
41896else
41897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41898$as_echo "no" >&6; }
41899fi
41900
41901
41902  test -n "$ac_ct_OBJCOPY" && break
41903done
41904
41905  if test "x$ac_ct_OBJCOPY" = x; then
41906    OBJCOPY=""
41907  else
41908    case $cross_compiling:$ac_tool_warned in
41909yes:)
41910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41912ac_tool_warned=yes ;;
41913esac
41914    OBJCOPY=$ac_ct_OBJCOPY
41915  fi
41916fi
41917
41918  else
41919    # The variable is set, but is it from the command line or the environment?
41920
41921    # Try to remove the string !OBJCOPY! from our list.
41922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41924      # If it failed, the variable was not from the command line. Ignore it,
41925      # but warn the user (except for BASH, which is always set by the calling BASH).
41926      if test "xOBJCOPY" != xBASH; then
41927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41928$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41929      fi
41930      # Try to locate tool using the code snippet
41931      if test -n "$ac_tool_prefix"; then
41932  for ac_prog in gobjcopy objcopy
41933  do
41934    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41935set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41937$as_echo_n "checking for $ac_word... " >&6; }
41938if ${ac_cv_prog_OBJCOPY+:} false; then :
41939  $as_echo_n "(cached) " >&6
41940else
41941  if test -n "$OBJCOPY"; then
41942  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41943else
41944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41945for as_dir in $PATH
41946do
41947  IFS=$as_save_IFS
41948  test -z "$as_dir" && as_dir=.
41949    for ac_exec_ext in '' $ac_executable_extensions; do
41950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41951    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41953    break 2
41954  fi
41955done
41956  done
41957IFS=$as_save_IFS
41958
41959fi
41960fi
41961OBJCOPY=$ac_cv_prog_OBJCOPY
41962if test -n "$OBJCOPY"; then
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41964$as_echo "$OBJCOPY" >&6; }
41965else
41966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41967$as_echo "no" >&6; }
41968fi
41969
41970
41971    test -n "$OBJCOPY" && break
41972  done
41973fi
41974if test -z "$OBJCOPY"; then
41975  ac_ct_OBJCOPY=$OBJCOPY
41976  for ac_prog in gobjcopy objcopy
41977do
41978  # Extract the first word of "$ac_prog", so it can be a program name with args.
41979set dummy $ac_prog; ac_word=$2
41980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41981$as_echo_n "checking for $ac_word... " >&6; }
41982if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41983  $as_echo_n "(cached) " >&6
41984else
41985  if test -n "$ac_ct_OBJCOPY"; then
41986  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41987else
41988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41989for as_dir in $PATH
41990do
41991  IFS=$as_save_IFS
41992  test -z "$as_dir" && as_dir=.
41993    for ac_exec_ext in '' $ac_executable_extensions; do
41994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41995    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41997    break 2
41998  fi
41999done
42000  done
42001IFS=$as_save_IFS
42002
42003fi
42004fi
42005ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42006if test -n "$ac_ct_OBJCOPY"; then
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42008$as_echo "$ac_ct_OBJCOPY" >&6; }
42009else
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42011$as_echo "no" >&6; }
42012fi
42013
42014
42015  test -n "$ac_ct_OBJCOPY" && break
42016done
42017
42018  if test "x$ac_ct_OBJCOPY" = x; then
42019    OBJCOPY=""
42020  else
42021    case $cross_compiling:$ac_tool_warned in
42022yes:)
42023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42025ac_tool_warned=yes ;;
42026esac
42027    OBJCOPY=$ac_ct_OBJCOPY
42028  fi
42029fi
42030
42031    else
42032      # If it succeeded, then it was overridden by the user. We will use it
42033      # for the tool.
42034
42035      # First remove it from the list of overridden variables, so we can test
42036      # for unknown variables in the end.
42037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42038
42039      # Check if we try to supply an empty value
42040      if test "x$OBJCOPY" = x; then
42041        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42042$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42044$as_echo_n "checking for OBJCOPY... " >&6; }
42045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42046$as_echo "disabled" >&6; }
42047      else
42048        # Check if the provided tool contains a complete path.
42049        tool_specified="$OBJCOPY"
42050        tool_basename="${tool_specified##*/}"
42051        if test "x$tool_basename" = "x$tool_specified"; then
42052          # A command without a complete path is provided, search $PATH.
42053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42054$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42055          # Extract the first word of "$tool_basename", so it can be a program name with args.
42056set dummy $tool_basename; ac_word=$2
42057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42058$as_echo_n "checking for $ac_word... " >&6; }
42059if ${ac_cv_path_OBJCOPY+:} false; then :
42060  $as_echo_n "(cached) " >&6
42061else
42062  case $OBJCOPY in
42063  [\\/]* | ?:[\\/]*)
42064  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42065  ;;
42066  *)
42067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42068for as_dir in $PATH
42069do
42070  IFS=$as_save_IFS
42071  test -z "$as_dir" && as_dir=.
42072    for ac_exec_ext in '' $ac_executable_extensions; do
42073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42074    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42076    break 2
42077  fi
42078done
42079  done
42080IFS=$as_save_IFS
42081
42082  ;;
42083esac
42084fi
42085OBJCOPY=$ac_cv_path_OBJCOPY
42086if test -n "$OBJCOPY"; then
42087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42088$as_echo "$OBJCOPY" >&6; }
42089else
42090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42091$as_echo "no" >&6; }
42092fi
42093
42094
42095          if test "x$OBJCOPY" = x; then
42096            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42097          fi
42098        else
42099          # Otherwise we believe it is a complete path. Use it as it is.
42100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42101$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42102          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42103$as_echo_n "checking for OBJCOPY... " >&6; }
42104          if test ! -x "$tool_specified"; then
42105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42106$as_echo "not found" >&6; }
42107            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42108          fi
42109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42110$as_echo "$tool_specified" >&6; }
42111        fi
42112      fi
42113    fi
42114
42115  fi
42116
42117
42118    # Only call fixup if objcopy was found.
42119    if test -n "$OBJCOPY"; then
42120
42121  # Only process if variable expands to non-empty
42122
42123  if test "x$OBJCOPY" != x; then
42124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42125
42126  # First separate the path from the arguments. This will split at the first
42127  # space.
42128  complete="$OBJCOPY"
42129  path="${complete%% *}"
42130  tmp="$complete EOL"
42131  arguments="${tmp#* }"
42132
42133  # Input might be given as Windows format, start by converting to
42134  # unix format.
42135  new_path=`$CYGPATH -u "$path"`
42136
42137  # Now try to locate executable using which
42138  new_path=`$WHICH "$new_path" 2> /dev/null`
42139  # bat and cmd files are not always considered executable in cygwin causing which
42140  # to not find them
42141  if test "x$new_path" = x \
42142      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42143      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42144    new_path=`$CYGPATH -u "$path"`
42145  fi
42146  if test "x$new_path" = x; then
42147    # Oops. Which didn't find the executable.
42148    # The splitting of arguments from the executable at a space might have been incorrect,
42149    # since paths with space are more likely in Windows. Give it another try with the whole
42150    # argument.
42151    path="$complete"
42152    arguments="EOL"
42153    new_path=`$CYGPATH -u "$path"`
42154    new_path=`$WHICH "$new_path" 2> /dev/null`
42155    # bat and cmd files are not always considered executable in cygwin causing which
42156    # to not find them
42157    if test "x$new_path" = x \
42158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42160      new_path=`$CYGPATH -u "$path"`
42161    fi
42162    if test "x$new_path" = x; then
42163      # It's still not found. Now this is an unrecoverable error.
42164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42165$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42166      has_space=`$ECHO "$complete" | $GREP " "`
42167      if test "x$has_space" != x; then
42168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42170      fi
42171      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42172    fi
42173  fi
42174
42175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42178  # "foo.exe" is OK but "foo" is an error.
42179  #
42180  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42181  # It is also a way to make sure we got the proper file name for the real test later on.
42182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42183  if test "x$test_shortpath" = x; then
42184    # Short path failed, file does not exist as specified.
42185    # Try adding .exe or .cmd
42186    if test -f "${new_path}.exe"; then
42187      input_to_shortpath="${new_path}.exe"
42188    elif test -f "${new_path}.cmd"; then
42189      input_to_shortpath="${new_path}.cmd"
42190    else
42191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42192$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42193      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42194$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42195      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42196    fi
42197  else
42198    input_to_shortpath="$new_path"
42199  fi
42200
42201  # Call helper function which possibly converts this using DOS-style short mode.
42202  # If so, the updated path is stored in $new_path.
42203  new_path="$input_to_shortpath"
42204
42205  input_path="$input_to_shortpath"
42206  # Check if we need to convert this using DOS-style short mode. If the path
42207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42208  # take no chances and rewrite it.
42209  # Note: m4 eats our [], so we need to use [ and ] instead.
42210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42211  if test "x$has_forbidden_chars" != x; then
42212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42216      # Going to short mode and back again did indeed matter. Since short mode is
42217      # case insensitive, let's make it lowercase to improve readability.
42218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42219      # Now convert it back to Unix-style (cygpath)
42220      input_path=`$CYGPATH -u "$shortmode_path"`
42221      new_path="$input_path"
42222    fi
42223  fi
42224
42225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42226  if test "x$test_cygdrive_prefix" = x; then
42227    # As a simple fix, exclude /usr/bin since it's not a real path.
42228    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42230      # a path prefixed by /cygdrive for fixpath to work.
42231      new_path="$CYGWIN_ROOT_PATH$input_path"
42232    fi
42233  fi
42234
42235  # remove trailing .exe if any
42236  new_path="${new_path/%.exe/}"
42237
42238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42239
42240  # First separate the path from the arguments. This will split at the first
42241  # space.
42242  complete="$OBJCOPY"
42243  path="${complete%% *}"
42244  tmp="$complete EOL"
42245  arguments="${tmp#* }"
42246
42247  # Input might be given as Windows format, start by converting to
42248  # unix format.
42249  new_path="$path"
42250
42251  windows_path="$new_path"
42252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42253    unix_path=`$CYGPATH -u "$windows_path"`
42254    new_path="$unix_path"
42255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42257    new_path="$unix_path"
42258  fi
42259
42260
42261  # Now try to locate executable using which
42262  new_path=`$WHICH "$new_path" 2> /dev/null`
42263
42264  if test "x$new_path" = x; then
42265    # Oops. Which didn't find the executable.
42266    # The splitting of arguments from the executable at a space might have been incorrect,
42267    # since paths with space are more likely in Windows. Give it another try with the whole
42268    # argument.
42269    path="$complete"
42270    arguments="EOL"
42271    new_path="$path"
42272
42273  windows_path="$new_path"
42274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42275    unix_path=`$CYGPATH -u "$windows_path"`
42276    new_path="$unix_path"
42277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42279    new_path="$unix_path"
42280  fi
42281
42282
42283    new_path=`$WHICH "$new_path" 2> /dev/null`
42284    # bat and cmd files are not always considered executable in MSYS causing which
42285    # to not find them
42286    if test "x$new_path" = x \
42287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42289      new_path="$path"
42290
42291  windows_path="$new_path"
42292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42293    unix_path=`$CYGPATH -u "$windows_path"`
42294    new_path="$unix_path"
42295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42297    new_path="$unix_path"
42298  fi
42299
42300    fi
42301
42302    if test "x$new_path" = x; then
42303      # It's still not found. Now this is an unrecoverable error.
42304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42305$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42306      has_space=`$ECHO "$complete" | $GREP " "`
42307      if test "x$has_space" != x; then
42308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42310      fi
42311      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42312    fi
42313  fi
42314
42315  # Now new_path has a complete unix path to the binary
42316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42317    # Keep paths in /bin as-is, but remove trailing .exe if any
42318    new_path="${new_path/%.exe/}"
42319    # Do not save /bin paths to all_fixpath_prefixes!
42320  else
42321    # Not in mixed or Windows style, start by that.
42322    new_path=`cmd //c echo $new_path`
42323
42324  input_path="$new_path"
42325  # Check if we need to convert this using DOS-style short mode. If the path
42326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42327  # take no chances and rewrite it.
42328  # Note: m4 eats our [], so we need to use [ and ] instead.
42329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42330  if test "x$has_forbidden_chars" != x; then
42331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42333  fi
42334
42335    # Output is in $new_path
42336
42337  windows_path="$new_path"
42338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42339    unix_path=`$CYGPATH -u "$windows_path"`
42340    new_path="$unix_path"
42341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42343    new_path="$unix_path"
42344  fi
42345
42346    # remove trailing .exe if any
42347    new_path="${new_path/%.exe/}"
42348
42349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42351  fi
42352
42353    else
42354      # We're on a unix platform. Hooray! :)
42355      # First separate the path from the arguments. This will split at the first
42356      # space.
42357      complete="$OBJCOPY"
42358      path="${complete%% *}"
42359      tmp="$complete EOL"
42360      arguments="${tmp#* }"
42361
42362      # Cannot rely on the command "which" here since it doesn't always work.
42363      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42364      if test -z "$is_absolute_path"; then
42365        # Path to executable is not absolute. Find it.
42366        IFS_save="$IFS"
42367        IFS=:
42368        for p in $PATH; do
42369          if test -f "$p/$path" && test -x "$p/$path"; then
42370            new_path="$p/$path"
42371            break
42372          fi
42373        done
42374        IFS="$IFS_save"
42375      else
42376        # This is an absolute path, we can use it without further modifications.
42377        new_path="$path"
42378      fi
42379
42380      if test "x$new_path" = x; then
42381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42382$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42383        has_space=`$ECHO "$complete" | $GREP " "`
42384        if test "x$has_space" != x; then
42385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42387        fi
42388        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42389      fi
42390    fi
42391
42392    # Now join together the path and the arguments once again
42393    if test "x$arguments" != xEOL; then
42394      new_complete="$new_path ${arguments% *}"
42395    else
42396      new_complete="$new_path"
42397    fi
42398
42399    if test "x$complete" != "x$new_complete"; then
42400      OBJCOPY="$new_complete"
42401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42402$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42403    fi
42404  fi
42405
42406      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42407        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42408        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42409        # - version number is last blank separate word on first line
42410        # - version number formats that have been seen:
42411        #   - <major>.<minor>
42412        #   - <major>.<minor>.<micro>
42413        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42414        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42415         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42416              -e 's/.* //' \
42417              -e '/^[01]\./b bad' \
42418              -e '/^2\./{' \
42419              -e '  s/^2\.//' \
42420              -e '  /^[0-9]$/b bad' \
42421              -e '  /^[0-9]\./b bad' \
42422              -e '  /^1[0-9]$/b bad' \
42423              -e '  /^1[0-9]\./b bad' \
42424              -e '  /^20\./b bad' \
42425              -e '  /^21\.0$/b bad' \
42426              -e '  /^21\.0\./b bad' \
42427              -e '}' \
42428              -e ':good' \
42429              -e 's/.*/VALID_VERSION/p' \
42430              -e 'q' \
42431              -e ':bad' \
42432              -e 's/.*/BAD_VERSION/p' \
42433              -e 'q'`
42434        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42435          OBJCOPY=
42436          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
42437$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42438          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42439$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42440          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42441$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42442          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42443$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42444          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42445$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42446        fi
42447      fi
42448    fi
42449  fi
42450
42451
42452
42453  # Publish this variable in the help.
42454
42455
42456  if [ -z "${OBJDUMP+x}" ]; then
42457    # The variable is not set by user, try to locate tool using the code snippet
42458    if test -n "$ac_tool_prefix"; then
42459  for ac_prog in gobjdump objdump
42460  do
42461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42464$as_echo_n "checking for $ac_word... " >&6; }
42465if ${ac_cv_prog_OBJDUMP+:} false; then :
42466  $as_echo_n "(cached) " >&6
42467else
42468  if test -n "$OBJDUMP"; then
42469  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42470else
42471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42472for as_dir in $PATH
42473do
42474  IFS=$as_save_IFS
42475  test -z "$as_dir" && as_dir=.
42476    for ac_exec_ext in '' $ac_executable_extensions; do
42477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42478    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42480    break 2
42481  fi
42482done
42483  done
42484IFS=$as_save_IFS
42485
42486fi
42487fi
42488OBJDUMP=$ac_cv_prog_OBJDUMP
42489if test -n "$OBJDUMP"; then
42490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42491$as_echo "$OBJDUMP" >&6; }
42492else
42493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42494$as_echo "no" >&6; }
42495fi
42496
42497
42498    test -n "$OBJDUMP" && break
42499  done
42500fi
42501if test -z "$OBJDUMP"; then
42502  ac_ct_OBJDUMP=$OBJDUMP
42503  for ac_prog in gobjdump objdump
42504do
42505  # Extract the first word of "$ac_prog", so it can be a program name with args.
42506set dummy $ac_prog; ac_word=$2
42507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42508$as_echo_n "checking for $ac_word... " >&6; }
42509if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42510  $as_echo_n "(cached) " >&6
42511else
42512  if test -n "$ac_ct_OBJDUMP"; then
42513  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42514else
42515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42516for as_dir in $PATH
42517do
42518  IFS=$as_save_IFS
42519  test -z "$as_dir" && as_dir=.
42520    for ac_exec_ext in '' $ac_executable_extensions; do
42521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42522    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42524    break 2
42525  fi
42526done
42527  done
42528IFS=$as_save_IFS
42529
42530fi
42531fi
42532ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42533if test -n "$ac_ct_OBJDUMP"; then
42534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42535$as_echo "$ac_ct_OBJDUMP" >&6; }
42536else
42537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42538$as_echo "no" >&6; }
42539fi
42540
42541
42542  test -n "$ac_ct_OBJDUMP" && break
42543done
42544
42545  if test "x$ac_ct_OBJDUMP" = x; then
42546    OBJDUMP=""
42547  else
42548    case $cross_compiling:$ac_tool_warned in
42549yes:)
42550{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42551$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42552ac_tool_warned=yes ;;
42553esac
42554    OBJDUMP=$ac_ct_OBJDUMP
42555  fi
42556fi
42557
42558  else
42559    # The variable is set, but is it from the command line or the environment?
42560
42561    # Try to remove the string !OBJDUMP! from our list.
42562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42564      # If it failed, the variable was not from the command line. Ignore it,
42565      # but warn the user (except for BASH, which is always set by the calling BASH).
42566      if test "xOBJDUMP" != xBASH; then
42567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42568$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42569      fi
42570      # Try to locate tool using the code snippet
42571      if test -n "$ac_tool_prefix"; then
42572  for ac_prog in gobjdump objdump
42573  do
42574    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42577$as_echo_n "checking for $ac_word... " >&6; }
42578if ${ac_cv_prog_OBJDUMP+:} false; then :
42579  $as_echo_n "(cached) " >&6
42580else
42581  if test -n "$OBJDUMP"; then
42582  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42583else
42584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42585for as_dir in $PATH
42586do
42587  IFS=$as_save_IFS
42588  test -z "$as_dir" && as_dir=.
42589    for ac_exec_ext in '' $ac_executable_extensions; do
42590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42591    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42593    break 2
42594  fi
42595done
42596  done
42597IFS=$as_save_IFS
42598
42599fi
42600fi
42601OBJDUMP=$ac_cv_prog_OBJDUMP
42602if test -n "$OBJDUMP"; then
42603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42604$as_echo "$OBJDUMP" >&6; }
42605else
42606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42607$as_echo "no" >&6; }
42608fi
42609
42610
42611    test -n "$OBJDUMP" && break
42612  done
42613fi
42614if test -z "$OBJDUMP"; then
42615  ac_ct_OBJDUMP=$OBJDUMP
42616  for ac_prog in gobjdump objdump
42617do
42618  # Extract the first word of "$ac_prog", so it can be a program name with args.
42619set dummy $ac_prog; ac_word=$2
42620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42621$as_echo_n "checking for $ac_word... " >&6; }
42622if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42623  $as_echo_n "(cached) " >&6
42624else
42625  if test -n "$ac_ct_OBJDUMP"; then
42626  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42627else
42628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42629for as_dir in $PATH
42630do
42631  IFS=$as_save_IFS
42632  test -z "$as_dir" && as_dir=.
42633    for ac_exec_ext in '' $ac_executable_extensions; do
42634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42635    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42637    break 2
42638  fi
42639done
42640  done
42641IFS=$as_save_IFS
42642
42643fi
42644fi
42645ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42646if test -n "$ac_ct_OBJDUMP"; then
42647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42648$as_echo "$ac_ct_OBJDUMP" >&6; }
42649else
42650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42651$as_echo "no" >&6; }
42652fi
42653
42654
42655  test -n "$ac_ct_OBJDUMP" && break
42656done
42657
42658  if test "x$ac_ct_OBJDUMP" = x; then
42659    OBJDUMP=""
42660  else
42661    case $cross_compiling:$ac_tool_warned in
42662yes:)
42663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42665ac_tool_warned=yes ;;
42666esac
42667    OBJDUMP=$ac_ct_OBJDUMP
42668  fi
42669fi
42670
42671    else
42672      # If it succeeded, then it was overridden by the user. We will use it
42673      # for the tool.
42674
42675      # First remove it from the list of overridden variables, so we can test
42676      # for unknown variables in the end.
42677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42678
42679      # Check if we try to supply an empty value
42680      if test "x$OBJDUMP" = x; then
42681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42682$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42684$as_echo_n "checking for OBJDUMP... " >&6; }
42685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42686$as_echo "disabled" >&6; }
42687      else
42688        # Check if the provided tool contains a complete path.
42689        tool_specified="$OBJDUMP"
42690        tool_basename="${tool_specified##*/}"
42691        if test "x$tool_basename" = "x$tool_specified"; then
42692          # A command without a complete path is provided, search $PATH.
42693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42694$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42695          # Extract the first word of "$tool_basename", so it can be a program name with args.
42696set dummy $tool_basename; ac_word=$2
42697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42698$as_echo_n "checking for $ac_word... " >&6; }
42699if ${ac_cv_path_OBJDUMP+:} false; then :
42700  $as_echo_n "(cached) " >&6
42701else
42702  case $OBJDUMP in
42703  [\\/]* | ?:[\\/]*)
42704  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42705  ;;
42706  *)
42707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42708for as_dir in $PATH
42709do
42710  IFS=$as_save_IFS
42711  test -z "$as_dir" && as_dir=.
42712    for ac_exec_ext in '' $ac_executable_extensions; do
42713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42714    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42716    break 2
42717  fi
42718done
42719  done
42720IFS=$as_save_IFS
42721
42722  ;;
42723esac
42724fi
42725OBJDUMP=$ac_cv_path_OBJDUMP
42726if test -n "$OBJDUMP"; then
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42728$as_echo "$OBJDUMP" >&6; }
42729else
42730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732fi
42733
42734
42735          if test "x$OBJDUMP" = x; then
42736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42737          fi
42738        else
42739          # Otherwise we believe it is a complete path. Use it as it is.
42740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42741$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42743$as_echo_n "checking for OBJDUMP... " >&6; }
42744          if test ! -x "$tool_specified"; then
42745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42746$as_echo "not found" >&6; }
42747            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42748          fi
42749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42750$as_echo "$tool_specified" >&6; }
42751        fi
42752      fi
42753    fi
42754
42755  fi
42756
42757
42758  if test "x$OBJDUMP" != x; then
42759    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42760    # bails if argument is missing.
42761
42762  # Only process if variable expands to non-empty
42763
42764  if test "x$OBJDUMP" != x; then
42765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42766
42767  # First separate the path from the arguments. This will split at the first
42768  # space.
42769  complete="$OBJDUMP"
42770  path="${complete%% *}"
42771  tmp="$complete EOL"
42772  arguments="${tmp#* }"
42773
42774  # Input might be given as Windows format, start by converting to
42775  # unix format.
42776  new_path=`$CYGPATH -u "$path"`
42777
42778  # Now try to locate executable using which
42779  new_path=`$WHICH "$new_path" 2> /dev/null`
42780  # bat and cmd files are not always considered executable in cygwin causing which
42781  # to not find them
42782  if test "x$new_path" = x \
42783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42785    new_path=`$CYGPATH -u "$path"`
42786  fi
42787  if test "x$new_path" = x; then
42788    # Oops. Which didn't find the executable.
42789    # The splitting of arguments from the executable at a space might have been incorrect,
42790    # since paths with space are more likely in Windows. Give it another try with the whole
42791    # argument.
42792    path="$complete"
42793    arguments="EOL"
42794    new_path=`$CYGPATH -u "$path"`
42795    new_path=`$WHICH "$new_path" 2> /dev/null`
42796    # bat and cmd files are not always considered executable in cygwin causing which
42797    # to not find them
42798    if test "x$new_path" = x \
42799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42801      new_path=`$CYGPATH -u "$path"`
42802    fi
42803    if test "x$new_path" = x; then
42804      # It's still not found. Now this is an unrecoverable error.
42805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42806$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42807      has_space=`$ECHO "$complete" | $GREP " "`
42808      if test "x$has_space" != x; then
42809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42811      fi
42812      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42813    fi
42814  fi
42815
42816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42819  # "foo.exe" is OK but "foo" is an error.
42820  #
42821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42822  # It is also a way to make sure we got the proper file name for the real test later on.
42823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42824  if test "x$test_shortpath" = x; then
42825    # Short path failed, file does not exist as specified.
42826    # Try adding .exe or .cmd
42827    if test -f "${new_path}.exe"; then
42828      input_to_shortpath="${new_path}.exe"
42829    elif test -f "${new_path}.cmd"; then
42830      input_to_shortpath="${new_path}.cmd"
42831    else
42832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42833$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42836      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42837    fi
42838  else
42839    input_to_shortpath="$new_path"
42840  fi
42841
42842  # Call helper function which possibly converts this using DOS-style short mode.
42843  # If so, the updated path is stored in $new_path.
42844  new_path="$input_to_shortpath"
42845
42846  input_path="$input_to_shortpath"
42847  # Check if we need to convert this using DOS-style short mode. If the path
42848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42849  # take no chances and rewrite it.
42850  # Note: m4 eats our [], so we need to use [ and ] instead.
42851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42852  if test "x$has_forbidden_chars" != x; then
42853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42857      # Going to short mode and back again did indeed matter. Since short mode is
42858      # case insensitive, let's make it lowercase to improve readability.
42859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42860      # Now convert it back to Unix-style (cygpath)
42861      input_path=`$CYGPATH -u "$shortmode_path"`
42862      new_path="$input_path"
42863    fi
42864  fi
42865
42866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42867  if test "x$test_cygdrive_prefix" = x; then
42868    # As a simple fix, exclude /usr/bin since it's not a real path.
42869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42871      # a path prefixed by /cygdrive for fixpath to work.
42872      new_path="$CYGWIN_ROOT_PATH$input_path"
42873    fi
42874  fi
42875
42876  # remove trailing .exe if any
42877  new_path="${new_path/%.exe/}"
42878
42879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42880
42881  # First separate the path from the arguments. This will split at the first
42882  # space.
42883  complete="$OBJDUMP"
42884  path="${complete%% *}"
42885  tmp="$complete EOL"
42886  arguments="${tmp#* }"
42887
42888  # Input might be given as Windows format, start by converting to
42889  # unix format.
42890  new_path="$path"
42891
42892  windows_path="$new_path"
42893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42894    unix_path=`$CYGPATH -u "$windows_path"`
42895    new_path="$unix_path"
42896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42898    new_path="$unix_path"
42899  fi
42900
42901
42902  # Now try to locate executable using which
42903  new_path=`$WHICH "$new_path" 2> /dev/null`
42904
42905  if test "x$new_path" = x; then
42906    # Oops. Which didn't find the executable.
42907    # The splitting of arguments from the executable at a space might have been incorrect,
42908    # since paths with space are more likely in Windows. Give it another try with the whole
42909    # argument.
42910    path="$complete"
42911    arguments="EOL"
42912    new_path="$path"
42913
42914  windows_path="$new_path"
42915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42916    unix_path=`$CYGPATH -u "$windows_path"`
42917    new_path="$unix_path"
42918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42920    new_path="$unix_path"
42921  fi
42922
42923
42924    new_path=`$WHICH "$new_path" 2> /dev/null`
42925    # bat and cmd files are not always considered executable in MSYS causing which
42926    # to not find them
42927    if test "x$new_path" = x \
42928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42930      new_path="$path"
42931
42932  windows_path="$new_path"
42933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42934    unix_path=`$CYGPATH -u "$windows_path"`
42935    new_path="$unix_path"
42936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42938    new_path="$unix_path"
42939  fi
42940
42941    fi
42942
42943    if test "x$new_path" = x; then
42944      # It's still not found. Now this is an unrecoverable error.
42945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42946$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42947      has_space=`$ECHO "$complete" | $GREP " "`
42948      if test "x$has_space" != x; then
42949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42951      fi
42952      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42953    fi
42954  fi
42955
42956  # Now new_path has a complete unix path to the binary
42957  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42958    # Keep paths in /bin as-is, but remove trailing .exe if any
42959    new_path="${new_path/%.exe/}"
42960    # Do not save /bin paths to all_fixpath_prefixes!
42961  else
42962    # Not in mixed or Windows style, start by that.
42963    new_path=`cmd //c echo $new_path`
42964
42965  input_path="$new_path"
42966  # Check if we need to convert this using DOS-style short mode. If the path
42967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42968  # take no chances and rewrite it.
42969  # Note: m4 eats our [], so we need to use [ and ] instead.
42970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42971  if test "x$has_forbidden_chars" != x; then
42972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42974  fi
42975
42976    # Output is in $new_path
42977
42978  windows_path="$new_path"
42979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42980    unix_path=`$CYGPATH -u "$windows_path"`
42981    new_path="$unix_path"
42982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42984    new_path="$unix_path"
42985  fi
42986
42987    # remove trailing .exe if any
42988    new_path="${new_path/%.exe/}"
42989
42990    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42991    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42992  fi
42993
42994    else
42995      # We're on a unix platform. Hooray! :)
42996      # First separate the path from the arguments. This will split at the first
42997      # space.
42998      complete="$OBJDUMP"
42999      path="${complete%% *}"
43000      tmp="$complete EOL"
43001      arguments="${tmp#* }"
43002
43003      # Cannot rely on the command "which" here since it doesn't always work.
43004      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43005      if test -z "$is_absolute_path"; then
43006        # Path to executable is not absolute. Find it.
43007        IFS_save="$IFS"
43008        IFS=:
43009        for p in $PATH; do
43010          if test -f "$p/$path" && test -x "$p/$path"; then
43011            new_path="$p/$path"
43012            break
43013          fi
43014        done
43015        IFS="$IFS_save"
43016      else
43017        # This is an absolute path, we can use it without further modifications.
43018        new_path="$path"
43019      fi
43020
43021      if test "x$new_path" = x; then
43022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43023$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43024        has_space=`$ECHO "$complete" | $GREP " "`
43025        if test "x$has_space" != x; then
43026          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43028        fi
43029        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43030      fi
43031    fi
43032
43033    # Now join together the path and the arguments once again
43034    if test "x$arguments" != xEOL; then
43035      new_complete="$new_path ${arguments% *}"
43036    else
43037      new_complete="$new_path"
43038    fi
43039
43040    if test "x$complete" != "x$new_complete"; then
43041      OBJDUMP="$new_complete"
43042      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43043$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43044    fi
43045  fi
43046
43047  fi
43048
43049
43050  # Restore old path.
43051  PATH="$OLD_PATH"
43052
43053  # Restore the flags to the user specified values.
43054  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43055  CFLAGS="$ORG_CFLAGS"
43056  CXXFLAGS="$ORG_CXXFLAGS"
43057
43058
43059# Finally do some processing after the detection phase
43060
43061  if test "x$COMPILE_TYPE" = "xcross"; then
43062    # Now we need to find a C/C++ compiler that can build executables for the
43063    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43064    # used once. Also, we need to do this without adding a tools dir to the
43065    # path, otherwise we might pick up cross-compilers which don't use standard
43066    # naming.
43067
43068    OLDPATH="$PATH"
43069
43070
43071# Check whether --with-build-devkit was given.
43072if test "${with_build_devkit+set}" = set; then :
43073  withval=$with_build_devkit;
43074fi
43075
43076    if test "x$with_build_devkit" = "xyes"; then
43077      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43078    elif test -n "$with_build_devkit"; then
43079      if test ! -d "$with_build_devkit"; then
43080        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43081      else
43082
43083  # Only process if variable expands to non-empty
43084
43085  if test "x$with_build_devkit" != x; then
43086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43087
43088  # Input might be given as Windows format, start by converting to
43089  # unix format.
43090  path="$with_build_devkit"
43091  new_path=`$CYGPATH -u "$path"`
43092
43093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43096  # "foo.exe" is OK but "foo" is an error.
43097  #
43098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43099  # It is also a way to make sure we got the proper file name for the real test later on.
43100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43101  if test "x$test_shortpath" = x; then
43102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43103$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43104    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43105  fi
43106
43107  # Call helper function which possibly converts this using DOS-style short mode.
43108  # If so, the updated path is stored in $new_path.
43109
43110  input_path="$new_path"
43111  # Check if we need to convert this using DOS-style short mode. If the path
43112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43113  # take no chances and rewrite it.
43114  # Note: m4 eats our [], so we need to use [ and ] instead.
43115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43116  if test "x$has_forbidden_chars" != x; then
43117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43121      # Going to short mode and back again did indeed matter. Since short mode is
43122      # case insensitive, let's make it lowercase to improve readability.
43123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43124      # Now convert it back to Unix-style (cygpath)
43125      input_path=`$CYGPATH -u "$shortmode_path"`
43126      new_path="$input_path"
43127    fi
43128  fi
43129
43130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43131  if test "x$test_cygdrive_prefix" = x; then
43132    # As a simple fix, exclude /usr/bin since it's not a real path.
43133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43135      # a path prefixed by /cygdrive for fixpath to work.
43136      new_path="$CYGWIN_ROOT_PATH$input_path"
43137    fi
43138  fi
43139
43140
43141  if test "x$path" != "x$new_path"; then
43142    with_build_devkit="$new_path"
43143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43144$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43145  fi
43146
43147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43148
43149  path="$with_build_devkit"
43150  has_colon=`$ECHO $path | $GREP ^.:`
43151  new_path="$path"
43152  if test "x$has_colon" = x; then
43153    # Not in mixed or Windows style, start by that.
43154    new_path=`cmd //c echo $path`
43155  fi
43156
43157
43158  input_path="$new_path"
43159  # Check if we need to convert this using DOS-style short mode. If the path
43160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43161  # take no chances and rewrite it.
43162  # Note: m4 eats our [], so we need to use [ and ] instead.
43163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43164  if test "x$has_forbidden_chars" != x; then
43165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43167  fi
43168
43169
43170  windows_path="$new_path"
43171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43172    unix_path=`$CYGPATH -u "$windows_path"`
43173    new_path="$unix_path"
43174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43176    new_path="$unix_path"
43177  fi
43178
43179  if test "x$path" != "x$new_path"; then
43180    with_build_devkit="$new_path"
43181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43182$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43183  fi
43184
43185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43187
43188    else
43189      # We're on a unix platform. Hooray! :)
43190      path="$with_build_devkit"
43191      has_space=`$ECHO "$path" | $GREP " "`
43192      if test "x$has_space" != x; then
43193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43194$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43196      fi
43197
43198      # Use eval to expand a potential ~
43199      eval path="$path"
43200      if test ! -f "$path" && test ! -d "$path"; then
43201        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43202      fi
43203
43204      if test -d "$path"; then
43205        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43206      else
43207        dir="`$DIRNAME "$path"`"
43208        base="`$BASENAME "$path"`"
43209        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43210      fi
43211    fi
43212  fi
43213
43214        BUILD_DEVKIT_ROOT="$with_build_devkit"
43215        # Check for a meta data info file in the root of the devkit
43216        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43217          # Process devkit.info so that existing devkit variables are not
43218          # modified by this
43219          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43220              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43221              -e "s/\$host/\$build/g" \
43222              $BUILD_DEVKIT_ROOT/devkit.info \
43223              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43224          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43225          # This potentially sets the following:
43226          # A descriptive name of the devkit
43227
43228  if test "x$BUILD_DEVKIT_NAME" = x; then
43229    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43230  fi
43231
43232          # Corresponds to --with-extra-path
43233
43234  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43235    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43236  fi
43237
43238          # Corresponds to --with-toolchain-path
43239
43240  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43241    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43242  fi
43243
43244          # Corresponds to --with-sysroot
43245
43246  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43247    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43248  fi
43249
43250          # Skip the Window specific parts
43251        fi
43252
43253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43254$as_echo_n "checking for build platform devkit... " >&6; }
43255        if test "x$BUILD_DEVKIT_NAME" != x; then
43256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43257$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43258        else
43259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43260$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43261        fi
43262
43263        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43264
43265  if test "x$BUILD_SYSROOT" != "x"; then
43266    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43267      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43268        # Solaris Studio does not have a concept of sysroot. Instead we must
43269        # make sure the default include and lib dirs are appended to each
43270        # compile and link command line.
43271        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43272        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43273            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43274            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43275      fi
43276    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43277      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43278      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43279    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43280      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43281      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43282    fi
43283    # Propagate the sysroot args to hotspot
43284    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43285    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43286    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43287    # The global CFLAGS and LDFLAGS variables need these for configure to function
43288    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43289    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43290    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43291    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43292  fi
43293
43294  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43295    # We also need -iframework<path>/System/Library/Frameworks
43296    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43297    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43298    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43299    # set this here so it doesn't have to be peppered throughout the forest
43300    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43301    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43302  fi
43303
43304
43305
43306
43307
43308         # Fallback default of just /bin if DEVKIT_PATH is not defined
43309        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43310          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43311        fi
43312        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43313      fi
43314    fi
43315
43316    # FIXME: we should list the discovered compilers as an exclude pattern!
43317    # If we do that, we can do this detection before POST_DETECTION, and still
43318    # find the build compilers in the tools dir, if needed.
43319
43320
43321
43322  # Publish this variable in the help.
43323
43324
43325  if [ -z "${BUILD_CC+x}" ]; then
43326    # The variable is not set by user, try to locate tool using the code snippet
43327    for ac_prog in cl cc gcc
43328do
43329  # Extract the first word of "$ac_prog", so it can be a program name with args.
43330set dummy $ac_prog; ac_word=$2
43331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43332$as_echo_n "checking for $ac_word... " >&6; }
43333if ${ac_cv_path_BUILD_CC+:} false; then :
43334  $as_echo_n "(cached) " >&6
43335else
43336  case $BUILD_CC in
43337  [\\/]* | ?:[\\/]*)
43338  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43339  ;;
43340  *)
43341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43342for as_dir in $PATH
43343do
43344  IFS=$as_save_IFS
43345  test -z "$as_dir" && as_dir=.
43346    for ac_exec_ext in '' $ac_executable_extensions; do
43347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43348    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43350    break 2
43351  fi
43352done
43353  done
43354IFS=$as_save_IFS
43355
43356  ;;
43357esac
43358fi
43359BUILD_CC=$ac_cv_path_BUILD_CC
43360if test -n "$BUILD_CC"; then
43361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43362$as_echo "$BUILD_CC" >&6; }
43363else
43364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43365$as_echo "no" >&6; }
43366fi
43367
43368
43369  test -n "$BUILD_CC" && break
43370done
43371
43372  else
43373    # The variable is set, but is it from the command line or the environment?
43374
43375    # Try to remove the string !BUILD_CC! from our list.
43376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43378      # If it failed, the variable was not from the command line. Ignore it,
43379      # but warn the user (except for BASH, which is always set by the calling BASH).
43380      if test "xBUILD_CC" != xBASH; then
43381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43382$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43383      fi
43384      # Try to locate tool using the code snippet
43385      for ac_prog in cl cc gcc
43386do
43387  # Extract the first word of "$ac_prog", so it can be a program name with args.
43388set dummy $ac_prog; ac_word=$2
43389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43390$as_echo_n "checking for $ac_word... " >&6; }
43391if ${ac_cv_path_BUILD_CC+:} false; then :
43392  $as_echo_n "(cached) " >&6
43393else
43394  case $BUILD_CC in
43395  [\\/]* | ?:[\\/]*)
43396  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43397  ;;
43398  *)
43399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43400for as_dir in $PATH
43401do
43402  IFS=$as_save_IFS
43403  test -z "$as_dir" && as_dir=.
43404    for ac_exec_ext in '' $ac_executable_extensions; do
43405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43406    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43408    break 2
43409  fi
43410done
43411  done
43412IFS=$as_save_IFS
43413
43414  ;;
43415esac
43416fi
43417BUILD_CC=$ac_cv_path_BUILD_CC
43418if test -n "$BUILD_CC"; then
43419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43420$as_echo "$BUILD_CC" >&6; }
43421else
43422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43423$as_echo "no" >&6; }
43424fi
43425
43426
43427  test -n "$BUILD_CC" && break
43428done
43429
43430    else
43431      # If it succeeded, then it was overridden by the user. We will use it
43432      # for the tool.
43433
43434      # First remove it from the list of overridden variables, so we can test
43435      # for unknown variables in the end.
43436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43437
43438      # Check if we try to supply an empty value
43439      if test "x$BUILD_CC" = x; then
43440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43441$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43443$as_echo_n "checking for BUILD_CC... " >&6; }
43444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43445$as_echo "disabled" >&6; }
43446      else
43447        # Check if the provided tool contains a complete path.
43448        tool_specified="$BUILD_CC"
43449        tool_basename="${tool_specified##*/}"
43450        if test "x$tool_basename" = "x$tool_specified"; then
43451          # A command without a complete path is provided, search $PATH.
43452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43453$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43454          # Extract the first word of "$tool_basename", so it can be a program name with args.
43455set dummy $tool_basename; ac_word=$2
43456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43457$as_echo_n "checking for $ac_word... " >&6; }
43458if ${ac_cv_path_BUILD_CC+:} false; then :
43459  $as_echo_n "(cached) " >&6
43460else
43461  case $BUILD_CC in
43462  [\\/]* | ?:[\\/]*)
43463  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43464  ;;
43465  *)
43466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43467for as_dir in $PATH
43468do
43469  IFS=$as_save_IFS
43470  test -z "$as_dir" && as_dir=.
43471    for ac_exec_ext in '' $ac_executable_extensions; do
43472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43473    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43475    break 2
43476  fi
43477done
43478  done
43479IFS=$as_save_IFS
43480
43481  ;;
43482esac
43483fi
43484BUILD_CC=$ac_cv_path_BUILD_CC
43485if test -n "$BUILD_CC"; then
43486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43487$as_echo "$BUILD_CC" >&6; }
43488else
43489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43490$as_echo "no" >&6; }
43491fi
43492
43493
43494          if test "x$BUILD_CC" = x; then
43495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43496          fi
43497        else
43498          # Otherwise we believe it is a complete path. Use it as it is.
43499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43500$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43502$as_echo_n "checking for BUILD_CC... " >&6; }
43503          if test ! -x "$tool_specified"; then
43504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43505$as_echo "not found" >&6; }
43506            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43507          fi
43508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43509$as_echo "$tool_specified" >&6; }
43510        fi
43511      fi
43512    fi
43513
43514  fi
43515
43516
43517
43518  if test "x$BUILD_CC" = x; then
43519    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43520  fi
43521
43522
43523
43524  # Only process if variable expands to non-empty
43525
43526  if test "x$BUILD_CC" != x; then
43527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43528
43529  # First separate the path from the arguments. This will split at the first
43530  # space.
43531  complete="$BUILD_CC"
43532  path="${complete%% *}"
43533  tmp="$complete EOL"
43534  arguments="${tmp#* }"
43535
43536  # Input might be given as Windows format, start by converting to
43537  # unix format.
43538  new_path=`$CYGPATH -u "$path"`
43539
43540  # Now try to locate executable using which
43541  new_path=`$WHICH "$new_path" 2> /dev/null`
43542  # bat and cmd files are not always considered executable in cygwin causing which
43543  # to not find them
43544  if test "x$new_path" = x \
43545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43547    new_path=`$CYGPATH -u "$path"`
43548  fi
43549  if test "x$new_path" = x; then
43550    # Oops. Which didn't find the executable.
43551    # The splitting of arguments from the executable at a space might have been incorrect,
43552    # since paths with space are more likely in Windows. Give it another try with the whole
43553    # argument.
43554    path="$complete"
43555    arguments="EOL"
43556    new_path=`$CYGPATH -u "$path"`
43557    new_path=`$WHICH "$new_path" 2> /dev/null`
43558    # bat and cmd files are not always considered executable in cygwin causing which
43559    # to not find them
43560    if test "x$new_path" = x \
43561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43563      new_path=`$CYGPATH -u "$path"`
43564    fi
43565    if test "x$new_path" = x; then
43566      # It's still not found. Now this is an unrecoverable error.
43567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43568$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43569      has_space=`$ECHO "$complete" | $GREP " "`
43570      if test "x$has_space" != x; then
43571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43573      fi
43574      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43575    fi
43576  fi
43577
43578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43581  # "foo.exe" is OK but "foo" is an error.
43582  #
43583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43584  # It is also a way to make sure we got the proper file name for the real test later on.
43585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43586  if test "x$test_shortpath" = x; then
43587    # Short path failed, file does not exist as specified.
43588    # Try adding .exe or .cmd
43589    if test -f "${new_path}.exe"; then
43590      input_to_shortpath="${new_path}.exe"
43591    elif test -f "${new_path}.cmd"; then
43592      input_to_shortpath="${new_path}.cmd"
43593    else
43594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43595$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43598      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43599    fi
43600  else
43601    input_to_shortpath="$new_path"
43602  fi
43603
43604  # Call helper function which possibly converts this using DOS-style short mode.
43605  # If so, the updated path is stored in $new_path.
43606  new_path="$input_to_shortpath"
43607
43608  input_path="$input_to_shortpath"
43609  # Check if we need to convert this using DOS-style short mode. If the path
43610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43611  # take no chances and rewrite it.
43612  # Note: m4 eats our [], so we need to use [ and ] instead.
43613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43614  if test "x$has_forbidden_chars" != x; then
43615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43619      # Going to short mode and back again did indeed matter. Since short mode is
43620      # case insensitive, let's make it lowercase to improve readability.
43621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43622      # Now convert it back to Unix-style (cygpath)
43623      input_path=`$CYGPATH -u "$shortmode_path"`
43624      new_path="$input_path"
43625    fi
43626  fi
43627
43628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43629  if test "x$test_cygdrive_prefix" = x; then
43630    # As a simple fix, exclude /usr/bin since it's not a real path.
43631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43633      # a path prefixed by /cygdrive for fixpath to work.
43634      new_path="$CYGWIN_ROOT_PATH$input_path"
43635    fi
43636  fi
43637
43638  # remove trailing .exe if any
43639  new_path="${new_path/%.exe/}"
43640
43641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43642
43643  # First separate the path from the arguments. This will split at the first
43644  # space.
43645  complete="$BUILD_CC"
43646  path="${complete%% *}"
43647  tmp="$complete EOL"
43648  arguments="${tmp#* }"
43649
43650  # Input might be given as Windows format, start by converting to
43651  # unix format.
43652  new_path="$path"
43653
43654  windows_path="$new_path"
43655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43656    unix_path=`$CYGPATH -u "$windows_path"`
43657    new_path="$unix_path"
43658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43660    new_path="$unix_path"
43661  fi
43662
43663
43664  # Now try to locate executable using which
43665  new_path=`$WHICH "$new_path" 2> /dev/null`
43666
43667  if test "x$new_path" = x; then
43668    # Oops. Which didn't find the executable.
43669    # The splitting of arguments from the executable at a space might have been incorrect,
43670    # since paths with space are more likely in Windows. Give it another try with the whole
43671    # argument.
43672    path="$complete"
43673    arguments="EOL"
43674    new_path="$path"
43675
43676  windows_path="$new_path"
43677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43678    unix_path=`$CYGPATH -u "$windows_path"`
43679    new_path="$unix_path"
43680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43682    new_path="$unix_path"
43683  fi
43684
43685
43686    new_path=`$WHICH "$new_path" 2> /dev/null`
43687    # bat and cmd files are not always considered executable in MSYS causing which
43688    # to not find them
43689    if test "x$new_path" = x \
43690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43692      new_path="$path"
43693
43694  windows_path="$new_path"
43695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43696    unix_path=`$CYGPATH -u "$windows_path"`
43697    new_path="$unix_path"
43698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43700    new_path="$unix_path"
43701  fi
43702
43703    fi
43704
43705    if test "x$new_path" = x; then
43706      # It's still not found. Now this is an unrecoverable error.
43707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43708$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43709      has_space=`$ECHO "$complete" | $GREP " "`
43710      if test "x$has_space" != x; then
43711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43713      fi
43714      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43715    fi
43716  fi
43717
43718  # Now new_path has a complete unix path to the binary
43719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43720    # Keep paths in /bin as-is, but remove trailing .exe if any
43721    new_path="${new_path/%.exe/}"
43722    # Do not save /bin paths to all_fixpath_prefixes!
43723  else
43724    # Not in mixed or Windows style, start by that.
43725    new_path=`cmd //c echo $new_path`
43726
43727  input_path="$new_path"
43728  # Check if we need to convert this using DOS-style short mode. If the path
43729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43730  # take no chances and rewrite it.
43731  # Note: m4 eats our [], so we need to use [ and ] instead.
43732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43733  if test "x$has_forbidden_chars" != x; then
43734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43736  fi
43737
43738    # Output is in $new_path
43739
43740  windows_path="$new_path"
43741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43742    unix_path=`$CYGPATH -u "$windows_path"`
43743    new_path="$unix_path"
43744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43746    new_path="$unix_path"
43747  fi
43748
43749    # remove trailing .exe if any
43750    new_path="${new_path/%.exe/}"
43751
43752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43754  fi
43755
43756    else
43757      # We're on a unix platform. Hooray! :)
43758      # First separate the path from the arguments. This will split at the first
43759      # space.
43760      complete="$BUILD_CC"
43761      path="${complete%% *}"
43762      tmp="$complete EOL"
43763      arguments="${tmp#* }"
43764
43765      # Cannot rely on the command "which" here since it doesn't always work.
43766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43767      if test -z "$is_absolute_path"; then
43768        # Path to executable is not absolute. Find it.
43769        IFS_save="$IFS"
43770        IFS=:
43771        for p in $PATH; do
43772          if test -f "$p/$path" && test -x "$p/$path"; then
43773            new_path="$p/$path"
43774            break
43775          fi
43776        done
43777        IFS="$IFS_save"
43778      else
43779        # This is an absolute path, we can use it without further modifications.
43780        new_path="$path"
43781      fi
43782
43783      if test "x$new_path" = x; then
43784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43785$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43786        has_space=`$ECHO "$complete" | $GREP " "`
43787        if test "x$has_space" != x; then
43788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43790        fi
43791        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43792      fi
43793    fi
43794
43795    # Now join together the path and the arguments once again
43796    if test "x$arguments" != xEOL; then
43797      new_complete="$new_path ${arguments% *}"
43798    else
43799      new_complete="$new_path"
43800    fi
43801
43802    if test "x$complete" != "x$new_complete"; then
43803      BUILD_CC="$new_complete"
43804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43805$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43806    fi
43807  fi
43808
43809
43810
43811
43812  # Publish this variable in the help.
43813
43814
43815  if [ -z "${BUILD_CXX+x}" ]; then
43816    # The variable is not set by user, try to locate tool using the code snippet
43817    for ac_prog in cl CC g++
43818do
43819  # Extract the first word of "$ac_prog", so it can be a program name with args.
43820set dummy $ac_prog; ac_word=$2
43821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43822$as_echo_n "checking for $ac_word... " >&6; }
43823if ${ac_cv_path_BUILD_CXX+:} false; then :
43824  $as_echo_n "(cached) " >&6
43825else
43826  case $BUILD_CXX in
43827  [\\/]* | ?:[\\/]*)
43828  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43829  ;;
43830  *)
43831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43832for as_dir in $PATH
43833do
43834  IFS=$as_save_IFS
43835  test -z "$as_dir" && as_dir=.
43836    for ac_exec_ext in '' $ac_executable_extensions; do
43837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43838    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43840    break 2
43841  fi
43842done
43843  done
43844IFS=$as_save_IFS
43845
43846  ;;
43847esac
43848fi
43849BUILD_CXX=$ac_cv_path_BUILD_CXX
43850if test -n "$BUILD_CXX"; then
43851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43852$as_echo "$BUILD_CXX" >&6; }
43853else
43854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43855$as_echo "no" >&6; }
43856fi
43857
43858
43859  test -n "$BUILD_CXX" && break
43860done
43861
43862  else
43863    # The variable is set, but is it from the command line or the environment?
43864
43865    # Try to remove the string !BUILD_CXX! from our list.
43866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43868      # If it failed, the variable was not from the command line. Ignore it,
43869      # but warn the user (except for BASH, which is always set by the calling BASH).
43870      if test "xBUILD_CXX" != xBASH; then
43871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43872$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43873      fi
43874      # Try to locate tool using the code snippet
43875      for ac_prog in cl CC g++
43876do
43877  # Extract the first word of "$ac_prog", so it can be a program name with args.
43878set dummy $ac_prog; ac_word=$2
43879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43880$as_echo_n "checking for $ac_word... " >&6; }
43881if ${ac_cv_path_BUILD_CXX+:} false; then :
43882  $as_echo_n "(cached) " >&6
43883else
43884  case $BUILD_CXX in
43885  [\\/]* | ?:[\\/]*)
43886  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43887  ;;
43888  *)
43889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43890for as_dir in $PATH
43891do
43892  IFS=$as_save_IFS
43893  test -z "$as_dir" && as_dir=.
43894    for ac_exec_ext in '' $ac_executable_extensions; do
43895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43896    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43898    break 2
43899  fi
43900done
43901  done
43902IFS=$as_save_IFS
43903
43904  ;;
43905esac
43906fi
43907BUILD_CXX=$ac_cv_path_BUILD_CXX
43908if test -n "$BUILD_CXX"; then
43909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43910$as_echo "$BUILD_CXX" >&6; }
43911else
43912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43913$as_echo "no" >&6; }
43914fi
43915
43916
43917  test -n "$BUILD_CXX" && break
43918done
43919
43920    else
43921      # If it succeeded, then it was overridden by the user. We will use it
43922      # for the tool.
43923
43924      # First remove it from the list of overridden variables, so we can test
43925      # for unknown variables in the end.
43926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43927
43928      # Check if we try to supply an empty value
43929      if test "x$BUILD_CXX" = x; then
43930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43931$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43933$as_echo_n "checking for BUILD_CXX... " >&6; }
43934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43935$as_echo "disabled" >&6; }
43936      else
43937        # Check if the provided tool contains a complete path.
43938        tool_specified="$BUILD_CXX"
43939        tool_basename="${tool_specified##*/}"
43940        if test "x$tool_basename" = "x$tool_specified"; then
43941          # A command without a complete path is provided, search $PATH.
43942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43943$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43944          # Extract the first word of "$tool_basename", so it can be a program name with args.
43945set dummy $tool_basename; ac_word=$2
43946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43947$as_echo_n "checking for $ac_word... " >&6; }
43948if ${ac_cv_path_BUILD_CXX+:} false; then :
43949  $as_echo_n "(cached) " >&6
43950else
43951  case $BUILD_CXX in
43952  [\\/]* | ?:[\\/]*)
43953  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43954  ;;
43955  *)
43956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43957for as_dir in $PATH
43958do
43959  IFS=$as_save_IFS
43960  test -z "$as_dir" && as_dir=.
43961    for ac_exec_ext in '' $ac_executable_extensions; do
43962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43963    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43965    break 2
43966  fi
43967done
43968  done
43969IFS=$as_save_IFS
43970
43971  ;;
43972esac
43973fi
43974BUILD_CXX=$ac_cv_path_BUILD_CXX
43975if test -n "$BUILD_CXX"; then
43976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43977$as_echo "$BUILD_CXX" >&6; }
43978else
43979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43980$as_echo "no" >&6; }
43981fi
43982
43983
43984          if test "x$BUILD_CXX" = x; then
43985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43986          fi
43987        else
43988          # Otherwise we believe it is a complete path. Use it as it is.
43989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43990$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43992$as_echo_n "checking for BUILD_CXX... " >&6; }
43993          if test ! -x "$tool_specified"; then
43994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43995$as_echo "not found" >&6; }
43996            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43997          fi
43998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43999$as_echo "$tool_specified" >&6; }
44000        fi
44001      fi
44002    fi
44003
44004  fi
44005
44006
44007
44008  if test "x$BUILD_CXX" = x; then
44009    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44010  fi
44011
44012
44013
44014  # Only process if variable expands to non-empty
44015
44016  if test "x$BUILD_CXX" != x; then
44017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44018
44019  # First separate the path from the arguments. This will split at the first
44020  # space.
44021  complete="$BUILD_CXX"
44022  path="${complete%% *}"
44023  tmp="$complete EOL"
44024  arguments="${tmp#* }"
44025
44026  # Input might be given as Windows format, start by converting to
44027  # unix format.
44028  new_path=`$CYGPATH -u "$path"`
44029
44030  # Now try to locate executable using which
44031  new_path=`$WHICH "$new_path" 2> /dev/null`
44032  # bat and cmd files are not always considered executable in cygwin causing which
44033  # to not find them
44034  if test "x$new_path" = x \
44035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44037    new_path=`$CYGPATH -u "$path"`
44038  fi
44039  if test "x$new_path" = x; then
44040    # Oops. Which didn't find the executable.
44041    # The splitting of arguments from the executable at a space might have been incorrect,
44042    # since paths with space are more likely in Windows. Give it another try with the whole
44043    # argument.
44044    path="$complete"
44045    arguments="EOL"
44046    new_path=`$CYGPATH -u "$path"`
44047    new_path=`$WHICH "$new_path" 2> /dev/null`
44048    # bat and cmd files are not always considered executable in cygwin causing which
44049    # to not find them
44050    if test "x$new_path" = x \
44051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44053      new_path=`$CYGPATH -u "$path"`
44054    fi
44055    if test "x$new_path" = x; then
44056      # It's still not found. Now this is an unrecoverable error.
44057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44058$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44059      has_space=`$ECHO "$complete" | $GREP " "`
44060      if test "x$has_space" != x; then
44061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44063      fi
44064      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44065    fi
44066  fi
44067
44068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44071  # "foo.exe" is OK but "foo" is an error.
44072  #
44073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44074  # It is also a way to make sure we got the proper file name for the real test later on.
44075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44076  if test "x$test_shortpath" = x; then
44077    # Short path failed, file does not exist as specified.
44078    # Try adding .exe or .cmd
44079    if test -f "${new_path}.exe"; then
44080      input_to_shortpath="${new_path}.exe"
44081    elif test -f "${new_path}.cmd"; then
44082      input_to_shortpath="${new_path}.cmd"
44083    else
44084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44085$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44088      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44089    fi
44090  else
44091    input_to_shortpath="$new_path"
44092  fi
44093
44094  # Call helper function which possibly converts this using DOS-style short mode.
44095  # If so, the updated path is stored in $new_path.
44096  new_path="$input_to_shortpath"
44097
44098  input_path="$input_to_shortpath"
44099  # Check if we need to convert this using DOS-style short mode. If the path
44100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44101  # take no chances and rewrite it.
44102  # Note: m4 eats our [], so we need to use [ and ] instead.
44103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44104  if test "x$has_forbidden_chars" != x; then
44105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44109      # Going to short mode and back again did indeed matter. Since short mode is
44110      # case insensitive, let's make it lowercase to improve readability.
44111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44112      # Now convert it back to Unix-style (cygpath)
44113      input_path=`$CYGPATH -u "$shortmode_path"`
44114      new_path="$input_path"
44115    fi
44116  fi
44117
44118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44119  if test "x$test_cygdrive_prefix" = x; then
44120    # As a simple fix, exclude /usr/bin since it's not a real path.
44121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44123      # a path prefixed by /cygdrive for fixpath to work.
44124      new_path="$CYGWIN_ROOT_PATH$input_path"
44125    fi
44126  fi
44127
44128  # remove trailing .exe if any
44129  new_path="${new_path/%.exe/}"
44130
44131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44132
44133  # First separate the path from the arguments. This will split at the first
44134  # space.
44135  complete="$BUILD_CXX"
44136  path="${complete%% *}"
44137  tmp="$complete EOL"
44138  arguments="${tmp#* }"
44139
44140  # Input might be given as Windows format, start by converting to
44141  # unix format.
44142  new_path="$path"
44143
44144  windows_path="$new_path"
44145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44146    unix_path=`$CYGPATH -u "$windows_path"`
44147    new_path="$unix_path"
44148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44150    new_path="$unix_path"
44151  fi
44152
44153
44154  # Now try to locate executable using which
44155  new_path=`$WHICH "$new_path" 2> /dev/null`
44156
44157  if test "x$new_path" = x; then
44158    # Oops. Which didn't find the executable.
44159    # The splitting of arguments from the executable at a space might have been incorrect,
44160    # since paths with space are more likely in Windows. Give it another try with the whole
44161    # argument.
44162    path="$complete"
44163    arguments="EOL"
44164    new_path="$path"
44165
44166  windows_path="$new_path"
44167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44168    unix_path=`$CYGPATH -u "$windows_path"`
44169    new_path="$unix_path"
44170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44172    new_path="$unix_path"
44173  fi
44174
44175
44176    new_path=`$WHICH "$new_path" 2> /dev/null`
44177    # bat and cmd files are not always considered executable in MSYS causing which
44178    # to not find them
44179    if test "x$new_path" = x \
44180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44182      new_path="$path"
44183
44184  windows_path="$new_path"
44185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44186    unix_path=`$CYGPATH -u "$windows_path"`
44187    new_path="$unix_path"
44188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44190    new_path="$unix_path"
44191  fi
44192
44193    fi
44194
44195    if test "x$new_path" = x; then
44196      # It's still not found. Now this is an unrecoverable error.
44197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44198$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44199      has_space=`$ECHO "$complete" | $GREP " "`
44200      if test "x$has_space" != x; then
44201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44203      fi
44204      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44205    fi
44206  fi
44207
44208  # Now new_path has a complete unix path to the binary
44209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44210    # Keep paths in /bin as-is, but remove trailing .exe if any
44211    new_path="${new_path/%.exe/}"
44212    # Do not save /bin paths to all_fixpath_prefixes!
44213  else
44214    # Not in mixed or Windows style, start by that.
44215    new_path=`cmd //c echo $new_path`
44216
44217  input_path="$new_path"
44218  # Check if we need to convert this using DOS-style short mode. If the path
44219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44220  # take no chances and rewrite it.
44221  # Note: m4 eats our [], so we need to use [ and ] instead.
44222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44223  if test "x$has_forbidden_chars" != x; then
44224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44226  fi
44227
44228    # Output is in $new_path
44229
44230  windows_path="$new_path"
44231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44232    unix_path=`$CYGPATH -u "$windows_path"`
44233    new_path="$unix_path"
44234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44236    new_path="$unix_path"
44237  fi
44238
44239    # remove trailing .exe if any
44240    new_path="${new_path/%.exe/}"
44241
44242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44244  fi
44245
44246    else
44247      # We're on a unix platform. Hooray! :)
44248      # First separate the path from the arguments. This will split at the first
44249      # space.
44250      complete="$BUILD_CXX"
44251      path="${complete%% *}"
44252      tmp="$complete EOL"
44253      arguments="${tmp#* }"
44254
44255      # Cannot rely on the command "which" here since it doesn't always work.
44256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44257      if test -z "$is_absolute_path"; then
44258        # Path to executable is not absolute. Find it.
44259        IFS_save="$IFS"
44260        IFS=:
44261        for p in $PATH; do
44262          if test -f "$p/$path" && test -x "$p/$path"; then
44263            new_path="$p/$path"
44264            break
44265          fi
44266        done
44267        IFS="$IFS_save"
44268      else
44269        # This is an absolute path, we can use it without further modifications.
44270        new_path="$path"
44271      fi
44272
44273      if test "x$new_path" = x; then
44274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44275$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44276        has_space=`$ECHO "$complete" | $GREP " "`
44277        if test "x$has_space" != x; then
44278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44280        fi
44281        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44282      fi
44283    fi
44284
44285    # Now join together the path and the arguments once again
44286    if test "x$arguments" != xEOL; then
44287      new_complete="$new_path ${arguments% *}"
44288    else
44289      new_complete="$new_path"
44290    fi
44291
44292    if test "x$complete" != "x$new_complete"; then
44293      BUILD_CXX="$new_complete"
44294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44295$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44296    fi
44297  fi
44298
44299
44300
44301  # Publish this variable in the help.
44302
44303
44304  if [ -z "${BUILD_NM+x}" ]; then
44305    # The variable is not set by user, try to locate tool using the code snippet
44306    for ac_prog in nm gcc-nm
44307do
44308  # Extract the first word of "$ac_prog", so it can be a program name with args.
44309set dummy $ac_prog; ac_word=$2
44310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44311$as_echo_n "checking for $ac_word... " >&6; }
44312if ${ac_cv_path_BUILD_NM+:} false; then :
44313  $as_echo_n "(cached) " >&6
44314else
44315  case $BUILD_NM in
44316  [\\/]* | ?:[\\/]*)
44317  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44318  ;;
44319  *)
44320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44321for as_dir in $PATH
44322do
44323  IFS=$as_save_IFS
44324  test -z "$as_dir" && as_dir=.
44325    for ac_exec_ext in '' $ac_executable_extensions; do
44326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44327    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44329    break 2
44330  fi
44331done
44332  done
44333IFS=$as_save_IFS
44334
44335  ;;
44336esac
44337fi
44338BUILD_NM=$ac_cv_path_BUILD_NM
44339if test -n "$BUILD_NM"; then
44340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44341$as_echo "$BUILD_NM" >&6; }
44342else
44343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44344$as_echo "no" >&6; }
44345fi
44346
44347
44348  test -n "$BUILD_NM" && break
44349done
44350
44351  else
44352    # The variable is set, but is it from the command line or the environment?
44353
44354    # Try to remove the string !BUILD_NM! from our list.
44355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44357      # If it failed, the variable was not from the command line. Ignore it,
44358      # but warn the user (except for BASH, which is always set by the calling BASH).
44359      if test "xBUILD_NM" != xBASH; then
44360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44361$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44362      fi
44363      # Try to locate tool using the code snippet
44364      for ac_prog in nm gcc-nm
44365do
44366  # Extract the first word of "$ac_prog", so it can be a program name with args.
44367set dummy $ac_prog; ac_word=$2
44368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44369$as_echo_n "checking for $ac_word... " >&6; }
44370if ${ac_cv_path_BUILD_NM+:} false; then :
44371  $as_echo_n "(cached) " >&6
44372else
44373  case $BUILD_NM in
44374  [\\/]* | ?:[\\/]*)
44375  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44376  ;;
44377  *)
44378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44379for as_dir in $PATH
44380do
44381  IFS=$as_save_IFS
44382  test -z "$as_dir" && as_dir=.
44383    for ac_exec_ext in '' $ac_executable_extensions; do
44384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44385    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44387    break 2
44388  fi
44389done
44390  done
44391IFS=$as_save_IFS
44392
44393  ;;
44394esac
44395fi
44396BUILD_NM=$ac_cv_path_BUILD_NM
44397if test -n "$BUILD_NM"; then
44398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44399$as_echo "$BUILD_NM" >&6; }
44400else
44401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44402$as_echo "no" >&6; }
44403fi
44404
44405
44406  test -n "$BUILD_NM" && break
44407done
44408
44409    else
44410      # If it succeeded, then it was overridden by the user. We will use it
44411      # for the tool.
44412
44413      # First remove it from the list of overridden variables, so we can test
44414      # for unknown variables in the end.
44415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44416
44417      # Check if we try to supply an empty value
44418      if test "x$BUILD_NM" = x; then
44419        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44420$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44422$as_echo_n "checking for BUILD_NM... " >&6; }
44423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44424$as_echo "disabled" >&6; }
44425      else
44426        # Check if the provided tool contains a complete path.
44427        tool_specified="$BUILD_NM"
44428        tool_basename="${tool_specified##*/}"
44429        if test "x$tool_basename" = "x$tool_specified"; then
44430          # A command without a complete path is provided, search $PATH.
44431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44432$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44433          # Extract the first word of "$tool_basename", so it can be a program name with args.
44434set dummy $tool_basename; ac_word=$2
44435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44436$as_echo_n "checking for $ac_word... " >&6; }
44437if ${ac_cv_path_BUILD_NM+:} false; then :
44438  $as_echo_n "(cached) " >&6
44439else
44440  case $BUILD_NM in
44441  [\\/]* | ?:[\\/]*)
44442  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44443  ;;
44444  *)
44445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44446for as_dir in $PATH
44447do
44448  IFS=$as_save_IFS
44449  test -z "$as_dir" && as_dir=.
44450    for ac_exec_ext in '' $ac_executable_extensions; do
44451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44452    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44454    break 2
44455  fi
44456done
44457  done
44458IFS=$as_save_IFS
44459
44460  ;;
44461esac
44462fi
44463BUILD_NM=$ac_cv_path_BUILD_NM
44464if test -n "$BUILD_NM"; then
44465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44466$as_echo "$BUILD_NM" >&6; }
44467else
44468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44469$as_echo "no" >&6; }
44470fi
44471
44472
44473          if test "x$BUILD_NM" = x; then
44474            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44475          fi
44476        else
44477          # Otherwise we believe it is a complete path. Use it as it is.
44478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44479$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44480          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44481$as_echo_n "checking for BUILD_NM... " >&6; }
44482          if test ! -x "$tool_specified"; then
44483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44484$as_echo "not found" >&6; }
44485            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44486          fi
44487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44488$as_echo "$tool_specified" >&6; }
44489        fi
44490      fi
44491    fi
44492
44493  fi
44494
44495
44496
44497  # Only process if variable expands to non-empty
44498
44499  if test "x$BUILD_NM" != x; then
44500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44501
44502  # First separate the path from the arguments. This will split at the first
44503  # space.
44504  complete="$BUILD_NM"
44505  path="${complete%% *}"
44506  tmp="$complete EOL"
44507  arguments="${tmp#* }"
44508
44509  # Input might be given as Windows format, start by converting to
44510  # unix format.
44511  new_path=`$CYGPATH -u "$path"`
44512
44513  # Now try to locate executable using which
44514  new_path=`$WHICH "$new_path" 2> /dev/null`
44515  # bat and cmd files are not always considered executable in cygwin causing which
44516  # to not find them
44517  if test "x$new_path" = x \
44518      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44519      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44520    new_path=`$CYGPATH -u "$path"`
44521  fi
44522  if test "x$new_path" = x; then
44523    # Oops. Which didn't find the executable.
44524    # The splitting of arguments from the executable at a space might have been incorrect,
44525    # since paths with space are more likely in Windows. Give it another try with the whole
44526    # argument.
44527    path="$complete"
44528    arguments="EOL"
44529    new_path=`$CYGPATH -u "$path"`
44530    new_path=`$WHICH "$new_path" 2> /dev/null`
44531    # bat and cmd files are not always considered executable in cygwin causing which
44532    # to not find them
44533    if test "x$new_path" = x \
44534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44536      new_path=`$CYGPATH -u "$path"`
44537    fi
44538    if test "x$new_path" = x; then
44539      # It's still not found. Now this is an unrecoverable error.
44540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44541$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44542      has_space=`$ECHO "$complete" | $GREP " "`
44543      if test "x$has_space" != x; then
44544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44546      fi
44547      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44548    fi
44549  fi
44550
44551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44554  # "foo.exe" is OK but "foo" is an error.
44555  #
44556  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44557  # It is also a way to make sure we got the proper file name for the real test later on.
44558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44559  if test "x$test_shortpath" = x; then
44560    # Short path failed, file does not exist as specified.
44561    # Try adding .exe or .cmd
44562    if test -f "${new_path}.exe"; then
44563      input_to_shortpath="${new_path}.exe"
44564    elif test -f "${new_path}.cmd"; then
44565      input_to_shortpath="${new_path}.cmd"
44566    else
44567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44568$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44569      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44570$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44571      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44572    fi
44573  else
44574    input_to_shortpath="$new_path"
44575  fi
44576
44577  # Call helper function which possibly converts this using DOS-style short mode.
44578  # If so, the updated path is stored in $new_path.
44579  new_path="$input_to_shortpath"
44580
44581  input_path="$input_to_shortpath"
44582  # Check if we need to convert this using DOS-style short mode. If the path
44583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44584  # take no chances and rewrite it.
44585  # Note: m4 eats our [], so we need to use [ and ] instead.
44586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44587  if test "x$has_forbidden_chars" != x; then
44588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44592      # Going to short mode and back again did indeed matter. Since short mode is
44593      # case insensitive, let's make it lowercase to improve readability.
44594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44595      # Now convert it back to Unix-style (cygpath)
44596      input_path=`$CYGPATH -u "$shortmode_path"`
44597      new_path="$input_path"
44598    fi
44599  fi
44600
44601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44602  if test "x$test_cygdrive_prefix" = x; then
44603    # As a simple fix, exclude /usr/bin since it's not a real path.
44604    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44606      # a path prefixed by /cygdrive for fixpath to work.
44607      new_path="$CYGWIN_ROOT_PATH$input_path"
44608    fi
44609  fi
44610
44611  # remove trailing .exe if any
44612  new_path="${new_path/%.exe/}"
44613
44614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44615
44616  # First separate the path from the arguments. This will split at the first
44617  # space.
44618  complete="$BUILD_NM"
44619  path="${complete%% *}"
44620  tmp="$complete EOL"
44621  arguments="${tmp#* }"
44622
44623  # Input might be given as Windows format, start by converting to
44624  # unix format.
44625  new_path="$path"
44626
44627  windows_path="$new_path"
44628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44629    unix_path=`$CYGPATH -u "$windows_path"`
44630    new_path="$unix_path"
44631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44633    new_path="$unix_path"
44634  fi
44635
44636
44637  # Now try to locate executable using which
44638  new_path=`$WHICH "$new_path" 2> /dev/null`
44639
44640  if test "x$new_path" = x; then
44641    # Oops. Which didn't find the executable.
44642    # The splitting of arguments from the executable at a space might have been incorrect,
44643    # since paths with space are more likely in Windows. Give it another try with the whole
44644    # argument.
44645    path="$complete"
44646    arguments="EOL"
44647    new_path="$path"
44648
44649  windows_path="$new_path"
44650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44651    unix_path=`$CYGPATH -u "$windows_path"`
44652    new_path="$unix_path"
44653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44655    new_path="$unix_path"
44656  fi
44657
44658
44659    new_path=`$WHICH "$new_path" 2> /dev/null`
44660    # bat and cmd files are not always considered executable in MSYS causing which
44661    # to not find them
44662    if test "x$new_path" = x \
44663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44665      new_path="$path"
44666
44667  windows_path="$new_path"
44668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44669    unix_path=`$CYGPATH -u "$windows_path"`
44670    new_path="$unix_path"
44671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44673    new_path="$unix_path"
44674  fi
44675
44676    fi
44677
44678    if test "x$new_path" = x; then
44679      # It's still not found. Now this is an unrecoverable error.
44680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44681$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44682      has_space=`$ECHO "$complete" | $GREP " "`
44683      if test "x$has_space" != x; then
44684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44686      fi
44687      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44688    fi
44689  fi
44690
44691  # Now new_path has a complete unix path to the binary
44692  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44693    # Keep paths in /bin as-is, but remove trailing .exe if any
44694    new_path="${new_path/%.exe/}"
44695    # Do not save /bin paths to all_fixpath_prefixes!
44696  else
44697    # Not in mixed or Windows style, start by that.
44698    new_path=`cmd //c echo $new_path`
44699
44700  input_path="$new_path"
44701  # Check if we need to convert this using DOS-style short mode. If the path
44702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44703  # take no chances and rewrite it.
44704  # Note: m4 eats our [], so we need to use [ and ] instead.
44705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44706  if test "x$has_forbidden_chars" != x; then
44707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44709  fi
44710
44711    # Output is in $new_path
44712
44713  windows_path="$new_path"
44714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44715    unix_path=`$CYGPATH -u "$windows_path"`
44716    new_path="$unix_path"
44717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44719    new_path="$unix_path"
44720  fi
44721
44722    # remove trailing .exe if any
44723    new_path="${new_path/%.exe/}"
44724
44725    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44726    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44727  fi
44728
44729    else
44730      # We're on a unix platform. Hooray! :)
44731      # First separate the path from the arguments. This will split at the first
44732      # space.
44733      complete="$BUILD_NM"
44734      path="${complete%% *}"
44735      tmp="$complete EOL"
44736      arguments="${tmp#* }"
44737
44738      # Cannot rely on the command "which" here since it doesn't always work.
44739      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44740      if test -z "$is_absolute_path"; then
44741        # Path to executable is not absolute. Find it.
44742        IFS_save="$IFS"
44743        IFS=:
44744        for p in $PATH; do
44745          if test -f "$p/$path" && test -x "$p/$path"; then
44746            new_path="$p/$path"
44747            break
44748          fi
44749        done
44750        IFS="$IFS_save"
44751      else
44752        # This is an absolute path, we can use it without further modifications.
44753        new_path="$path"
44754      fi
44755
44756      if test "x$new_path" = x; then
44757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44758$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44759        has_space=`$ECHO "$complete" | $GREP " "`
44760        if test "x$has_space" != x; then
44761          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44762$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44763        fi
44764        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44765      fi
44766    fi
44767
44768    # Now join together the path and the arguments once again
44769    if test "x$arguments" != xEOL; then
44770      new_complete="$new_path ${arguments% *}"
44771    else
44772      new_complete="$new_path"
44773    fi
44774
44775    if test "x$complete" != "x$new_complete"; then
44776      BUILD_NM="$new_complete"
44777      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44778$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44779    fi
44780  fi
44781
44782
44783
44784  # Publish this variable in the help.
44785
44786
44787  if [ -z "${BUILD_AR+x}" ]; then
44788    # The variable is not set by user, try to locate tool using the code snippet
44789    for ac_prog in ar gcc-ar
44790do
44791  # Extract the first word of "$ac_prog", so it can be a program name with args.
44792set dummy $ac_prog; ac_word=$2
44793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44794$as_echo_n "checking for $ac_word... " >&6; }
44795if ${ac_cv_path_BUILD_AR+:} false; then :
44796  $as_echo_n "(cached) " >&6
44797else
44798  case $BUILD_AR in
44799  [\\/]* | ?:[\\/]*)
44800  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44801  ;;
44802  *)
44803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44804for as_dir in $PATH
44805do
44806  IFS=$as_save_IFS
44807  test -z "$as_dir" && as_dir=.
44808    for ac_exec_ext in '' $ac_executable_extensions; do
44809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44810    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44812    break 2
44813  fi
44814done
44815  done
44816IFS=$as_save_IFS
44817
44818  ;;
44819esac
44820fi
44821BUILD_AR=$ac_cv_path_BUILD_AR
44822if test -n "$BUILD_AR"; then
44823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44824$as_echo "$BUILD_AR" >&6; }
44825else
44826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44827$as_echo "no" >&6; }
44828fi
44829
44830
44831  test -n "$BUILD_AR" && break
44832done
44833
44834  else
44835    # The variable is set, but is it from the command line or the environment?
44836
44837    # Try to remove the string !BUILD_AR! from our list.
44838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44840      # If it failed, the variable was not from the command line. Ignore it,
44841      # but warn the user (except for BASH, which is always set by the calling BASH).
44842      if test "xBUILD_AR" != xBASH; then
44843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44844$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44845      fi
44846      # Try to locate tool using the code snippet
44847      for ac_prog in ar gcc-ar
44848do
44849  # Extract the first word of "$ac_prog", so it can be a program name with args.
44850set dummy $ac_prog; ac_word=$2
44851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44852$as_echo_n "checking for $ac_word... " >&6; }
44853if ${ac_cv_path_BUILD_AR+:} false; then :
44854  $as_echo_n "(cached) " >&6
44855else
44856  case $BUILD_AR in
44857  [\\/]* | ?:[\\/]*)
44858  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44859  ;;
44860  *)
44861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44862for as_dir in $PATH
44863do
44864  IFS=$as_save_IFS
44865  test -z "$as_dir" && as_dir=.
44866    for ac_exec_ext in '' $ac_executable_extensions; do
44867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44868    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44870    break 2
44871  fi
44872done
44873  done
44874IFS=$as_save_IFS
44875
44876  ;;
44877esac
44878fi
44879BUILD_AR=$ac_cv_path_BUILD_AR
44880if test -n "$BUILD_AR"; then
44881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44882$as_echo "$BUILD_AR" >&6; }
44883else
44884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44885$as_echo "no" >&6; }
44886fi
44887
44888
44889  test -n "$BUILD_AR" && break
44890done
44891
44892    else
44893      # If it succeeded, then it was overridden by the user. We will use it
44894      # for the tool.
44895
44896      # First remove it from the list of overridden variables, so we can test
44897      # for unknown variables in the end.
44898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44899
44900      # Check if we try to supply an empty value
44901      if test "x$BUILD_AR" = x; then
44902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44903$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44905$as_echo_n "checking for BUILD_AR... " >&6; }
44906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44907$as_echo "disabled" >&6; }
44908      else
44909        # Check if the provided tool contains a complete path.
44910        tool_specified="$BUILD_AR"
44911        tool_basename="${tool_specified##*/}"
44912        if test "x$tool_basename" = "x$tool_specified"; then
44913          # A command without a complete path is provided, search $PATH.
44914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44915$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44916          # Extract the first word of "$tool_basename", so it can be a program name with args.
44917set dummy $tool_basename; ac_word=$2
44918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44919$as_echo_n "checking for $ac_word... " >&6; }
44920if ${ac_cv_path_BUILD_AR+:} false; then :
44921  $as_echo_n "(cached) " >&6
44922else
44923  case $BUILD_AR in
44924  [\\/]* | ?:[\\/]*)
44925  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44926  ;;
44927  *)
44928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44929for as_dir in $PATH
44930do
44931  IFS=$as_save_IFS
44932  test -z "$as_dir" && as_dir=.
44933    for ac_exec_ext in '' $ac_executable_extensions; do
44934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44935    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44937    break 2
44938  fi
44939done
44940  done
44941IFS=$as_save_IFS
44942
44943  ;;
44944esac
44945fi
44946BUILD_AR=$ac_cv_path_BUILD_AR
44947if test -n "$BUILD_AR"; then
44948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44949$as_echo "$BUILD_AR" >&6; }
44950else
44951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44952$as_echo "no" >&6; }
44953fi
44954
44955
44956          if test "x$BUILD_AR" = x; then
44957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44958          fi
44959        else
44960          # Otherwise we believe it is a complete path. Use it as it is.
44961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44962$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44964$as_echo_n "checking for BUILD_AR... " >&6; }
44965          if test ! -x "$tool_specified"; then
44966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44967$as_echo "not found" >&6; }
44968            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44969          fi
44970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44971$as_echo "$tool_specified" >&6; }
44972        fi
44973      fi
44974    fi
44975
44976  fi
44977
44978
44979
44980  # Only process if variable expands to non-empty
44981
44982  if test "x$BUILD_AR" != x; then
44983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44984
44985  # First separate the path from the arguments. This will split at the first
44986  # space.
44987  complete="$BUILD_AR"
44988  path="${complete%% *}"
44989  tmp="$complete EOL"
44990  arguments="${tmp#* }"
44991
44992  # Input might be given as Windows format, start by converting to
44993  # unix format.
44994  new_path=`$CYGPATH -u "$path"`
44995
44996  # Now try to locate executable using which
44997  new_path=`$WHICH "$new_path" 2> /dev/null`
44998  # bat and cmd files are not always considered executable in cygwin causing which
44999  # to not find them
45000  if test "x$new_path" = x \
45001      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45002      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45003    new_path=`$CYGPATH -u "$path"`
45004  fi
45005  if test "x$new_path" = x; then
45006    # Oops. Which didn't find the executable.
45007    # The splitting of arguments from the executable at a space might have been incorrect,
45008    # since paths with space are more likely in Windows. Give it another try with the whole
45009    # argument.
45010    path="$complete"
45011    arguments="EOL"
45012    new_path=`$CYGPATH -u "$path"`
45013    new_path=`$WHICH "$new_path" 2> /dev/null`
45014    # bat and cmd files are not always considered executable in cygwin causing which
45015    # to not find them
45016    if test "x$new_path" = x \
45017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45019      new_path=`$CYGPATH -u "$path"`
45020    fi
45021    if test "x$new_path" = x; then
45022      # It's still not found. Now this is an unrecoverable error.
45023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45024$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45025      has_space=`$ECHO "$complete" | $GREP " "`
45026      if test "x$has_space" != x; then
45027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45029      fi
45030      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45031    fi
45032  fi
45033
45034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45037  # "foo.exe" is OK but "foo" is an error.
45038  #
45039  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45040  # It is also a way to make sure we got the proper file name for the real test later on.
45041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45042  if test "x$test_shortpath" = x; then
45043    # Short path failed, file does not exist as specified.
45044    # Try adding .exe or .cmd
45045    if test -f "${new_path}.exe"; then
45046      input_to_shortpath="${new_path}.exe"
45047    elif test -f "${new_path}.cmd"; then
45048      input_to_shortpath="${new_path}.cmd"
45049    else
45050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45051$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45054      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45055    fi
45056  else
45057    input_to_shortpath="$new_path"
45058  fi
45059
45060  # Call helper function which possibly converts this using DOS-style short mode.
45061  # If so, the updated path is stored in $new_path.
45062  new_path="$input_to_shortpath"
45063
45064  input_path="$input_to_shortpath"
45065  # Check if we need to convert this using DOS-style short mode. If the path
45066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45067  # take no chances and rewrite it.
45068  # Note: m4 eats our [], so we need to use [ and ] instead.
45069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45070  if test "x$has_forbidden_chars" != x; then
45071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45075      # Going to short mode and back again did indeed matter. Since short mode is
45076      # case insensitive, let's make it lowercase to improve readability.
45077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45078      # Now convert it back to Unix-style (cygpath)
45079      input_path=`$CYGPATH -u "$shortmode_path"`
45080      new_path="$input_path"
45081    fi
45082  fi
45083
45084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45085  if test "x$test_cygdrive_prefix" = x; then
45086    # As a simple fix, exclude /usr/bin since it's not a real path.
45087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45089      # a path prefixed by /cygdrive for fixpath to work.
45090      new_path="$CYGWIN_ROOT_PATH$input_path"
45091    fi
45092  fi
45093
45094  # remove trailing .exe if any
45095  new_path="${new_path/%.exe/}"
45096
45097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45098
45099  # First separate the path from the arguments. This will split at the first
45100  # space.
45101  complete="$BUILD_AR"
45102  path="${complete%% *}"
45103  tmp="$complete EOL"
45104  arguments="${tmp#* }"
45105
45106  # Input might be given as Windows format, start by converting to
45107  # unix format.
45108  new_path="$path"
45109
45110  windows_path="$new_path"
45111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45112    unix_path=`$CYGPATH -u "$windows_path"`
45113    new_path="$unix_path"
45114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45116    new_path="$unix_path"
45117  fi
45118
45119
45120  # Now try to locate executable using which
45121  new_path=`$WHICH "$new_path" 2> /dev/null`
45122
45123  if test "x$new_path" = x; then
45124    # Oops. Which didn't find the executable.
45125    # The splitting of arguments from the executable at a space might have been incorrect,
45126    # since paths with space are more likely in Windows. Give it another try with the whole
45127    # argument.
45128    path="$complete"
45129    arguments="EOL"
45130    new_path="$path"
45131
45132  windows_path="$new_path"
45133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45134    unix_path=`$CYGPATH -u "$windows_path"`
45135    new_path="$unix_path"
45136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45138    new_path="$unix_path"
45139  fi
45140
45141
45142    new_path=`$WHICH "$new_path" 2> /dev/null`
45143    # bat and cmd files are not always considered executable in MSYS causing which
45144    # to not find them
45145    if test "x$new_path" = x \
45146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45148      new_path="$path"
45149
45150  windows_path="$new_path"
45151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45152    unix_path=`$CYGPATH -u "$windows_path"`
45153    new_path="$unix_path"
45154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45156    new_path="$unix_path"
45157  fi
45158
45159    fi
45160
45161    if test "x$new_path" = x; then
45162      # It's still not found. Now this is an unrecoverable error.
45163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45164$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45165      has_space=`$ECHO "$complete" | $GREP " "`
45166      if test "x$has_space" != x; then
45167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45169      fi
45170      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45171    fi
45172  fi
45173
45174  # Now new_path has a complete unix path to the binary
45175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45176    # Keep paths in /bin as-is, but remove trailing .exe if any
45177    new_path="${new_path/%.exe/}"
45178    # Do not save /bin paths to all_fixpath_prefixes!
45179  else
45180    # Not in mixed or Windows style, start by that.
45181    new_path=`cmd //c echo $new_path`
45182
45183  input_path="$new_path"
45184  # Check if we need to convert this using DOS-style short mode. If the path
45185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45186  # take no chances and rewrite it.
45187  # Note: m4 eats our [], so we need to use [ and ] instead.
45188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45189  if test "x$has_forbidden_chars" != x; then
45190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45192  fi
45193
45194    # Output is in $new_path
45195
45196  windows_path="$new_path"
45197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45198    unix_path=`$CYGPATH -u "$windows_path"`
45199    new_path="$unix_path"
45200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45202    new_path="$unix_path"
45203  fi
45204
45205    # remove trailing .exe if any
45206    new_path="${new_path/%.exe/}"
45207
45208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45210  fi
45211
45212    else
45213      # We're on a unix platform. Hooray! :)
45214      # First separate the path from the arguments. This will split at the first
45215      # space.
45216      complete="$BUILD_AR"
45217      path="${complete%% *}"
45218      tmp="$complete EOL"
45219      arguments="${tmp#* }"
45220
45221      # Cannot rely on the command "which" here since it doesn't always work.
45222      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45223      if test -z "$is_absolute_path"; then
45224        # Path to executable is not absolute. Find it.
45225        IFS_save="$IFS"
45226        IFS=:
45227        for p in $PATH; do
45228          if test -f "$p/$path" && test -x "$p/$path"; then
45229            new_path="$p/$path"
45230            break
45231          fi
45232        done
45233        IFS="$IFS_save"
45234      else
45235        # This is an absolute path, we can use it without further modifications.
45236        new_path="$path"
45237      fi
45238
45239      if test "x$new_path" = x; then
45240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45241$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45242        has_space=`$ECHO "$complete" | $GREP " "`
45243        if test "x$has_space" != x; then
45244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45246        fi
45247        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45248      fi
45249    fi
45250
45251    # Now join together the path and the arguments once again
45252    if test "x$arguments" != xEOL; then
45253      new_complete="$new_path ${arguments% *}"
45254    else
45255      new_complete="$new_path"
45256    fi
45257
45258    if test "x$complete" != "x$new_complete"; then
45259      BUILD_AR="$new_complete"
45260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45261$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45262    fi
45263  fi
45264
45265    # Assume the C compiler is the assembler
45266    BUILD_AS="$BUILD_CC -c"
45267    # Just like for the target compiler, use the compiler as linker
45268    BUILD_LD="$BUILD_CC"
45269    BUILD_LDCXX="$BUILD_CXX"
45270
45271    PATH="$OLDPATH"
45272  else
45273    # If we are not cross compiling, use the normal target compilers for
45274    # building the build platform executables.
45275    BUILD_CC="$CC"
45276    BUILD_CXX="$CXX"
45277    BUILD_LD="$LD"
45278    BUILD_LDCXX="$LDCXX"
45279    BUILD_NM="$NM"
45280    BUILD_AS="$AS"
45281    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45282    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45283    BUILD_AR="$AR"
45284  fi
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45298    # For hotspot, we need these in Windows mixed path,
45299    # so rewrite them all. Need added .exe suffix.
45300    HOTSPOT_CXX="$CXX.exe"
45301    HOTSPOT_LD="$LD.exe"
45302    HOTSPOT_MT="$MT.exe"
45303    HOTSPOT_RC="$RC.exe"
45304
45305  unix_path="$HOTSPOT_CXX"
45306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45307    windows_path=`$CYGPATH -m "$unix_path"`
45308    HOTSPOT_CXX="$windows_path"
45309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45310    windows_path=`cmd //c echo $unix_path`
45311    HOTSPOT_CXX="$windows_path"
45312  fi
45313
45314
45315  unix_path="$HOTSPOT_LD"
45316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45317    windows_path=`$CYGPATH -m "$unix_path"`
45318    HOTSPOT_LD="$windows_path"
45319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45320    windows_path=`cmd //c echo $unix_path`
45321    HOTSPOT_LD="$windows_path"
45322  fi
45323
45324
45325  unix_path="$HOTSPOT_MT"
45326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45327    windows_path=`$CYGPATH -m "$unix_path"`
45328    HOTSPOT_MT="$windows_path"
45329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45330    windows_path=`cmd //c echo $unix_path`
45331    HOTSPOT_MT="$windows_path"
45332  fi
45333
45334
45335  unix_path="$HOTSPOT_RC"
45336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337    windows_path=`$CYGPATH -m "$unix_path"`
45338    HOTSPOT_RC="$windows_path"
45339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340    windows_path=`cmd //c echo $unix_path`
45341    HOTSPOT_RC="$windows_path"
45342  fi
45343
45344
45345
45346  else
45347    HOTSPOT_CXX="$CXX"
45348    HOTSPOT_LD="$LD"
45349  fi
45350
45351
45352
45353  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45354    USE_CLANG=true
45355  fi
45356
45357
45358
45359
45360
45361  # The package path is used only on macosx?
45362  # FIXME: clean this up, and/or move it elsewhere.
45363  PACKAGE_PATH=/opt/local
45364
45365
45366  # Check for extra potential brokenness.
45367  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45368    # On Windows, double-check that we got the right compiler.
45369    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45370    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45371    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45372      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45373        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
45374      fi
45375    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45376      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45377        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45378      fi
45379    fi
45380  fi
45381
45382  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45383    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45384    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45385    # This is later checked when setting flags.
45386
45387    # "-Og" suppported for GCC 4.8 and later
45388    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436    # Execute function body
45437
45438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45439$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45440  supports=yes
45441
45442  saved_cflags="$CFLAGS"
45443  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45444  ac_ext=c
45445ac_cpp='$CPP $CPPFLAGS'
45446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45448ac_compiler_gnu=$ac_cv_c_compiler_gnu
45449
45450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45451/* end confdefs.h.  */
45452int i;
45453_ACEOF
45454if ac_fn_c_try_compile "$LINENO"; then :
45455
45456else
45457  supports=no
45458fi
45459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45460  ac_ext=cpp
45461ac_cpp='$CXXCPP $CPPFLAGS'
45462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45465
45466  CFLAGS="$saved_cflags"
45467
45468  saved_cxxflags="$CXXFLAGS"
45469  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45470  ac_ext=cpp
45471ac_cpp='$CXXCPP $CPPFLAGS'
45472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45475
45476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45477/* end confdefs.h.  */
45478int i;
45479_ACEOF
45480if ac_fn_cxx_try_compile "$LINENO"; then :
45481
45482else
45483  supports=no
45484fi
45485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45486  ac_ext=cpp
45487ac_cpp='$CXXCPP $CPPFLAGS'
45488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45491
45492  CXXFLAGS="$saved_cxxflags"
45493
45494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45495$as_echo "$supports" >&6; }
45496  if test "x$supports" = "xyes" ; then
45497    :
45498    HAS_CFLAG_OPTIMIZE_DEBUG=true
45499  else
45500    :
45501    HAS_CFLAG_OPTIMIZE_DEBUG=false
45502  fi
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516    # "-z relro" supported in GNU binutils 2.17 and later
45517    LINKER_RELRO_FLAG="-Wl,-z,relro"
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565    # Execute function body
45566
45567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45568$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45569  supports=yes
45570
45571  saved_ldflags="$LDFLAGS"
45572  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45573  ac_ext=c
45574ac_cpp='$CPP $CPPFLAGS'
45575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45577ac_compiler_gnu=$ac_cv_c_compiler_gnu
45578
45579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45580/* end confdefs.h.  */
45581
45582int
45583main ()
45584{
45585
45586  ;
45587  return 0;
45588}
45589_ACEOF
45590if ac_fn_c_try_link "$LINENO"; then :
45591
45592else
45593  supports=no
45594fi
45595rm -f core conftest.err conftest.$ac_objext \
45596    conftest$ac_exeext conftest.$ac_ext
45597  ac_ext=cpp
45598ac_cpp='$CXXCPP $CPPFLAGS'
45599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45602
45603  LDFLAGS="$saved_ldflags"
45604
45605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45606$as_echo "$supports" >&6; }
45607  if test "x$supports" = "xyes" ; then
45608    :
45609    HAS_LINKER_RELRO=true
45610  else
45611    :
45612    HAS_LINKER_RELRO=false
45613  fi
45614
45615
45616
45617
45618
45619
45620
45621
45622
45623
45624
45625
45626
45627    # "-z now" supported in GNU binutils 2.11 and later
45628    LINKER_NOW_FLAG="-Wl,-z,now"
45629
45630
45631
45632
45633
45634
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676    # Execute function body
45677
45678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45679$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45680  supports=yes
45681
45682  saved_ldflags="$LDFLAGS"
45683  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45684  ac_ext=c
45685ac_cpp='$CPP $CPPFLAGS'
45686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45688ac_compiler_gnu=$ac_cv_c_compiler_gnu
45689
45690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45691/* end confdefs.h.  */
45692
45693int
45694main ()
45695{
45696
45697  ;
45698  return 0;
45699}
45700_ACEOF
45701if ac_fn_c_try_link "$LINENO"; then :
45702
45703else
45704  supports=no
45705fi
45706rm -f core conftest.err conftest.$ac_objext \
45707    conftest$ac_exeext conftest.$ac_ext
45708  ac_ext=cpp
45709ac_cpp='$CXXCPP $CPPFLAGS'
45710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45713
45714  LDFLAGS="$saved_ldflags"
45715
45716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45717$as_echo "$supports" >&6; }
45718  if test "x$supports" = "xyes" ; then
45719    :
45720    HAS_LINKER_NOW=true
45721  else
45722    :
45723    HAS_LINKER_NOW=false
45724  fi
45725
45726
45727
45728
45729
45730
45731
45732
45733
45734
45735
45736
45737  fi
45738
45739  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45740  # in executable.'
45741  USING_BROKEN_SUSE_LD=no
45742  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45744$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45745    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45746    $ECHO "int main() { }" > main.c
45747    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45749$as_echo "no" >&6; }
45750      USING_BROKEN_SUSE_LD=no
45751    else
45752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45753$as_echo "yes" >&6; }
45754      USING_BROKEN_SUSE_LD=yes
45755    fi
45756    rm -rf version-script.map main.c a.out
45757  fi
45758
45759
45760
45761# Setup the JTReg Regression Test Harness.
45762
45763
45764# Check whether --with-jtreg was given.
45765if test "${with_jtreg+set}" = set; then :
45766  withval=$with_jtreg;
45767else
45768  with_jtreg=no
45769fi
45770
45771
45772  if test "x$with_jtreg" = xno; then
45773    # jtreg disabled
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45775$as_echo_n "checking for jtreg... " >&6; }
45776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45777$as_echo "no" >&6; }
45778  else
45779    if test "x$with_jtreg" != xyes; then
45780      # with path specified.
45781      JT_HOME="$with_jtreg"
45782    fi
45783
45784    if test "x$JT_HOME" != x; then
45785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45786$as_echo_n "checking for jtreg... " >&6; }
45787
45788      # use JT_HOME enviroment var.
45789
45790  # Only process if variable expands to non-empty
45791
45792  if test "x$JT_HOME" != x; then
45793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45794
45795  # Input might be given as Windows format, start by converting to
45796  # unix format.
45797  path="$JT_HOME"
45798  new_path=`$CYGPATH -u "$path"`
45799
45800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45803  # "foo.exe" is OK but "foo" is an error.
45804  #
45805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45806  # It is also a way to make sure we got the proper file name for the real test later on.
45807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45808  if test "x$test_shortpath" = x; then
45809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45810$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45811    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45812  fi
45813
45814  # Call helper function which possibly converts this using DOS-style short mode.
45815  # If so, the updated path is stored in $new_path.
45816
45817  input_path="$new_path"
45818  # Check if we need to convert this using DOS-style short mode. If the path
45819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45820  # take no chances and rewrite it.
45821  # Note: m4 eats our [], so we need to use [ and ] instead.
45822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45823  if test "x$has_forbidden_chars" != x; then
45824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45828      # Going to short mode and back again did indeed matter. Since short mode is
45829      # case insensitive, let's make it lowercase to improve readability.
45830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45831      # Now convert it back to Unix-style (cygpath)
45832      input_path=`$CYGPATH -u "$shortmode_path"`
45833      new_path="$input_path"
45834    fi
45835  fi
45836
45837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45838  if test "x$test_cygdrive_prefix" = x; then
45839    # As a simple fix, exclude /usr/bin since it's not a real path.
45840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45842      # a path prefixed by /cygdrive for fixpath to work.
45843      new_path="$CYGWIN_ROOT_PATH$input_path"
45844    fi
45845  fi
45846
45847
45848  if test "x$path" != "x$new_path"; then
45849    JT_HOME="$new_path"
45850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45851$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45852  fi
45853
45854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45855
45856  path="$JT_HOME"
45857  has_colon=`$ECHO $path | $GREP ^.:`
45858  new_path="$path"
45859  if test "x$has_colon" = x; then
45860    # Not in mixed or Windows style, start by that.
45861    new_path=`cmd //c echo $path`
45862  fi
45863
45864
45865  input_path="$new_path"
45866  # Check if we need to convert this using DOS-style short mode. If the path
45867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45868  # take no chances and rewrite it.
45869  # Note: m4 eats our [], so we need to use [ and ] instead.
45870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45871  if test "x$has_forbidden_chars" != x; then
45872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45874  fi
45875
45876
45877  windows_path="$new_path"
45878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45879    unix_path=`$CYGPATH -u "$windows_path"`
45880    new_path="$unix_path"
45881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45883    new_path="$unix_path"
45884  fi
45885
45886  if test "x$path" != "x$new_path"; then
45887    JT_HOME="$new_path"
45888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45889$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45890  fi
45891
45892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45894
45895    else
45896      # We're on a unix platform. Hooray! :)
45897      path="$JT_HOME"
45898      has_space=`$ECHO "$path" | $GREP " "`
45899      if test "x$has_space" != x; then
45900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45901$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45903      fi
45904
45905      # Use eval to expand a potential ~
45906      eval path="$path"
45907      if test ! -f "$path" && test ! -d "$path"; then
45908        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45909      fi
45910
45911      if test -d "$path"; then
45912        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45913      else
45914        dir="`$DIRNAME "$path"`"
45915        base="`$BASENAME "$path"`"
45916        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45917      fi
45918    fi
45919  fi
45920
45921
45922      # jtreg win32 script works for everybody
45923      JTREGEXE="$JT_HOME/bin/jtreg"
45924
45925      if test ! -f "$JTREGEXE"; then
45926        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45927      fi
45928
45929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45930$as_echo "$JTREGEXE" >&6; }
45931    else
45932      # try to find jtreg on path
45933
45934
45935
45936  # Publish this variable in the help.
45937
45938
45939  if [ -z "${JTREGEXE+x}" ]; then
45940    # The variable is not set by user, try to locate tool using the code snippet
45941    for ac_prog in jtreg
45942do
45943  # Extract the first word of "$ac_prog", so it can be a program name with args.
45944set dummy $ac_prog; ac_word=$2
45945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45946$as_echo_n "checking for $ac_word... " >&6; }
45947if ${ac_cv_path_JTREGEXE+:} false; then :
45948  $as_echo_n "(cached) " >&6
45949else
45950  case $JTREGEXE in
45951  [\\/]* | ?:[\\/]*)
45952  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45953  ;;
45954  *)
45955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45956for as_dir in $PATH
45957do
45958  IFS=$as_save_IFS
45959  test -z "$as_dir" && as_dir=.
45960    for ac_exec_ext in '' $ac_executable_extensions; do
45961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45962    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45964    break 2
45965  fi
45966done
45967  done
45968IFS=$as_save_IFS
45969
45970  ;;
45971esac
45972fi
45973JTREGEXE=$ac_cv_path_JTREGEXE
45974if test -n "$JTREGEXE"; then
45975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45976$as_echo "$JTREGEXE" >&6; }
45977else
45978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45979$as_echo "no" >&6; }
45980fi
45981
45982
45983  test -n "$JTREGEXE" && break
45984done
45985
45986  else
45987    # The variable is set, but is it from the command line or the environment?
45988
45989    # Try to remove the string !JTREGEXE! from our list.
45990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45992      # If it failed, the variable was not from the command line. Ignore it,
45993      # but warn the user (except for BASH, which is always set by the calling BASH).
45994      if test "xJTREGEXE" != xBASH; then
45995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45996$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45997      fi
45998      # Try to locate tool using the code snippet
45999      for ac_prog in jtreg
46000do
46001  # Extract the first word of "$ac_prog", so it can be a program name with args.
46002set dummy $ac_prog; ac_word=$2
46003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46004$as_echo_n "checking for $ac_word... " >&6; }
46005if ${ac_cv_path_JTREGEXE+:} false; then :
46006  $as_echo_n "(cached) " >&6
46007else
46008  case $JTREGEXE in
46009  [\\/]* | ?:[\\/]*)
46010  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46011  ;;
46012  *)
46013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46014for as_dir in $PATH
46015do
46016  IFS=$as_save_IFS
46017  test -z "$as_dir" && as_dir=.
46018    for ac_exec_ext in '' $ac_executable_extensions; do
46019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46020    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46022    break 2
46023  fi
46024done
46025  done
46026IFS=$as_save_IFS
46027
46028  ;;
46029esac
46030fi
46031JTREGEXE=$ac_cv_path_JTREGEXE
46032if test -n "$JTREGEXE"; then
46033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46034$as_echo "$JTREGEXE" >&6; }
46035else
46036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46037$as_echo "no" >&6; }
46038fi
46039
46040
46041  test -n "$JTREGEXE" && break
46042done
46043
46044    else
46045      # If it succeeded, then it was overridden by the user. We will use it
46046      # for the tool.
46047
46048      # First remove it from the list of overridden variables, so we can test
46049      # for unknown variables in the end.
46050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46051
46052      # Check if we try to supply an empty value
46053      if test "x$JTREGEXE" = x; then
46054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
46055$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
46056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46057$as_echo_n "checking for JTREGEXE... " >&6; }
46058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46059$as_echo "disabled" >&6; }
46060      else
46061        # Check if the provided tool contains a complete path.
46062        tool_specified="$JTREGEXE"
46063        tool_basename="${tool_specified##*/}"
46064        if test "x$tool_basename" = "x$tool_specified"; then
46065          # A command without a complete path is provided, search $PATH.
46066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
46067$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
46068          # Extract the first word of "$tool_basename", so it can be a program name with args.
46069set dummy $tool_basename; ac_word=$2
46070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46071$as_echo_n "checking for $ac_word... " >&6; }
46072if ${ac_cv_path_JTREGEXE+:} false; then :
46073  $as_echo_n "(cached) " >&6
46074else
46075  case $JTREGEXE in
46076  [\\/]* | ?:[\\/]*)
46077  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46078  ;;
46079  *)
46080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46081for as_dir in $PATH
46082do
46083  IFS=$as_save_IFS
46084  test -z "$as_dir" && as_dir=.
46085    for ac_exec_ext in '' $ac_executable_extensions; do
46086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46087    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46089    break 2
46090  fi
46091done
46092  done
46093IFS=$as_save_IFS
46094
46095  ;;
46096esac
46097fi
46098JTREGEXE=$ac_cv_path_JTREGEXE
46099if test -n "$JTREGEXE"; then
46100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46101$as_echo "$JTREGEXE" >&6; }
46102else
46103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46104$as_echo "no" >&6; }
46105fi
46106
46107
46108          if test "x$JTREGEXE" = x; then
46109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46110          fi
46111        else
46112          # Otherwise we believe it is a complete path. Use it as it is.
46113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
46114$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
46115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46116$as_echo_n "checking for JTREGEXE... " >&6; }
46117          if test ! -x "$tool_specified"; then
46118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46119$as_echo "not found" >&6; }
46120            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
46121          fi
46122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46123$as_echo "$tool_specified" >&6; }
46124        fi
46125      fi
46126    fi
46127
46128  fi
46129
46130
46131
46132  if test "x$JTREGEXE" = x; then
46133    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
46134  fi
46135
46136
46137      JT_HOME="`$DIRNAME $JTREGEXE`"
46138    fi
46139  fi
46140
46141
46142
46143
46144
46145
46146  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
46147  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
46148  if test "x$TOOLCHAIN_TYPE" = xxlc; then
46149    COMPILER_TARGET_BITS_FLAG="-q"
46150    COMPILER_COMMAND_FILE_FLAG="-f"
46151  else
46152    COMPILER_TARGET_BITS_FLAG="-m"
46153    COMPILER_COMMAND_FILE_FLAG="@"
46154
46155    # The solstudio linker does not support @-files.
46156    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46157      COMPILER_COMMAND_FILE_FLAG=
46158    fi
46159
46160    # Check if @file is supported by gcc
46161    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
46163$as_echo_n "checking if @file is supported by gcc... " >&6; }
46164      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
46165      $ECHO "" "--version" > command.file
46166      if $CXX @command.file 2>&5 >&5; then
46167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46168$as_echo "yes" >&6; }
46169        COMPILER_COMMAND_FILE_FLAG="@"
46170      else
46171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46172$as_echo "no" >&6; }
46173        COMPILER_COMMAND_FILE_FLAG=
46174      fi
46175      rm -rf command.file
46176    fi
46177  fi
46178
46179
46180
46181  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
46182  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46183    ARFLAGS="-r"
46184  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46185    ARFLAGS="-X64"
46186  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
46187    # lib.exe is used as AR to create static libraries.
46188    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
46189  else
46190    ARFLAGS=""
46191  fi
46192
46193
46194  ## Setup strip.
46195  # FIXME: should this really be per platform, or should it be per toolchain type?
46196  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
46197  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
46198  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46199    STRIPFLAGS="-g"
46200  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
46201    STRIPFLAGS="-x"
46202  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
46203    STRIPFLAGS="-S"
46204  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46205    STRIPFLAGS="-X32_64"
46206  fi
46207
46208
46209
46210  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46211    CC_OUT_OPTION=-Fo
46212    EXE_OUT_OPTION=-out:
46213    LD_OUT_OPTION=-out:
46214    AR_OUT_OPTION=-out:
46215  else
46216    # The option used to specify the target .o,.a or .so file.
46217    # When compiling, how to specify the to be created object file.
46218    CC_OUT_OPTION='-o$(SPACE)'
46219    # When linking, how to specify the to be created executable.
46220    EXE_OUT_OPTION='-o$(SPACE)'
46221    # When linking, how to specify the to be created dynamically linkable library.
46222    LD_OUT_OPTION='-o$(SPACE)'
46223    # When archiving, how to specify the to be create static archive for object files.
46224    AR_OUT_OPTION='rcs$(SPACE)'
46225  fi
46226
46227
46228
46229
46230
46231  # On Windows, we need to set RC flags.
46232  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46233    RC_FLAGS="-nologo -l0x409"
46234    if test "x$VARIANT" = xOPT; then
46235      RC_FLAGS="$RC_FLAGS -DNDEBUG"
46236    fi
46237
46238    # The version variables used to create RC_FLAGS may be overridden
46239    # in a custom configure script, or possibly the command line.
46240    # Let those variables be expanded at make time in spec.gmk.
46241    # The \$ are escaped to the shell, and the $(...) variables
46242    # are evaluated by make.
46243    RC_FLAGS="$RC_FLAGS \
46244        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
46245        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
46246        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
46247        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
46248        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
46249        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
46250        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
46251  fi
46252
46253
46254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46255    # silence copyright notice and other headers.
46256    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
46257  fi
46258
46259
46260# FIXME: Currently we must test this after toolchain but before flags. Fix!
46261
46262# Now we can test some aspects on the target using configure macros.
46263
46264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46265$as_echo_n "checking for ANSI C header files... " >&6; }
46266if ${ac_cv_header_stdc+:} false; then :
46267  $as_echo_n "(cached) " >&6
46268else
46269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46270/* end confdefs.h.  */
46271#include <stdlib.h>
46272#include <stdarg.h>
46273#include <string.h>
46274#include <float.h>
46275
46276int
46277main ()
46278{
46279
46280  ;
46281  return 0;
46282}
46283_ACEOF
46284if ac_fn_cxx_try_compile "$LINENO"; then :
46285  ac_cv_header_stdc=yes
46286else
46287  ac_cv_header_stdc=no
46288fi
46289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46290
46291if test $ac_cv_header_stdc = yes; then
46292  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46294/* end confdefs.h.  */
46295#include <string.h>
46296
46297_ACEOF
46298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46299  $EGREP "memchr" >/dev/null 2>&1; then :
46300
46301else
46302  ac_cv_header_stdc=no
46303fi
46304rm -f conftest*
46305
46306fi
46307
46308if test $ac_cv_header_stdc = yes; then
46309  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46311/* end confdefs.h.  */
46312#include <stdlib.h>
46313
46314_ACEOF
46315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46316  $EGREP "free" >/dev/null 2>&1; then :
46317
46318else
46319  ac_cv_header_stdc=no
46320fi
46321rm -f conftest*
46322
46323fi
46324
46325if test $ac_cv_header_stdc = yes; then
46326  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46327  if test "$cross_compiling" = yes; then :
46328  :
46329else
46330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46331/* end confdefs.h.  */
46332#include <ctype.h>
46333#include <stdlib.h>
46334#if ((' ' & 0x0FF) == 0x020)
46335# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46336# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46337#else
46338# define ISLOWER(c) \
46339		   (('a' <= (c) && (c) <= 'i') \
46340		     || ('j' <= (c) && (c) <= 'r') \
46341		     || ('s' <= (c) && (c) <= 'z'))
46342# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46343#endif
46344
46345#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46346int
46347main ()
46348{
46349  int i;
46350  for (i = 0; i < 256; i++)
46351    if (XOR (islower (i), ISLOWER (i))
46352	|| toupper (i) != TOUPPER (i))
46353      return 2;
46354  return 0;
46355}
46356_ACEOF
46357if ac_fn_cxx_try_run "$LINENO"; then :
46358
46359else
46360  ac_cv_header_stdc=no
46361fi
46362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46363  conftest.$ac_objext conftest.beam conftest.$ac_ext
46364fi
46365
46366fi
46367fi
46368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46369$as_echo "$ac_cv_header_stdc" >&6; }
46370if test $ac_cv_header_stdc = yes; then
46371
46372$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46373
46374fi
46375
46376# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46377for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46378		  inttypes.h stdint.h unistd.h
46379do :
46380  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46381ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46382"
46383if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46384  cat >>confdefs.h <<_ACEOF
46385#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46386_ACEOF
46387
46388fi
46389
46390done
46391
46392
46393
46394  ###############################################################################
46395  #
46396  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46397  # (The JVM can use 32 or 64 bit Java pointers but that decision
46398  # is made at runtime.)
46399  #
46400
46401  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46402    # Always specify -m flag on Solaris
46403    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46404
46405  # When we add flags to the "official" CFLAGS etc, we need to
46406  # keep track of these additions in ADDED_CFLAGS etc. These
46407  # will later be checked to make sure only controlled additions
46408  # have been made to CFLAGS etc.
46409  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46410  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46411  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46412
46413  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46414  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46415  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46416
46417  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46418  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46419  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46420
46421  elif test "x$COMPILE_TYPE" = xreduced; then
46422    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46423      # Specify -m if running reduced on unix platforms
46424
46425  # When we add flags to the "official" CFLAGS etc, we need to
46426  # keep track of these additions in ADDED_CFLAGS etc. These
46427  # will later be checked to make sure only controlled additions
46428  # have been made to CFLAGS etc.
46429  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46430  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46431  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46432
46433  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46434  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46435  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46436
46437  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46438  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46439  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46440
46441    fi
46442  fi
46443
46444  # Make compilation sanity check
46445  for ac_header in stdio.h
46446do :
46447  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46448if test "x$ac_cv_header_stdio_h" = xyes; then :
46449  cat >>confdefs.h <<_ACEOF
46450#define HAVE_STDIO_H 1
46451_ACEOF
46452
46453else
46454
46455    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46456$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46457    if test "x$COMPILE_TYPE" = xreduced; then
46458
46459  # Print a helpful message on how to acquire the necessary build dependency.
46460  # reduced is the help tag: freetype, cups, alsa etc
46461  MISSING_DEPENDENCY=reduced
46462
46463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46464    cygwin_help $MISSING_DEPENDENCY
46465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46466    msys_help $MISSING_DEPENDENCY
46467  else
46468    PKGHANDLER_COMMAND=
46469
46470    case $PKGHANDLER in
46471      apt-get)
46472        apt_help     $MISSING_DEPENDENCY ;;
46473      yum)
46474        yum_help     $MISSING_DEPENDENCY ;;
46475      port)
46476        port_help    $MISSING_DEPENDENCY ;;
46477      pkgutil)
46478        pkgutil_help $MISSING_DEPENDENCY ;;
46479      pkgadd)
46480        pkgadd_help  $MISSING_DEPENDENCY ;;
46481    esac
46482
46483    if test "x$PKGHANDLER_COMMAND" != x; then
46484      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46485    fi
46486  fi
46487
46488      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46489$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46490    elif test "x$COMPILE_TYPE" = xcross; then
46491      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46492$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46493    fi
46494    as_fn_error $? "Cannot continue." "$LINENO" 5
46495
46496fi
46497
46498done
46499
46500
46501  # The cast to long int works around a bug in the HP C Compiler
46502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46504# This bug is HP SR number 8606223364.
46505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46506$as_echo_n "checking size of int *... " >&6; }
46507if ${ac_cv_sizeof_int_p+:} false; then :
46508  $as_echo_n "(cached) " >&6
46509else
46510  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46511
46512else
46513  if test "$ac_cv_type_int_p" = yes; then
46514     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46516as_fn_error 77 "cannot compute sizeof (int *)
46517See \`config.log' for more details" "$LINENO" 5; }
46518   else
46519     ac_cv_sizeof_int_p=0
46520   fi
46521fi
46522
46523fi
46524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46525$as_echo "$ac_cv_sizeof_int_p" >&6; }
46526
46527
46528
46529cat >>confdefs.h <<_ACEOF
46530#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46531_ACEOF
46532
46533
46534
46535  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46536  if test "x$ac_cv_sizeof_int_p" = x; then
46537    # The test failed, lets stick to the assumed value.
46538    { $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
46539$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46540  else
46541    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46542
46543    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46544      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46545      # Let's try to implicitely set the compilers target architecture and retry the test
46546      { $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
46547$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;}
46548      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46549$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46550
46551  # When we add flags to the "official" CFLAGS etc, we need to
46552  # keep track of these additions in ADDED_CFLAGS etc. These
46553  # will later be checked to make sure only controlled additions
46554  # have been made to CFLAGS etc.
46555  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46556  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46557  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46558
46559  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46560  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46561  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46562
46563  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46564  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46565  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46566
46567
46568      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46569      unset ac_cv_sizeof_int_p
46570      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46571      cat >>confdefs.h <<_ACEOF
46572#undef SIZEOF_INT_P
46573_ACEOF
46574
46575      # The cast to long int works around a bug in the HP C Compiler
46576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46578# This bug is HP SR number 8606223364.
46579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46580$as_echo_n "checking size of int *... " >&6; }
46581if ${ac_cv_sizeof_int_p+:} false; then :
46582  $as_echo_n "(cached) " >&6
46583else
46584  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46585
46586else
46587  if test "$ac_cv_type_int_p" = yes; then
46588     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46590as_fn_error 77 "cannot compute sizeof (int *)
46591See \`config.log' for more details" "$LINENO" 5; }
46592   else
46593     ac_cv_sizeof_int_p=0
46594   fi
46595fi
46596
46597fi
46598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46599$as_echo "$ac_cv_sizeof_int_p" >&6; }
46600
46601
46602
46603cat >>confdefs.h <<_ACEOF
46604#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46605_ACEOF
46606
46607
46608
46609      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46610
46611      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46612        { $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
46613$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;}
46614        if test "x$COMPILE_TYPE" = xreduced; then
46615
46616  # Print a helpful message on how to acquire the necessary build dependency.
46617  # reduced is the help tag: freetype, cups, alsa etc
46618  MISSING_DEPENDENCY=reduced
46619
46620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46621    cygwin_help $MISSING_DEPENDENCY
46622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46623    msys_help $MISSING_DEPENDENCY
46624  else
46625    PKGHANDLER_COMMAND=
46626
46627    case $PKGHANDLER in
46628      apt-get)
46629        apt_help     $MISSING_DEPENDENCY ;;
46630      yum)
46631        yum_help     $MISSING_DEPENDENCY ;;
46632      port)
46633        port_help    $MISSING_DEPENDENCY ;;
46634      pkgutil)
46635        pkgutil_help $MISSING_DEPENDENCY ;;
46636      pkgadd)
46637        pkgadd_help  $MISSING_DEPENDENCY ;;
46638    esac
46639
46640    if test "x$PKGHANDLER_COMMAND" != x; then
46641      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46642    fi
46643  fi
46644
46645          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46646$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46647        elif test "x$COMPILE_TYPE" = xcross; then
46648          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46649$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46650        fi
46651        as_fn_error $? "Cannot continue." "$LINENO" 5
46652      fi
46653    fi
46654  fi
46655
46656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46657$as_echo_n "checking for target address size... " >&6; }
46658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46659$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46660
46661
46662  ###############################################################################
46663  #
46664  # Is the target little of big endian?
46665  #
46666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46667$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46668if ${ac_cv_c_bigendian+:} false; then :
46669  $as_echo_n "(cached) " >&6
46670else
46671  ac_cv_c_bigendian=unknown
46672    # See if we're dealing with a universal compiler.
46673    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46674/* end confdefs.h.  */
46675#ifndef __APPLE_CC__
46676	       not a universal capable compiler
46677	     #endif
46678	     typedef int dummy;
46679
46680_ACEOF
46681if ac_fn_cxx_try_compile "$LINENO"; then :
46682
46683	# Check for potential -arch flags.  It is not universal unless
46684	# there are at least two -arch flags with different values.
46685	ac_arch=
46686	ac_prev=
46687	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46688	 if test -n "$ac_prev"; then
46689	   case $ac_word in
46690	     i?86 | x86_64 | ppc | ppc64)
46691	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46692		 ac_arch=$ac_word
46693	       else
46694		 ac_cv_c_bigendian=universal
46695		 break
46696	       fi
46697	       ;;
46698	   esac
46699	   ac_prev=
46700	 elif test "x$ac_word" = "x-arch"; then
46701	   ac_prev=arch
46702	 fi
46703       done
46704fi
46705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46706    if test $ac_cv_c_bigendian = unknown; then
46707      # See if sys/param.h defines the BYTE_ORDER macro.
46708      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46709/* end confdefs.h.  */
46710#include <sys/types.h>
46711	     #include <sys/param.h>
46712
46713int
46714main ()
46715{
46716#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46717		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46718		     && LITTLE_ENDIAN)
46719	      bogus endian macros
46720	     #endif
46721
46722  ;
46723  return 0;
46724}
46725_ACEOF
46726if ac_fn_cxx_try_compile "$LINENO"; then :
46727  # It does; now see whether it defined to BIG_ENDIAN or not.
46728	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46729/* end confdefs.h.  */
46730#include <sys/types.h>
46731		#include <sys/param.h>
46732
46733int
46734main ()
46735{
46736#if BYTE_ORDER != BIG_ENDIAN
46737		 not big endian
46738		#endif
46739
46740  ;
46741  return 0;
46742}
46743_ACEOF
46744if ac_fn_cxx_try_compile "$LINENO"; then :
46745  ac_cv_c_bigendian=yes
46746else
46747  ac_cv_c_bigendian=no
46748fi
46749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46750fi
46751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46752    fi
46753    if test $ac_cv_c_bigendian = unknown; then
46754      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46755      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46756/* end confdefs.h.  */
46757#include <limits.h>
46758
46759int
46760main ()
46761{
46762#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46763	      bogus endian macros
46764	     #endif
46765
46766  ;
46767  return 0;
46768}
46769_ACEOF
46770if ac_fn_cxx_try_compile "$LINENO"; then :
46771  # It does; now see whether it defined to _BIG_ENDIAN or not.
46772	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46773/* end confdefs.h.  */
46774#include <limits.h>
46775
46776int
46777main ()
46778{
46779#ifndef _BIG_ENDIAN
46780		 not big endian
46781		#endif
46782
46783  ;
46784  return 0;
46785}
46786_ACEOF
46787if ac_fn_cxx_try_compile "$LINENO"; then :
46788  ac_cv_c_bigendian=yes
46789else
46790  ac_cv_c_bigendian=no
46791fi
46792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46793fi
46794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46795    fi
46796    if test $ac_cv_c_bigendian = unknown; then
46797      # Compile a test program.
46798      if test "$cross_compiling" = yes; then :
46799  # Try to guess by grepping values from an object file.
46800	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46801/* end confdefs.h.  */
46802short int ascii_mm[] =
46803		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46804		short int ascii_ii[] =
46805		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46806		int use_ascii (int i) {
46807		  return ascii_mm[i] + ascii_ii[i];
46808		}
46809		short int ebcdic_ii[] =
46810		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46811		short int ebcdic_mm[] =
46812		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46813		int use_ebcdic (int i) {
46814		  return ebcdic_mm[i] + ebcdic_ii[i];
46815		}
46816		extern int foo;
46817
46818int
46819main ()
46820{
46821return use_ascii (foo) == use_ebcdic (foo);
46822  ;
46823  return 0;
46824}
46825_ACEOF
46826if ac_fn_cxx_try_compile "$LINENO"; then :
46827  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46828	      ac_cv_c_bigendian=yes
46829	    fi
46830	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46831	      if test "$ac_cv_c_bigendian" = unknown; then
46832		ac_cv_c_bigendian=no
46833	      else
46834		# finding both strings is unlikely to happen, but who knows?
46835		ac_cv_c_bigendian=unknown
46836	      fi
46837	    fi
46838fi
46839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46840else
46841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46842/* end confdefs.h.  */
46843$ac_includes_default
46844int
46845main ()
46846{
46847
46848	     /* Are we little or big endian?  From Harbison&Steele.  */
46849	     union
46850	     {
46851	       long int l;
46852	       char c[sizeof (long int)];
46853	     } u;
46854	     u.l = 1;
46855	     return u.c[sizeof (long int) - 1] == 1;
46856
46857  ;
46858  return 0;
46859}
46860_ACEOF
46861if ac_fn_cxx_try_run "$LINENO"; then :
46862  ac_cv_c_bigendian=no
46863else
46864  ac_cv_c_bigendian=yes
46865fi
46866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46867  conftest.$ac_objext conftest.beam conftest.$ac_ext
46868fi
46869
46870    fi
46871fi
46872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46873$as_echo "$ac_cv_c_bigendian" >&6; }
46874 case $ac_cv_c_bigendian in #(
46875   yes)
46876     ENDIAN="big";; #(
46877   no)
46878     ENDIAN="little" ;; #(
46879   universal)
46880     ENDIAN="universal_endianness"
46881     ;; #(
46882   *)
46883     ENDIAN="unknown" ;;
46884 esac
46885
46886
46887  if test "x$ENDIAN" = xuniversal_endianness; then
46888    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46889  fi
46890  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46891    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
46892  fi
46893
46894
46895# Configure flags for the tools
46896
46897  ###############################################################################
46898  #
46899  # How to compile shared libraries.
46900  #
46901
46902  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46903    PICFLAG="-fPIC"
46904    C_FLAG_REORDER=''
46905    CXX_FLAG_REORDER=''
46906
46907    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46908      # Linking is different on MacOSX
46909      if test "x$STATIC_BUILD" = xtrue; then
46910        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46911      else
46912        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46913      fi
46914      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46915      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46916      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46917      SET_SHARED_LIBRARY_MAPFILE=''
46918    else
46919      # Default works for linux, might work on other platforms as well.
46920      SHARED_LIBRARY_FLAGS='-shared'
46921      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46922      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46923      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46924      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46925    fi
46926  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46927    C_FLAG_REORDER=''
46928    CXX_FLAG_REORDER=''
46929
46930    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46931      # Linking is different on MacOSX
46932      PICFLAG=''
46933      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46934      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46935      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46936      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46937      SET_SHARED_LIBRARY_MAPFILE=''
46938    else
46939      # Default works for linux, might work on other platforms as well.
46940      PICFLAG='-fPIC'
46941      SHARED_LIBRARY_FLAGS='-shared'
46942      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46943      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46944      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46945      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46946    fi
46947  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46948    PICFLAG="-KPIC"
46949    C_FLAG_REORDER='-xF'
46950    CXX_FLAG_REORDER='-xF'
46951    SHARED_LIBRARY_FLAGS="-G"
46952    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46953    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46954    SET_SHARED_LIBRARY_NAME='-h $1'
46955    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46956  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46957    PICFLAG="-qpic=large"
46958    C_FLAG_REORDER=''
46959    CXX_FLAG_REORDER=''
46960    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46961    SET_EXECUTABLE_ORIGIN=""
46962    SET_SHARED_LIBRARY_ORIGIN=''
46963    SET_SHARED_LIBRARY_NAME=''
46964    SET_SHARED_LIBRARY_MAPFILE=''
46965  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46966    PICFLAG=""
46967    C_FLAG_REORDER=''
46968    CXX_FLAG_REORDER=''
46969    SHARED_LIBRARY_FLAGS="-dll"
46970    SET_EXECUTABLE_ORIGIN=''
46971    SET_SHARED_LIBRARY_ORIGIN=''
46972    SET_SHARED_LIBRARY_NAME=''
46973    SET_SHARED_LIBRARY_MAPFILE=''
46974  fi
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46985    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46986    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46987    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46988  fi
46989  # The (cross) compiler is now configured, we can now test capabilities
46990  # of the target platform.
46991
46992
46993
46994  ###############################################################################
46995  #
46996  # Setup the opt flags for different compilers
46997  # and different operating systems.
46998  #
46999
47000  # FIXME: this was indirectly the old default, but just inherited.
47001  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47002  #   C_FLAG_DEPS="-MMD -MF"
47003  # fi
47004
47005  # Generate make dependency files
47006  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47007    C_FLAG_DEPS="-MMD -MF"
47008  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47009    C_FLAG_DEPS="-MMD -MF"
47010  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47011    C_FLAG_DEPS="-xMMD -xMF"
47012  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47013    C_FLAG_DEPS="-qmakedep=gcc -MF"
47014  fi
47015  CXX_FLAG_DEPS="$C_FLAG_DEPS"
47016
47017
47018
47019  # Debug symbols
47020  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47021    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
47022      # reduce from default "-g2" option to save space
47023      CFLAGS_DEBUG_SYMBOLS="-g1"
47024      CXXFLAGS_DEBUG_SYMBOLS="-g1"
47025    else
47026      CFLAGS_DEBUG_SYMBOLS="-g"
47027      CXXFLAGS_DEBUG_SYMBOLS="-g"
47028    fi
47029  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47030    CFLAGS_DEBUG_SYMBOLS="-g"
47031    CXXFLAGS_DEBUG_SYMBOLS="-g"
47032  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47033    CFLAGS_DEBUG_SYMBOLS="-g -xs"
47034    # -g0 enables debug symbols without disabling inlining.
47035    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
47036  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47037    CFLAGS_DEBUG_SYMBOLS="-g"
47038    CXXFLAGS_DEBUG_SYMBOLS="-g"
47039  fi
47040
47041
47042
47043  # bounds, memory and behavior checking options
47044  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47045    case $DEBUG_LEVEL in
47046    release )
47047      # no adjustment
47048      ;;
47049    fastdebug )
47050      # no adjustment
47051      ;;
47052    slowdebug )
47053      # Add runtime stack smashing and undefined behavior checks.
47054      # Not all versions of gcc support -fstack-protector
47055      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098    # Execute function body
47099
47100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
47101$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
47102  supports=yes
47103
47104  saved_cflags="$CFLAGS"
47105  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
47106  ac_ext=c
47107ac_cpp='$CPP $CPPFLAGS'
47108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47110ac_compiler_gnu=$ac_cv_c_compiler_gnu
47111
47112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47113/* end confdefs.h.  */
47114int i;
47115_ACEOF
47116if ac_fn_c_try_compile "$LINENO"; then :
47117
47118else
47119  supports=no
47120fi
47121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47122  ac_ext=cpp
47123ac_cpp='$CXXCPP $CPPFLAGS'
47124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47127
47128  CFLAGS="$saved_cflags"
47129
47130  saved_cxxflags="$CXXFLAGS"
47131  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
47132  ac_ext=cpp
47133ac_cpp='$CXXCPP $CPPFLAGS'
47134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47137
47138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47139/* end confdefs.h.  */
47140int i;
47141_ACEOF
47142if ac_fn_cxx_try_compile "$LINENO"; then :
47143
47144else
47145  supports=no
47146fi
47147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47148  ac_ext=cpp
47149ac_cpp='$CXXCPP $CPPFLAGS'
47150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47153
47154  CXXFLAGS="$saved_cxxflags"
47155
47156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47157$as_echo "$supports" >&6; }
47158  if test "x$supports" = "xyes" ; then
47159    :
47160
47161  else
47162    :
47163    STACK_PROTECTOR_CFLAG=""
47164  fi
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
47179      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
47180      ;;
47181    esac
47182  fi
47183
47184  # Optimization levels
47185  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47186    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
47187
47188    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
47189      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
47190      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
47191      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
47192      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
47193      C_O_FLAG_DEBUG="-xregs=no%frameptr"
47194      C_O_FLAG_NONE="-xregs=no%frameptr"
47195      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
47196      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
47197      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
47198      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
47199      CXX_O_FLAG_NONE="-xregs=no%frameptr"
47200      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47201        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
47202        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
47203      fi
47204    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47205      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
47206      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
47207      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
47208      C_O_FLAG_DEBUG=""
47209      C_O_FLAG_NONE=""
47210      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
47211      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
47212      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
47213      C_O_FLAG_DEBUG=""
47214      CXX_O_FLAG_NONE=""
47215    fi
47216  else
47217    # The remaining toolchains share opt flags between CC and CXX;
47218    # setup for C and duplicate afterwards.
47219    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47220      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47221        # On MacOSX we optimize for size, something
47222        # we should do for all platforms?
47223        C_O_FLAG_HIGHEST="-Os"
47224        C_O_FLAG_HI="-Os"
47225        C_O_FLAG_NORM="-Os"
47226      else
47227        C_O_FLAG_HIGHEST="-O3"
47228        C_O_FLAG_HI="-O3"
47229        C_O_FLAG_NORM="-O2"
47230      fi
47231      C_O_FLAG_DEBUG="-O0"
47232      C_O_FLAG_NONE="-O0"
47233    elif test "x$TOOLCHAIN_TYPE" = xclang; then
47234      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47235        # On MacOSX we optimize for size, something
47236        # we should do for all platforms?
47237        C_O_FLAG_HIGHEST="-Os"
47238        C_O_FLAG_HI="-Os"
47239        C_O_FLAG_NORM="-Os"
47240      else
47241        C_O_FLAG_HIGHEST="-O3"
47242        C_O_FLAG_HI="-O3"
47243        C_O_FLAG_NORM="-O2"
47244      fi
47245      C_O_FLAG_DEBUG="-O0"
47246      C_O_FLAG_NONE="-O0"
47247    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47248      C_O_FLAG_HIGHEST="-O3"
47249      C_O_FLAG_HI="-O3 -qstrict"
47250      C_O_FLAG_NORM="-O2"
47251      C_O_FLAG_DEBUG="-qnoopt"
47252      C_O_FLAG_NONE="-qnoopt"
47253    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47254      C_O_FLAG_HIGHEST="-O2"
47255      C_O_FLAG_HI="-O1"
47256      C_O_FLAG_NORM="-O1"
47257      C_O_FLAG_DEBUG="-Od"
47258      C_O_FLAG_NONE="-Od"
47259    fi
47260    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
47261    CXX_O_FLAG_HI="$C_O_FLAG_HI"
47262    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
47263    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
47264    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
47265  fi
47266
47267  # Adjust optimization flags according to debug level.
47268  case $DEBUG_LEVEL in
47269    release )
47270      # no adjustment
47271      ;;
47272    fastdebug )
47273      # Not quite so much optimization
47274      C_O_FLAG_HI="$C_O_FLAG_NORM"
47275      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
47276      ;;
47277    slowdebug )
47278      # Disable optimization
47279      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
47280      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
47281      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
47282      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
47283      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
47284      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
47285      ;;
47286  esac
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300  # Special extras...
47301  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47302    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47303      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47304      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47305    fi
47306    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47307    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47308  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47309    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47310    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47311  fi
47312
47313  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
47314  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
47315  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
47316
47317  ###############################################################################
47318  #
47319  # Now setup the CFLAGS and LDFLAGS for the JDK build.
47320  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
47321  #
47322
47323  # Setup compiler/platform specific flags into
47324  #    CFLAGS_JDK    - C Compiler flags
47325  #    CXXFLAGS_JDK  - C++ Compiler flags
47326  #    COMMON_CCXXFLAGS_JDK - common to C and C++
47327  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47328    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47329      # Force compatibility with i586 on 32 bit intel platforms.
47330      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47331    fi
47332    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47333        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47334    case $OPENJDK_TARGET_CPU_ARCH in
47335      arm )
47336        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47337        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47338        ;;
47339      ppc )
47340        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47341        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47342        ;;
47343      * )
47344        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47345        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47346        ;;
47347    esac
47348  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47349    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47350	    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47351	      # Force compatibility with i586 on 32 bit intel platforms.
47352	      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47353	    fi
47354	    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47355	        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47356	    case $OPENJDK_TARGET_CPU_ARCH in
47357	      ppc )
47358	        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47359	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47360	        ;;
47361	      * )
47362	        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47363	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47364	        ;;
47365	    esac
47366    fi
47367  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47368    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47369    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47370      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47371    fi
47372
47373    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47374    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47375  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47376    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47377    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47378  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47379    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47380        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47381        -DWIN32_LEAN_AND_MEAN \
47382        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47383        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47384        -DWIN32 -DIAL"
47385    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47386      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47387    else
47388      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47389    fi
47390    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47391    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47392    # studio.
47393    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47394      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47395          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47396    fi
47397  fi
47398
47399  ###############################################################################
47400
47401  # Adjust flags according to debug level.
47402  case $DEBUG_LEVEL in
47403    fastdebug | slowdebug )
47404      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47405      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47406      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47407      ;;
47408    release )
47409      ;;
47410    * )
47411      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47412      ;;
47413  esac
47414
47415  # Setup LP64
47416  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47417
47418  # Set some common defines. These works for all compilers, but assume
47419  # -D is universally accepted.
47420
47421  # Setup endianness
47422  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47423    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47424    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47425    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47426    #   Note: -Dmacro         is the same as    #define macro 1
47427    #         -Dmacro=        is the same as    #define macro
47428    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47429      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47430    else
47431      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47432    fi
47433  else
47434    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47435    # are defined in the system?
47436    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47437      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47438    else
47439      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47440    fi
47441  fi
47442
47443  # Setup target OS define. Use OS target name but in upper case.
47444  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47445  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47446
47447  # Setup target CPU
47448  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47449
47450  # Setup debug/release defines
47451  if test "x$DEBUG_LEVEL" = xrelease; then
47452    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47453    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47454      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47455    fi
47456  else
47457    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47458  fi
47459
47460  # Set some additional per-OS defines.
47461  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47462    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47463  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47464    # FIXME: PPC64 should not be here.
47465    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47466  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47467    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47468  fi
47469
47470  # Additional macosx handling
47471  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47472    # Setting these parameters makes it an error to link to macosx APIs that are
47473    # newer than the given OS version and makes the linked binaries compatible
47474    # even if built on a newer version of the OS.
47475    # The expected format is X.Y.Z
47476    MACOSX_VERSION_MIN=10.7.0
47477
47478
47479    # The macro takes the version with no dots, ex: 1070
47480    # Let the flags variables get resolved in make for easier override on make
47481    # command line.
47482    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47483    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47484  fi
47485
47486  # Setup some hard coded includes
47487  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47488      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47489      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47490      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47491      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47492      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47493
47494  # The shared libraries are compiled using the picflag.
47495  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47496  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47497
47498  # Executable flags
47499  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47500  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47501
47502
47503
47504
47505
47506
47507  # Flags for compiling test libraries
47508  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47509  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47510
47511  # Flags for compiling test executables
47512  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47513  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47514
47515
47516
47517
47518
47519
47520  # Setup LDFLAGS et al.
47521  #
47522
47523  # Now this is odd. The JDK native libraries have to link against libjvm.so
47524  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47525  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47526  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47527  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47528  # libraries will link to whatever is in memory. Yuck.
47529  #
47530  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47531  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47532    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47533    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47534      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47535    fi
47536    # TODO: make -debug optional "--disable-full-debug-symbols"
47537    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47538  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47539    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47540    # We have previously set HAS_GNU_HASH if this is the case
47541    if test -n "$HAS_GNU_HASH"; then
47542      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
47543    fi
47544    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47545      # And since we now know that the linker is gnu, then add -z defs, to forbid
47546      # undefined symbols in object files.
47547      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
47548      case $DEBUG_LEVEL in
47549        release )
47550          # tell linker to optimize libraries.
47551          # Should this be supplied to the OSS linker as well?
47552          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
47553          ;;
47554        slowdebug )
47555          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47556            # do relocations at load
47557            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47558            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47559          fi
47560          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47561            # mark relocations read only
47562            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47563            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47564          fi
47565          ;;
47566        fastdebug )
47567          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47568            # mark relocations read only
47569            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47570            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47571          fi
47572          ;;
47573        * )
47574          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47575          ;;
47576        esac
47577    fi
47578  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47579    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
47580    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47581  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47582    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47583  fi
47584
47585  # Customize LDFLAGS for executables
47586
47587  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47588
47589  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47590    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47591      LDFLAGS_STACK_SIZE=1048576
47592    else
47593      LDFLAGS_STACK_SIZE=327680
47594    fi
47595    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47596  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47597    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
47598  fi
47599
47600  # Customize LDFLAGS for libs
47601  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47602
47603  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
47604  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47605    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47606        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47607    JDKLIB_LIBS=""
47608  else
47609    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47610        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47611
47612    # On some platforms (mac) the linker warns about non existing -L dirs.
47613    # Add server first if available. Linking aginst client does not always produce the same results.
47614    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47615    # Default to server for other variants.
47616    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47617      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47618    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47619      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47620    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47621      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47622    else
47623      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47624    fi
47625
47626    JDKLIB_LIBS="-ljava -ljvm"
47627    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47628      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47629    fi
47630  fi
47631
47632
47633
47634
47635
47636
47637
47638  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47639  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47640
47641
47642
47643
47644
47645  # Some Zero and Shark settings.
47646  # ZERO_ARCHFLAG tells the compiler which mode to build for
47647  case "${OPENJDK_TARGET_CPU}" in
47648    s390)
47649      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47650      ;;
47651    *)
47652      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47653  esac
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696    # Execute function body
47697
47698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47699$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47700  supports=yes
47701
47702  saved_cflags="$CFLAGS"
47703  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47704  ac_ext=c
47705ac_cpp='$CPP $CPPFLAGS'
47706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47708ac_compiler_gnu=$ac_cv_c_compiler_gnu
47709
47710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47711/* end confdefs.h.  */
47712int i;
47713_ACEOF
47714if ac_fn_c_try_compile "$LINENO"; then :
47715
47716else
47717  supports=no
47718fi
47719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47720  ac_ext=cpp
47721ac_cpp='$CXXCPP $CPPFLAGS'
47722ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47723ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47724ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47725
47726  CFLAGS="$saved_cflags"
47727
47728  saved_cxxflags="$CXXFLAGS"
47729  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47730  ac_ext=cpp
47731ac_cpp='$CXXCPP $CPPFLAGS'
47732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47735
47736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47737/* end confdefs.h.  */
47738int i;
47739_ACEOF
47740if ac_fn_cxx_try_compile "$LINENO"; then :
47741
47742else
47743  supports=no
47744fi
47745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47746  ac_ext=cpp
47747ac_cpp='$CXXCPP $CPPFLAGS'
47748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47751
47752  CXXFLAGS="$saved_cxxflags"
47753
47754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47755$as_echo "$supports" >&6; }
47756  if test "x$supports" = "xyes" ; then
47757    :
47758
47759  else
47760    :
47761    ZERO_ARCHFLAG=""
47762  fi
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777  # Check that the compiler supports -mX (or -qX on AIX) flags
47778  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826    # Execute function body
47827
47828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47829$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47830  supports=yes
47831
47832  saved_cflags="$CFLAGS"
47833  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47834  ac_ext=c
47835ac_cpp='$CPP $CPPFLAGS'
47836ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47837ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47838ac_compiler_gnu=$ac_cv_c_compiler_gnu
47839
47840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47841/* end confdefs.h.  */
47842int i;
47843_ACEOF
47844if ac_fn_c_try_compile "$LINENO"; then :
47845
47846else
47847  supports=no
47848fi
47849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47850  ac_ext=cpp
47851ac_cpp='$CXXCPP $CPPFLAGS'
47852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47855
47856  CFLAGS="$saved_cflags"
47857
47858  saved_cxxflags="$CXXFLAGS"
47859  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47860  ac_ext=cpp
47861ac_cpp='$CXXCPP $CPPFLAGS'
47862ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47863ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47864ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47865
47866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47867/* end confdefs.h.  */
47868int i;
47869_ACEOF
47870if ac_fn_cxx_try_compile "$LINENO"; then :
47871
47872else
47873  supports=no
47874fi
47875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47876  ac_ext=cpp
47877ac_cpp='$CXXCPP $CPPFLAGS'
47878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47881
47882  CXXFLAGS="$saved_cxxflags"
47883
47884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47885$as_echo "$supports" >&6; }
47886  if test "x$supports" = "xyes" ; then
47887    :
47888    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47889  else
47890    :
47891    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47892  fi
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907  # Check whether --enable-warnings-as-errors was given.
47908if test "${enable_warnings_as_errors+set}" = set; then :
47909  enableval=$enable_warnings_as_errors;
47910fi
47911
47912
47913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47914$as_echo_n "checking if native warnings are errors... " >&6; }
47915  if test "x$enable_warnings_as_errors" = "xyes"; then
47916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47917$as_echo "yes (explicitely set)" >&6; }
47918    WARNINGS_AS_ERRORS=true
47919  elif test "x$enable_warnings_as_errors" = "xno"; then
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47921$as_echo "no" >&6; }
47922    WARNINGS_AS_ERRORS=false
47923  elif test "x$enable_warnings_as_errors" = "x"; then
47924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47925$as_echo "yes (default)" >&6; }
47926    WARNINGS_AS_ERRORS=true
47927  else
47928    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47929  fi
47930
47931  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47932    # Set legacy hotspot variable
47933    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47934  else
47935    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47936  fi
47937
47938
47939
47940
47941  case "${TOOLCHAIN_TYPE}" in
47942    microsoft)
47943      DISABLE_WARNING_PREFIX="-wd"
47944      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47945      ;;
47946    solstudio)
47947      DISABLE_WARNING_PREFIX="-erroff="
47948      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47949      ;;
47950    gcc)
47951      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999    # Execute function body
48000
48001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48002$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48003  supports=yes
48004
48005  saved_cflags="$CFLAGS"
48006  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48007  ac_ext=c
48008ac_cpp='$CPP $CPPFLAGS'
48009ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48010ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48011ac_compiler_gnu=$ac_cv_c_compiler_gnu
48012
48013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48014/* end confdefs.h.  */
48015int i;
48016_ACEOF
48017if ac_fn_c_try_compile "$LINENO"; then :
48018
48019else
48020  supports=no
48021fi
48022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48023  ac_ext=cpp
48024ac_cpp='$CXXCPP $CPPFLAGS'
48025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48028
48029  CFLAGS="$saved_cflags"
48030
48031  saved_cxxflags="$CXXFLAGS"
48032  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48033  ac_ext=cpp
48034ac_cpp='$CXXCPP $CPPFLAGS'
48035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48038
48039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48040/* end confdefs.h.  */
48041int i;
48042_ACEOF
48043if ac_fn_cxx_try_compile "$LINENO"; then :
48044
48045else
48046  supports=no
48047fi
48048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48049  ac_ext=cpp
48050ac_cpp='$CXXCPP $CPPFLAGS'
48051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48054
48055  CXXFLAGS="$saved_cxxflags"
48056
48057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48058$as_echo "$supports" >&6; }
48059  if test "x$supports" = "xyes" ; then
48060    :
48061    GCC_CAN_DISABLE_WARNINGS=true
48062  else
48063    :
48064    GCC_CAN_DISABLE_WARNINGS=false
48065
48066  fi
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48080        DISABLE_WARNING_PREFIX="-Wno-"
48081      else
48082        DISABLE_WARNING_PREFIX=
48083      fi
48084      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48085      # Repeate the check for the BUILD_CC
48086      CC_OLD="$CC"
48087      CC="$BUILD_CC"
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135    # Execute function body
48136
48137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48138$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48139  supports=yes
48140
48141  saved_cflags="$CFLAGS"
48142  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48143  ac_ext=c
48144ac_cpp='$CPP $CPPFLAGS'
48145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48147ac_compiler_gnu=$ac_cv_c_compiler_gnu
48148
48149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48150/* end confdefs.h.  */
48151int i;
48152_ACEOF
48153if ac_fn_c_try_compile "$LINENO"; then :
48154
48155else
48156  supports=no
48157fi
48158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48159  ac_ext=cpp
48160ac_cpp='$CXXCPP $CPPFLAGS'
48161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48164
48165  CFLAGS="$saved_cflags"
48166
48167  saved_cxxflags="$CXXFLAGS"
48168  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48169  ac_ext=cpp
48170ac_cpp='$CXXCPP $CPPFLAGS'
48171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48174
48175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48176/* end confdefs.h.  */
48177int i;
48178_ACEOF
48179if ac_fn_cxx_try_compile "$LINENO"; then :
48180
48181else
48182  supports=no
48183fi
48184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48185  ac_ext=cpp
48186ac_cpp='$CXXCPP $CPPFLAGS'
48187ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48188ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48189ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48190
48191  CXXFLAGS="$saved_cxxflags"
48192
48193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48194$as_echo "$supports" >&6; }
48195  if test "x$supports" = "xyes" ; then
48196    :
48197    BUILD_CC_CAN_DISABLE_WARNINGS=true
48198  else
48199    :
48200    BUILD_CC_CAN_DISABLE_WARNINGS=false
48201
48202  fi
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48216        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
48217      else
48218        BUILD_CC_DISABLE_WARNING_PREFIX=
48219      fi
48220      CC="$CC_OLD"
48221      ;;
48222    clang)
48223      DISABLE_WARNING_PREFIX="-Wno-"
48224      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48225      ;;
48226  esac
48227
48228
48229
48230
48231# Setup debug symbols (need objcopy from the toolchain for that)
48232
48233  #
48234  # NATIVE_DEBUG_SYMBOLS
48235  # This must be done after the toolchain is setup, since we're looking at objcopy.
48236  #
48237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
48238$as_echo_n "checking what type of native debug symbols to use... " >&6; }
48239
48240# Check whether --with-native-debug-symbols was given.
48241if test "${with_native_debug_symbols+set}" = set; then :
48242  withval=$with_native_debug_symbols;
48243        if test "x$OPENJDK_TARGET_OS" = xaix; then
48244          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
48245            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
48246          fi
48247        fi
48248
48249else
48250
48251        if test "x$OPENJDK_TARGET_OS" = xaix; then
48252          # AIX doesn't support 'zipped' so use 'internal' as default
48253          with_native_debug_symbols="internal"
48254        else
48255          with_native_debug_symbols="zipped"
48256        fi
48257
48258fi
48259
48260  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
48261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
48262$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
48263
48264  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
48265
48266    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
48267      if test "x$OBJCOPY" = x; then
48268        # enabling of enable-debug-symbols and can't find objcopy
48269        # this is an error
48270        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
48271      fi
48272    fi
48273
48274    COMPILE_WITH_DEBUG_SYMBOLS=true
48275    COPY_DEBUG_SYMBOLS=true
48276    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
48277
48278    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
48279    DEBUG_BINARIES=false
48280    STRIP_POLICY=min_strip
48281
48282  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
48283    COMPILE_WITH_DEBUG_SYMBOLS=false
48284    COPY_DEBUG_SYMBOLS=false
48285    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
48286
48287    DEBUG_BINARIES=false
48288    STRIP_POLICY=no_strip
48289  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
48290    COMPILE_WITH_DEBUG_SYMBOLS=true
48291    COPY_DEBUG_SYMBOLS=false
48292    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
48293
48294    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
48295    DEBUG_BINARIES=true
48296    STRIP_POLICY=no_strip
48297    STRIP=""
48298
48299  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
48300
48301    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
48302      if test "x$OBJCOPY" = x; then
48303        # enabling of enable-debug-symbols and can't find objcopy
48304        # this is an error
48305        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
48306      fi
48307    fi
48308
48309    COMPILE_WITH_DEBUG_SYMBOLS=true
48310    COPY_DEBUG_SYMBOLS=true
48311    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
48312
48313    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
48314    DEBUG_BINARIES=false
48315    STRIP_POLICY=min_strip
48316  else
48317    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
48318  fi
48319
48320  # --enable-debug-symbols is deprecated.
48321  # Please use --with-native-debug-symbols=[internal,external,zipped] .
48322
48323  # Check whether --enable-debug-symbols was given.
48324if test "${enable_debug_symbols+set}" = set; then :
48325  enableval=$enable_debug_symbols;
48326fi
48327
48328  if test "x$enable_debug_symbols" != x; then
48329    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
48330$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
48331
48332    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
48333      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
48334$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
48335    fi
48336
48337  fi
48338
48339
48340  # --enable-zip-debug-info is deprecated.
48341  # Please use --with-native-debug-symbols=zipped .
48342
48343  # Check whether --enable-zip-debug-info was given.
48344if test "${enable_zip_debug_info+set}" = set; then :
48345  enableval=$enable_zip_debug_info;
48346fi
48347
48348  if test "x$enable_zip_debug_info" != x; then
48349    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
48350$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
48351
48352    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
48353      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
48354$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
48355    fi
48356
48357  fi
48358
48359
48360
48361
48362
48363
48364  # Legacy values
48365
48366
48367
48368
48369  # Check whether --enable-native-coverage was given.
48370if test "${enable_native_coverage+set}" = set; then :
48371  enableval=$enable_native_coverage;
48372fi
48373
48374  GCOV_ENABLED="false"
48375  if test "x$enable_native_coverage" = "xyes"; then
48376    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
48377      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
48378$as_echo_n "checking if native coverage is enabled... " >&6; }
48379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48380$as_echo "yes" >&6; }
48381      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
48382      GCOV_LDFLAGS="-fprofile-arcs"
48383      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
48384      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
48385      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
48386      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
48387      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
48388      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
48389      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
48390      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
48391      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
48392      GCOV_ENABLED="true"
48393    else
48394      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
48395    fi
48396  elif test "x$enable_native_coverage" = "xno"; then
48397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
48398$as_echo_n "checking if native coverage is enabled... " >&6; }
48399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48400$as_echo "no" >&6; }
48401  elif test "x$enable_native_coverage" != "x"; then
48402    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
48403  fi
48404
48405
48406
48407
48408###############################################################################
48409#
48410# Check dependencies for external and internal libraries.
48411#
48412###############################################################################
48413
48414# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
48415
48416  # When using cygwin or msys, we need a wrapper binary that renames
48417  # /cygdrive/c/ arguments into c:/ arguments and peeks into
48418  # @files and rewrites these too! This wrapper binary is
48419  # called fixpath.
48420  FIXPATH=
48421  if test "x$OPENJDK_BUILD_OS" = xwindows; then
48422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
48423$as_echo_n "checking if fixpath can be created... " >&6; }
48424    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
48425    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
48426    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
48427    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
48428      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
48429      FIXPATH="$FIXPATH_BIN -c"
48430    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
48431      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
48432      # @ was chosen as separator to minimize risk of other tools messing around with it
48433      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
48434          | tr ' ' '\n' | grep '^/./' | sort | uniq`
48435      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
48436      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
48437    fi
48438    FIXPATH_SRC_W="$FIXPATH_SRC"
48439    FIXPATH_BIN_W="$FIXPATH_BIN"
48440
48441  unix_path="$FIXPATH_SRC_W"
48442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48443    windows_path=`$CYGPATH -m "$unix_path"`
48444    FIXPATH_SRC_W="$windows_path"
48445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48446    windows_path=`cmd //c echo $unix_path`
48447    FIXPATH_SRC_W="$windows_path"
48448  fi
48449
48450
48451  unix_path="$FIXPATH_BIN_W"
48452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48453    windows_path=`$CYGPATH -m "$unix_path"`
48454    FIXPATH_BIN_W="$windows_path"
48455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48456    windows_path=`cmd //c echo $unix_path`
48457    FIXPATH_BIN_W="$windows_path"
48458  fi
48459
48460    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
48461    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
48462    cd $FIXPATH_DIR
48463    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
48464    cd $CURDIR
48465
48466    if test ! -x $FIXPATH_BIN; then
48467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48468$as_echo "no" >&6; }
48469      cat $FIXPATH_DIR/fixpath1.log
48470      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
48471    fi
48472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48473$as_echo "yes" >&6; }
48474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
48475$as_echo_n "checking if fixpath.exe works... " >&6; }
48476    cd $FIXPATH_DIR
48477    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
48478        > $FIXPATH_DIR/fixpath2.log 2>&1
48479    cd $CURDIR
48480    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
48481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48482$as_echo "no" >&6; }
48483      cat $FIXPATH_DIR/fixpath2.log
48484      as_fn_error $? "fixpath did not work!" "$LINENO" 5
48485    fi
48486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48487$as_echo "yes" >&6; }
48488
48489    FIXPATH_DETACH_FLAG="--detach"
48490  fi
48491
48492
48493
48494
48495
48496
48497  # Check if X11 is needed
48498  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
48499    # No X11 support on windows or macosx
48500    NEEDS_LIB_X11=false
48501  else
48502    if test "x$SUPPORT_HEADFUL" = xno; then
48503      # No X11 support if building headless-only
48504      NEEDS_LIB_X11=false
48505    else
48506      # All other instances need X11
48507      NEEDS_LIB_X11=true
48508    fi
48509  fi
48510
48511  # Check if cups is needed
48512  if test "x$OPENJDK_TARGET_OS" = xwindows; then
48513    # Windows have a separate print system
48514    NEEDS_LIB_CUPS=false
48515  else
48516    NEEDS_LIB_CUPS=true
48517  fi
48518
48519  # Check if freetype is needed
48520  if test "x$OPENJDK" = "xtrue"; then
48521    NEEDS_LIB_FREETYPE=true
48522  else
48523    NEEDS_LIB_FREETYPE=false
48524  fi
48525
48526  # Check if alsa is needed
48527  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48528    NEEDS_LIB_ALSA=true
48529  else
48530    NEEDS_LIB_ALSA=false
48531  fi
48532
48533  # Check if ffi is needed
48534  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48535    NEEDS_LIB_FFI=true
48536  else
48537    NEEDS_LIB_FFI=false
48538  fi
48539
48540
48541  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48542  # dynamic build is configured on command line.
48543
48544# Check whether --with-stdc++lib was given.
48545if test "${with_stdc__lib+set}" = set; then :
48546  withval=$with_stdc__lib;
48547        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48548                && test "x$with_stdc__lib" != xdefault; then
48549          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48550        fi
48551
48552else
48553  with_stdc__lib=default
48554
48555fi
48556
48557
48558  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48559    # Test if -lstdc++ works.
48560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48561$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48562    ac_ext=cpp
48563ac_cpp='$CXXCPP $CPPFLAGS'
48564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48567
48568    OLD_CXXFLAGS="$CXXFLAGS"
48569    CXXFLAGS="$CXXFLAGS -lstdc++"
48570    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48571/* end confdefs.h.  */
48572
48573int
48574main ()
48575{
48576return 0;
48577  ;
48578  return 0;
48579}
48580_ACEOF
48581if ac_fn_cxx_try_link "$LINENO"; then :
48582  has_dynamic_libstdcxx=yes
48583else
48584  has_dynamic_libstdcxx=no
48585fi
48586rm -f core conftest.err conftest.$ac_objext \
48587    conftest$ac_exeext conftest.$ac_ext
48588    CXXFLAGS="$OLD_CXXFLAGS"
48589    ac_ext=cpp
48590ac_cpp='$CXXCPP $CPPFLAGS'
48591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48594
48595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48596$as_echo "$has_dynamic_libstdcxx" >&6; }
48597
48598    # Test if stdc++ can be linked statically.
48599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48600$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48601    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48602    ac_ext=cpp
48603ac_cpp='$CXXCPP $CPPFLAGS'
48604ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48605ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48606ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48607
48608    OLD_LIBS="$LIBS"
48609    OLD_CXX="$CXX"
48610    LIBS="$STATIC_STDCXX_FLAGS"
48611    CXX="$CC"
48612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48613/* end confdefs.h.  */
48614
48615int
48616main ()
48617{
48618return 0;
48619  ;
48620  return 0;
48621}
48622_ACEOF
48623if ac_fn_cxx_try_link "$LINENO"; then :
48624  has_static_libstdcxx=yes
48625else
48626  has_static_libstdcxx=no
48627fi
48628rm -f core conftest.err conftest.$ac_objext \
48629    conftest$ac_exeext conftest.$ac_ext
48630    LIBS="$OLD_LIBS"
48631    CXX="$OLD_CXX"
48632    ac_ext=cpp
48633ac_cpp='$CXXCPP $CPPFLAGS'
48634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48637
48638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48639$as_echo "$has_static_libstdcxx" >&6; }
48640
48641    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48642      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48643    fi
48644
48645    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48646      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48647    fi
48648
48649    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48650      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48651    fi
48652
48653    # If dynamic was requested, it's available since it would fail above otherwise.
48654    # If dynamic wasn't requested, go with static unless it isn't available.
48655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48656$as_echo_n "checking how to link with libstdc++... " >&6; }
48657    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48658      LIBCXX="$LIBCXX -lstdc++"
48659      LDCXX="$CXX"
48660      STATIC_CXX_SETTING="STATIC_CXX=false"
48661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48662$as_echo "dynamic" >&6; }
48663    else
48664      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48665      LDCXX="$CC"
48666      STATIC_CXX_SETTING="STATIC_CXX=true"
48667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48668$as_echo "static" >&6; }
48669    fi
48670  fi
48671
48672
48673  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48674  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48675    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48676  fi
48677
48678  # TODO better (platform agnostic) test
48679  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48680    LIBCXX="-lstdc++"
48681  fi
48682
48683
48684  # Setup Windows runtime dlls
48685  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48686
48687
48688# Check whether --with-msvcr-dll was given.
48689if test "${with_msvcr_dll+set}" = set; then :
48690  withval=$with_msvcr_dll;
48691fi
48692
48693
48694  if test "x$with_msvcr_dll" != x; then
48695    # If given explicitely by user, do not probe. If not present, fail directly.
48696
48697  DLL_NAME="$MSVCR_NAME"
48698  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48699  METHOD="--with-msvcr-dll"
48700  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48702$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48703
48704    # Need to check if the found msvcr is correct architecture
48705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48706$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48707    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48709      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48710      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48711      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48712        CORRECT_MSVCR_ARCH="PE32 executable"
48713      else
48714        CORRECT_MSVCR_ARCH="PE32+ executable"
48715      fi
48716    else
48717      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48718        CORRECT_MSVCR_ARCH=386
48719      else
48720        CORRECT_MSVCR_ARCH=x86-64
48721      fi
48722    fi
48723    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48725$as_echo "ok" >&6; }
48726      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48727
48728  # Only process if variable expands to non-empty
48729
48730  if test "x$MSVC_DLL" != x; then
48731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48732
48733  # Input might be given as Windows format, start by converting to
48734  # unix format.
48735  path="$MSVC_DLL"
48736  new_path=`$CYGPATH -u "$path"`
48737
48738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48741  # "foo.exe" is OK but "foo" is an error.
48742  #
48743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48744  # It is also a way to make sure we got the proper file name for the real test later on.
48745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48746  if test "x$test_shortpath" = x; then
48747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48748$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48749    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48750  fi
48751
48752  # Call helper function which possibly converts this using DOS-style short mode.
48753  # If so, the updated path is stored in $new_path.
48754
48755  input_path="$new_path"
48756  # Check if we need to convert this using DOS-style short mode. If the path
48757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48758  # take no chances and rewrite it.
48759  # Note: m4 eats our [], so we need to use [ and ] instead.
48760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48761  if test "x$has_forbidden_chars" != x; then
48762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48766      # Going to short mode and back again did indeed matter. Since short mode is
48767      # case insensitive, let's make it lowercase to improve readability.
48768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48769      # Now convert it back to Unix-style (cygpath)
48770      input_path=`$CYGPATH -u "$shortmode_path"`
48771      new_path="$input_path"
48772    fi
48773  fi
48774
48775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48776  if test "x$test_cygdrive_prefix" = x; then
48777    # As a simple fix, exclude /usr/bin since it's not a real path.
48778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48780      # a path prefixed by /cygdrive for fixpath to work.
48781      new_path="$CYGWIN_ROOT_PATH$input_path"
48782    fi
48783  fi
48784
48785
48786  if test "x$path" != "x$new_path"; then
48787    MSVC_DLL="$new_path"
48788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48789$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48790  fi
48791
48792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48793
48794  path="$MSVC_DLL"
48795  has_colon=`$ECHO $path | $GREP ^.:`
48796  new_path="$path"
48797  if test "x$has_colon" = x; then
48798    # Not in mixed or Windows style, start by that.
48799    new_path=`cmd //c echo $path`
48800  fi
48801
48802
48803  input_path="$new_path"
48804  # Check if we need to convert this using DOS-style short mode. If the path
48805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48806  # take no chances and rewrite it.
48807  # Note: m4 eats our [], so we need to use [ and ] instead.
48808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48809  if test "x$has_forbidden_chars" != x; then
48810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48812  fi
48813
48814
48815  windows_path="$new_path"
48816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48817    unix_path=`$CYGPATH -u "$windows_path"`
48818    new_path="$unix_path"
48819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48821    new_path="$unix_path"
48822  fi
48823
48824  if test "x$path" != "x$new_path"; then
48825    MSVC_DLL="$new_path"
48826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48827$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48828  fi
48829
48830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48832
48833    else
48834      # We're on a unix platform. Hooray! :)
48835      path="$MSVC_DLL"
48836      has_space=`$ECHO "$path" | $GREP " "`
48837      if test "x$has_space" != x; then
48838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48839$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48841      fi
48842
48843      # Use eval to expand a potential ~
48844      eval path="$path"
48845      if test ! -f "$path" && test ! -d "$path"; then
48846        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48847      fi
48848
48849      if test -d "$path"; then
48850        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48851      else
48852        dir="`$DIRNAME "$path"`"
48853        base="`$BASENAME "$path"`"
48854        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48855      fi
48856    fi
48857  fi
48858
48859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48860$as_echo_n "checking for $DLL_NAME... " >&6; }
48861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48862$as_echo "$MSVC_DLL" >&6; }
48863    else
48864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48865$as_echo "incorrect, ignoring" >&6; }
48866      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48867$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48868    fi
48869  fi
48870
48871    if test "x$MSVC_DLL" = x; then
48872      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48873    fi
48874    MSVCR_DLL="$MSVC_DLL"
48875  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48876
48877  DLL_NAME="$MSVCR_NAME"
48878  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48879  METHOD="devkit"
48880  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48881    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48882$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48883
48884    # Need to check if the found msvcr is correct architecture
48885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48886$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48887    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48889      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48890      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48891      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48892        CORRECT_MSVCR_ARCH="PE32 executable"
48893      else
48894        CORRECT_MSVCR_ARCH="PE32+ executable"
48895      fi
48896    else
48897      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48898        CORRECT_MSVCR_ARCH=386
48899      else
48900        CORRECT_MSVCR_ARCH=x86-64
48901      fi
48902    fi
48903    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48905$as_echo "ok" >&6; }
48906      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48907
48908  # Only process if variable expands to non-empty
48909
48910  if test "x$MSVC_DLL" != x; then
48911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48912
48913  # Input might be given as Windows format, start by converting to
48914  # unix format.
48915  path="$MSVC_DLL"
48916  new_path=`$CYGPATH -u "$path"`
48917
48918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48921  # "foo.exe" is OK but "foo" is an error.
48922  #
48923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48924  # It is also a way to make sure we got the proper file name for the real test later on.
48925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48926  if test "x$test_shortpath" = x; then
48927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48928$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48929    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48930  fi
48931
48932  # Call helper function which possibly converts this using DOS-style short mode.
48933  # If so, the updated path is stored in $new_path.
48934
48935  input_path="$new_path"
48936  # Check if we need to convert this using DOS-style short mode. If the path
48937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48938  # take no chances and rewrite it.
48939  # Note: m4 eats our [], so we need to use [ and ] instead.
48940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48941  if test "x$has_forbidden_chars" != x; then
48942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48946      # Going to short mode and back again did indeed matter. Since short mode is
48947      # case insensitive, let's make it lowercase to improve readability.
48948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48949      # Now convert it back to Unix-style (cygpath)
48950      input_path=`$CYGPATH -u "$shortmode_path"`
48951      new_path="$input_path"
48952    fi
48953  fi
48954
48955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48956  if test "x$test_cygdrive_prefix" = x; then
48957    # As a simple fix, exclude /usr/bin since it's not a real path.
48958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48960      # a path prefixed by /cygdrive for fixpath to work.
48961      new_path="$CYGWIN_ROOT_PATH$input_path"
48962    fi
48963  fi
48964
48965
48966  if test "x$path" != "x$new_path"; then
48967    MSVC_DLL="$new_path"
48968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48969$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48970  fi
48971
48972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48973
48974  path="$MSVC_DLL"
48975  has_colon=`$ECHO $path | $GREP ^.:`
48976  new_path="$path"
48977  if test "x$has_colon" = x; then
48978    # Not in mixed or Windows style, start by that.
48979    new_path=`cmd //c echo $path`
48980  fi
48981
48982
48983  input_path="$new_path"
48984  # Check if we need to convert this using DOS-style short mode. If the path
48985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48986  # take no chances and rewrite it.
48987  # Note: m4 eats our [], so we need to use [ and ] instead.
48988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48989  if test "x$has_forbidden_chars" != x; then
48990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48992  fi
48993
48994
48995  windows_path="$new_path"
48996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48997    unix_path=`$CYGPATH -u "$windows_path"`
48998    new_path="$unix_path"
48999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49001    new_path="$unix_path"
49002  fi
49003
49004  if test "x$path" != "x$new_path"; then
49005    MSVC_DLL="$new_path"
49006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49007$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49008  fi
49009
49010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49012
49013    else
49014      # We're on a unix platform. Hooray! :)
49015      path="$MSVC_DLL"
49016      has_space=`$ECHO "$path" | $GREP " "`
49017      if test "x$has_space" != x; then
49018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49019$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49021      fi
49022
49023      # Use eval to expand a potential ~
49024      eval path="$path"
49025      if test ! -f "$path" && test ! -d "$path"; then
49026        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49027      fi
49028
49029      if test -d "$path"; then
49030        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49031      else
49032        dir="`$DIRNAME "$path"`"
49033        base="`$BASENAME "$path"`"
49034        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49035      fi
49036    fi
49037  fi
49038
49039      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49040$as_echo_n "checking for $DLL_NAME... " >&6; }
49041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49042$as_echo "$MSVC_DLL" >&6; }
49043    else
49044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49045$as_echo "incorrect, ignoring" >&6; }
49046      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49047$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49048    fi
49049  fi
49050
49051    if test "x$MSVC_DLL" = x; then
49052      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49053    fi
49054    MSVCR_DLL="$MSVC_DLL"
49055  else
49056
49057  DLL_NAME="${MSVCR_NAME}"
49058  MSVC_DLL=
49059
49060  if test "x$MSVC_DLL" = x; then
49061    # Probe: Using well-known location from Visual Studio 10.0
49062    if test "x$VCINSTALLDIR" != x; then
49063      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49064
49065  windows_path="$CYGWIN_VC_INSTALL_DIR"
49066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49067    unix_path=`$CYGPATH -u "$windows_path"`
49068    CYGWIN_VC_INSTALL_DIR="$unix_path"
49069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49071    CYGWIN_VC_INSTALL_DIR="$unix_path"
49072  fi
49073
49074      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49075        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49076      else
49077        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49078      fi
49079      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49080
49081  DLL_NAME="$DLL_NAME"
49082  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49083  METHOD="well-known location in VCINSTALLDIR"
49084  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49085    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49086$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49087
49088    # Need to check if the found msvcr is correct architecture
49089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49090$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49091    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49093      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49094      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49095      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49096        CORRECT_MSVCR_ARCH="PE32 executable"
49097      else
49098        CORRECT_MSVCR_ARCH="PE32+ executable"
49099      fi
49100    else
49101      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49102        CORRECT_MSVCR_ARCH=386
49103      else
49104        CORRECT_MSVCR_ARCH=x86-64
49105      fi
49106    fi
49107    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49109$as_echo "ok" >&6; }
49110      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49111
49112  # Only process if variable expands to non-empty
49113
49114  if test "x$MSVC_DLL" != x; then
49115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49116
49117  # Input might be given as Windows format, start by converting to
49118  # unix format.
49119  path="$MSVC_DLL"
49120  new_path=`$CYGPATH -u "$path"`
49121
49122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49125  # "foo.exe" is OK but "foo" is an error.
49126  #
49127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49128  # It is also a way to make sure we got the proper file name for the real test later on.
49129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49130  if test "x$test_shortpath" = x; then
49131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49132$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49133    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49134  fi
49135
49136  # Call helper function which possibly converts this using DOS-style short mode.
49137  # If so, the updated path is stored in $new_path.
49138
49139  input_path="$new_path"
49140  # Check if we need to convert this using DOS-style short mode. If the path
49141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49142  # take no chances and rewrite it.
49143  # Note: m4 eats our [], so we need to use [ and ] instead.
49144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49145  if test "x$has_forbidden_chars" != x; then
49146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49150      # Going to short mode and back again did indeed matter. Since short mode is
49151      # case insensitive, let's make it lowercase to improve readability.
49152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49153      # Now convert it back to Unix-style (cygpath)
49154      input_path=`$CYGPATH -u "$shortmode_path"`
49155      new_path="$input_path"
49156    fi
49157  fi
49158
49159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49160  if test "x$test_cygdrive_prefix" = x; then
49161    # As a simple fix, exclude /usr/bin since it's not a real path.
49162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49164      # a path prefixed by /cygdrive for fixpath to work.
49165      new_path="$CYGWIN_ROOT_PATH$input_path"
49166    fi
49167  fi
49168
49169
49170  if test "x$path" != "x$new_path"; then
49171    MSVC_DLL="$new_path"
49172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49173$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49174  fi
49175
49176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49177
49178  path="$MSVC_DLL"
49179  has_colon=`$ECHO $path | $GREP ^.:`
49180  new_path="$path"
49181  if test "x$has_colon" = x; then
49182    # Not in mixed or Windows style, start by that.
49183    new_path=`cmd //c echo $path`
49184  fi
49185
49186
49187  input_path="$new_path"
49188  # Check if we need to convert this using DOS-style short mode. If the path
49189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49190  # take no chances and rewrite it.
49191  # Note: m4 eats our [], so we need to use [ and ] instead.
49192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49193  if test "x$has_forbidden_chars" != x; then
49194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49196  fi
49197
49198
49199  windows_path="$new_path"
49200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49201    unix_path=`$CYGPATH -u "$windows_path"`
49202    new_path="$unix_path"
49203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49205    new_path="$unix_path"
49206  fi
49207
49208  if test "x$path" != "x$new_path"; then
49209    MSVC_DLL="$new_path"
49210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49211$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49212  fi
49213
49214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49216
49217    else
49218      # We're on a unix platform. Hooray! :)
49219      path="$MSVC_DLL"
49220      has_space=`$ECHO "$path" | $GREP " "`
49221      if test "x$has_space" != x; then
49222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49223$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49225      fi
49226
49227      # Use eval to expand a potential ~
49228      eval path="$path"
49229      if test ! -f "$path" && test ! -d "$path"; then
49230        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49231      fi
49232
49233      if test -d "$path"; then
49234        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49235      else
49236        dir="`$DIRNAME "$path"`"
49237        base="`$BASENAME "$path"`"
49238        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49239      fi
49240    fi
49241  fi
49242
49243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49244$as_echo_n "checking for $DLL_NAME... " >&6; }
49245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49246$as_echo "$MSVC_DLL" >&6; }
49247    else
49248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49249$as_echo "incorrect, ignoring" >&6; }
49250      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49251$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49252    fi
49253  fi
49254
49255    fi
49256  fi
49257
49258  if test "x$MSVC_DLL" = x; then
49259    # Probe: Check in the Boot JDK directory.
49260    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49261
49262  DLL_NAME="$DLL_NAME"
49263  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49264  METHOD="well-known location in Boot JDK"
49265  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49267$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49268
49269    # Need to check if the found msvcr is correct architecture
49270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49271$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49272    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49274      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49275      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49277        CORRECT_MSVCR_ARCH="PE32 executable"
49278      else
49279        CORRECT_MSVCR_ARCH="PE32+ executable"
49280      fi
49281    else
49282      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49283        CORRECT_MSVCR_ARCH=386
49284      else
49285        CORRECT_MSVCR_ARCH=x86-64
49286      fi
49287    fi
49288    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49290$as_echo "ok" >&6; }
49291      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49292
49293  # Only process if variable expands to non-empty
49294
49295  if test "x$MSVC_DLL" != x; then
49296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49297
49298  # Input might be given as Windows format, start by converting to
49299  # unix format.
49300  path="$MSVC_DLL"
49301  new_path=`$CYGPATH -u "$path"`
49302
49303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49306  # "foo.exe" is OK but "foo" is an error.
49307  #
49308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49309  # It is also a way to make sure we got the proper file name for the real test later on.
49310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49311  if test "x$test_shortpath" = x; then
49312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49313$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49314    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49315  fi
49316
49317  # Call helper function which possibly converts this using DOS-style short mode.
49318  # If so, the updated path is stored in $new_path.
49319
49320  input_path="$new_path"
49321  # Check if we need to convert this using DOS-style short mode. If the path
49322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49323  # take no chances and rewrite it.
49324  # Note: m4 eats our [], so we need to use [ and ] instead.
49325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49326  if test "x$has_forbidden_chars" != x; then
49327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49331      # Going to short mode and back again did indeed matter. Since short mode is
49332      # case insensitive, let's make it lowercase to improve readability.
49333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49334      # Now convert it back to Unix-style (cygpath)
49335      input_path=`$CYGPATH -u "$shortmode_path"`
49336      new_path="$input_path"
49337    fi
49338  fi
49339
49340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49341  if test "x$test_cygdrive_prefix" = x; then
49342    # As a simple fix, exclude /usr/bin since it's not a real path.
49343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49345      # a path prefixed by /cygdrive for fixpath to work.
49346      new_path="$CYGWIN_ROOT_PATH$input_path"
49347    fi
49348  fi
49349
49350
49351  if test "x$path" != "x$new_path"; then
49352    MSVC_DLL="$new_path"
49353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49354$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49355  fi
49356
49357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49358
49359  path="$MSVC_DLL"
49360  has_colon=`$ECHO $path | $GREP ^.:`
49361  new_path="$path"
49362  if test "x$has_colon" = x; then
49363    # Not in mixed or Windows style, start by that.
49364    new_path=`cmd //c echo $path`
49365  fi
49366
49367
49368  input_path="$new_path"
49369  # Check if we need to convert this using DOS-style short mode. If the path
49370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49371  # take no chances and rewrite it.
49372  # Note: m4 eats our [], so we need to use [ and ] instead.
49373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49374  if test "x$has_forbidden_chars" != x; then
49375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49377  fi
49378
49379
49380  windows_path="$new_path"
49381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49382    unix_path=`$CYGPATH -u "$windows_path"`
49383    new_path="$unix_path"
49384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49386    new_path="$unix_path"
49387  fi
49388
49389  if test "x$path" != "x$new_path"; then
49390    MSVC_DLL="$new_path"
49391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49392$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49393  fi
49394
49395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49397
49398    else
49399      # We're on a unix platform. Hooray! :)
49400      path="$MSVC_DLL"
49401      has_space=`$ECHO "$path" | $GREP " "`
49402      if test "x$has_space" != x; then
49403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49404$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49406      fi
49407
49408      # Use eval to expand a potential ~
49409      eval path="$path"
49410      if test ! -f "$path" && test ! -d "$path"; then
49411        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49412      fi
49413
49414      if test -d "$path"; then
49415        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49416      else
49417        dir="`$DIRNAME "$path"`"
49418        base="`$BASENAME "$path"`"
49419        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49420      fi
49421    fi
49422  fi
49423
49424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49425$as_echo_n "checking for $DLL_NAME... " >&6; }
49426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49427$as_echo "$MSVC_DLL" >&6; }
49428    else
49429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49430$as_echo "incorrect, ignoring" >&6; }
49431      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49432$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49433    fi
49434  fi
49435
49436  fi
49437
49438  if test "x$MSVC_DLL" = x; then
49439    # Probe: Look in the Windows system32 directory
49440    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49441
49442  windows_path="$CYGWIN_SYSTEMROOT"
49443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49444    unix_path=`$CYGPATH -u "$windows_path"`
49445    CYGWIN_SYSTEMROOT="$unix_path"
49446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49448    CYGWIN_SYSTEMROOT="$unix_path"
49449  fi
49450
49451    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49452
49453  DLL_NAME="$DLL_NAME"
49454  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49455  METHOD="well-known location in SYSTEMROOT"
49456  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49458$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49459
49460    # Need to check if the found msvcr is correct architecture
49461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49462$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49463    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49465      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49466      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49467      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49468        CORRECT_MSVCR_ARCH="PE32 executable"
49469      else
49470        CORRECT_MSVCR_ARCH="PE32+ executable"
49471      fi
49472    else
49473      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49474        CORRECT_MSVCR_ARCH=386
49475      else
49476        CORRECT_MSVCR_ARCH=x86-64
49477      fi
49478    fi
49479    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49481$as_echo "ok" >&6; }
49482      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49483
49484  # Only process if variable expands to non-empty
49485
49486  if test "x$MSVC_DLL" != x; then
49487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49488
49489  # Input might be given as Windows format, start by converting to
49490  # unix format.
49491  path="$MSVC_DLL"
49492  new_path=`$CYGPATH -u "$path"`
49493
49494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49497  # "foo.exe" is OK but "foo" is an error.
49498  #
49499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49500  # It is also a way to make sure we got the proper file name for the real test later on.
49501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49502  if test "x$test_shortpath" = x; then
49503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49504$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49505    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49506  fi
49507
49508  # Call helper function which possibly converts this using DOS-style short mode.
49509  # If so, the updated path is stored in $new_path.
49510
49511  input_path="$new_path"
49512  # Check if we need to convert this using DOS-style short mode. If the path
49513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49514  # take no chances and rewrite it.
49515  # Note: m4 eats our [], so we need to use [ and ] instead.
49516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49517  if test "x$has_forbidden_chars" != x; then
49518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49522      # Going to short mode and back again did indeed matter. Since short mode is
49523      # case insensitive, let's make it lowercase to improve readability.
49524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49525      # Now convert it back to Unix-style (cygpath)
49526      input_path=`$CYGPATH -u "$shortmode_path"`
49527      new_path="$input_path"
49528    fi
49529  fi
49530
49531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49532  if test "x$test_cygdrive_prefix" = x; then
49533    # As a simple fix, exclude /usr/bin since it's not a real path.
49534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49536      # a path prefixed by /cygdrive for fixpath to work.
49537      new_path="$CYGWIN_ROOT_PATH$input_path"
49538    fi
49539  fi
49540
49541
49542  if test "x$path" != "x$new_path"; then
49543    MSVC_DLL="$new_path"
49544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49545$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49546  fi
49547
49548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49549
49550  path="$MSVC_DLL"
49551  has_colon=`$ECHO $path | $GREP ^.:`
49552  new_path="$path"
49553  if test "x$has_colon" = x; then
49554    # Not in mixed or Windows style, start by that.
49555    new_path=`cmd //c echo $path`
49556  fi
49557
49558
49559  input_path="$new_path"
49560  # Check if we need to convert this using DOS-style short mode. If the path
49561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49562  # take no chances and rewrite it.
49563  # Note: m4 eats our [], so we need to use [ and ] instead.
49564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49565  if test "x$has_forbidden_chars" != x; then
49566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49568  fi
49569
49570
49571  windows_path="$new_path"
49572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49573    unix_path=`$CYGPATH -u "$windows_path"`
49574    new_path="$unix_path"
49575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49577    new_path="$unix_path"
49578  fi
49579
49580  if test "x$path" != "x$new_path"; then
49581    MSVC_DLL="$new_path"
49582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49583$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49584  fi
49585
49586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49588
49589    else
49590      # We're on a unix platform. Hooray! :)
49591      path="$MSVC_DLL"
49592      has_space=`$ECHO "$path" | $GREP " "`
49593      if test "x$has_space" != x; then
49594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49595$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49597      fi
49598
49599      # Use eval to expand a potential ~
49600      eval path="$path"
49601      if test ! -f "$path" && test ! -d "$path"; then
49602        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49603      fi
49604
49605      if test -d "$path"; then
49606        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49607      else
49608        dir="`$DIRNAME "$path"`"
49609        base="`$BASENAME "$path"`"
49610        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49611      fi
49612    fi
49613  fi
49614
49615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49616$as_echo_n "checking for $DLL_NAME... " >&6; }
49617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49618$as_echo "$MSVC_DLL" >&6; }
49619    else
49620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49621$as_echo "incorrect, ignoring" >&6; }
49622      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49623$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49624    fi
49625  fi
49626
49627  fi
49628
49629  if test "x$MSVC_DLL" = x; then
49630    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49631    if test "x$VS100COMNTOOLS" != x; then
49632      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49633
49634  windows_path="$CYGWIN_VS_TOOLS_DIR"
49635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49636    unix_path=`$CYGPATH -u "$windows_path"`
49637    CYGWIN_VS_TOOLS_DIR="$unix_path"
49638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49640    CYGWIN_VS_TOOLS_DIR="$unix_path"
49641  fi
49642
49643      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49644        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49645	    | $GREP -i /x64/ | $HEAD --lines 1`
49646      else
49647        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49648	    | $GREP -i /x86/ | $HEAD --lines 1`
49649      fi
49650
49651  DLL_NAME="$DLL_NAME"
49652  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49653  METHOD="search of VS100COMNTOOLS"
49654  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49656$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49657
49658    # Need to check if the found msvcr is correct architecture
49659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49660$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49661    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49663      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49664      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49665      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49666        CORRECT_MSVCR_ARCH="PE32 executable"
49667      else
49668        CORRECT_MSVCR_ARCH="PE32+ executable"
49669      fi
49670    else
49671      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49672        CORRECT_MSVCR_ARCH=386
49673      else
49674        CORRECT_MSVCR_ARCH=x86-64
49675      fi
49676    fi
49677    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49679$as_echo "ok" >&6; }
49680      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49681
49682  # Only process if variable expands to non-empty
49683
49684  if test "x$MSVC_DLL" != x; then
49685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49686
49687  # Input might be given as Windows format, start by converting to
49688  # unix format.
49689  path="$MSVC_DLL"
49690  new_path=`$CYGPATH -u "$path"`
49691
49692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49695  # "foo.exe" is OK but "foo" is an error.
49696  #
49697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49698  # It is also a way to make sure we got the proper file name for the real test later on.
49699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49700  if test "x$test_shortpath" = x; then
49701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49702$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49703    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49704  fi
49705
49706  # Call helper function which possibly converts this using DOS-style short mode.
49707  # If so, the updated path is stored in $new_path.
49708
49709  input_path="$new_path"
49710  # Check if we need to convert this using DOS-style short mode. If the path
49711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49712  # take no chances and rewrite it.
49713  # Note: m4 eats our [], so we need to use [ and ] instead.
49714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49715  if test "x$has_forbidden_chars" != x; then
49716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49720      # Going to short mode and back again did indeed matter. Since short mode is
49721      # case insensitive, let's make it lowercase to improve readability.
49722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49723      # Now convert it back to Unix-style (cygpath)
49724      input_path=`$CYGPATH -u "$shortmode_path"`
49725      new_path="$input_path"
49726    fi
49727  fi
49728
49729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49730  if test "x$test_cygdrive_prefix" = x; then
49731    # As a simple fix, exclude /usr/bin since it's not a real path.
49732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49734      # a path prefixed by /cygdrive for fixpath to work.
49735      new_path="$CYGWIN_ROOT_PATH$input_path"
49736    fi
49737  fi
49738
49739
49740  if test "x$path" != "x$new_path"; then
49741    MSVC_DLL="$new_path"
49742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49743$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49744  fi
49745
49746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49747
49748  path="$MSVC_DLL"
49749  has_colon=`$ECHO $path | $GREP ^.:`
49750  new_path="$path"
49751  if test "x$has_colon" = x; then
49752    # Not in mixed or Windows style, start by that.
49753    new_path=`cmd //c echo $path`
49754  fi
49755
49756
49757  input_path="$new_path"
49758  # Check if we need to convert this using DOS-style short mode. If the path
49759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49760  # take no chances and rewrite it.
49761  # Note: m4 eats our [], so we need to use [ and ] instead.
49762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49763  if test "x$has_forbidden_chars" != x; then
49764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49766  fi
49767
49768
49769  windows_path="$new_path"
49770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49771    unix_path=`$CYGPATH -u "$windows_path"`
49772    new_path="$unix_path"
49773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49775    new_path="$unix_path"
49776  fi
49777
49778  if test "x$path" != "x$new_path"; then
49779    MSVC_DLL="$new_path"
49780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49781$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49782  fi
49783
49784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49786
49787    else
49788      # We're on a unix platform. Hooray! :)
49789      path="$MSVC_DLL"
49790      has_space=`$ECHO "$path" | $GREP " "`
49791      if test "x$has_space" != x; then
49792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49793$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49795      fi
49796
49797      # Use eval to expand a potential ~
49798      eval path="$path"
49799      if test ! -f "$path" && test ! -d "$path"; then
49800        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49801      fi
49802
49803      if test -d "$path"; then
49804        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49805      else
49806        dir="`$DIRNAME "$path"`"
49807        base="`$BASENAME "$path"`"
49808        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49809      fi
49810    fi
49811  fi
49812
49813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49814$as_echo_n "checking for $DLL_NAME... " >&6; }
49815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49816$as_echo "$MSVC_DLL" >&6; }
49817    else
49818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49819$as_echo "incorrect, ignoring" >&6; }
49820      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49821$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49822    fi
49823  fi
49824
49825    fi
49826  fi
49827
49828  if test "x$MSVC_DLL" = x; then
49829    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49830    # (This was the original behaviour; kept since it might turn something up)
49831    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49832      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49833        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49834	    | $GREP x64 | $HEAD --lines 1`
49835      else
49836        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49837	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49838        if test "x$POSSIBLE_MSVC_DLL" = x; then
49839          # We're grasping at straws now...
49840          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49841	      | $HEAD --lines 1`
49842        fi
49843      fi
49844
49845
49846  DLL_NAME="$DLL_NAME"
49847  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49848  METHOD="search of VCINSTALLDIR"
49849  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49850    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49851$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49852
49853    # Need to check if the found msvcr is correct architecture
49854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49855$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49856    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49858      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49859      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49860      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49861        CORRECT_MSVCR_ARCH="PE32 executable"
49862      else
49863        CORRECT_MSVCR_ARCH="PE32+ executable"
49864      fi
49865    else
49866      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49867        CORRECT_MSVCR_ARCH=386
49868      else
49869        CORRECT_MSVCR_ARCH=x86-64
49870      fi
49871    fi
49872    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49874$as_echo "ok" >&6; }
49875      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49876
49877  # Only process if variable expands to non-empty
49878
49879  if test "x$MSVC_DLL" != x; then
49880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49881
49882  # Input might be given as Windows format, start by converting to
49883  # unix format.
49884  path="$MSVC_DLL"
49885  new_path=`$CYGPATH -u "$path"`
49886
49887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49890  # "foo.exe" is OK but "foo" is an error.
49891  #
49892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49893  # It is also a way to make sure we got the proper file name for the real test later on.
49894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49895  if test "x$test_shortpath" = x; then
49896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49897$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49898    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49899  fi
49900
49901  # Call helper function which possibly converts this using DOS-style short mode.
49902  # If so, the updated path is stored in $new_path.
49903
49904  input_path="$new_path"
49905  # Check if we need to convert this using DOS-style short mode. If the path
49906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49907  # take no chances and rewrite it.
49908  # Note: m4 eats our [], so we need to use [ and ] instead.
49909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49910  if test "x$has_forbidden_chars" != x; then
49911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49915      # Going to short mode and back again did indeed matter. Since short mode is
49916      # case insensitive, let's make it lowercase to improve readability.
49917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49918      # Now convert it back to Unix-style (cygpath)
49919      input_path=`$CYGPATH -u "$shortmode_path"`
49920      new_path="$input_path"
49921    fi
49922  fi
49923
49924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49925  if test "x$test_cygdrive_prefix" = x; then
49926    # As a simple fix, exclude /usr/bin since it's not a real path.
49927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49929      # a path prefixed by /cygdrive for fixpath to work.
49930      new_path="$CYGWIN_ROOT_PATH$input_path"
49931    fi
49932  fi
49933
49934
49935  if test "x$path" != "x$new_path"; then
49936    MSVC_DLL="$new_path"
49937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49938$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49939  fi
49940
49941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49942
49943  path="$MSVC_DLL"
49944  has_colon=`$ECHO $path | $GREP ^.:`
49945  new_path="$path"
49946  if test "x$has_colon" = x; then
49947    # Not in mixed or Windows style, start by that.
49948    new_path=`cmd //c echo $path`
49949  fi
49950
49951
49952  input_path="$new_path"
49953  # Check if we need to convert this using DOS-style short mode. If the path
49954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49955  # take no chances and rewrite it.
49956  # Note: m4 eats our [], so we need to use [ and ] instead.
49957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49958  if test "x$has_forbidden_chars" != x; then
49959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49961  fi
49962
49963
49964  windows_path="$new_path"
49965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49966    unix_path=`$CYGPATH -u "$windows_path"`
49967    new_path="$unix_path"
49968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49970    new_path="$unix_path"
49971  fi
49972
49973  if test "x$path" != "x$new_path"; then
49974    MSVC_DLL="$new_path"
49975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49976$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49977  fi
49978
49979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49981
49982    else
49983      # We're on a unix platform. Hooray! :)
49984      path="$MSVC_DLL"
49985      has_space=`$ECHO "$path" | $GREP " "`
49986      if test "x$has_space" != x; then
49987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49988$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49990      fi
49991
49992      # Use eval to expand a potential ~
49993      eval path="$path"
49994      if test ! -f "$path" && test ! -d "$path"; then
49995        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49996      fi
49997
49998      if test -d "$path"; then
49999        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50000      else
50001        dir="`$DIRNAME "$path"`"
50002        base="`$BASENAME "$path"`"
50003        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50004      fi
50005    fi
50006  fi
50007
50008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50009$as_echo_n "checking for $DLL_NAME... " >&6; }
50010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50011$as_echo "$MSVC_DLL" >&6; }
50012    else
50013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50014$as_echo "incorrect, ignoring" >&6; }
50015      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50016$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50017    fi
50018  fi
50019
50020    fi
50021  fi
50022
50023  if test "x$MSVC_DLL" = x; then
50024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50025$as_echo_n "checking for $DLL_NAME... " >&6; }
50026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50027$as_echo "no" >&6; }
50028    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50029  fi
50030
50031    MSVCR_DLL="$MSVC_DLL"
50032  fi
50033
50034
50035
50036# Check whether --with-msvcp-dll was given.
50037if test "${with_msvcp_dll+set}" = set; then :
50038  withval=$with_msvcp_dll;
50039fi
50040
50041
50042  if test "x$MSVCP_NAME" != "x"; then
50043    if test "x$with_msvcp_dll" != x; then
50044      # If given explicitely by user, do not probe. If not present, fail directly.
50045
50046  DLL_NAME="$MSVCP_NAME"
50047  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50048  METHOD="--with-msvcp-dll"
50049  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50051$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50052
50053    # Need to check if the found msvcr is correct architecture
50054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50055$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50056    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50058      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50059      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50061        CORRECT_MSVCR_ARCH="PE32 executable"
50062      else
50063        CORRECT_MSVCR_ARCH="PE32+ executable"
50064      fi
50065    else
50066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50067        CORRECT_MSVCR_ARCH=386
50068      else
50069        CORRECT_MSVCR_ARCH=x86-64
50070      fi
50071    fi
50072    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50074$as_echo "ok" >&6; }
50075      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50076
50077  # Only process if variable expands to non-empty
50078
50079  if test "x$MSVC_DLL" != x; then
50080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50081
50082  # Input might be given as Windows format, start by converting to
50083  # unix format.
50084  path="$MSVC_DLL"
50085  new_path=`$CYGPATH -u "$path"`
50086
50087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50090  # "foo.exe" is OK but "foo" is an error.
50091  #
50092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50093  # It is also a way to make sure we got the proper file name for the real test later on.
50094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50095  if test "x$test_shortpath" = x; then
50096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50097$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50098    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50099  fi
50100
50101  # Call helper function which possibly converts this using DOS-style short mode.
50102  # If so, the updated path is stored in $new_path.
50103
50104  input_path="$new_path"
50105  # Check if we need to convert this using DOS-style short mode. If the path
50106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50107  # take no chances and rewrite it.
50108  # Note: m4 eats our [], so we need to use [ and ] instead.
50109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50110  if test "x$has_forbidden_chars" != x; then
50111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50115      # Going to short mode and back again did indeed matter. Since short mode is
50116      # case insensitive, let's make it lowercase to improve readability.
50117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50118      # Now convert it back to Unix-style (cygpath)
50119      input_path=`$CYGPATH -u "$shortmode_path"`
50120      new_path="$input_path"
50121    fi
50122  fi
50123
50124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50125  if test "x$test_cygdrive_prefix" = x; then
50126    # As a simple fix, exclude /usr/bin since it's not a real path.
50127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50129      # a path prefixed by /cygdrive for fixpath to work.
50130      new_path="$CYGWIN_ROOT_PATH$input_path"
50131    fi
50132  fi
50133
50134
50135  if test "x$path" != "x$new_path"; then
50136    MSVC_DLL="$new_path"
50137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50139  fi
50140
50141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50142
50143  path="$MSVC_DLL"
50144  has_colon=`$ECHO $path | $GREP ^.:`
50145  new_path="$path"
50146  if test "x$has_colon" = x; then
50147    # Not in mixed or Windows style, start by that.
50148    new_path=`cmd //c echo $path`
50149  fi
50150
50151
50152  input_path="$new_path"
50153  # Check if we need to convert this using DOS-style short mode. If the path
50154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50155  # take no chances and rewrite it.
50156  # Note: m4 eats our [], so we need to use [ and ] instead.
50157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50158  if test "x$has_forbidden_chars" != x; then
50159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50161  fi
50162
50163
50164  windows_path="$new_path"
50165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50166    unix_path=`$CYGPATH -u "$windows_path"`
50167    new_path="$unix_path"
50168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50170    new_path="$unix_path"
50171  fi
50172
50173  if test "x$path" != "x$new_path"; then
50174    MSVC_DLL="$new_path"
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50177  fi
50178
50179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50181
50182    else
50183      # We're on a unix platform. Hooray! :)
50184      path="$MSVC_DLL"
50185      has_space=`$ECHO "$path" | $GREP " "`
50186      if test "x$has_space" != x; then
50187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50190      fi
50191
50192      # Use eval to expand a potential ~
50193      eval path="$path"
50194      if test ! -f "$path" && test ! -d "$path"; then
50195        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50196      fi
50197
50198      if test -d "$path"; then
50199        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50200      else
50201        dir="`$DIRNAME "$path"`"
50202        base="`$BASENAME "$path"`"
50203        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50204      fi
50205    fi
50206  fi
50207
50208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50209$as_echo_n "checking for $DLL_NAME... " >&6; }
50210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50211$as_echo "$MSVC_DLL" >&6; }
50212    else
50213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50214$as_echo "incorrect, ignoring" >&6; }
50215      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50216$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50217    fi
50218  fi
50219
50220      if test "x$MSVC_DLL" = x; then
50221        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50222      fi
50223      MSVCP_DLL="$MSVC_DLL"
50224    elif test "x$DEVKIT_MSVCP_DLL" != x; then
50225
50226  DLL_NAME="$MSVCP_NAME"
50227  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50228  METHOD="devkit"
50229  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50230    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50231$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50232
50233    # Need to check if the found msvcr is correct architecture
50234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50235$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50236    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50238      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50239      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50240      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50241        CORRECT_MSVCR_ARCH="PE32 executable"
50242      else
50243        CORRECT_MSVCR_ARCH="PE32+ executable"
50244      fi
50245    else
50246      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50247        CORRECT_MSVCR_ARCH=386
50248      else
50249        CORRECT_MSVCR_ARCH=x86-64
50250      fi
50251    fi
50252    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50254$as_echo "ok" >&6; }
50255      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50256
50257  # Only process if variable expands to non-empty
50258
50259  if test "x$MSVC_DLL" != x; then
50260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50261
50262  # Input might be given as Windows format, start by converting to
50263  # unix format.
50264  path="$MSVC_DLL"
50265  new_path=`$CYGPATH -u "$path"`
50266
50267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50270  # "foo.exe" is OK but "foo" is an error.
50271  #
50272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50273  # It is also a way to make sure we got the proper file name for the real test later on.
50274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50275  if test "x$test_shortpath" = x; then
50276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50277$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50278    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50279  fi
50280
50281  # Call helper function which possibly converts this using DOS-style short mode.
50282  # If so, the updated path is stored in $new_path.
50283
50284  input_path="$new_path"
50285  # Check if we need to convert this using DOS-style short mode. If the path
50286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50287  # take no chances and rewrite it.
50288  # Note: m4 eats our [], so we need to use [ and ] instead.
50289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50290  if test "x$has_forbidden_chars" != x; then
50291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50295      # Going to short mode and back again did indeed matter. Since short mode is
50296      # case insensitive, let's make it lowercase to improve readability.
50297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50298      # Now convert it back to Unix-style (cygpath)
50299      input_path=`$CYGPATH -u "$shortmode_path"`
50300      new_path="$input_path"
50301    fi
50302  fi
50303
50304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50305  if test "x$test_cygdrive_prefix" = x; then
50306    # As a simple fix, exclude /usr/bin since it's not a real path.
50307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50309      # a path prefixed by /cygdrive for fixpath to work.
50310      new_path="$CYGWIN_ROOT_PATH$input_path"
50311    fi
50312  fi
50313
50314
50315  if test "x$path" != "x$new_path"; then
50316    MSVC_DLL="$new_path"
50317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50318$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50319  fi
50320
50321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50322
50323  path="$MSVC_DLL"
50324  has_colon=`$ECHO $path | $GREP ^.:`
50325  new_path="$path"
50326  if test "x$has_colon" = x; then
50327    # Not in mixed or Windows style, start by that.
50328    new_path=`cmd //c echo $path`
50329  fi
50330
50331
50332  input_path="$new_path"
50333  # Check if we need to convert this using DOS-style short mode. If the path
50334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50335  # take no chances and rewrite it.
50336  # Note: m4 eats our [], so we need to use [ and ] instead.
50337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50338  if test "x$has_forbidden_chars" != x; then
50339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50341  fi
50342
50343
50344  windows_path="$new_path"
50345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50346    unix_path=`$CYGPATH -u "$windows_path"`
50347    new_path="$unix_path"
50348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50350    new_path="$unix_path"
50351  fi
50352
50353  if test "x$path" != "x$new_path"; then
50354    MSVC_DLL="$new_path"
50355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50356$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50357  fi
50358
50359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50361
50362    else
50363      # We're on a unix platform. Hooray! :)
50364      path="$MSVC_DLL"
50365      has_space=`$ECHO "$path" | $GREP " "`
50366      if test "x$has_space" != x; then
50367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50368$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50370      fi
50371
50372      # Use eval to expand a potential ~
50373      eval path="$path"
50374      if test ! -f "$path" && test ! -d "$path"; then
50375        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50376      fi
50377
50378      if test -d "$path"; then
50379        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50380      else
50381        dir="`$DIRNAME "$path"`"
50382        base="`$BASENAME "$path"`"
50383        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50384      fi
50385    fi
50386  fi
50387
50388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50389$as_echo_n "checking for $DLL_NAME... " >&6; }
50390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50391$as_echo "$MSVC_DLL" >&6; }
50392    else
50393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50394$as_echo "incorrect, ignoring" >&6; }
50395      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50396$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50397    fi
50398  fi
50399
50400      if test "x$MSVC_DLL" = x; then
50401        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
50402      fi
50403      MSVCP_DLL="$MSVC_DLL"
50404    else
50405
50406  DLL_NAME="${MSVCP_NAME}"
50407  MSVC_DLL=
50408
50409  if test "x$MSVC_DLL" = x; then
50410    # Probe: Using well-known location from Visual Studio 10.0
50411    if test "x$VCINSTALLDIR" != x; then
50412      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50413
50414  windows_path="$CYGWIN_VC_INSTALL_DIR"
50415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50416    unix_path=`$CYGPATH -u "$windows_path"`
50417    CYGWIN_VC_INSTALL_DIR="$unix_path"
50418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50420    CYGWIN_VC_INSTALL_DIR="$unix_path"
50421  fi
50422
50423      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50424        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50425      else
50426        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50427      fi
50428      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50429
50430  DLL_NAME="$DLL_NAME"
50431  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50432  METHOD="well-known location in VCINSTALLDIR"
50433  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50434    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50435$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50436
50437    # Need to check if the found msvcr is correct architecture
50438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50439$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50440    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50442      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50443      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50444      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50445        CORRECT_MSVCR_ARCH="PE32 executable"
50446      else
50447        CORRECT_MSVCR_ARCH="PE32+ executable"
50448      fi
50449    else
50450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50451        CORRECT_MSVCR_ARCH=386
50452      else
50453        CORRECT_MSVCR_ARCH=x86-64
50454      fi
50455    fi
50456    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50458$as_echo "ok" >&6; }
50459      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50460
50461  # Only process if variable expands to non-empty
50462
50463  if test "x$MSVC_DLL" != x; then
50464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50465
50466  # Input might be given as Windows format, start by converting to
50467  # unix format.
50468  path="$MSVC_DLL"
50469  new_path=`$CYGPATH -u "$path"`
50470
50471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50474  # "foo.exe" is OK but "foo" is an error.
50475  #
50476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50477  # It is also a way to make sure we got the proper file name for the real test later on.
50478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50479  if test "x$test_shortpath" = x; then
50480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50481$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50482    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50483  fi
50484
50485  # Call helper function which possibly converts this using DOS-style short mode.
50486  # If so, the updated path is stored in $new_path.
50487
50488  input_path="$new_path"
50489  # Check if we need to convert this using DOS-style short mode. If the path
50490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50491  # take no chances and rewrite it.
50492  # Note: m4 eats our [], so we need to use [ and ] instead.
50493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50494  if test "x$has_forbidden_chars" != x; then
50495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50499      # Going to short mode and back again did indeed matter. Since short mode is
50500      # case insensitive, let's make it lowercase to improve readability.
50501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50502      # Now convert it back to Unix-style (cygpath)
50503      input_path=`$CYGPATH -u "$shortmode_path"`
50504      new_path="$input_path"
50505    fi
50506  fi
50507
50508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50509  if test "x$test_cygdrive_prefix" = x; then
50510    # As a simple fix, exclude /usr/bin since it's not a real path.
50511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50513      # a path prefixed by /cygdrive for fixpath to work.
50514      new_path="$CYGWIN_ROOT_PATH$input_path"
50515    fi
50516  fi
50517
50518
50519  if test "x$path" != "x$new_path"; then
50520    MSVC_DLL="$new_path"
50521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50522$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50523  fi
50524
50525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50526
50527  path="$MSVC_DLL"
50528  has_colon=`$ECHO $path | $GREP ^.:`
50529  new_path="$path"
50530  if test "x$has_colon" = x; then
50531    # Not in mixed or Windows style, start by that.
50532    new_path=`cmd //c echo $path`
50533  fi
50534
50535
50536  input_path="$new_path"
50537  # Check if we need to convert this using DOS-style short mode. If the path
50538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50539  # take no chances and rewrite it.
50540  # Note: m4 eats our [], so we need to use [ and ] instead.
50541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50542  if test "x$has_forbidden_chars" != x; then
50543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50545  fi
50546
50547
50548  windows_path="$new_path"
50549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50550    unix_path=`$CYGPATH -u "$windows_path"`
50551    new_path="$unix_path"
50552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50554    new_path="$unix_path"
50555  fi
50556
50557  if test "x$path" != "x$new_path"; then
50558    MSVC_DLL="$new_path"
50559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50560$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50561  fi
50562
50563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50565
50566    else
50567      # We're on a unix platform. Hooray! :)
50568      path="$MSVC_DLL"
50569      has_space=`$ECHO "$path" | $GREP " "`
50570      if test "x$has_space" != x; then
50571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50572$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50574      fi
50575
50576      # Use eval to expand a potential ~
50577      eval path="$path"
50578      if test ! -f "$path" && test ! -d "$path"; then
50579        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50580      fi
50581
50582      if test -d "$path"; then
50583        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50584      else
50585        dir="`$DIRNAME "$path"`"
50586        base="`$BASENAME "$path"`"
50587        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50588      fi
50589    fi
50590  fi
50591
50592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50593$as_echo_n "checking for $DLL_NAME... " >&6; }
50594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50595$as_echo "$MSVC_DLL" >&6; }
50596    else
50597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50598$as_echo "incorrect, ignoring" >&6; }
50599      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50600$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50601    fi
50602  fi
50603
50604    fi
50605  fi
50606
50607  if test "x$MSVC_DLL" = x; then
50608    # Probe: Check in the Boot JDK directory.
50609    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50610
50611  DLL_NAME="$DLL_NAME"
50612  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50613  METHOD="well-known location in Boot JDK"
50614  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50615    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50616$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50617
50618    # Need to check if the found msvcr is correct architecture
50619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50620$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50621    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50623      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50624      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50625      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50626        CORRECT_MSVCR_ARCH="PE32 executable"
50627      else
50628        CORRECT_MSVCR_ARCH="PE32+ executable"
50629      fi
50630    else
50631      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50632        CORRECT_MSVCR_ARCH=386
50633      else
50634        CORRECT_MSVCR_ARCH=x86-64
50635      fi
50636    fi
50637    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50639$as_echo "ok" >&6; }
50640      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50641
50642  # Only process if variable expands to non-empty
50643
50644  if test "x$MSVC_DLL" != x; then
50645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50646
50647  # Input might be given as Windows format, start by converting to
50648  # unix format.
50649  path="$MSVC_DLL"
50650  new_path=`$CYGPATH -u "$path"`
50651
50652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50655  # "foo.exe" is OK but "foo" is an error.
50656  #
50657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50658  # It is also a way to make sure we got the proper file name for the real test later on.
50659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50660  if test "x$test_shortpath" = x; then
50661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50662$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50663    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50664  fi
50665
50666  # Call helper function which possibly converts this using DOS-style short mode.
50667  # If so, the updated path is stored in $new_path.
50668
50669  input_path="$new_path"
50670  # Check if we need to convert this using DOS-style short mode. If the path
50671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50672  # take no chances and rewrite it.
50673  # Note: m4 eats our [], so we need to use [ and ] instead.
50674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50675  if test "x$has_forbidden_chars" != x; then
50676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50680      # Going to short mode and back again did indeed matter. Since short mode is
50681      # case insensitive, let's make it lowercase to improve readability.
50682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50683      # Now convert it back to Unix-style (cygpath)
50684      input_path=`$CYGPATH -u "$shortmode_path"`
50685      new_path="$input_path"
50686    fi
50687  fi
50688
50689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50690  if test "x$test_cygdrive_prefix" = x; then
50691    # As a simple fix, exclude /usr/bin since it's not a real path.
50692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50694      # a path prefixed by /cygdrive for fixpath to work.
50695      new_path="$CYGWIN_ROOT_PATH$input_path"
50696    fi
50697  fi
50698
50699
50700  if test "x$path" != "x$new_path"; then
50701    MSVC_DLL="$new_path"
50702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50704  fi
50705
50706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50707
50708  path="$MSVC_DLL"
50709  has_colon=`$ECHO $path | $GREP ^.:`
50710  new_path="$path"
50711  if test "x$has_colon" = x; then
50712    # Not in mixed or Windows style, start by that.
50713    new_path=`cmd //c echo $path`
50714  fi
50715
50716
50717  input_path="$new_path"
50718  # Check if we need to convert this using DOS-style short mode. If the path
50719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50720  # take no chances and rewrite it.
50721  # Note: m4 eats our [], so we need to use [ and ] instead.
50722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50723  if test "x$has_forbidden_chars" != x; then
50724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50726  fi
50727
50728
50729  windows_path="$new_path"
50730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50731    unix_path=`$CYGPATH -u "$windows_path"`
50732    new_path="$unix_path"
50733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50735    new_path="$unix_path"
50736  fi
50737
50738  if test "x$path" != "x$new_path"; then
50739    MSVC_DLL="$new_path"
50740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50741$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50742  fi
50743
50744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50746
50747    else
50748      # We're on a unix platform. Hooray! :)
50749      path="$MSVC_DLL"
50750      has_space=`$ECHO "$path" | $GREP " "`
50751      if test "x$has_space" != x; then
50752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50753$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50754        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50755      fi
50756
50757      # Use eval to expand a potential ~
50758      eval path="$path"
50759      if test ! -f "$path" && test ! -d "$path"; then
50760        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50761      fi
50762
50763      if test -d "$path"; then
50764        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50765      else
50766        dir="`$DIRNAME "$path"`"
50767        base="`$BASENAME "$path"`"
50768        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50769      fi
50770    fi
50771  fi
50772
50773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50774$as_echo_n "checking for $DLL_NAME... " >&6; }
50775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50776$as_echo "$MSVC_DLL" >&6; }
50777    else
50778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50779$as_echo "incorrect, ignoring" >&6; }
50780      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50781$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50782    fi
50783  fi
50784
50785  fi
50786
50787  if test "x$MSVC_DLL" = x; then
50788    # Probe: Look in the Windows system32 directory
50789    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50790
50791  windows_path="$CYGWIN_SYSTEMROOT"
50792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50793    unix_path=`$CYGPATH -u "$windows_path"`
50794    CYGWIN_SYSTEMROOT="$unix_path"
50795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50797    CYGWIN_SYSTEMROOT="$unix_path"
50798  fi
50799
50800    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50801
50802  DLL_NAME="$DLL_NAME"
50803  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50804  METHOD="well-known location in SYSTEMROOT"
50805  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50807$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50808
50809    # Need to check if the found msvcr is correct architecture
50810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50811$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50812    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50814      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50815      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50816      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50817        CORRECT_MSVCR_ARCH="PE32 executable"
50818      else
50819        CORRECT_MSVCR_ARCH="PE32+ executable"
50820      fi
50821    else
50822      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50823        CORRECT_MSVCR_ARCH=386
50824      else
50825        CORRECT_MSVCR_ARCH=x86-64
50826      fi
50827    fi
50828    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50830$as_echo "ok" >&6; }
50831      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50832
50833  # Only process if variable expands to non-empty
50834
50835  if test "x$MSVC_DLL" != x; then
50836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50837
50838  # Input might be given as Windows format, start by converting to
50839  # unix format.
50840  path="$MSVC_DLL"
50841  new_path=`$CYGPATH -u "$path"`
50842
50843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50846  # "foo.exe" is OK but "foo" is an error.
50847  #
50848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50849  # It is also a way to make sure we got the proper file name for the real test later on.
50850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50851  if test "x$test_shortpath" = x; then
50852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50853$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50854    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50855  fi
50856
50857  # Call helper function which possibly converts this using DOS-style short mode.
50858  # If so, the updated path is stored in $new_path.
50859
50860  input_path="$new_path"
50861  # Check if we need to convert this using DOS-style short mode. If the path
50862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50863  # take no chances and rewrite it.
50864  # Note: m4 eats our [], so we need to use [ and ] instead.
50865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50866  if test "x$has_forbidden_chars" != x; then
50867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50871      # Going to short mode and back again did indeed matter. Since short mode is
50872      # case insensitive, let's make it lowercase to improve readability.
50873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50874      # Now convert it back to Unix-style (cygpath)
50875      input_path=`$CYGPATH -u "$shortmode_path"`
50876      new_path="$input_path"
50877    fi
50878  fi
50879
50880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50881  if test "x$test_cygdrive_prefix" = x; then
50882    # As a simple fix, exclude /usr/bin since it's not a real path.
50883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50885      # a path prefixed by /cygdrive for fixpath to work.
50886      new_path="$CYGWIN_ROOT_PATH$input_path"
50887    fi
50888  fi
50889
50890
50891  if test "x$path" != "x$new_path"; then
50892    MSVC_DLL="$new_path"
50893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50894$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50895  fi
50896
50897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50898
50899  path="$MSVC_DLL"
50900  has_colon=`$ECHO $path | $GREP ^.:`
50901  new_path="$path"
50902  if test "x$has_colon" = x; then
50903    # Not in mixed or Windows style, start by that.
50904    new_path=`cmd //c echo $path`
50905  fi
50906
50907
50908  input_path="$new_path"
50909  # Check if we need to convert this using DOS-style short mode. If the path
50910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50911  # take no chances and rewrite it.
50912  # Note: m4 eats our [], so we need to use [ and ] instead.
50913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50914  if test "x$has_forbidden_chars" != x; then
50915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50917  fi
50918
50919
50920  windows_path="$new_path"
50921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50922    unix_path=`$CYGPATH -u "$windows_path"`
50923    new_path="$unix_path"
50924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50926    new_path="$unix_path"
50927  fi
50928
50929  if test "x$path" != "x$new_path"; then
50930    MSVC_DLL="$new_path"
50931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50932$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50933  fi
50934
50935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50937
50938    else
50939      # We're on a unix platform. Hooray! :)
50940      path="$MSVC_DLL"
50941      has_space=`$ECHO "$path" | $GREP " "`
50942      if test "x$has_space" != x; then
50943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50944$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50946      fi
50947
50948      # Use eval to expand a potential ~
50949      eval path="$path"
50950      if test ! -f "$path" && test ! -d "$path"; then
50951        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50952      fi
50953
50954      if test -d "$path"; then
50955        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50956      else
50957        dir="`$DIRNAME "$path"`"
50958        base="`$BASENAME "$path"`"
50959        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50960      fi
50961    fi
50962  fi
50963
50964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50965$as_echo_n "checking for $DLL_NAME... " >&6; }
50966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50967$as_echo "$MSVC_DLL" >&6; }
50968    else
50969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50970$as_echo "incorrect, ignoring" >&6; }
50971      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50972$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50973    fi
50974  fi
50975
50976  fi
50977
50978  if test "x$MSVC_DLL" = x; then
50979    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50980    if test "x$VS100COMNTOOLS" != x; then
50981      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50982
50983  windows_path="$CYGWIN_VS_TOOLS_DIR"
50984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50985    unix_path=`$CYGPATH -u "$windows_path"`
50986    CYGWIN_VS_TOOLS_DIR="$unix_path"
50987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50989    CYGWIN_VS_TOOLS_DIR="$unix_path"
50990  fi
50991
50992      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50993        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50994	    | $GREP -i /x64/ | $HEAD --lines 1`
50995      else
50996        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50997	    | $GREP -i /x86/ | $HEAD --lines 1`
50998      fi
50999
51000  DLL_NAME="$DLL_NAME"
51001  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51002  METHOD="search of VS100COMNTOOLS"
51003  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51004    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51005$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51006
51007    # Need to check if the found msvcr is correct architecture
51008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51009$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51010    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51012      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51013      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51014      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51015        CORRECT_MSVCR_ARCH="PE32 executable"
51016      else
51017        CORRECT_MSVCR_ARCH="PE32+ executable"
51018      fi
51019    else
51020      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51021        CORRECT_MSVCR_ARCH=386
51022      else
51023        CORRECT_MSVCR_ARCH=x86-64
51024      fi
51025    fi
51026    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51028$as_echo "ok" >&6; }
51029      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51030
51031  # Only process if variable expands to non-empty
51032
51033  if test "x$MSVC_DLL" != x; then
51034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51035
51036  # Input might be given as Windows format, start by converting to
51037  # unix format.
51038  path="$MSVC_DLL"
51039  new_path=`$CYGPATH -u "$path"`
51040
51041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51044  # "foo.exe" is OK but "foo" is an error.
51045  #
51046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51047  # It is also a way to make sure we got the proper file name for the real test later on.
51048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51049  if test "x$test_shortpath" = x; then
51050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51051$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51052    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51053  fi
51054
51055  # Call helper function which possibly converts this using DOS-style short mode.
51056  # If so, the updated path is stored in $new_path.
51057
51058  input_path="$new_path"
51059  # Check if we need to convert this using DOS-style short mode. If the path
51060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51061  # take no chances and rewrite it.
51062  # Note: m4 eats our [], so we need to use [ and ] instead.
51063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51064  if test "x$has_forbidden_chars" != x; then
51065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51069      # Going to short mode and back again did indeed matter. Since short mode is
51070      # case insensitive, let's make it lowercase to improve readability.
51071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51072      # Now convert it back to Unix-style (cygpath)
51073      input_path=`$CYGPATH -u "$shortmode_path"`
51074      new_path="$input_path"
51075    fi
51076  fi
51077
51078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51079  if test "x$test_cygdrive_prefix" = x; then
51080    # As a simple fix, exclude /usr/bin since it's not a real path.
51081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51083      # a path prefixed by /cygdrive for fixpath to work.
51084      new_path="$CYGWIN_ROOT_PATH$input_path"
51085    fi
51086  fi
51087
51088
51089  if test "x$path" != "x$new_path"; then
51090    MSVC_DLL="$new_path"
51091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51092$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51093  fi
51094
51095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51096
51097  path="$MSVC_DLL"
51098  has_colon=`$ECHO $path | $GREP ^.:`
51099  new_path="$path"
51100  if test "x$has_colon" = x; then
51101    # Not in mixed or Windows style, start by that.
51102    new_path=`cmd //c echo $path`
51103  fi
51104
51105
51106  input_path="$new_path"
51107  # Check if we need to convert this using DOS-style short mode. If the path
51108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51109  # take no chances and rewrite it.
51110  # Note: m4 eats our [], so we need to use [ and ] instead.
51111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51112  if test "x$has_forbidden_chars" != x; then
51113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51115  fi
51116
51117
51118  windows_path="$new_path"
51119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51120    unix_path=`$CYGPATH -u "$windows_path"`
51121    new_path="$unix_path"
51122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51124    new_path="$unix_path"
51125  fi
51126
51127  if test "x$path" != "x$new_path"; then
51128    MSVC_DLL="$new_path"
51129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51130$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51131  fi
51132
51133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51135
51136    else
51137      # We're on a unix platform. Hooray! :)
51138      path="$MSVC_DLL"
51139      has_space=`$ECHO "$path" | $GREP " "`
51140      if test "x$has_space" != x; then
51141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51142$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51144      fi
51145
51146      # Use eval to expand a potential ~
51147      eval path="$path"
51148      if test ! -f "$path" && test ! -d "$path"; then
51149        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51150      fi
51151
51152      if test -d "$path"; then
51153        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51154      else
51155        dir="`$DIRNAME "$path"`"
51156        base="`$BASENAME "$path"`"
51157        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51158      fi
51159    fi
51160  fi
51161
51162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51163$as_echo_n "checking for $DLL_NAME... " >&6; }
51164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51165$as_echo "$MSVC_DLL" >&6; }
51166    else
51167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51168$as_echo "incorrect, ignoring" >&6; }
51169      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51170$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51171    fi
51172  fi
51173
51174    fi
51175  fi
51176
51177  if test "x$MSVC_DLL" = x; then
51178    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51179    # (This was the original behaviour; kept since it might turn something up)
51180    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51181      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51182        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51183	    | $GREP x64 | $HEAD --lines 1`
51184      else
51185        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51186	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51187        if test "x$POSSIBLE_MSVC_DLL" = x; then
51188          # We're grasping at straws now...
51189          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51190	      | $HEAD --lines 1`
51191        fi
51192      fi
51193
51194
51195  DLL_NAME="$DLL_NAME"
51196  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51197  METHOD="search of VCINSTALLDIR"
51198  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51199    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51200$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51201
51202    # Need to check if the found msvcr is correct architecture
51203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51204$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51205    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51207      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51208      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51209      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51210        CORRECT_MSVCR_ARCH="PE32 executable"
51211      else
51212        CORRECT_MSVCR_ARCH="PE32+ executable"
51213      fi
51214    else
51215      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51216        CORRECT_MSVCR_ARCH=386
51217      else
51218        CORRECT_MSVCR_ARCH=x86-64
51219      fi
51220    fi
51221    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51223$as_echo "ok" >&6; }
51224      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51225
51226  # Only process if variable expands to non-empty
51227
51228  if test "x$MSVC_DLL" != x; then
51229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51230
51231  # Input might be given as Windows format, start by converting to
51232  # unix format.
51233  path="$MSVC_DLL"
51234  new_path=`$CYGPATH -u "$path"`
51235
51236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51239  # "foo.exe" is OK but "foo" is an error.
51240  #
51241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51242  # It is also a way to make sure we got the proper file name for the real test later on.
51243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51244  if test "x$test_shortpath" = x; then
51245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51246$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51247    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51248  fi
51249
51250  # Call helper function which possibly converts this using DOS-style short mode.
51251  # If so, the updated path is stored in $new_path.
51252
51253  input_path="$new_path"
51254  # Check if we need to convert this using DOS-style short mode. If the path
51255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51256  # take no chances and rewrite it.
51257  # Note: m4 eats our [], so we need to use [ and ] instead.
51258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51259  if test "x$has_forbidden_chars" != x; then
51260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51264      # Going to short mode and back again did indeed matter. Since short mode is
51265      # case insensitive, let's make it lowercase to improve readability.
51266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51267      # Now convert it back to Unix-style (cygpath)
51268      input_path=`$CYGPATH -u "$shortmode_path"`
51269      new_path="$input_path"
51270    fi
51271  fi
51272
51273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51274  if test "x$test_cygdrive_prefix" = x; then
51275    # As a simple fix, exclude /usr/bin since it's not a real path.
51276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51278      # a path prefixed by /cygdrive for fixpath to work.
51279      new_path="$CYGWIN_ROOT_PATH$input_path"
51280    fi
51281  fi
51282
51283
51284  if test "x$path" != "x$new_path"; then
51285    MSVC_DLL="$new_path"
51286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51287$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51288  fi
51289
51290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51291
51292  path="$MSVC_DLL"
51293  has_colon=`$ECHO $path | $GREP ^.:`
51294  new_path="$path"
51295  if test "x$has_colon" = x; then
51296    # Not in mixed or Windows style, start by that.
51297    new_path=`cmd //c echo $path`
51298  fi
51299
51300
51301  input_path="$new_path"
51302  # Check if we need to convert this using DOS-style short mode. If the path
51303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51304  # take no chances and rewrite it.
51305  # Note: m4 eats our [], so we need to use [ and ] instead.
51306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51307  if test "x$has_forbidden_chars" != x; then
51308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51310  fi
51311
51312
51313  windows_path="$new_path"
51314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51315    unix_path=`$CYGPATH -u "$windows_path"`
51316    new_path="$unix_path"
51317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51319    new_path="$unix_path"
51320  fi
51321
51322  if test "x$path" != "x$new_path"; then
51323    MSVC_DLL="$new_path"
51324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51325$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51326  fi
51327
51328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51330
51331    else
51332      # We're on a unix platform. Hooray! :)
51333      path="$MSVC_DLL"
51334      has_space=`$ECHO "$path" | $GREP " "`
51335      if test "x$has_space" != x; then
51336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51337$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51339      fi
51340
51341      # Use eval to expand a potential ~
51342      eval path="$path"
51343      if test ! -f "$path" && test ! -d "$path"; then
51344        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51345      fi
51346
51347      if test -d "$path"; then
51348        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51349      else
51350        dir="`$DIRNAME "$path"`"
51351        base="`$BASENAME "$path"`"
51352        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51353      fi
51354    fi
51355  fi
51356
51357      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51358$as_echo_n "checking for $DLL_NAME... " >&6; }
51359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51360$as_echo "$MSVC_DLL" >&6; }
51361    else
51362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51363$as_echo "incorrect, ignoring" >&6; }
51364      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51365$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51366    fi
51367  fi
51368
51369    fi
51370  fi
51371
51372  if test "x$MSVC_DLL" = x; then
51373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51374$as_echo_n "checking for $DLL_NAME... " >&6; }
51375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51376$as_echo "no" >&6; }
51377    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51378  fi
51379
51380      MSVCP_DLL="$MSVC_DLL"
51381    fi
51382
51383  fi
51384
51385  fi
51386
51387
51388  if test "x$NEEDS_LIB_X11" = xfalse; then
51389    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
51390      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
51391$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
51392    fi
51393    X_CFLAGS=
51394    X_LIBS=
51395  else
51396
51397    if test "x${with_x}" = xno; then
51398      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
51399    fi
51400
51401    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
51402      # The user has specified a X11 base directory. Use it for includes and
51403      # libraries, unless explicitely overridden.
51404      if test "x$x_includes" = xNONE; then
51405        x_includes="${with_x}/include"
51406      fi
51407      if test "x$x_libraries" = xNONE; then
51408        x_libraries="${with_x}/lib"
51409      fi
51410    else
51411      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
51412      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
51413      # --x-libraries for the sysroot, if that seems to be correct.
51414      if test "x$SYSROOT" != "x"; then
51415        if test "x$x_includes" = xNONE; then
51416          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
51417            x_includes="$SYSROOT/usr/X11R6/include"
51418          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
51419            x_includes="$SYSROOT/usr/include"
51420          fi
51421        fi
51422        if test "x$x_libraries" = xNONE; then
51423          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
51424            x_libraries="$SYSROOT/usr/X11R6/lib"
51425          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51426            x_libraries="$SYSROOT/usr/lib64"
51427          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
51428            x_libraries="$SYSROOT/usr/lib"
51429          fi
51430        fi
51431      fi
51432    fi
51433
51434    # Now let autoconf do it's magic
51435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
51436$as_echo_n "checking for X... " >&6; }
51437
51438
51439# Check whether --with-x was given.
51440if test "${with_x+set}" = set; then :
51441  withval=$with_x;
51442fi
51443
51444# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
51445if test "x$with_x" = xno; then
51446  # The user explicitly disabled X.
51447  have_x=disabled
51448else
51449  case $x_includes,$x_libraries in #(
51450    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
51451    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
51452  $as_echo_n "(cached) " >&6
51453else
51454  # One or both of the vars are not set, and there is no cached value.
51455ac_x_includes=no ac_x_libraries=no
51456rm -f -r conftest.dir
51457if mkdir conftest.dir; then
51458  cd conftest.dir
51459  cat >Imakefile <<'_ACEOF'
51460incroot:
51461	@echo incroot='${INCROOT}'
51462usrlibdir:
51463	@echo usrlibdir='${USRLIBDIR}'
51464libdir:
51465	@echo libdir='${LIBDIR}'
51466_ACEOF
51467  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
51468    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
51469    for ac_var in incroot usrlibdir libdir; do
51470      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
51471    done
51472    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
51473    for ac_extension in a so sl dylib la dll; do
51474      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
51475	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
51476	ac_im_usrlibdir=$ac_im_libdir; break
51477      fi
51478    done
51479    # Screen out bogus values from the imake configuration.  They are
51480    # bogus both because they are the default anyway, and because
51481    # using them would break gcc on systems where it needs fixed includes.
51482    case $ac_im_incroot in
51483	/usr/include) ac_x_includes= ;;
51484	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
51485    esac
51486    case $ac_im_usrlibdir in
51487	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
51488	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
51489    esac
51490  fi
51491  cd ..
51492  rm -f -r conftest.dir
51493fi
51494
51495# Standard set of common directories for X headers.
51496# Check X11 before X11Rn because it is often a symlink to the current release.
51497ac_x_header_dirs='
51498/usr/X11/include
51499/usr/X11R7/include
51500/usr/X11R6/include
51501/usr/X11R5/include
51502/usr/X11R4/include
51503
51504/usr/include/X11
51505/usr/include/X11R7
51506/usr/include/X11R6
51507/usr/include/X11R5
51508/usr/include/X11R4
51509
51510/usr/local/X11/include
51511/usr/local/X11R7/include
51512/usr/local/X11R6/include
51513/usr/local/X11R5/include
51514/usr/local/X11R4/include
51515
51516/usr/local/include/X11
51517/usr/local/include/X11R7
51518/usr/local/include/X11R6
51519/usr/local/include/X11R5
51520/usr/local/include/X11R4
51521
51522/usr/X386/include
51523/usr/x386/include
51524/usr/XFree86/include/X11
51525
51526/usr/include
51527/usr/local/include
51528/usr/unsupported/include
51529/usr/athena/include
51530/usr/local/x11r5/include
51531/usr/lpp/Xamples/include
51532
51533/usr/openwin/include
51534/usr/openwin/share/include'
51535
51536if test "$ac_x_includes" = no; then
51537  # Guess where to find include files, by looking for Xlib.h.
51538  # First, try using that file with no special directory specified.
51539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51540/* end confdefs.h.  */
51541#include <X11/Xlib.h>
51542_ACEOF
51543if ac_fn_cxx_try_cpp "$LINENO"; then :
51544  # We can compile using X headers with no special include directory.
51545ac_x_includes=
51546else
51547  for ac_dir in $ac_x_header_dirs; do
51548  if test -r "$ac_dir/X11/Xlib.h"; then
51549    ac_x_includes=$ac_dir
51550    break
51551  fi
51552done
51553fi
51554rm -f conftest.err conftest.i conftest.$ac_ext
51555fi # $ac_x_includes = no
51556
51557if test "$ac_x_libraries" = no; then
51558  # Check for the libraries.
51559  # See if we find them without any special options.
51560  # Don't add to $LIBS permanently.
51561  ac_save_LIBS=$LIBS
51562  LIBS="-lX11 $LIBS"
51563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51564/* end confdefs.h.  */
51565#include <X11/Xlib.h>
51566int
51567main ()
51568{
51569XrmInitialize ()
51570  ;
51571  return 0;
51572}
51573_ACEOF
51574if ac_fn_cxx_try_link "$LINENO"; then :
51575  LIBS=$ac_save_LIBS
51576# We can link X programs with no special library path.
51577ac_x_libraries=
51578else
51579  LIBS=$ac_save_LIBS
51580for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
51581do
51582  # Don't even attempt the hair of trying to link an X program!
51583  for ac_extension in a so sl dylib la dll; do
51584    if test -r "$ac_dir/libX11.$ac_extension"; then
51585      ac_x_libraries=$ac_dir
51586      break 2
51587    fi
51588  done
51589done
51590fi
51591rm -f core conftest.err conftest.$ac_objext \
51592    conftest$ac_exeext conftest.$ac_ext
51593fi # $ac_x_libraries = no
51594
51595case $ac_x_includes,$ac_x_libraries in #(
51596  no,* | *,no | *\'*)
51597    # Didn't find X, or a directory has "'" in its name.
51598    ac_cv_have_x="have_x=no";; #(
51599  *)
51600    # Record where we found X for the cache.
51601    ac_cv_have_x="have_x=yes\
51602	ac_x_includes='$ac_x_includes'\
51603	ac_x_libraries='$ac_x_libraries'"
51604esac
51605fi
51606;; #(
51607    *) have_x=yes;;
51608  esac
51609  eval "$ac_cv_have_x"
51610fi # $with_x != no
51611
51612if test "$have_x" != yes; then
51613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
51614$as_echo "$have_x" >&6; }
51615  no_x=yes
51616else
51617  # If each of the values was on the command line, it overrides each guess.
51618  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
51619  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
51620  # Update the cache value to reflect the command line values.
51621  ac_cv_have_x="have_x=yes\
51622	ac_x_includes='$x_includes'\
51623	ac_x_libraries='$x_libraries'"
51624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
51625$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
51626fi
51627
51628    if test "$no_x" = yes; then
51629  # Not all programs may use this symbol, but it does not hurt to define it.
51630
51631$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
51632
51633  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
51634else
51635  if test -n "$x_includes"; then
51636    X_CFLAGS="$X_CFLAGS -I$x_includes"
51637  fi
51638
51639  # It would also be nice to do this for all -L options, not just this one.
51640  if test -n "$x_libraries"; then
51641    X_LIBS="$X_LIBS -L$x_libraries"
51642    # For Solaris; some versions of Sun CC require a space after -R and
51643    # others require no space.  Words are not sufficient . . . .
51644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
51645$as_echo_n "checking whether -R must be followed by a space... " >&6; }
51646    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
51647    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
51648    ac_cxx_werror_flag=yes
51649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51650/* end confdefs.h.  */
51651
51652int
51653main ()
51654{
51655
51656  ;
51657  return 0;
51658}
51659_ACEOF
51660if ac_fn_cxx_try_link "$LINENO"; then :
51661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51662$as_echo "no" >&6; }
51663       X_LIBS="$X_LIBS -R$x_libraries"
51664else
51665  LIBS="$ac_xsave_LIBS -R $x_libraries"
51666       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51667/* end confdefs.h.  */
51668
51669int
51670main ()
51671{
51672
51673  ;
51674  return 0;
51675}
51676_ACEOF
51677if ac_fn_cxx_try_link "$LINENO"; then :
51678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51679$as_echo "yes" >&6; }
51680	  X_LIBS="$X_LIBS -R $x_libraries"
51681else
51682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51683$as_echo "neither works" >&6; }
51684fi
51685rm -f core conftest.err conftest.$ac_objext \
51686    conftest$ac_exeext conftest.$ac_ext
51687fi
51688rm -f core conftest.err conftest.$ac_objext \
51689    conftest$ac_exeext conftest.$ac_ext
51690    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51691    LIBS=$ac_xsave_LIBS
51692  fi
51693
51694  # Check for system-dependent libraries X programs must link with.
51695  # Do this before checking for the system-independent R6 libraries
51696  # (-lICE), since we may need -lsocket or whatever for X linking.
51697
51698  if test "$ISC" = yes; then
51699    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51700  else
51701    # Martyn Johnson says this is needed for Ultrix, if the X
51702    # libraries were built with DECnet support.  And Karl Berry says
51703    # the Alpha needs dnet_stub (dnet does not exist).
51704    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51705    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51706/* end confdefs.h.  */
51707
51708/* Override any GCC internal prototype to avoid an error.
51709   Use char because int might match the return type of a GCC
51710   builtin and then its argument prototype would still apply.  */
51711#ifdef __cplusplus
51712extern "C"
51713#endif
51714char XOpenDisplay ();
51715int
51716main ()
51717{
51718return XOpenDisplay ();
51719  ;
51720  return 0;
51721}
51722_ACEOF
51723if ac_fn_cxx_try_link "$LINENO"; then :
51724
51725else
51726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51727$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51728if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51729  $as_echo_n "(cached) " >&6
51730else
51731  ac_check_lib_save_LIBS=$LIBS
51732LIBS="-ldnet  $LIBS"
51733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51734/* end confdefs.h.  */
51735
51736/* Override any GCC internal prototype to avoid an error.
51737   Use char because int might match the return type of a GCC
51738   builtin and then its argument prototype would still apply.  */
51739#ifdef __cplusplus
51740extern "C"
51741#endif
51742char dnet_ntoa ();
51743int
51744main ()
51745{
51746return dnet_ntoa ();
51747  ;
51748  return 0;
51749}
51750_ACEOF
51751if ac_fn_cxx_try_link "$LINENO"; then :
51752  ac_cv_lib_dnet_dnet_ntoa=yes
51753else
51754  ac_cv_lib_dnet_dnet_ntoa=no
51755fi
51756rm -f core conftest.err conftest.$ac_objext \
51757    conftest$ac_exeext conftest.$ac_ext
51758LIBS=$ac_check_lib_save_LIBS
51759fi
51760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51761$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51762if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51763  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51764fi
51765
51766    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51768$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51769if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51770  $as_echo_n "(cached) " >&6
51771else
51772  ac_check_lib_save_LIBS=$LIBS
51773LIBS="-ldnet_stub  $LIBS"
51774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51775/* end confdefs.h.  */
51776
51777/* Override any GCC internal prototype to avoid an error.
51778   Use char because int might match the return type of a GCC
51779   builtin and then its argument prototype would still apply.  */
51780#ifdef __cplusplus
51781extern "C"
51782#endif
51783char dnet_ntoa ();
51784int
51785main ()
51786{
51787return dnet_ntoa ();
51788  ;
51789  return 0;
51790}
51791_ACEOF
51792if ac_fn_cxx_try_link "$LINENO"; then :
51793  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51794else
51795  ac_cv_lib_dnet_stub_dnet_ntoa=no
51796fi
51797rm -f core conftest.err conftest.$ac_objext \
51798    conftest$ac_exeext conftest.$ac_ext
51799LIBS=$ac_check_lib_save_LIBS
51800fi
51801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51802$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51803if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51804  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51805fi
51806
51807    fi
51808fi
51809rm -f core conftest.err conftest.$ac_objext \
51810    conftest$ac_exeext conftest.$ac_ext
51811    LIBS="$ac_xsave_LIBS"
51812
51813    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51814    # to get the SysV transport functions.
51815    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51816    # needs -lnsl.
51817    # The nsl library prevents programs from opening the X display
51818    # on Irix 5.2, according to T.E. Dickey.
51819    # The functions gethostbyname, getservbyname, and inet_addr are
51820    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51821    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51822if test "x$ac_cv_func_gethostbyname" = xyes; then :
51823
51824fi
51825
51826    if test $ac_cv_func_gethostbyname = no; then
51827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51828$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51829if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51830  $as_echo_n "(cached) " >&6
51831else
51832  ac_check_lib_save_LIBS=$LIBS
51833LIBS="-lnsl  $LIBS"
51834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51835/* end confdefs.h.  */
51836
51837/* Override any GCC internal prototype to avoid an error.
51838   Use char because int might match the return type of a GCC
51839   builtin and then its argument prototype would still apply.  */
51840#ifdef __cplusplus
51841extern "C"
51842#endif
51843char gethostbyname ();
51844int
51845main ()
51846{
51847return gethostbyname ();
51848  ;
51849  return 0;
51850}
51851_ACEOF
51852if ac_fn_cxx_try_link "$LINENO"; then :
51853  ac_cv_lib_nsl_gethostbyname=yes
51854else
51855  ac_cv_lib_nsl_gethostbyname=no
51856fi
51857rm -f core conftest.err conftest.$ac_objext \
51858    conftest$ac_exeext conftest.$ac_ext
51859LIBS=$ac_check_lib_save_LIBS
51860fi
51861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51862$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51863if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51864  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51865fi
51866
51867      if test $ac_cv_lib_nsl_gethostbyname = no; then
51868	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51869$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51870if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51871  $as_echo_n "(cached) " >&6
51872else
51873  ac_check_lib_save_LIBS=$LIBS
51874LIBS="-lbsd  $LIBS"
51875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51876/* end confdefs.h.  */
51877
51878/* Override any GCC internal prototype to avoid an error.
51879   Use char because int might match the return type of a GCC
51880   builtin and then its argument prototype would still apply.  */
51881#ifdef __cplusplus
51882extern "C"
51883#endif
51884char gethostbyname ();
51885int
51886main ()
51887{
51888return gethostbyname ();
51889  ;
51890  return 0;
51891}
51892_ACEOF
51893if ac_fn_cxx_try_link "$LINENO"; then :
51894  ac_cv_lib_bsd_gethostbyname=yes
51895else
51896  ac_cv_lib_bsd_gethostbyname=no
51897fi
51898rm -f core conftest.err conftest.$ac_objext \
51899    conftest$ac_exeext conftest.$ac_ext
51900LIBS=$ac_check_lib_save_LIBS
51901fi
51902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51903$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51904if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51905  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51906fi
51907
51908      fi
51909    fi
51910
51911    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51912    # socket/setsockopt and other routines are undefined under SCO ODT
51913    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51914    # on later versions), says Simon Leinen: it contains gethostby*
51915    # variants that don't use the name server (or something).  -lsocket
51916    # must be given before -lnsl if both are needed.  We assume that
51917    # if connect needs -lnsl, so does gethostbyname.
51918    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51919if test "x$ac_cv_func_connect" = xyes; then :
51920
51921fi
51922
51923    if test $ac_cv_func_connect = no; then
51924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51925$as_echo_n "checking for connect in -lsocket... " >&6; }
51926if ${ac_cv_lib_socket_connect+:} false; then :
51927  $as_echo_n "(cached) " >&6
51928else
51929  ac_check_lib_save_LIBS=$LIBS
51930LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51932/* end confdefs.h.  */
51933
51934/* Override any GCC internal prototype to avoid an error.
51935   Use char because int might match the return type of a GCC
51936   builtin and then its argument prototype would still apply.  */
51937#ifdef __cplusplus
51938extern "C"
51939#endif
51940char connect ();
51941int
51942main ()
51943{
51944return connect ();
51945  ;
51946  return 0;
51947}
51948_ACEOF
51949if ac_fn_cxx_try_link "$LINENO"; then :
51950  ac_cv_lib_socket_connect=yes
51951else
51952  ac_cv_lib_socket_connect=no
51953fi
51954rm -f core conftest.err conftest.$ac_objext \
51955    conftest$ac_exeext conftest.$ac_ext
51956LIBS=$ac_check_lib_save_LIBS
51957fi
51958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51959$as_echo "$ac_cv_lib_socket_connect" >&6; }
51960if test "x$ac_cv_lib_socket_connect" = xyes; then :
51961  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51962fi
51963
51964    fi
51965
51966    # Guillermo Gomez says -lposix is necessary on A/UX.
51967    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51968if test "x$ac_cv_func_remove" = xyes; then :
51969
51970fi
51971
51972    if test $ac_cv_func_remove = no; then
51973      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51974$as_echo_n "checking for remove in -lposix... " >&6; }
51975if ${ac_cv_lib_posix_remove+:} false; then :
51976  $as_echo_n "(cached) " >&6
51977else
51978  ac_check_lib_save_LIBS=$LIBS
51979LIBS="-lposix  $LIBS"
51980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51981/* end confdefs.h.  */
51982
51983/* Override any GCC internal prototype to avoid an error.
51984   Use char because int might match the return type of a GCC
51985   builtin and then its argument prototype would still apply.  */
51986#ifdef __cplusplus
51987extern "C"
51988#endif
51989char remove ();
51990int
51991main ()
51992{
51993return remove ();
51994  ;
51995  return 0;
51996}
51997_ACEOF
51998if ac_fn_cxx_try_link "$LINENO"; then :
51999  ac_cv_lib_posix_remove=yes
52000else
52001  ac_cv_lib_posix_remove=no
52002fi
52003rm -f core conftest.err conftest.$ac_objext \
52004    conftest$ac_exeext conftest.$ac_ext
52005LIBS=$ac_check_lib_save_LIBS
52006fi
52007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
52008$as_echo "$ac_cv_lib_posix_remove" >&6; }
52009if test "x$ac_cv_lib_posix_remove" = xyes; then :
52010  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
52011fi
52012
52013    fi
52014
52015    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
52016    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
52017if test "x$ac_cv_func_shmat" = xyes; then :
52018
52019fi
52020
52021    if test $ac_cv_func_shmat = no; then
52022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
52023$as_echo_n "checking for shmat in -lipc... " >&6; }
52024if ${ac_cv_lib_ipc_shmat+:} false; then :
52025  $as_echo_n "(cached) " >&6
52026else
52027  ac_check_lib_save_LIBS=$LIBS
52028LIBS="-lipc  $LIBS"
52029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52030/* end confdefs.h.  */
52031
52032/* Override any GCC internal prototype to avoid an error.
52033   Use char because int might match the return type of a GCC
52034   builtin and then its argument prototype would still apply.  */
52035#ifdef __cplusplus
52036extern "C"
52037#endif
52038char shmat ();
52039int
52040main ()
52041{
52042return shmat ();
52043  ;
52044  return 0;
52045}
52046_ACEOF
52047if ac_fn_cxx_try_link "$LINENO"; then :
52048  ac_cv_lib_ipc_shmat=yes
52049else
52050  ac_cv_lib_ipc_shmat=no
52051fi
52052rm -f core conftest.err conftest.$ac_objext \
52053    conftest$ac_exeext conftest.$ac_ext
52054LIBS=$ac_check_lib_save_LIBS
52055fi
52056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
52057$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
52058if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
52059  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
52060fi
52061
52062    fi
52063  fi
52064
52065  # Check for libraries that X11R6 Xt/Xaw programs need.
52066  ac_save_LDFLAGS=$LDFLAGS
52067  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
52068  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
52069  # check for ICE first), but we must link in the order -lSM -lICE or
52070  # we get undefined symbols.  So assume we have SM if we have ICE.
52071  # These have to be linked with before -lX11, unlike the other
52072  # libraries we check for below, so use a different variable.
52073  # John Interrante, Karl Berry
52074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
52075$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
52076if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
52077  $as_echo_n "(cached) " >&6
52078else
52079  ac_check_lib_save_LIBS=$LIBS
52080LIBS="-lICE $X_EXTRA_LIBS $LIBS"
52081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52082/* end confdefs.h.  */
52083
52084/* Override any GCC internal prototype to avoid an error.
52085   Use char because int might match the return type of a GCC
52086   builtin and then its argument prototype would still apply.  */
52087#ifdef __cplusplus
52088extern "C"
52089#endif
52090char IceConnectionNumber ();
52091int
52092main ()
52093{
52094return IceConnectionNumber ();
52095  ;
52096  return 0;
52097}
52098_ACEOF
52099if ac_fn_cxx_try_link "$LINENO"; then :
52100  ac_cv_lib_ICE_IceConnectionNumber=yes
52101else
52102  ac_cv_lib_ICE_IceConnectionNumber=no
52103fi
52104rm -f core conftest.err conftest.$ac_objext \
52105    conftest$ac_exeext conftest.$ac_ext
52106LIBS=$ac_check_lib_save_LIBS
52107fi
52108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
52109$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
52110if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
52111  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
52112fi
52113
52114  LDFLAGS=$ac_save_LDFLAGS
52115
52116fi
52117
52118
52119    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
52120    # this doesn't make sense so we remove it.
52121    if test "x$COMPILE_TYPE" = xcross; then
52122      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
52123    fi
52124
52125    if test "x$no_x" = xyes; then
52126
52127  # Print a helpful message on how to acquire the necessary build dependency.
52128  # x11 is the help tag: freetype, cups, alsa etc
52129  MISSING_DEPENDENCY=x11
52130
52131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52132    cygwin_help $MISSING_DEPENDENCY
52133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52134    msys_help $MISSING_DEPENDENCY
52135  else
52136    PKGHANDLER_COMMAND=
52137
52138    case $PKGHANDLER in
52139      apt-get)
52140        apt_help     $MISSING_DEPENDENCY ;;
52141      yum)
52142        yum_help     $MISSING_DEPENDENCY ;;
52143      port)
52144        port_help    $MISSING_DEPENDENCY ;;
52145      pkgutil)
52146        pkgutil_help $MISSING_DEPENDENCY ;;
52147      pkgadd)
52148        pkgadd_help  $MISSING_DEPENDENCY ;;
52149    esac
52150
52151    if test "x$PKGHANDLER_COMMAND" != x; then
52152      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52153    fi
52154  fi
52155
52156      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
52157    fi
52158
52159    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52160      OPENWIN_HOME="/usr/openwin"
52161      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
52162      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52163          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
52164          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52165          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
52166    fi
52167
52168    ac_ext=c
52169ac_cpp='$CPP $CPPFLAGS'
52170ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52171ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52172ac_compiler_gnu=$ac_cv_c_compiler_gnu
52173
52174    OLD_CFLAGS="$CFLAGS"
52175    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
52176
52177    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
52178    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
52179do :
52180  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52181ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
52182          # include <X11/Xlib.h>
52183          # include <X11/Xutil.h>
52184
52185
52186"
52187if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52188  cat >>confdefs.h <<_ACEOF
52189#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52190_ACEOF
52191 X11_HEADERS_OK=yes
52192else
52193  X11_HEADERS_OK=no; break
52194fi
52195
52196done
52197
52198
52199    if test "x$X11_HEADERS_OK" = xno; then
52200
52201  # Print a helpful message on how to acquire the necessary build dependency.
52202  # x11 is the help tag: freetype, cups, alsa etc
52203  MISSING_DEPENDENCY=x11
52204
52205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52206    cygwin_help $MISSING_DEPENDENCY
52207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52208    msys_help $MISSING_DEPENDENCY
52209  else
52210    PKGHANDLER_COMMAND=
52211
52212    case $PKGHANDLER in
52213      apt-get)
52214        apt_help     $MISSING_DEPENDENCY ;;
52215      yum)
52216        yum_help     $MISSING_DEPENDENCY ;;
52217      port)
52218        port_help    $MISSING_DEPENDENCY ;;
52219      pkgutil)
52220        pkgutil_help $MISSING_DEPENDENCY ;;
52221      pkgadd)
52222        pkgadd_help  $MISSING_DEPENDENCY ;;
52223    esac
52224
52225    if test "x$PKGHANDLER_COMMAND" != x; then
52226      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52227    fi
52228  fi
52229
52230      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
52231    fi
52232
52233    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
52234    # defined in libawt_xawt.
52235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
52236$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
52237    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52238/* end confdefs.h.  */
52239#include <X11/extensions/Xrender.h>
52240int
52241main ()
52242{
52243XLinearGradient x;
52244  ;
52245  return 0;
52246}
52247_ACEOF
52248if ac_fn_c_try_compile "$LINENO"; then :
52249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52250$as_echo "yes" >&6; }
52251else
52252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52253$as_echo "no" >&6; }
52254         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
52255fi
52256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52257
52258    CFLAGS="$OLD_CFLAGS"
52259    ac_ext=cpp
52260ac_cpp='$CXXCPP $CPPFLAGS'
52261ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52262ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52263ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52264
52265  fi # NEEDS_LIB_X11
52266
52267
52268
52269
52270
52271
52272# Check whether --with-cups was given.
52273if test "${with_cups+set}" = set; then :
52274  withval=$with_cups;
52275fi
52276
52277
52278# Check whether --with-cups-include was given.
52279if test "${with_cups_include+set}" = set; then :
52280  withval=$with_cups_include;
52281fi
52282
52283
52284  if test "x$NEEDS_LIB_CUPS" = xfalse; then
52285    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
52286        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
52287      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
52288$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
52289    fi
52290    CUPS_CFLAGS=
52291  else
52292    CUPS_FOUND=no
52293
52294    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
52295      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
52296    fi
52297
52298    if test "x${with_cups}" != x; then
52299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52300$as_echo_n "checking for cups headers... " >&6; }
52301      if test -s "${with_cups}/include/cups/cups.h"; then
52302        CUPS_CFLAGS="-I${with_cups}/include"
52303        CUPS_FOUND=yes
52304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52305$as_echo "$CUPS_FOUND" >&6; }
52306      else
52307        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
52308      fi
52309    fi
52310    if test "x${with_cups_include}" != x; then
52311      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52312$as_echo_n "checking for cups headers... " >&6; }
52313      if test -s "${with_cups_include}/cups/cups.h"; then
52314        CUPS_CFLAGS="-I${with_cups_include}"
52315        CUPS_FOUND=yes
52316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52317$as_echo "$CUPS_FOUND" >&6; }
52318      else
52319        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
52320      fi
52321    fi
52322    if test "x$CUPS_FOUND" = xno; then
52323      # Are the cups headers installed in the default /usr/include location?
52324      for ac_header in cups/cups.h cups/ppd.h
52325do :
52326  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52327ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
52328if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52329  cat >>confdefs.h <<_ACEOF
52330#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52331_ACEOF
52332
52333          CUPS_FOUND=yes
52334          CUPS_CFLAGS=
52335          DEFAULT_CUPS=yes
52336
52337fi
52338
52339done
52340
52341    fi
52342    if test "x$CUPS_FOUND" = xno; then
52343      # Getting nervous now? Lets poke around for standard Solaris third-party
52344      # package installation locations.
52345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52346$as_echo_n "checking for cups headers... " >&6; }
52347      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
52348        # An SFW package seems to be installed!
52349        CUPS_FOUND=yes
52350        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
52351      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
52352        # A CSW package seems to be installed!
52353        CUPS_FOUND=yes
52354        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
52355      fi
52356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52357$as_echo "$CUPS_FOUND" >&6; }
52358    fi
52359    if test "x$CUPS_FOUND" = xno; then
52360
52361  # Print a helpful message on how to acquire the necessary build dependency.
52362  # cups is the help tag: freetype, cups, alsa etc
52363  MISSING_DEPENDENCY=cups
52364
52365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52366    cygwin_help $MISSING_DEPENDENCY
52367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52368    msys_help $MISSING_DEPENDENCY
52369  else
52370    PKGHANDLER_COMMAND=
52371
52372    case $PKGHANDLER in
52373      apt-get)
52374        apt_help     $MISSING_DEPENDENCY ;;
52375      yum)
52376        yum_help     $MISSING_DEPENDENCY ;;
52377      port)
52378        port_help    $MISSING_DEPENDENCY ;;
52379      pkgutil)
52380        pkgutil_help $MISSING_DEPENDENCY ;;
52381      pkgadd)
52382        pkgadd_help  $MISSING_DEPENDENCY ;;
52383    esac
52384
52385    if test "x$PKGHANDLER_COMMAND" != x; then
52386      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52387    fi
52388  fi
52389
52390      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
52391    fi
52392  fi
52393
52394
52395
52396
52397
52398# Check whether --with-freetype was given.
52399if test "${with_freetype+set}" = set; then :
52400  withval=$with_freetype;
52401fi
52402
52403
52404# Check whether --with-freetype-include was given.
52405if test "${with_freetype_include+set}" = set; then :
52406  withval=$with_freetype_include;
52407fi
52408
52409
52410# Check whether --with-freetype-lib was given.
52411if test "${with_freetype_lib+set}" = set; then :
52412  withval=$with_freetype_lib;
52413fi
52414
52415
52416# Check whether --with-freetype-src was given.
52417if test "${with_freetype_src+set}" = set; then :
52418  withval=$with_freetype_src;
52419fi
52420
52421  # Check whether --enable-freetype-bundling was given.
52422if test "${enable_freetype_bundling+set}" = set; then :
52423  enableval=$enable_freetype_bundling;
52424fi
52425
52426
52427  # Need to specify explicitly since it needs to be overridden on some versions of macosx
52428  FREETYPE_BASE_NAME=freetype
52429  FREETYPE_CFLAGS=
52430  FREETYPE_LIBS=
52431  FREETYPE_BUNDLE_LIB_PATH=
52432
52433  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
52434    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
52435        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
52436        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
52437        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
52438      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
52439$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
52440    fi
52441    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
52442      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
52443$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
52444    fi
52445  else
52446    # freetype is needed to build; go get it!
52447
52448    BUNDLE_FREETYPE="$enable_freetype_bundling"
52449
52450    if  test "x$with_freetype_src" != x; then
52451      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52452        # Try to build freetype if --with-freetype-src was given on Windows
52453
52454  FREETYPE_SRC_PATH="$with_freetype_src"
52455  BUILD_FREETYPE=yes
52456
52457  # Check if the freetype sources are acessible..
52458  if ! test -d $FREETYPE_SRC_PATH; then
52459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
52460$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
52461    BUILD_FREETYPE=no
52462  fi
52463  # ..and contain a vc2010 project file
52464  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
52465  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
52466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
52467$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
52468    BUILD_FREETYPE=no
52469  fi
52470  # Now check if configure found a version of 'msbuild.exe'
52471  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
52472    { $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
52473$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;}
52474    BUILD_FREETYPE=no
52475  fi
52476
52477  # Ready to go..
52478  if test "x$BUILD_FREETYPE" = xyes; then
52479    # msbuild requires trailing slashes for output directories
52480    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
52481    freetype_lib_path_unix="$freetype_lib_path"
52482    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
52483
52484  unix_path="$vcxproj_path"
52485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52486    windows_path=`$CYGPATH -m "$unix_path"`
52487    vcxproj_path="$windows_path"
52488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52489    windows_path=`cmd //c echo $unix_path`
52490    vcxproj_path="$windows_path"
52491  fi
52492
52493
52494  unix_path="$freetype_lib_path"
52495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52496    windows_path=`$CYGPATH -m "$unix_path"`
52497    freetype_lib_path="$windows_path"
52498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52499    windows_path=`cmd //c echo $unix_path`
52500    freetype_lib_path="$windows_path"
52501  fi
52502
52503
52504  unix_path="$freetype_obj_path"
52505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52506    windows_path=`$CYGPATH -m "$unix_path"`
52507    freetype_obj_path="$windows_path"
52508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52509    windows_path=`cmd //c echo $unix_path`
52510    freetype_obj_path="$windows_path"
52511  fi
52512
52513    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52514      freetype_platform=x64
52515    else
52516      freetype_platform=win32
52517    fi
52518
52519    # The original freetype project file is for VS 2010 (i.e. 'v100'),
52520    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
52521    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
52522    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
52523    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
52524$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
52525
52526    # First we try to build the freetype.dll
52527    $ECHO -e "@echo off\n"\
52528        "$MSBUILD $vcxproj_path "\
52529        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
52530        "/p:Configuration=\"Release Multithreaded\" "\
52531        "/p:Platform=$freetype_platform "\
52532        "/p:ConfigurationType=DynamicLibrary "\
52533        "/p:TargetName=freetype "\
52534        "/p:OutDir=\"$freetype_lib_path\" "\
52535        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
52536    cmd /c freetype.bat
52537
52538    if test -s "$freetype_lib_path_unix/freetype.dll"; then
52539      # If that succeeds we also build freetype.lib
52540      $ECHO -e "@echo off\n"\
52541          "$MSBUILD $vcxproj_path "\
52542          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
52543          "/p:Configuration=\"Release Multithreaded\" "\
52544          "/p:Platform=$freetype_platform "\
52545          "/p:ConfigurationType=StaticLibrary "\
52546          "/p:TargetName=freetype "\
52547          "/p:OutDir=\"$freetype_lib_path\" "\
52548          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
52549      cmd /c freetype.bat
52550
52551      if test -s "$freetype_lib_path_unix/freetype.lib"; then
52552        # Once we build both, lib and dll, set freetype lib and include path appropriately
52553        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
52554        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
52555        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
52556$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
52557      else
52558        BUILD_FREETYPE=no
52559      fi
52560    else
52561      BUILD_FREETYPE=no
52562    fi
52563  fi
52564
52565        if test "x$BUILD_FREETYPE" = xyes; then
52566          # Okay, we built it. Check that it works.
52567
52568  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52569  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52570  METHOD="--with-freetype-src"
52571
52572  # Let's start with an optimistic view of the world :-)
52573  FOUND_FREETYPE=yes
52574
52575  # First look for the canonical freetype main include file ft2build.h.
52576  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52577    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52578    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52579    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52580      # Fail.
52581      FOUND_FREETYPE=no
52582    fi
52583  fi
52584
52585  if test "x$FOUND_FREETYPE" = xyes; then
52586    # Include file found, let's continue the sanity check.
52587    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52588$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52589
52590    # Reset to default value
52591    FREETYPE_BASE_NAME=freetype
52592    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52593    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52594      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52595          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52596        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52597        # for the .6 version explicitly.
52598        FREETYPE_BASE_NAME=freetype.6
52599        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52600        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52601$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52602      else
52603        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52604$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52605        FOUND_FREETYPE=no
52606      fi
52607    else
52608      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52609        # On Windows, we will need both .lib and .dll file.
52610        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52611          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52612$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52613          FOUND_FREETYPE=no
52614        fi
52615      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52616          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52617        # Found lib in isa dir, use that instead.
52618        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52619        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52620$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52621      fi
52622    fi
52623  fi
52624
52625  if test "x$FOUND_FREETYPE" = xyes; then
52626
52627  # Only process if variable expands to non-empty
52628
52629  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52631
52632  # Input might be given as Windows format, start by converting to
52633  # unix format.
52634  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52635  new_path=`$CYGPATH -u "$path"`
52636
52637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52640  # "foo.exe" is OK but "foo" is an error.
52641  #
52642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52643  # It is also a way to make sure we got the proper file name for the real test later on.
52644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52645  if test "x$test_shortpath" = x; then
52646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52648    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52649  fi
52650
52651  # Call helper function which possibly converts this using DOS-style short mode.
52652  # If so, the updated path is stored in $new_path.
52653
52654  input_path="$new_path"
52655  # Check if we need to convert this using DOS-style short mode. If the path
52656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52657  # take no chances and rewrite it.
52658  # Note: m4 eats our [], so we need to use [ and ] instead.
52659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52660  if test "x$has_forbidden_chars" != x; then
52661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52665      # Going to short mode and back again did indeed matter. Since short mode is
52666      # case insensitive, let's make it lowercase to improve readability.
52667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52668      # Now convert it back to Unix-style (cygpath)
52669      input_path=`$CYGPATH -u "$shortmode_path"`
52670      new_path="$input_path"
52671    fi
52672  fi
52673
52674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52675  if test "x$test_cygdrive_prefix" = x; then
52676    # As a simple fix, exclude /usr/bin since it's not a real path.
52677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52679      # a path prefixed by /cygdrive for fixpath to work.
52680      new_path="$CYGWIN_ROOT_PATH$input_path"
52681    fi
52682  fi
52683
52684
52685  if test "x$path" != "x$new_path"; then
52686    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52688$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52689  fi
52690
52691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52692
52693  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52694  has_colon=`$ECHO $path | $GREP ^.:`
52695  new_path="$path"
52696  if test "x$has_colon" = x; then
52697    # Not in mixed or Windows style, start by that.
52698    new_path=`cmd //c echo $path`
52699  fi
52700
52701
52702  input_path="$new_path"
52703  # Check if we need to convert this using DOS-style short mode. If the path
52704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52705  # take no chances and rewrite it.
52706  # Note: m4 eats our [], so we need to use [ and ] instead.
52707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52708  if test "x$has_forbidden_chars" != x; then
52709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52711  fi
52712
52713
52714  windows_path="$new_path"
52715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52716    unix_path=`$CYGPATH -u "$windows_path"`
52717    new_path="$unix_path"
52718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52720    new_path="$unix_path"
52721  fi
52722
52723  if test "x$path" != "x$new_path"; then
52724    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52727  fi
52728
52729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52731
52732    else
52733      # We're on a unix platform. Hooray! :)
52734      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52735      has_space=`$ECHO "$path" | $GREP " "`
52736      if test "x$has_space" != x; then
52737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52740      fi
52741
52742      # Use eval to expand a potential ~
52743      eval path="$path"
52744      if test ! -f "$path" && test ! -d "$path"; then
52745        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52746      fi
52747
52748      if test -d "$path"; then
52749        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52750      else
52751        dir="`$DIRNAME "$path"`"
52752        base="`$BASENAME "$path"`"
52753        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52754      fi
52755    fi
52756  fi
52757
52758
52759  # Only process if variable expands to non-empty
52760
52761  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52763
52764  # Input might be given as Windows format, start by converting to
52765  # unix format.
52766  path="$POTENTIAL_FREETYPE_LIB_PATH"
52767  new_path=`$CYGPATH -u "$path"`
52768
52769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52772  # "foo.exe" is OK but "foo" is an error.
52773  #
52774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52775  # It is also a way to make sure we got the proper file name for the real test later on.
52776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52777  if test "x$test_shortpath" = x; then
52778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52780    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52781  fi
52782
52783  # Call helper function which possibly converts this using DOS-style short mode.
52784  # If so, the updated path is stored in $new_path.
52785
52786  input_path="$new_path"
52787  # Check if we need to convert this using DOS-style short mode. If the path
52788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52789  # take no chances and rewrite it.
52790  # Note: m4 eats our [], so we need to use [ and ] instead.
52791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52792  if test "x$has_forbidden_chars" != x; then
52793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52797      # Going to short mode and back again did indeed matter. Since short mode is
52798      # case insensitive, let's make it lowercase to improve readability.
52799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52800      # Now convert it back to Unix-style (cygpath)
52801      input_path=`$CYGPATH -u "$shortmode_path"`
52802      new_path="$input_path"
52803    fi
52804  fi
52805
52806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52807  if test "x$test_cygdrive_prefix" = x; then
52808    # As a simple fix, exclude /usr/bin since it's not a real path.
52809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52811      # a path prefixed by /cygdrive for fixpath to work.
52812      new_path="$CYGWIN_ROOT_PATH$input_path"
52813    fi
52814  fi
52815
52816
52817  if test "x$path" != "x$new_path"; then
52818    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52821  fi
52822
52823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52824
52825  path="$POTENTIAL_FREETYPE_LIB_PATH"
52826  has_colon=`$ECHO $path | $GREP ^.:`
52827  new_path="$path"
52828  if test "x$has_colon" = x; then
52829    # Not in mixed or Windows style, start by that.
52830    new_path=`cmd //c echo $path`
52831  fi
52832
52833
52834  input_path="$new_path"
52835  # Check if we need to convert this using DOS-style short mode. If the path
52836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52837  # take no chances and rewrite it.
52838  # Note: m4 eats our [], so we need to use [ and ] instead.
52839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52840  if test "x$has_forbidden_chars" != x; then
52841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52843  fi
52844
52845
52846  windows_path="$new_path"
52847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52848    unix_path=`$CYGPATH -u "$windows_path"`
52849    new_path="$unix_path"
52850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52852    new_path="$unix_path"
52853  fi
52854
52855  if test "x$path" != "x$new_path"; then
52856    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52859  fi
52860
52861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52863
52864    else
52865      # We're on a unix platform. Hooray! :)
52866      path="$POTENTIAL_FREETYPE_LIB_PATH"
52867      has_space=`$ECHO "$path" | $GREP " "`
52868      if test "x$has_space" != x; then
52869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52870$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52872      fi
52873
52874      # Use eval to expand a potential ~
52875      eval path="$path"
52876      if test ! -f "$path" && test ! -d "$path"; then
52877        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52878      fi
52879
52880      if test -d "$path"; then
52881        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52882      else
52883        dir="`$DIRNAME "$path"`"
52884        base="`$BASENAME "$path"`"
52885        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52886      fi
52887    fi
52888  fi
52889
52890
52891    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52893$as_echo_n "checking for freetype includes... " >&6; }
52894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52895$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52896    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52898$as_echo_n "checking for freetype libraries... " >&6; }
52899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52900$as_echo "$FREETYPE_LIB_PATH" >&6; }
52901  fi
52902
52903          if test "x$FOUND_FREETYPE" != xyes; then
52904            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52905          fi
52906        else
52907          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52908$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52909          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52910        fi
52911      else
52912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52913$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52914      fi
52915    fi
52916
52917    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52918      # User has specified settings
52919
52920      if test "x$BUNDLE_FREETYPE" = x; then
52921        # If not specified, default is to bundle freetype
52922        BUNDLE_FREETYPE=yes
52923      fi
52924
52925      if test "x$with_freetype" != x; then
52926        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52927        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52928      fi
52929
52930      # Allow --with-freetype-lib and --with-freetype-include to override
52931      if test "x$with_freetype_include" != x; then
52932        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52933      fi
52934      if test "x$with_freetype_lib" != x; then
52935        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52936      fi
52937
52938      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52939        # Okay, we got it. Check that it works.
52940
52941  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52942  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52943  METHOD="--with-freetype"
52944
52945  # Let's start with an optimistic view of the world :-)
52946  FOUND_FREETYPE=yes
52947
52948  # First look for the canonical freetype main include file ft2build.h.
52949  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52950    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52951    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52952    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52953      # Fail.
52954      FOUND_FREETYPE=no
52955    fi
52956  fi
52957
52958  if test "x$FOUND_FREETYPE" = xyes; then
52959    # Include file found, let's continue the sanity check.
52960    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52961$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52962
52963    # Reset to default value
52964    FREETYPE_BASE_NAME=freetype
52965    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52966    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52967      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52968          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52969        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52970        # for the .6 version explicitly.
52971        FREETYPE_BASE_NAME=freetype.6
52972        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52973        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52974$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52975      else
52976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52977$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52978        FOUND_FREETYPE=no
52979      fi
52980    else
52981      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52982        # On Windows, we will need both .lib and .dll file.
52983        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52984          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52986          FOUND_FREETYPE=no
52987        fi
52988      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52990        # Found lib in isa dir, use that instead.
52991        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52992        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52993$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52994      fi
52995    fi
52996  fi
52997
52998  if test "x$FOUND_FREETYPE" = xyes; then
52999
53000  # Only process if variable expands to non-empty
53001
53002  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53004
53005  # Input might be given as Windows format, start by converting to
53006  # unix format.
53007  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53008  new_path=`$CYGPATH -u "$path"`
53009
53010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53013  # "foo.exe" is OK but "foo" is an error.
53014  #
53015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53016  # It is also a way to make sure we got the proper file name for the real test later on.
53017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53018  if test "x$test_shortpath" = x; then
53019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53021    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53022  fi
53023
53024  # Call helper function which possibly converts this using DOS-style short mode.
53025  # If so, the updated path is stored in $new_path.
53026
53027  input_path="$new_path"
53028  # Check if we need to convert this using DOS-style short mode. If the path
53029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53030  # take no chances and rewrite it.
53031  # Note: m4 eats our [], so we need to use [ and ] instead.
53032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53033  if test "x$has_forbidden_chars" != x; then
53034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53038      # Going to short mode and back again did indeed matter. Since short mode is
53039      # case insensitive, let's make it lowercase to improve readability.
53040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53041      # Now convert it back to Unix-style (cygpath)
53042      input_path=`$CYGPATH -u "$shortmode_path"`
53043      new_path="$input_path"
53044    fi
53045  fi
53046
53047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53048  if test "x$test_cygdrive_prefix" = x; then
53049    # As a simple fix, exclude /usr/bin since it's not a real path.
53050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53052      # a path prefixed by /cygdrive for fixpath to work.
53053      new_path="$CYGWIN_ROOT_PATH$input_path"
53054    fi
53055  fi
53056
53057
53058  if test "x$path" != "x$new_path"; then
53059    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53062  fi
53063
53064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53065
53066  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53067  has_colon=`$ECHO $path | $GREP ^.:`
53068  new_path="$path"
53069  if test "x$has_colon" = x; then
53070    # Not in mixed or Windows style, start by that.
53071    new_path=`cmd //c echo $path`
53072  fi
53073
53074
53075  input_path="$new_path"
53076  # Check if we need to convert this using DOS-style short mode. If the path
53077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53078  # take no chances and rewrite it.
53079  # Note: m4 eats our [], so we need to use [ and ] instead.
53080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53081  if test "x$has_forbidden_chars" != x; then
53082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53084  fi
53085
53086
53087  windows_path="$new_path"
53088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53089    unix_path=`$CYGPATH -u "$windows_path"`
53090    new_path="$unix_path"
53091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53093    new_path="$unix_path"
53094  fi
53095
53096  if test "x$path" != "x$new_path"; then
53097    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53100  fi
53101
53102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53104
53105    else
53106      # We're on a unix platform. Hooray! :)
53107      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53108      has_space=`$ECHO "$path" | $GREP " "`
53109      if test "x$has_space" != x; then
53110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53113      fi
53114
53115      # Use eval to expand a potential ~
53116      eval path="$path"
53117      if test ! -f "$path" && test ! -d "$path"; then
53118        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53119      fi
53120
53121      if test -d "$path"; then
53122        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53123      else
53124        dir="`$DIRNAME "$path"`"
53125        base="`$BASENAME "$path"`"
53126        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53127      fi
53128    fi
53129  fi
53130
53131
53132  # Only process if variable expands to non-empty
53133
53134  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53136
53137  # Input might be given as Windows format, start by converting to
53138  # unix format.
53139  path="$POTENTIAL_FREETYPE_LIB_PATH"
53140  new_path=`$CYGPATH -u "$path"`
53141
53142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53145  # "foo.exe" is OK but "foo" is an error.
53146  #
53147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53148  # It is also a way to make sure we got the proper file name for the real test later on.
53149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53150  if test "x$test_shortpath" = x; then
53151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53153    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53154  fi
53155
53156  # Call helper function which possibly converts this using DOS-style short mode.
53157  # If so, the updated path is stored in $new_path.
53158
53159  input_path="$new_path"
53160  # Check if we need to convert this using DOS-style short mode. If the path
53161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53162  # take no chances and rewrite it.
53163  # Note: m4 eats our [], so we need to use [ and ] instead.
53164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53165  if test "x$has_forbidden_chars" != x; then
53166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53170      # Going to short mode and back again did indeed matter. Since short mode is
53171      # case insensitive, let's make it lowercase to improve readability.
53172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53173      # Now convert it back to Unix-style (cygpath)
53174      input_path=`$CYGPATH -u "$shortmode_path"`
53175      new_path="$input_path"
53176    fi
53177  fi
53178
53179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53180  if test "x$test_cygdrive_prefix" = x; then
53181    # As a simple fix, exclude /usr/bin since it's not a real path.
53182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53184      # a path prefixed by /cygdrive for fixpath to work.
53185      new_path="$CYGWIN_ROOT_PATH$input_path"
53186    fi
53187  fi
53188
53189
53190  if test "x$path" != "x$new_path"; then
53191    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53194  fi
53195
53196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53197
53198  path="$POTENTIAL_FREETYPE_LIB_PATH"
53199  has_colon=`$ECHO $path | $GREP ^.:`
53200  new_path="$path"
53201  if test "x$has_colon" = x; then
53202    # Not in mixed or Windows style, start by that.
53203    new_path=`cmd //c echo $path`
53204  fi
53205
53206
53207  input_path="$new_path"
53208  # Check if we need to convert this using DOS-style short mode. If the path
53209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53210  # take no chances and rewrite it.
53211  # Note: m4 eats our [], so we need to use [ and ] instead.
53212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53213  if test "x$has_forbidden_chars" != x; then
53214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53216  fi
53217
53218
53219  windows_path="$new_path"
53220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53221    unix_path=`$CYGPATH -u "$windows_path"`
53222    new_path="$unix_path"
53223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53225    new_path="$unix_path"
53226  fi
53227
53228  if test "x$path" != "x$new_path"; then
53229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53232  fi
53233
53234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53236
53237    else
53238      # We're on a unix platform. Hooray! :)
53239      path="$POTENTIAL_FREETYPE_LIB_PATH"
53240      has_space=`$ECHO "$path" | $GREP " "`
53241      if test "x$has_space" != x; then
53242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53244        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53245      fi
53246
53247      # Use eval to expand a potential ~
53248      eval path="$path"
53249      if test ! -f "$path" && test ! -d "$path"; then
53250        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53251      fi
53252
53253      if test -d "$path"; then
53254        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53255      else
53256        dir="`$DIRNAME "$path"`"
53257        base="`$BASENAME "$path"`"
53258        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53259      fi
53260    fi
53261  fi
53262
53263
53264    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53266$as_echo_n "checking for freetype includes... " >&6; }
53267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53268$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53269    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53271$as_echo_n "checking for freetype libraries... " >&6; }
53272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53273$as_echo "$FREETYPE_LIB_PATH" >&6; }
53274  fi
53275
53276        if test "x$FOUND_FREETYPE" != xyes; then
53277          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
53278        fi
53279      else
53280        # User specified only one of lib or include. This is an error.
53281        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
53282          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
53283$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
53284          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
53285        else
53286          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
53287$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
53288          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
53289        fi
53290      fi
53291    else
53292      # User did not specify settings, but we need freetype. Try to locate it.
53293
53294      if test "x$BUNDLE_FREETYPE" = x; then
53295        # If not specified, default is to bundle freetype only on windows
53296        if test "x$OPENJDK_TARGET_OS" = xwindows; then
53297          BUNDLE_FREETYPE=yes
53298        else
53299          BUNDLE_FREETYPE=no
53300        fi
53301      fi
53302
53303      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
53304      if test "x$SYSROOT" = x; then
53305        if test "x$FOUND_FREETYPE" != xyes; then
53306          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
53307          if test "x$PKG_CONFIG" != x; then
53308
53309pkg_failed=no
53310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
53311$as_echo_n "checking for FREETYPE... " >&6; }
53312
53313if test -n "$FREETYPE_CFLAGS"; then
53314    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
53315 elif test -n "$PKG_CONFIG"; then
53316    if test -n "$PKG_CONFIG" && \
53317    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
53318  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
53319  ac_status=$?
53320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53321  test $ac_status = 0; }; then
53322  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
53323else
53324  pkg_failed=yes
53325fi
53326 else
53327    pkg_failed=untried
53328fi
53329if test -n "$FREETYPE_LIBS"; then
53330    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
53331 elif test -n "$PKG_CONFIG"; then
53332    if test -n "$PKG_CONFIG" && \
53333    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
53334  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
53335  ac_status=$?
53336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53337  test $ac_status = 0; }; then
53338  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
53339else
53340  pkg_failed=yes
53341fi
53342 else
53343    pkg_failed=untried
53344fi
53345
53346
53347
53348if test $pkg_failed = yes; then
53349
53350if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53351        _pkg_short_errors_supported=yes
53352else
53353        _pkg_short_errors_supported=no
53354fi
53355        if test $_pkg_short_errors_supported = yes; then
53356	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
53357        else
53358	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
53359        fi
53360	# Put the nasty error message in config.log where it belongs
53361	echo "$FREETYPE_PKG_ERRORS" >&5
53362
53363	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53364$as_echo "no" >&6; }
53365                FOUND_FREETYPE=no
53366elif test $pkg_failed = untried; then
53367	FOUND_FREETYPE=no
53368else
53369	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
53370	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
53371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53372$as_echo "yes" >&6; }
53373	FOUND_FREETYPE=yes
53374fi
53375            if test "x$FOUND_FREETYPE" = xyes; then
53376              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
53377              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
53378              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
53379              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
53380                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
53381              fi
53382              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
53383              if test "x$BUNDLE_FREETYPE" = xyes; then
53384                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
53385$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
53386                FOUND_FREETYPE=no
53387              else
53388                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
53389$as_echo_n "checking for freetype... " >&6; }
53390                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
53391$as_echo "yes (using pkg-config)" >&6; }
53392              fi
53393            fi
53394          fi
53395        fi
53396      fi
53397
53398      if test "x$FOUND_FREETYPE" != xyes; then
53399        # Check in well-known locations
53400        if test "x$OPENJDK_TARGET_OS" = xwindows; then
53401          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
53402
53403  windows_path="$FREETYPE_BASE_DIR"
53404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53405    unix_path=`$CYGPATH -u "$windows_path"`
53406    FREETYPE_BASE_DIR="$unix_path"
53407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53409    FREETYPE_BASE_DIR="$unix_path"
53410  fi
53411
53412
53413  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53414  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53415  METHOD="well-known location"
53416
53417  # Let's start with an optimistic view of the world :-)
53418  FOUND_FREETYPE=yes
53419
53420  # First look for the canonical freetype main include file ft2build.h.
53421  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53422    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53423    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53424    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53425      # Fail.
53426      FOUND_FREETYPE=no
53427    fi
53428  fi
53429
53430  if test "x$FOUND_FREETYPE" = xyes; then
53431    # Include file found, let's continue the sanity check.
53432    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53433$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53434
53435    # Reset to default value
53436    FREETYPE_BASE_NAME=freetype
53437    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53438    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53439      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53440          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53441        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53442        # for the .6 version explicitly.
53443        FREETYPE_BASE_NAME=freetype.6
53444        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53445        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53446$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53447      else
53448        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53449$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53450        FOUND_FREETYPE=no
53451      fi
53452    else
53453      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53454        # On Windows, we will need both .lib and .dll file.
53455        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53456          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53457$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53458          FOUND_FREETYPE=no
53459        fi
53460      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53461          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53462        # Found lib in isa dir, use that instead.
53463        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53464        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53465$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53466      fi
53467    fi
53468  fi
53469
53470  if test "x$FOUND_FREETYPE" = xyes; then
53471
53472  # Only process if variable expands to non-empty
53473
53474  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53476
53477  # Input might be given as Windows format, start by converting to
53478  # unix format.
53479  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53480  new_path=`$CYGPATH -u "$path"`
53481
53482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53485  # "foo.exe" is OK but "foo" is an error.
53486  #
53487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53488  # It is also a way to make sure we got the proper file name for the real test later on.
53489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53490  if test "x$test_shortpath" = x; then
53491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53493    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53494  fi
53495
53496  # Call helper function which possibly converts this using DOS-style short mode.
53497  # If so, the updated path is stored in $new_path.
53498
53499  input_path="$new_path"
53500  # Check if we need to convert this using DOS-style short mode. If the path
53501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53502  # take no chances and rewrite it.
53503  # Note: m4 eats our [], so we need to use [ and ] instead.
53504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53505  if test "x$has_forbidden_chars" != x; then
53506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53510      # Going to short mode and back again did indeed matter. Since short mode is
53511      # case insensitive, let's make it lowercase to improve readability.
53512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53513      # Now convert it back to Unix-style (cygpath)
53514      input_path=`$CYGPATH -u "$shortmode_path"`
53515      new_path="$input_path"
53516    fi
53517  fi
53518
53519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53520  if test "x$test_cygdrive_prefix" = x; then
53521    # As a simple fix, exclude /usr/bin since it's not a real path.
53522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53524      # a path prefixed by /cygdrive for fixpath to work.
53525      new_path="$CYGWIN_ROOT_PATH$input_path"
53526    fi
53527  fi
53528
53529
53530  if test "x$path" != "x$new_path"; then
53531    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53533$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53534  fi
53535
53536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53537
53538  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53539  has_colon=`$ECHO $path | $GREP ^.:`
53540  new_path="$path"
53541  if test "x$has_colon" = x; then
53542    # Not in mixed or Windows style, start by that.
53543    new_path=`cmd //c echo $path`
53544  fi
53545
53546
53547  input_path="$new_path"
53548  # Check if we need to convert this using DOS-style short mode. If the path
53549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53550  # take no chances and rewrite it.
53551  # Note: m4 eats our [], so we need to use [ and ] instead.
53552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53553  if test "x$has_forbidden_chars" != x; then
53554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53556  fi
53557
53558
53559  windows_path="$new_path"
53560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53561    unix_path=`$CYGPATH -u "$windows_path"`
53562    new_path="$unix_path"
53563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53565    new_path="$unix_path"
53566  fi
53567
53568  if test "x$path" != "x$new_path"; then
53569    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53571$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53572  fi
53573
53574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53576
53577    else
53578      # We're on a unix platform. Hooray! :)
53579      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53580      has_space=`$ECHO "$path" | $GREP " "`
53581      if test "x$has_space" != x; then
53582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53585      fi
53586
53587      # Use eval to expand a potential ~
53588      eval path="$path"
53589      if test ! -f "$path" && test ! -d "$path"; then
53590        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53591      fi
53592
53593      if test -d "$path"; then
53594        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53595      else
53596        dir="`$DIRNAME "$path"`"
53597        base="`$BASENAME "$path"`"
53598        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53599      fi
53600    fi
53601  fi
53602
53603
53604  # Only process if variable expands to non-empty
53605
53606  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53608
53609  # Input might be given as Windows format, start by converting to
53610  # unix format.
53611  path="$POTENTIAL_FREETYPE_LIB_PATH"
53612  new_path=`$CYGPATH -u "$path"`
53613
53614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53617  # "foo.exe" is OK but "foo" is an error.
53618  #
53619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53620  # It is also a way to make sure we got the proper file name for the real test later on.
53621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53622  if test "x$test_shortpath" = x; then
53623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53624$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53625    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53626  fi
53627
53628  # Call helper function which possibly converts this using DOS-style short mode.
53629  # If so, the updated path is stored in $new_path.
53630
53631  input_path="$new_path"
53632  # Check if we need to convert this using DOS-style short mode. If the path
53633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53634  # take no chances and rewrite it.
53635  # Note: m4 eats our [], so we need to use [ and ] instead.
53636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53637  if test "x$has_forbidden_chars" != x; then
53638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53642      # Going to short mode and back again did indeed matter. Since short mode is
53643      # case insensitive, let's make it lowercase to improve readability.
53644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53645      # Now convert it back to Unix-style (cygpath)
53646      input_path=`$CYGPATH -u "$shortmode_path"`
53647      new_path="$input_path"
53648    fi
53649  fi
53650
53651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53652  if test "x$test_cygdrive_prefix" = x; then
53653    # As a simple fix, exclude /usr/bin since it's not a real path.
53654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53656      # a path prefixed by /cygdrive for fixpath to work.
53657      new_path="$CYGWIN_ROOT_PATH$input_path"
53658    fi
53659  fi
53660
53661
53662  if test "x$path" != "x$new_path"; then
53663    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53665$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53666  fi
53667
53668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53669
53670  path="$POTENTIAL_FREETYPE_LIB_PATH"
53671  has_colon=`$ECHO $path | $GREP ^.:`
53672  new_path="$path"
53673  if test "x$has_colon" = x; then
53674    # Not in mixed or Windows style, start by that.
53675    new_path=`cmd //c echo $path`
53676  fi
53677
53678
53679  input_path="$new_path"
53680  # Check if we need to convert this using DOS-style short mode. If the path
53681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53682  # take no chances and rewrite it.
53683  # Note: m4 eats our [], so we need to use [ and ] instead.
53684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53685  if test "x$has_forbidden_chars" != x; then
53686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53688  fi
53689
53690
53691  windows_path="$new_path"
53692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53693    unix_path=`$CYGPATH -u "$windows_path"`
53694    new_path="$unix_path"
53695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53697    new_path="$unix_path"
53698  fi
53699
53700  if test "x$path" != "x$new_path"; then
53701    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53703$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53704  fi
53705
53706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53708
53709    else
53710      # We're on a unix platform. Hooray! :)
53711      path="$POTENTIAL_FREETYPE_LIB_PATH"
53712      has_space=`$ECHO "$path" | $GREP " "`
53713      if test "x$has_space" != x; then
53714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53715$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53717      fi
53718
53719      # Use eval to expand a potential ~
53720      eval path="$path"
53721      if test ! -f "$path" && test ! -d "$path"; then
53722        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53723      fi
53724
53725      if test -d "$path"; then
53726        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53727      else
53728        dir="`$DIRNAME "$path"`"
53729        base="`$BASENAME "$path"`"
53730        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53731      fi
53732    fi
53733  fi
53734
53735
53736    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53738$as_echo_n "checking for freetype includes... " >&6; }
53739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53740$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53741    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53743$as_echo_n "checking for freetype libraries... " >&6; }
53744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53745$as_echo "$FREETYPE_LIB_PATH" >&6; }
53746  fi
53747
53748          if test "x$FOUND_FREETYPE" != xyes; then
53749            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53750
53751  windows_path="$FREETYPE_BASE_DIR"
53752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53753    unix_path=`$CYGPATH -u "$windows_path"`
53754    FREETYPE_BASE_DIR="$unix_path"
53755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53757    FREETYPE_BASE_DIR="$unix_path"
53758  fi
53759
53760
53761  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53762  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53763  METHOD="well-known location"
53764
53765  # Let's start with an optimistic view of the world :-)
53766  FOUND_FREETYPE=yes
53767
53768  # First look for the canonical freetype main include file ft2build.h.
53769  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53770    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53771    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53772    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53773      # Fail.
53774      FOUND_FREETYPE=no
53775    fi
53776  fi
53777
53778  if test "x$FOUND_FREETYPE" = xyes; then
53779    # Include file found, let's continue the sanity check.
53780    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53781$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53782
53783    # Reset to default value
53784    FREETYPE_BASE_NAME=freetype
53785    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53786    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53787      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53788          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53789        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53790        # for the .6 version explicitly.
53791        FREETYPE_BASE_NAME=freetype.6
53792        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53793        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53794$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53795      else
53796        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53797$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53798        FOUND_FREETYPE=no
53799      fi
53800    else
53801      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53802        # On Windows, we will need both .lib and .dll file.
53803        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53804          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53805$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53806          FOUND_FREETYPE=no
53807        fi
53808      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53809          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53810        # Found lib in isa dir, use that instead.
53811        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53812        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53813$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53814      fi
53815    fi
53816  fi
53817
53818  if test "x$FOUND_FREETYPE" = xyes; then
53819
53820  # Only process if variable expands to non-empty
53821
53822  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53824
53825  # Input might be given as Windows format, start by converting to
53826  # unix format.
53827  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53828  new_path=`$CYGPATH -u "$path"`
53829
53830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53833  # "foo.exe" is OK but "foo" is an error.
53834  #
53835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53836  # It is also a way to make sure we got the proper file name for the real test later on.
53837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53838  if test "x$test_shortpath" = x; then
53839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53840$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53841    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53842  fi
53843
53844  # Call helper function which possibly converts this using DOS-style short mode.
53845  # If so, the updated path is stored in $new_path.
53846
53847  input_path="$new_path"
53848  # Check if we need to convert this using DOS-style short mode. If the path
53849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53850  # take no chances and rewrite it.
53851  # Note: m4 eats our [], so we need to use [ and ] instead.
53852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53853  if test "x$has_forbidden_chars" != x; then
53854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53858      # Going to short mode and back again did indeed matter. Since short mode is
53859      # case insensitive, let's make it lowercase to improve readability.
53860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53861      # Now convert it back to Unix-style (cygpath)
53862      input_path=`$CYGPATH -u "$shortmode_path"`
53863      new_path="$input_path"
53864    fi
53865  fi
53866
53867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53868  if test "x$test_cygdrive_prefix" = x; then
53869    # As a simple fix, exclude /usr/bin since it's not a real path.
53870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53872      # a path prefixed by /cygdrive for fixpath to work.
53873      new_path="$CYGWIN_ROOT_PATH$input_path"
53874    fi
53875  fi
53876
53877
53878  if test "x$path" != "x$new_path"; then
53879    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53881$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53882  fi
53883
53884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53885
53886  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53887  has_colon=`$ECHO $path | $GREP ^.:`
53888  new_path="$path"
53889  if test "x$has_colon" = x; then
53890    # Not in mixed or Windows style, start by that.
53891    new_path=`cmd //c echo $path`
53892  fi
53893
53894
53895  input_path="$new_path"
53896  # Check if we need to convert this using DOS-style short mode. If the path
53897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53898  # take no chances and rewrite it.
53899  # Note: m4 eats our [], so we need to use [ and ] instead.
53900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53901  if test "x$has_forbidden_chars" != x; then
53902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53904  fi
53905
53906
53907  windows_path="$new_path"
53908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53909    unix_path=`$CYGPATH -u "$windows_path"`
53910    new_path="$unix_path"
53911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53913    new_path="$unix_path"
53914  fi
53915
53916  if test "x$path" != "x$new_path"; then
53917    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53920  fi
53921
53922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53924
53925    else
53926      # We're on a unix platform. Hooray! :)
53927      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53928      has_space=`$ECHO "$path" | $GREP " "`
53929      if test "x$has_space" != x; then
53930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53933      fi
53934
53935      # Use eval to expand a potential ~
53936      eval path="$path"
53937      if test ! -f "$path" && test ! -d "$path"; then
53938        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53939      fi
53940
53941      if test -d "$path"; then
53942        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53943      else
53944        dir="`$DIRNAME "$path"`"
53945        base="`$BASENAME "$path"`"
53946        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53947      fi
53948    fi
53949  fi
53950
53951
53952  # Only process if variable expands to non-empty
53953
53954  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53956
53957  # Input might be given as Windows format, start by converting to
53958  # unix format.
53959  path="$POTENTIAL_FREETYPE_LIB_PATH"
53960  new_path=`$CYGPATH -u "$path"`
53961
53962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53965  # "foo.exe" is OK but "foo" is an error.
53966  #
53967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53968  # It is also a way to make sure we got the proper file name for the real test later on.
53969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53970  if test "x$test_shortpath" = x; then
53971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53973    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53974  fi
53975
53976  # Call helper function which possibly converts this using DOS-style short mode.
53977  # If so, the updated path is stored in $new_path.
53978
53979  input_path="$new_path"
53980  # Check if we need to convert this using DOS-style short mode. If the path
53981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53982  # take no chances and rewrite it.
53983  # Note: m4 eats our [], so we need to use [ and ] instead.
53984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53985  if test "x$has_forbidden_chars" != x; then
53986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53990      # Going to short mode and back again did indeed matter. Since short mode is
53991      # case insensitive, let's make it lowercase to improve readability.
53992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53993      # Now convert it back to Unix-style (cygpath)
53994      input_path=`$CYGPATH -u "$shortmode_path"`
53995      new_path="$input_path"
53996    fi
53997  fi
53998
53999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54000  if test "x$test_cygdrive_prefix" = x; then
54001    # As a simple fix, exclude /usr/bin since it's not a real path.
54002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54004      # a path prefixed by /cygdrive for fixpath to work.
54005      new_path="$CYGWIN_ROOT_PATH$input_path"
54006    fi
54007  fi
54008
54009
54010  if test "x$path" != "x$new_path"; then
54011    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54014  fi
54015
54016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54017
54018  path="$POTENTIAL_FREETYPE_LIB_PATH"
54019  has_colon=`$ECHO $path | $GREP ^.:`
54020  new_path="$path"
54021  if test "x$has_colon" = x; then
54022    # Not in mixed or Windows style, start by that.
54023    new_path=`cmd //c echo $path`
54024  fi
54025
54026
54027  input_path="$new_path"
54028  # Check if we need to convert this using DOS-style short mode. If the path
54029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54030  # take no chances and rewrite it.
54031  # Note: m4 eats our [], so we need to use [ and ] instead.
54032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54033  if test "x$has_forbidden_chars" != x; then
54034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54036  fi
54037
54038
54039  windows_path="$new_path"
54040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54041    unix_path=`$CYGPATH -u "$windows_path"`
54042    new_path="$unix_path"
54043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54045    new_path="$unix_path"
54046  fi
54047
54048  if test "x$path" != "x$new_path"; then
54049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54052  fi
54053
54054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54056
54057    else
54058      # We're on a unix platform. Hooray! :)
54059      path="$POTENTIAL_FREETYPE_LIB_PATH"
54060      has_space=`$ECHO "$path" | $GREP " "`
54061      if test "x$has_space" != x; then
54062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54065      fi
54066
54067      # Use eval to expand a potential ~
54068      eval path="$path"
54069      if test ! -f "$path" && test ! -d "$path"; then
54070        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54071      fi
54072
54073      if test -d "$path"; then
54074        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54075      else
54076        dir="`$DIRNAME "$path"`"
54077        base="`$BASENAME "$path"`"
54078        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54079      fi
54080    fi
54081  fi
54082
54083
54084    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54086$as_echo_n "checking for freetype includes... " >&6; }
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54088$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54089    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54091$as_echo_n "checking for freetype libraries... " >&6; }
54092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54093$as_echo "$FREETYPE_LIB_PATH" >&6; }
54094  fi
54095
54096          fi
54097          if test "x$FOUND_FREETYPE" != xyes; then
54098            FREETYPE_BASE_DIR="$HOME/freetype"
54099
54100  windows_path="$FREETYPE_BASE_DIR"
54101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54102    unix_path=`$CYGPATH -u "$windows_path"`
54103    FREETYPE_BASE_DIR="$unix_path"
54104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54106    FREETYPE_BASE_DIR="$unix_path"
54107  fi
54108
54109            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54110
54111  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54112  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54113  METHOD="well-known location"
54114
54115  # Let's start with an optimistic view of the world :-)
54116  FOUND_FREETYPE=yes
54117
54118  # First look for the canonical freetype main include file ft2build.h.
54119  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54120    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54121    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54122    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54123      # Fail.
54124      FOUND_FREETYPE=no
54125    fi
54126  fi
54127
54128  if test "x$FOUND_FREETYPE" = xyes; then
54129    # Include file found, let's continue the sanity check.
54130    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54131$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54132
54133    # Reset to default value
54134    FREETYPE_BASE_NAME=freetype
54135    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54136    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54137      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54138          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54139        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54140        # for the .6 version explicitly.
54141        FREETYPE_BASE_NAME=freetype.6
54142        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54143        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54144$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54145      else
54146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54147$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54148        FOUND_FREETYPE=no
54149      fi
54150    else
54151      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54152        # On Windows, we will need both .lib and .dll file.
54153        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54154          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54155$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54156          FOUND_FREETYPE=no
54157        fi
54158      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54159          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54160        # Found lib in isa dir, use that instead.
54161        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54162        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54163$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54164      fi
54165    fi
54166  fi
54167
54168  if test "x$FOUND_FREETYPE" = xyes; then
54169
54170  # Only process if variable expands to non-empty
54171
54172  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54174
54175  # Input might be given as Windows format, start by converting to
54176  # unix format.
54177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54178  new_path=`$CYGPATH -u "$path"`
54179
54180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54183  # "foo.exe" is OK but "foo" is an error.
54184  #
54185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54186  # It is also a way to make sure we got the proper file name for the real test later on.
54187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54188  if test "x$test_shortpath" = x; then
54189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54192  fi
54193
54194  # Call helper function which possibly converts this using DOS-style short mode.
54195  # If so, the updated path is stored in $new_path.
54196
54197  input_path="$new_path"
54198  # Check if we need to convert this using DOS-style short mode. If the path
54199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54200  # take no chances and rewrite it.
54201  # Note: m4 eats our [], so we need to use [ and ] instead.
54202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54203  if test "x$has_forbidden_chars" != x; then
54204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54208      # Going to short mode and back again did indeed matter. Since short mode is
54209      # case insensitive, let's make it lowercase to improve readability.
54210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54211      # Now convert it back to Unix-style (cygpath)
54212      input_path=`$CYGPATH -u "$shortmode_path"`
54213      new_path="$input_path"
54214    fi
54215  fi
54216
54217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54218  if test "x$test_cygdrive_prefix" = x; then
54219    # As a simple fix, exclude /usr/bin since it's not a real path.
54220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54222      # a path prefixed by /cygdrive for fixpath to work.
54223      new_path="$CYGWIN_ROOT_PATH$input_path"
54224    fi
54225  fi
54226
54227
54228  if test "x$path" != "x$new_path"; then
54229    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54232  fi
54233
54234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54235
54236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54237  has_colon=`$ECHO $path | $GREP ^.:`
54238  new_path="$path"
54239  if test "x$has_colon" = x; then
54240    # Not in mixed or Windows style, start by that.
54241    new_path=`cmd //c echo $path`
54242  fi
54243
54244
54245  input_path="$new_path"
54246  # Check if we need to convert this using DOS-style short mode. If the path
54247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54248  # take no chances and rewrite it.
54249  # Note: m4 eats our [], so we need to use [ and ] instead.
54250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54251  if test "x$has_forbidden_chars" != x; then
54252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54254  fi
54255
54256
54257  windows_path="$new_path"
54258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54259    unix_path=`$CYGPATH -u "$windows_path"`
54260    new_path="$unix_path"
54261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54263    new_path="$unix_path"
54264  fi
54265
54266  if test "x$path" != "x$new_path"; then
54267    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54270  fi
54271
54272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54274
54275    else
54276      # We're on a unix platform. Hooray! :)
54277      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54278      has_space=`$ECHO "$path" | $GREP " "`
54279      if test "x$has_space" != x; then
54280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54283      fi
54284
54285      # Use eval to expand a potential ~
54286      eval path="$path"
54287      if test ! -f "$path" && test ! -d "$path"; then
54288        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54289      fi
54290
54291      if test -d "$path"; then
54292        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54293      else
54294        dir="`$DIRNAME "$path"`"
54295        base="`$BASENAME "$path"`"
54296        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54297      fi
54298    fi
54299  fi
54300
54301
54302  # Only process if variable expands to non-empty
54303
54304  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54306
54307  # Input might be given as Windows format, start by converting to
54308  # unix format.
54309  path="$POTENTIAL_FREETYPE_LIB_PATH"
54310  new_path=`$CYGPATH -u "$path"`
54311
54312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54315  # "foo.exe" is OK but "foo" is an error.
54316  #
54317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54318  # It is also a way to make sure we got the proper file name for the real test later on.
54319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54320  if test "x$test_shortpath" = x; then
54321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54323    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54324  fi
54325
54326  # Call helper function which possibly converts this using DOS-style short mode.
54327  # If so, the updated path is stored in $new_path.
54328
54329  input_path="$new_path"
54330  # Check if we need to convert this using DOS-style short mode. If the path
54331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54332  # take no chances and rewrite it.
54333  # Note: m4 eats our [], so we need to use [ and ] instead.
54334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54335  if test "x$has_forbidden_chars" != x; then
54336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54340      # Going to short mode and back again did indeed matter. Since short mode is
54341      # case insensitive, let's make it lowercase to improve readability.
54342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54343      # Now convert it back to Unix-style (cygpath)
54344      input_path=`$CYGPATH -u "$shortmode_path"`
54345      new_path="$input_path"
54346    fi
54347  fi
54348
54349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54350  if test "x$test_cygdrive_prefix" = x; then
54351    # As a simple fix, exclude /usr/bin since it's not a real path.
54352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54354      # a path prefixed by /cygdrive for fixpath to work.
54355      new_path="$CYGWIN_ROOT_PATH$input_path"
54356    fi
54357  fi
54358
54359
54360  if test "x$path" != "x$new_path"; then
54361    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54364  fi
54365
54366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54367
54368  path="$POTENTIAL_FREETYPE_LIB_PATH"
54369  has_colon=`$ECHO $path | $GREP ^.:`
54370  new_path="$path"
54371  if test "x$has_colon" = x; then
54372    # Not in mixed or Windows style, start by that.
54373    new_path=`cmd //c echo $path`
54374  fi
54375
54376
54377  input_path="$new_path"
54378  # Check if we need to convert this using DOS-style short mode. If the path
54379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54380  # take no chances and rewrite it.
54381  # Note: m4 eats our [], so we need to use [ and ] instead.
54382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54383  if test "x$has_forbidden_chars" != x; then
54384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54386  fi
54387
54388
54389  windows_path="$new_path"
54390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54391    unix_path=`$CYGPATH -u "$windows_path"`
54392    new_path="$unix_path"
54393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54395    new_path="$unix_path"
54396  fi
54397
54398  if test "x$path" != "x$new_path"; then
54399    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54402  fi
54403
54404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54406
54407    else
54408      # We're on a unix platform. Hooray! :)
54409      path="$POTENTIAL_FREETYPE_LIB_PATH"
54410      has_space=`$ECHO "$path" | $GREP " "`
54411      if test "x$has_space" != x; then
54412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54415      fi
54416
54417      # Use eval to expand a potential ~
54418      eval path="$path"
54419      if test ! -f "$path" && test ! -d "$path"; then
54420        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54421      fi
54422
54423      if test -d "$path"; then
54424        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54425      else
54426        dir="`$DIRNAME "$path"`"
54427        base="`$BASENAME "$path"`"
54428        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54429      fi
54430    fi
54431  fi
54432
54433
54434    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54436$as_echo_n "checking for freetype includes... " >&6; }
54437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54438$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54439    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54441$as_echo_n "checking for freetype libraries... " >&6; }
54442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54443$as_echo "$FREETYPE_LIB_PATH" >&6; }
54444  fi
54445
54446            else
54447
54448  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54449  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54450  METHOD="well-known location"
54451
54452  # Let's start with an optimistic view of the world :-)
54453  FOUND_FREETYPE=yes
54454
54455  # First look for the canonical freetype main include file ft2build.h.
54456  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54457    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54458    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54459    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54460      # Fail.
54461      FOUND_FREETYPE=no
54462    fi
54463  fi
54464
54465  if test "x$FOUND_FREETYPE" = xyes; then
54466    # Include file found, let's continue the sanity check.
54467    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54468$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54469
54470    # Reset to default value
54471    FREETYPE_BASE_NAME=freetype
54472    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54473    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54474      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54475          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54476        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54477        # for the .6 version explicitly.
54478        FREETYPE_BASE_NAME=freetype.6
54479        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54480        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54481$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54482      else
54483        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54484$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54485        FOUND_FREETYPE=no
54486      fi
54487    else
54488      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54489        # On Windows, we will need both .lib and .dll file.
54490        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54491          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54493          FOUND_FREETYPE=no
54494        fi
54495      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54496          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54497        # Found lib in isa dir, use that instead.
54498        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54499        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54500$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54501      fi
54502    fi
54503  fi
54504
54505  if test "x$FOUND_FREETYPE" = xyes; then
54506
54507  # Only process if variable expands to non-empty
54508
54509  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54511
54512  # Input might be given as Windows format, start by converting to
54513  # unix format.
54514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54515  new_path=`$CYGPATH -u "$path"`
54516
54517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54520  # "foo.exe" is OK but "foo" is an error.
54521  #
54522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54523  # It is also a way to make sure we got the proper file name for the real test later on.
54524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54525  if test "x$test_shortpath" = x; then
54526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54528    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54529  fi
54530
54531  # Call helper function which possibly converts this using DOS-style short mode.
54532  # If so, the updated path is stored in $new_path.
54533
54534  input_path="$new_path"
54535  # Check if we need to convert this using DOS-style short mode. If the path
54536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54537  # take no chances and rewrite it.
54538  # Note: m4 eats our [], so we need to use [ and ] instead.
54539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54540  if test "x$has_forbidden_chars" != x; then
54541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54545      # Going to short mode and back again did indeed matter. Since short mode is
54546      # case insensitive, let's make it lowercase to improve readability.
54547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54548      # Now convert it back to Unix-style (cygpath)
54549      input_path=`$CYGPATH -u "$shortmode_path"`
54550      new_path="$input_path"
54551    fi
54552  fi
54553
54554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54555  if test "x$test_cygdrive_prefix" = x; then
54556    # As a simple fix, exclude /usr/bin since it's not a real path.
54557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54559      # a path prefixed by /cygdrive for fixpath to work.
54560      new_path="$CYGWIN_ROOT_PATH$input_path"
54561    fi
54562  fi
54563
54564
54565  if test "x$path" != "x$new_path"; then
54566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54569  fi
54570
54571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54572
54573  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54574  has_colon=`$ECHO $path | $GREP ^.:`
54575  new_path="$path"
54576  if test "x$has_colon" = x; then
54577    # Not in mixed or Windows style, start by that.
54578    new_path=`cmd //c echo $path`
54579  fi
54580
54581
54582  input_path="$new_path"
54583  # Check if we need to convert this using DOS-style short mode. If the path
54584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54585  # take no chances and rewrite it.
54586  # Note: m4 eats our [], so we need to use [ and ] instead.
54587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54588  if test "x$has_forbidden_chars" != x; then
54589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54591  fi
54592
54593
54594  windows_path="$new_path"
54595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54596    unix_path=`$CYGPATH -u "$windows_path"`
54597    new_path="$unix_path"
54598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54600    new_path="$unix_path"
54601  fi
54602
54603  if test "x$path" != "x$new_path"; then
54604    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54607  fi
54608
54609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54611
54612    else
54613      # We're on a unix platform. Hooray! :)
54614      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54615      has_space=`$ECHO "$path" | $GREP " "`
54616      if test "x$has_space" != x; then
54617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54620      fi
54621
54622      # Use eval to expand a potential ~
54623      eval path="$path"
54624      if test ! -f "$path" && test ! -d "$path"; then
54625        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54626      fi
54627
54628      if test -d "$path"; then
54629        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54630      else
54631        dir="`$DIRNAME "$path"`"
54632        base="`$BASENAME "$path"`"
54633        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54634      fi
54635    fi
54636  fi
54637
54638
54639  # Only process if variable expands to non-empty
54640
54641  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54643
54644  # Input might be given as Windows format, start by converting to
54645  # unix format.
54646  path="$POTENTIAL_FREETYPE_LIB_PATH"
54647  new_path=`$CYGPATH -u "$path"`
54648
54649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54652  # "foo.exe" is OK but "foo" is an error.
54653  #
54654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54655  # It is also a way to make sure we got the proper file name for the real test later on.
54656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54657  if test "x$test_shortpath" = x; then
54658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54660    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54661  fi
54662
54663  # Call helper function which possibly converts this using DOS-style short mode.
54664  # If so, the updated path is stored in $new_path.
54665
54666  input_path="$new_path"
54667  # Check if we need to convert this using DOS-style short mode. If the path
54668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54669  # take no chances and rewrite it.
54670  # Note: m4 eats our [], so we need to use [ and ] instead.
54671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54672  if test "x$has_forbidden_chars" != x; then
54673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54677      # Going to short mode and back again did indeed matter. Since short mode is
54678      # case insensitive, let's make it lowercase to improve readability.
54679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54680      # Now convert it back to Unix-style (cygpath)
54681      input_path=`$CYGPATH -u "$shortmode_path"`
54682      new_path="$input_path"
54683    fi
54684  fi
54685
54686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54687  if test "x$test_cygdrive_prefix" = x; then
54688    # As a simple fix, exclude /usr/bin since it's not a real path.
54689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54691      # a path prefixed by /cygdrive for fixpath to work.
54692      new_path="$CYGWIN_ROOT_PATH$input_path"
54693    fi
54694  fi
54695
54696
54697  if test "x$path" != "x$new_path"; then
54698    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54701  fi
54702
54703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54704
54705  path="$POTENTIAL_FREETYPE_LIB_PATH"
54706  has_colon=`$ECHO $path | $GREP ^.:`
54707  new_path="$path"
54708  if test "x$has_colon" = x; then
54709    # Not in mixed or Windows style, start by that.
54710    new_path=`cmd //c echo $path`
54711  fi
54712
54713
54714  input_path="$new_path"
54715  # Check if we need to convert this using DOS-style short mode. If the path
54716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54717  # take no chances and rewrite it.
54718  # Note: m4 eats our [], so we need to use [ and ] instead.
54719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54720  if test "x$has_forbidden_chars" != x; then
54721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54723  fi
54724
54725
54726  windows_path="$new_path"
54727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54728    unix_path=`$CYGPATH -u "$windows_path"`
54729    new_path="$unix_path"
54730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54732    new_path="$unix_path"
54733  fi
54734
54735  if test "x$path" != "x$new_path"; then
54736    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54738$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54739  fi
54740
54741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54743
54744    else
54745      # We're on a unix platform. Hooray! :)
54746      path="$POTENTIAL_FREETYPE_LIB_PATH"
54747      has_space=`$ECHO "$path" | $GREP " "`
54748      if test "x$has_space" != x; then
54749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54752      fi
54753
54754      # Use eval to expand a potential ~
54755      eval path="$path"
54756      if test ! -f "$path" && test ! -d "$path"; then
54757        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54758      fi
54759
54760      if test -d "$path"; then
54761        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54762      else
54763        dir="`$DIRNAME "$path"`"
54764        base="`$BASENAME "$path"`"
54765        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54766      fi
54767    fi
54768  fi
54769
54770
54771    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54773$as_echo_n "checking for freetype includes... " >&6; }
54774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54775$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54776    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54778$as_echo_n "checking for freetype libraries... " >&6; }
54779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54780$as_echo "$FREETYPE_LIB_PATH" >&6; }
54781  fi
54782
54783            fi
54784            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54785                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54786              # Source is available, as a last resort try to build freetype in default location
54787
54788  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54789  BUILD_FREETYPE=yes
54790
54791  # Check if the freetype sources are acessible..
54792  if ! test -d $FREETYPE_SRC_PATH; then
54793    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
54794$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54795    BUILD_FREETYPE=no
54796  fi
54797  # ..and contain a vc2010 project file
54798  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54799  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
54801$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54802    BUILD_FREETYPE=no
54803  fi
54804  # Now check if configure found a version of 'msbuild.exe'
54805  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54806    { $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
54807$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;}
54808    BUILD_FREETYPE=no
54809  fi
54810
54811  # Ready to go..
54812  if test "x$BUILD_FREETYPE" = xyes; then
54813    # msbuild requires trailing slashes for output directories
54814    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54815    freetype_lib_path_unix="$freetype_lib_path"
54816    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54817
54818  unix_path="$vcxproj_path"
54819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54820    windows_path=`$CYGPATH -m "$unix_path"`
54821    vcxproj_path="$windows_path"
54822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54823    windows_path=`cmd //c echo $unix_path`
54824    vcxproj_path="$windows_path"
54825  fi
54826
54827
54828  unix_path="$freetype_lib_path"
54829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54830    windows_path=`$CYGPATH -m "$unix_path"`
54831    freetype_lib_path="$windows_path"
54832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54833    windows_path=`cmd //c echo $unix_path`
54834    freetype_lib_path="$windows_path"
54835  fi
54836
54837
54838  unix_path="$freetype_obj_path"
54839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54840    windows_path=`$CYGPATH -m "$unix_path"`
54841    freetype_obj_path="$windows_path"
54842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54843    windows_path=`cmd //c echo $unix_path`
54844    freetype_obj_path="$windows_path"
54845  fi
54846
54847    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54848      freetype_platform=x64
54849    else
54850      freetype_platform=win32
54851    fi
54852
54853    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54854    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54855    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54856    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54857    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54858$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54859
54860    # First we try to build the freetype.dll
54861    $ECHO -e "@echo off\n"\
54862        "$MSBUILD $vcxproj_path "\
54863        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54864        "/p:Configuration=\"Release Multithreaded\" "\
54865        "/p:Platform=$freetype_platform "\
54866        "/p:ConfigurationType=DynamicLibrary "\
54867        "/p:TargetName=freetype "\
54868        "/p:OutDir=\"$freetype_lib_path\" "\
54869        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54870    cmd /c freetype.bat
54871
54872    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54873      # If that succeeds we also build freetype.lib
54874      $ECHO -e "@echo off\n"\
54875          "$MSBUILD $vcxproj_path "\
54876          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54877          "/p:Configuration=\"Release Multithreaded\" "\
54878          "/p:Platform=$freetype_platform "\
54879          "/p:ConfigurationType=StaticLibrary "\
54880          "/p:TargetName=freetype "\
54881          "/p:OutDir=\"$freetype_lib_path\" "\
54882          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54883      cmd /c freetype.bat
54884
54885      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54886        # Once we build both, lib and dll, set freetype lib and include path appropriately
54887        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54888        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54889        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54890$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54891      else
54892        BUILD_FREETYPE=no
54893      fi
54894    else
54895      BUILD_FREETYPE=no
54896    fi
54897  fi
54898
54899              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54900
54901  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54902  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54903  METHOD="well-known location"
54904
54905  # Let's start with an optimistic view of the world :-)
54906  FOUND_FREETYPE=yes
54907
54908  # First look for the canonical freetype main include file ft2build.h.
54909  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54910    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54911    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54912    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54913      # Fail.
54914      FOUND_FREETYPE=no
54915    fi
54916  fi
54917
54918  if test "x$FOUND_FREETYPE" = xyes; then
54919    # Include file found, let's continue the sanity check.
54920    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54921$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54922
54923    # Reset to default value
54924    FREETYPE_BASE_NAME=freetype
54925    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54926    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54927      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54928          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54929        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54930        # for the .6 version explicitly.
54931        FREETYPE_BASE_NAME=freetype.6
54932        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54933        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54934$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54935      else
54936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54937$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54938        FOUND_FREETYPE=no
54939      fi
54940    else
54941      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54942        # On Windows, we will need both .lib and .dll file.
54943        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54944          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54945$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54946          FOUND_FREETYPE=no
54947        fi
54948      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54949          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54950        # Found lib in isa dir, use that instead.
54951        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54952        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54953$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54954      fi
54955    fi
54956  fi
54957
54958  if test "x$FOUND_FREETYPE" = xyes; then
54959
54960  # Only process if variable expands to non-empty
54961
54962  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54964
54965  # Input might be given as Windows format, start by converting to
54966  # unix format.
54967  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54968  new_path=`$CYGPATH -u "$path"`
54969
54970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54973  # "foo.exe" is OK but "foo" is an error.
54974  #
54975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54976  # It is also a way to make sure we got the proper file name for the real test later on.
54977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54978  if test "x$test_shortpath" = x; then
54979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54980$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54981    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54982  fi
54983
54984  # Call helper function which possibly converts this using DOS-style short mode.
54985  # If so, the updated path is stored in $new_path.
54986
54987  input_path="$new_path"
54988  # Check if we need to convert this using DOS-style short mode. If the path
54989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54990  # take no chances and rewrite it.
54991  # Note: m4 eats our [], so we need to use [ and ] instead.
54992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54993  if test "x$has_forbidden_chars" != x; then
54994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54998      # Going to short mode and back again did indeed matter. Since short mode is
54999      # case insensitive, let's make it lowercase to improve readability.
55000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55001      # Now convert it back to Unix-style (cygpath)
55002      input_path=`$CYGPATH -u "$shortmode_path"`
55003      new_path="$input_path"
55004    fi
55005  fi
55006
55007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55008  if test "x$test_cygdrive_prefix" = x; then
55009    # As a simple fix, exclude /usr/bin since it's not a real path.
55010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55012      # a path prefixed by /cygdrive for fixpath to work.
55013      new_path="$CYGWIN_ROOT_PATH$input_path"
55014    fi
55015  fi
55016
55017
55018  if test "x$path" != "x$new_path"; then
55019    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55021$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55022  fi
55023
55024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55025
55026  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55027  has_colon=`$ECHO $path | $GREP ^.:`
55028  new_path="$path"
55029  if test "x$has_colon" = x; then
55030    # Not in mixed or Windows style, start by that.
55031    new_path=`cmd //c echo $path`
55032  fi
55033
55034
55035  input_path="$new_path"
55036  # Check if we need to convert this using DOS-style short mode. If the path
55037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55038  # take no chances and rewrite it.
55039  # Note: m4 eats our [], so we need to use [ and ] instead.
55040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55041  if test "x$has_forbidden_chars" != x; then
55042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55044  fi
55045
55046
55047  windows_path="$new_path"
55048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55049    unix_path=`$CYGPATH -u "$windows_path"`
55050    new_path="$unix_path"
55051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55053    new_path="$unix_path"
55054  fi
55055
55056  if test "x$path" != "x$new_path"; then
55057    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55060  fi
55061
55062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55064
55065    else
55066      # We're on a unix platform. Hooray! :)
55067      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55068      has_space=`$ECHO "$path" | $GREP " "`
55069      if test "x$has_space" != x; then
55070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55073      fi
55074
55075      # Use eval to expand a potential ~
55076      eval path="$path"
55077      if test ! -f "$path" && test ! -d "$path"; then
55078        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55079      fi
55080
55081      if test -d "$path"; then
55082        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55083      else
55084        dir="`$DIRNAME "$path"`"
55085        base="`$BASENAME "$path"`"
55086        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55087      fi
55088    fi
55089  fi
55090
55091
55092  # Only process if variable expands to non-empty
55093
55094  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55096
55097  # Input might be given as Windows format, start by converting to
55098  # unix format.
55099  path="$POTENTIAL_FREETYPE_LIB_PATH"
55100  new_path=`$CYGPATH -u "$path"`
55101
55102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55105  # "foo.exe" is OK but "foo" is an error.
55106  #
55107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55108  # It is also a way to make sure we got the proper file name for the real test later on.
55109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55110  if test "x$test_shortpath" = x; then
55111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55113    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55114  fi
55115
55116  # Call helper function which possibly converts this using DOS-style short mode.
55117  # If so, the updated path is stored in $new_path.
55118
55119  input_path="$new_path"
55120  # Check if we need to convert this using DOS-style short mode. If the path
55121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55122  # take no chances and rewrite it.
55123  # Note: m4 eats our [], so we need to use [ and ] instead.
55124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55125  if test "x$has_forbidden_chars" != x; then
55126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55130      # Going to short mode and back again did indeed matter. Since short mode is
55131      # case insensitive, let's make it lowercase to improve readability.
55132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55133      # Now convert it back to Unix-style (cygpath)
55134      input_path=`$CYGPATH -u "$shortmode_path"`
55135      new_path="$input_path"
55136    fi
55137  fi
55138
55139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55140  if test "x$test_cygdrive_prefix" = x; then
55141    # As a simple fix, exclude /usr/bin since it's not a real path.
55142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55144      # a path prefixed by /cygdrive for fixpath to work.
55145      new_path="$CYGWIN_ROOT_PATH$input_path"
55146    fi
55147  fi
55148
55149
55150  if test "x$path" != "x$new_path"; then
55151    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55154  fi
55155
55156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55157
55158  path="$POTENTIAL_FREETYPE_LIB_PATH"
55159  has_colon=`$ECHO $path | $GREP ^.:`
55160  new_path="$path"
55161  if test "x$has_colon" = x; then
55162    # Not in mixed or Windows style, start by that.
55163    new_path=`cmd //c echo $path`
55164  fi
55165
55166
55167  input_path="$new_path"
55168  # Check if we need to convert this using DOS-style short mode. If the path
55169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55170  # take no chances and rewrite it.
55171  # Note: m4 eats our [], so we need to use [ and ] instead.
55172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55173  if test "x$has_forbidden_chars" != x; then
55174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55176  fi
55177
55178
55179  windows_path="$new_path"
55180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55181    unix_path=`$CYGPATH -u "$windows_path"`
55182    new_path="$unix_path"
55183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55185    new_path="$unix_path"
55186  fi
55187
55188  if test "x$path" != "x$new_path"; then
55189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55192  fi
55193
55194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55196
55197    else
55198      # We're on a unix platform. Hooray! :)
55199      path="$POTENTIAL_FREETYPE_LIB_PATH"
55200      has_space=`$ECHO "$path" | $GREP " "`
55201      if test "x$has_space" != x; then
55202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55205      fi
55206
55207      # Use eval to expand a potential ~
55208      eval path="$path"
55209      if test ! -f "$path" && test ! -d "$path"; then
55210        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55211      fi
55212
55213      if test -d "$path"; then
55214        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55215      else
55216        dir="`$DIRNAME "$path"`"
55217        base="`$BASENAME "$path"`"
55218        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55219      fi
55220    fi
55221  fi
55222
55223
55224    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55226$as_echo_n "checking for freetype includes... " >&6; }
55227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55228$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55229    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55231$as_echo_n "checking for freetype libraries... " >&6; }
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55233$as_echo "$FREETYPE_LIB_PATH" >&6; }
55234  fi
55235
55236              else
55237
55238  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55239  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55240  METHOD="well-known location"
55241
55242  # Let's start with an optimistic view of the world :-)
55243  FOUND_FREETYPE=yes
55244
55245  # First look for the canonical freetype main include file ft2build.h.
55246  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55247    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55248    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55249    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55250      # Fail.
55251      FOUND_FREETYPE=no
55252    fi
55253  fi
55254
55255  if test "x$FOUND_FREETYPE" = xyes; then
55256    # Include file found, let's continue the sanity check.
55257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55258$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55259
55260    # Reset to default value
55261    FREETYPE_BASE_NAME=freetype
55262    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55263    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55264      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55265          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55266        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55267        # for the .6 version explicitly.
55268        FREETYPE_BASE_NAME=freetype.6
55269        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55270        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55271$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55272      else
55273        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55274$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55275        FOUND_FREETYPE=no
55276      fi
55277    else
55278      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55279        # On Windows, we will need both .lib and .dll file.
55280        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55281          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55282$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55283          FOUND_FREETYPE=no
55284        fi
55285      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55286          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55287        # Found lib in isa dir, use that instead.
55288        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55289        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55290$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55291      fi
55292    fi
55293  fi
55294
55295  if test "x$FOUND_FREETYPE" = xyes; then
55296
55297  # Only process if variable expands to non-empty
55298
55299  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55301
55302  # Input might be given as Windows format, start by converting to
55303  # unix format.
55304  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55305  new_path=`$CYGPATH -u "$path"`
55306
55307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55310  # "foo.exe" is OK but "foo" is an error.
55311  #
55312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55313  # It is also a way to make sure we got the proper file name for the real test later on.
55314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55315  if test "x$test_shortpath" = x; then
55316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55318    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55319  fi
55320
55321  # Call helper function which possibly converts this using DOS-style short mode.
55322  # If so, the updated path is stored in $new_path.
55323
55324  input_path="$new_path"
55325  # Check if we need to convert this using DOS-style short mode. If the path
55326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55327  # take no chances and rewrite it.
55328  # Note: m4 eats our [], so we need to use [ and ] instead.
55329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55330  if test "x$has_forbidden_chars" != x; then
55331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55335      # Going to short mode and back again did indeed matter. Since short mode is
55336      # case insensitive, let's make it lowercase to improve readability.
55337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55338      # Now convert it back to Unix-style (cygpath)
55339      input_path=`$CYGPATH -u "$shortmode_path"`
55340      new_path="$input_path"
55341    fi
55342  fi
55343
55344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55345  if test "x$test_cygdrive_prefix" = x; then
55346    # As a simple fix, exclude /usr/bin since it's not a real path.
55347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55349      # a path prefixed by /cygdrive for fixpath to work.
55350      new_path="$CYGWIN_ROOT_PATH$input_path"
55351    fi
55352  fi
55353
55354
55355  if test "x$path" != "x$new_path"; then
55356    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55359  fi
55360
55361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55362
55363  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55364  has_colon=`$ECHO $path | $GREP ^.:`
55365  new_path="$path"
55366  if test "x$has_colon" = x; then
55367    # Not in mixed or Windows style, start by that.
55368    new_path=`cmd //c echo $path`
55369  fi
55370
55371
55372  input_path="$new_path"
55373  # Check if we need to convert this using DOS-style short mode. If the path
55374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55375  # take no chances and rewrite it.
55376  # Note: m4 eats our [], so we need to use [ and ] instead.
55377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55378  if test "x$has_forbidden_chars" != x; then
55379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55381  fi
55382
55383
55384  windows_path="$new_path"
55385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55386    unix_path=`$CYGPATH -u "$windows_path"`
55387    new_path="$unix_path"
55388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55390    new_path="$unix_path"
55391  fi
55392
55393  if test "x$path" != "x$new_path"; then
55394    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55396$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55397  fi
55398
55399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55401
55402    else
55403      # We're on a unix platform. Hooray! :)
55404      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55405      has_space=`$ECHO "$path" | $GREP " "`
55406      if test "x$has_space" != x; then
55407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55410      fi
55411
55412      # Use eval to expand a potential ~
55413      eval path="$path"
55414      if test ! -f "$path" && test ! -d "$path"; then
55415        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55416      fi
55417
55418      if test -d "$path"; then
55419        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55420      else
55421        dir="`$DIRNAME "$path"`"
55422        base="`$BASENAME "$path"`"
55423        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55424      fi
55425    fi
55426  fi
55427
55428
55429  # Only process if variable expands to non-empty
55430
55431  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55433
55434  # Input might be given as Windows format, start by converting to
55435  # unix format.
55436  path="$POTENTIAL_FREETYPE_LIB_PATH"
55437  new_path=`$CYGPATH -u "$path"`
55438
55439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55442  # "foo.exe" is OK but "foo" is an error.
55443  #
55444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55445  # It is also a way to make sure we got the proper file name for the real test later on.
55446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55447  if test "x$test_shortpath" = x; then
55448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55449$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55450    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55451  fi
55452
55453  # Call helper function which possibly converts this using DOS-style short mode.
55454  # If so, the updated path is stored in $new_path.
55455
55456  input_path="$new_path"
55457  # Check if we need to convert this using DOS-style short mode. If the path
55458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55459  # take no chances and rewrite it.
55460  # Note: m4 eats our [], so we need to use [ and ] instead.
55461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55462  if test "x$has_forbidden_chars" != x; then
55463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55467      # Going to short mode and back again did indeed matter. Since short mode is
55468      # case insensitive, let's make it lowercase to improve readability.
55469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55470      # Now convert it back to Unix-style (cygpath)
55471      input_path=`$CYGPATH -u "$shortmode_path"`
55472      new_path="$input_path"
55473    fi
55474  fi
55475
55476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55477  if test "x$test_cygdrive_prefix" = x; then
55478    # As a simple fix, exclude /usr/bin since it's not a real path.
55479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55481      # a path prefixed by /cygdrive for fixpath to work.
55482      new_path="$CYGWIN_ROOT_PATH$input_path"
55483    fi
55484  fi
55485
55486
55487  if test "x$path" != "x$new_path"; then
55488    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55490$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55491  fi
55492
55493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55494
55495  path="$POTENTIAL_FREETYPE_LIB_PATH"
55496  has_colon=`$ECHO $path | $GREP ^.:`
55497  new_path="$path"
55498  if test "x$has_colon" = x; then
55499    # Not in mixed or Windows style, start by that.
55500    new_path=`cmd //c echo $path`
55501  fi
55502
55503
55504  input_path="$new_path"
55505  # Check if we need to convert this using DOS-style short mode. If the path
55506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55507  # take no chances and rewrite it.
55508  # Note: m4 eats our [], so we need to use [ and ] instead.
55509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55510  if test "x$has_forbidden_chars" != x; then
55511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55513  fi
55514
55515
55516  windows_path="$new_path"
55517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55518    unix_path=`$CYGPATH -u "$windows_path"`
55519    new_path="$unix_path"
55520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55522    new_path="$unix_path"
55523  fi
55524
55525  if test "x$path" != "x$new_path"; then
55526    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55528$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55529  fi
55530
55531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55533
55534    else
55535      # We're on a unix platform. Hooray! :)
55536      path="$POTENTIAL_FREETYPE_LIB_PATH"
55537      has_space=`$ECHO "$path" | $GREP " "`
55538      if test "x$has_space" != x; then
55539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55540$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55542      fi
55543
55544      # Use eval to expand a potential ~
55545      eval path="$path"
55546      if test ! -f "$path" && test ! -d "$path"; then
55547        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55548      fi
55549
55550      if test -d "$path"; then
55551        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55552      else
55553        dir="`$DIRNAME "$path"`"
55554        base="`$BASENAME "$path"`"
55555        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55556      fi
55557    fi
55558  fi
55559
55560
55561    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55563$as_echo_n "checking for freetype includes... " >&6; }
55564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55565$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55566    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55568$as_echo_n "checking for freetype libraries... " >&6; }
55569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55570$as_echo "$FREETYPE_LIB_PATH" >&6; }
55571  fi
55572
55573              fi
55574            fi
55575          fi
55576        else
55577          FREETYPE_BASE_DIR="$SYSROOT/usr"
55578
55579  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55580  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55581  METHOD="well-known location"
55582
55583  # Let's start with an optimistic view of the world :-)
55584  FOUND_FREETYPE=yes
55585
55586  # First look for the canonical freetype main include file ft2build.h.
55587  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55588    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55589    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55590    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55591      # Fail.
55592      FOUND_FREETYPE=no
55593    fi
55594  fi
55595
55596  if test "x$FOUND_FREETYPE" = xyes; then
55597    # Include file found, let's continue the sanity check.
55598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55599$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55600
55601    # Reset to default value
55602    FREETYPE_BASE_NAME=freetype
55603    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55604    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55605      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55606          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55607        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55608        # for the .6 version explicitly.
55609        FREETYPE_BASE_NAME=freetype.6
55610        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55611        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55612$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55613      else
55614        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55615$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55616        FOUND_FREETYPE=no
55617      fi
55618    else
55619      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55620        # On Windows, we will need both .lib and .dll file.
55621        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55622          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55623$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55624          FOUND_FREETYPE=no
55625        fi
55626      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55627          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55628        # Found lib in isa dir, use that instead.
55629        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55630        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55631$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55632      fi
55633    fi
55634  fi
55635
55636  if test "x$FOUND_FREETYPE" = xyes; then
55637
55638  # Only process if variable expands to non-empty
55639
55640  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55642
55643  # Input might be given as Windows format, start by converting to
55644  # unix format.
55645  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55646  new_path=`$CYGPATH -u "$path"`
55647
55648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55651  # "foo.exe" is OK but "foo" is an error.
55652  #
55653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55654  # It is also a way to make sure we got the proper file name for the real test later on.
55655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55656  if test "x$test_shortpath" = x; then
55657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55658$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55659    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55660  fi
55661
55662  # Call helper function which possibly converts this using DOS-style short mode.
55663  # If so, the updated path is stored in $new_path.
55664
55665  input_path="$new_path"
55666  # Check if we need to convert this using DOS-style short mode. If the path
55667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55668  # take no chances and rewrite it.
55669  # Note: m4 eats our [], so we need to use [ and ] instead.
55670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55671  if test "x$has_forbidden_chars" != x; then
55672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55676      # Going to short mode and back again did indeed matter. Since short mode is
55677      # case insensitive, let's make it lowercase to improve readability.
55678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55679      # Now convert it back to Unix-style (cygpath)
55680      input_path=`$CYGPATH -u "$shortmode_path"`
55681      new_path="$input_path"
55682    fi
55683  fi
55684
55685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55686  if test "x$test_cygdrive_prefix" = x; then
55687    # As a simple fix, exclude /usr/bin since it's not a real path.
55688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55690      # a path prefixed by /cygdrive for fixpath to work.
55691      new_path="$CYGWIN_ROOT_PATH$input_path"
55692    fi
55693  fi
55694
55695
55696  if test "x$path" != "x$new_path"; then
55697    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55700  fi
55701
55702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55703
55704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55705  has_colon=`$ECHO $path | $GREP ^.:`
55706  new_path="$path"
55707  if test "x$has_colon" = x; then
55708    # Not in mixed or Windows style, start by that.
55709    new_path=`cmd //c echo $path`
55710  fi
55711
55712
55713  input_path="$new_path"
55714  # Check if we need to convert this using DOS-style short mode. If the path
55715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55716  # take no chances and rewrite it.
55717  # Note: m4 eats our [], so we need to use [ and ] instead.
55718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55719  if test "x$has_forbidden_chars" != x; then
55720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55722  fi
55723
55724
55725  windows_path="$new_path"
55726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55727    unix_path=`$CYGPATH -u "$windows_path"`
55728    new_path="$unix_path"
55729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55731    new_path="$unix_path"
55732  fi
55733
55734  if test "x$path" != "x$new_path"; then
55735    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55738  fi
55739
55740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55742
55743    else
55744      # We're on a unix platform. Hooray! :)
55745      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55746      has_space=`$ECHO "$path" | $GREP " "`
55747      if test "x$has_space" != x; then
55748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55751      fi
55752
55753      # Use eval to expand a potential ~
55754      eval path="$path"
55755      if test ! -f "$path" && test ! -d "$path"; then
55756        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55757      fi
55758
55759      if test -d "$path"; then
55760        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55761      else
55762        dir="`$DIRNAME "$path"`"
55763        base="`$BASENAME "$path"`"
55764        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55765      fi
55766    fi
55767  fi
55768
55769
55770  # Only process if variable expands to non-empty
55771
55772  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55774
55775  # Input might be given as Windows format, start by converting to
55776  # unix format.
55777  path="$POTENTIAL_FREETYPE_LIB_PATH"
55778  new_path=`$CYGPATH -u "$path"`
55779
55780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55783  # "foo.exe" is OK but "foo" is an error.
55784  #
55785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55786  # It is also a way to make sure we got the proper file name for the real test later on.
55787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55788  if test "x$test_shortpath" = x; then
55789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55791    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55792  fi
55793
55794  # Call helper function which possibly converts this using DOS-style short mode.
55795  # If so, the updated path is stored in $new_path.
55796
55797  input_path="$new_path"
55798  # Check if we need to convert this using DOS-style short mode. If the path
55799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55800  # take no chances and rewrite it.
55801  # Note: m4 eats our [], so we need to use [ and ] instead.
55802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55803  if test "x$has_forbidden_chars" != x; then
55804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55808      # Going to short mode and back again did indeed matter. Since short mode is
55809      # case insensitive, let's make it lowercase to improve readability.
55810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55811      # Now convert it back to Unix-style (cygpath)
55812      input_path=`$CYGPATH -u "$shortmode_path"`
55813      new_path="$input_path"
55814    fi
55815  fi
55816
55817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55818  if test "x$test_cygdrive_prefix" = x; then
55819    # As a simple fix, exclude /usr/bin since it's not a real path.
55820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55822      # a path prefixed by /cygdrive for fixpath to work.
55823      new_path="$CYGWIN_ROOT_PATH$input_path"
55824    fi
55825  fi
55826
55827
55828  if test "x$path" != "x$new_path"; then
55829    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55832  fi
55833
55834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55835
55836  path="$POTENTIAL_FREETYPE_LIB_PATH"
55837  has_colon=`$ECHO $path | $GREP ^.:`
55838  new_path="$path"
55839  if test "x$has_colon" = x; then
55840    # Not in mixed or Windows style, start by that.
55841    new_path=`cmd //c echo $path`
55842  fi
55843
55844
55845  input_path="$new_path"
55846  # Check if we need to convert this using DOS-style short mode. If the path
55847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55848  # take no chances and rewrite it.
55849  # Note: m4 eats our [], so we need to use [ and ] instead.
55850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55851  if test "x$has_forbidden_chars" != x; then
55852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55854  fi
55855
55856
55857  windows_path="$new_path"
55858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55859    unix_path=`$CYGPATH -u "$windows_path"`
55860    new_path="$unix_path"
55861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55863    new_path="$unix_path"
55864  fi
55865
55866  if test "x$path" != "x$new_path"; then
55867    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55870  fi
55871
55872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55874
55875    else
55876      # We're on a unix platform. Hooray! :)
55877      path="$POTENTIAL_FREETYPE_LIB_PATH"
55878      has_space=`$ECHO "$path" | $GREP " "`
55879      if test "x$has_space" != x; then
55880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55883      fi
55884
55885      # Use eval to expand a potential ~
55886      eval path="$path"
55887      if test ! -f "$path" && test ! -d "$path"; then
55888        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55889      fi
55890
55891      if test -d "$path"; then
55892        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55893      else
55894        dir="`$DIRNAME "$path"`"
55895        base="`$BASENAME "$path"`"
55896        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55897      fi
55898    fi
55899  fi
55900
55901
55902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55904$as_echo_n "checking for freetype includes... " >&6; }
55905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55909$as_echo_n "checking for freetype libraries... " >&6; }
55910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55911$as_echo "$FREETYPE_LIB_PATH" >&6; }
55912  fi
55913
55914
55915          if test "x$FOUND_FREETYPE" != xyes; then
55916            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55917
55918  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55919  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55920  METHOD="well-known location"
55921
55922  # Let's start with an optimistic view of the world :-)
55923  FOUND_FREETYPE=yes
55924
55925  # First look for the canonical freetype main include file ft2build.h.
55926  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55927    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55928    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55929    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55930      # Fail.
55931      FOUND_FREETYPE=no
55932    fi
55933  fi
55934
55935  if test "x$FOUND_FREETYPE" = xyes; then
55936    # Include file found, let's continue the sanity check.
55937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55938$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55939
55940    # Reset to default value
55941    FREETYPE_BASE_NAME=freetype
55942    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55943    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55944      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55945          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55946        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55947        # for the .6 version explicitly.
55948        FREETYPE_BASE_NAME=freetype.6
55949        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55950        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55951$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55952      else
55953        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55954$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55955        FOUND_FREETYPE=no
55956      fi
55957    else
55958      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55959        # On Windows, we will need both .lib and .dll file.
55960        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55961          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55962$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55963          FOUND_FREETYPE=no
55964        fi
55965      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55966          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55967        # Found lib in isa dir, use that instead.
55968        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55969        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55970$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55971      fi
55972    fi
55973  fi
55974
55975  if test "x$FOUND_FREETYPE" = xyes; then
55976
55977  # Only process if variable expands to non-empty
55978
55979  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55981
55982  # Input might be given as Windows format, start by converting to
55983  # unix format.
55984  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55985  new_path=`$CYGPATH -u "$path"`
55986
55987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55990  # "foo.exe" is OK but "foo" is an error.
55991  #
55992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55993  # It is also a way to make sure we got the proper file name for the real test later on.
55994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55995  if test "x$test_shortpath" = x; then
55996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55998    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55999  fi
56000
56001  # Call helper function which possibly converts this using DOS-style short mode.
56002  # If so, the updated path is stored in $new_path.
56003
56004  input_path="$new_path"
56005  # Check if we need to convert this using DOS-style short mode. If the path
56006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56007  # take no chances and rewrite it.
56008  # Note: m4 eats our [], so we need to use [ and ] instead.
56009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56010  if test "x$has_forbidden_chars" != x; then
56011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56015      # Going to short mode and back again did indeed matter. Since short mode is
56016      # case insensitive, let's make it lowercase to improve readability.
56017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56018      # Now convert it back to Unix-style (cygpath)
56019      input_path=`$CYGPATH -u "$shortmode_path"`
56020      new_path="$input_path"
56021    fi
56022  fi
56023
56024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56025  if test "x$test_cygdrive_prefix" = x; then
56026    # As a simple fix, exclude /usr/bin since it's not a real path.
56027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56029      # a path prefixed by /cygdrive for fixpath to work.
56030      new_path="$CYGWIN_ROOT_PATH$input_path"
56031    fi
56032  fi
56033
56034
56035  if test "x$path" != "x$new_path"; then
56036    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56038$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56039  fi
56040
56041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56042
56043  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56044  has_colon=`$ECHO $path | $GREP ^.:`
56045  new_path="$path"
56046  if test "x$has_colon" = x; then
56047    # Not in mixed or Windows style, start by that.
56048    new_path=`cmd //c echo $path`
56049  fi
56050
56051
56052  input_path="$new_path"
56053  # Check if we need to convert this using DOS-style short mode. If the path
56054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56055  # take no chances and rewrite it.
56056  # Note: m4 eats our [], so we need to use [ and ] instead.
56057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56058  if test "x$has_forbidden_chars" != x; then
56059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56061  fi
56062
56063
56064  windows_path="$new_path"
56065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56066    unix_path=`$CYGPATH -u "$windows_path"`
56067    new_path="$unix_path"
56068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56070    new_path="$unix_path"
56071  fi
56072
56073  if test "x$path" != "x$new_path"; then
56074    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56077  fi
56078
56079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56081
56082    else
56083      # We're on a unix platform. Hooray! :)
56084      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56085      has_space=`$ECHO "$path" | $GREP " "`
56086      if test "x$has_space" != x; then
56087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56090      fi
56091
56092      # Use eval to expand a potential ~
56093      eval path="$path"
56094      if test ! -f "$path" && test ! -d "$path"; then
56095        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56096      fi
56097
56098      if test -d "$path"; then
56099        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56100      else
56101        dir="`$DIRNAME "$path"`"
56102        base="`$BASENAME "$path"`"
56103        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56104      fi
56105    fi
56106  fi
56107
56108
56109  # Only process if variable expands to non-empty
56110
56111  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56113
56114  # Input might be given as Windows format, start by converting to
56115  # unix format.
56116  path="$POTENTIAL_FREETYPE_LIB_PATH"
56117  new_path=`$CYGPATH -u "$path"`
56118
56119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56122  # "foo.exe" is OK but "foo" is an error.
56123  #
56124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56125  # It is also a way to make sure we got the proper file name for the real test later on.
56126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56127  if test "x$test_shortpath" = x; then
56128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56129$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56130    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56131  fi
56132
56133  # Call helper function which possibly converts this using DOS-style short mode.
56134  # If so, the updated path is stored in $new_path.
56135
56136  input_path="$new_path"
56137  # Check if we need to convert this using DOS-style short mode. If the path
56138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56139  # take no chances and rewrite it.
56140  # Note: m4 eats our [], so we need to use [ and ] instead.
56141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56142  if test "x$has_forbidden_chars" != x; then
56143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56147      # Going to short mode and back again did indeed matter. Since short mode is
56148      # case insensitive, let's make it lowercase to improve readability.
56149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56150      # Now convert it back to Unix-style (cygpath)
56151      input_path=`$CYGPATH -u "$shortmode_path"`
56152      new_path="$input_path"
56153    fi
56154  fi
56155
56156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56157  if test "x$test_cygdrive_prefix" = x; then
56158    # As a simple fix, exclude /usr/bin since it's not a real path.
56159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56161      # a path prefixed by /cygdrive for fixpath to work.
56162      new_path="$CYGWIN_ROOT_PATH$input_path"
56163    fi
56164  fi
56165
56166
56167  if test "x$path" != "x$new_path"; then
56168    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56171  fi
56172
56173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56174
56175  path="$POTENTIAL_FREETYPE_LIB_PATH"
56176  has_colon=`$ECHO $path | $GREP ^.:`
56177  new_path="$path"
56178  if test "x$has_colon" = x; then
56179    # Not in mixed or Windows style, start by that.
56180    new_path=`cmd //c echo $path`
56181  fi
56182
56183
56184  input_path="$new_path"
56185  # Check if we need to convert this using DOS-style short mode. If the path
56186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56187  # take no chances and rewrite it.
56188  # Note: m4 eats our [], so we need to use [ and ] instead.
56189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56190  if test "x$has_forbidden_chars" != x; then
56191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56193  fi
56194
56195
56196  windows_path="$new_path"
56197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56198    unix_path=`$CYGPATH -u "$windows_path"`
56199    new_path="$unix_path"
56200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56202    new_path="$unix_path"
56203  fi
56204
56205  if test "x$path" != "x$new_path"; then
56206    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56208$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56209  fi
56210
56211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56213
56214    else
56215      # We're on a unix platform. Hooray! :)
56216      path="$POTENTIAL_FREETYPE_LIB_PATH"
56217      has_space=`$ECHO "$path" | $GREP " "`
56218      if test "x$has_space" != x; then
56219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56220$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56222      fi
56223
56224      # Use eval to expand a potential ~
56225      eval path="$path"
56226      if test ! -f "$path" && test ! -d "$path"; then
56227        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56228      fi
56229
56230      if test -d "$path"; then
56231        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56232      else
56233        dir="`$DIRNAME "$path"`"
56234        base="`$BASENAME "$path"`"
56235        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56236      fi
56237    fi
56238  fi
56239
56240
56241    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56243$as_echo_n "checking for freetype includes... " >&6; }
56244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56245$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56246    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56248$as_echo_n "checking for freetype libraries... " >&6; }
56249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56250$as_echo "$FREETYPE_LIB_PATH" >&6; }
56251  fi
56252
56253          fi
56254
56255          if test "x$FOUND_FREETYPE" != xyes; then
56256            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
56257
56258  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56259  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56260  METHOD="well-known location"
56261
56262  # Let's start with an optimistic view of the world :-)
56263  FOUND_FREETYPE=yes
56264
56265  # First look for the canonical freetype main include file ft2build.h.
56266  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56267    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56268    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56269    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56270      # Fail.
56271      FOUND_FREETYPE=no
56272    fi
56273  fi
56274
56275  if test "x$FOUND_FREETYPE" = xyes; then
56276    # Include file found, let's continue the sanity check.
56277    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56278$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56279
56280    # Reset to default value
56281    FREETYPE_BASE_NAME=freetype
56282    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56283    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56284      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56285          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56286        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56287        # for the .6 version explicitly.
56288        FREETYPE_BASE_NAME=freetype.6
56289        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56290        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56291$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56292      else
56293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56294$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56295        FOUND_FREETYPE=no
56296      fi
56297    else
56298      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56299        # On Windows, we will need both .lib and .dll file.
56300        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56301          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56303          FOUND_FREETYPE=no
56304        fi
56305      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56306          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56307        # Found lib in isa dir, use that instead.
56308        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56309        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56310$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56311      fi
56312    fi
56313  fi
56314
56315  if test "x$FOUND_FREETYPE" = xyes; then
56316
56317  # Only process if variable expands to non-empty
56318
56319  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56321
56322  # Input might be given as Windows format, start by converting to
56323  # unix format.
56324  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56325  new_path=`$CYGPATH -u "$path"`
56326
56327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56330  # "foo.exe" is OK but "foo" is an error.
56331  #
56332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56333  # It is also a way to make sure we got the proper file name for the real test later on.
56334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56335  if test "x$test_shortpath" = x; then
56336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56338    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56339  fi
56340
56341  # Call helper function which possibly converts this using DOS-style short mode.
56342  # If so, the updated path is stored in $new_path.
56343
56344  input_path="$new_path"
56345  # Check if we need to convert this using DOS-style short mode. If the path
56346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56347  # take no chances and rewrite it.
56348  # Note: m4 eats our [], so we need to use [ and ] instead.
56349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56350  if test "x$has_forbidden_chars" != x; then
56351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56355      # Going to short mode and back again did indeed matter. Since short mode is
56356      # case insensitive, let's make it lowercase to improve readability.
56357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56358      # Now convert it back to Unix-style (cygpath)
56359      input_path=`$CYGPATH -u "$shortmode_path"`
56360      new_path="$input_path"
56361    fi
56362  fi
56363
56364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56365  if test "x$test_cygdrive_prefix" = x; then
56366    # As a simple fix, exclude /usr/bin since it's not a real path.
56367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56369      # a path prefixed by /cygdrive for fixpath to work.
56370      new_path="$CYGWIN_ROOT_PATH$input_path"
56371    fi
56372  fi
56373
56374
56375  if test "x$path" != "x$new_path"; then
56376    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56379  fi
56380
56381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56382
56383  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56384  has_colon=`$ECHO $path | $GREP ^.:`
56385  new_path="$path"
56386  if test "x$has_colon" = x; then
56387    # Not in mixed or Windows style, start by that.
56388    new_path=`cmd //c echo $path`
56389  fi
56390
56391
56392  input_path="$new_path"
56393  # Check if we need to convert this using DOS-style short mode. If the path
56394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56395  # take no chances and rewrite it.
56396  # Note: m4 eats our [], so we need to use [ and ] instead.
56397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56398  if test "x$has_forbidden_chars" != x; then
56399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56401  fi
56402
56403
56404  windows_path="$new_path"
56405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56406    unix_path=`$CYGPATH -u "$windows_path"`
56407    new_path="$unix_path"
56408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56410    new_path="$unix_path"
56411  fi
56412
56413  if test "x$path" != "x$new_path"; then
56414    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56417  fi
56418
56419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56421
56422    else
56423      # We're on a unix platform. Hooray! :)
56424      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56425      has_space=`$ECHO "$path" | $GREP " "`
56426      if test "x$has_space" != x; then
56427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56428$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56430      fi
56431
56432      # Use eval to expand a potential ~
56433      eval path="$path"
56434      if test ! -f "$path" && test ! -d "$path"; then
56435        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56436      fi
56437
56438      if test -d "$path"; then
56439        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56440      else
56441        dir="`$DIRNAME "$path"`"
56442        base="`$BASENAME "$path"`"
56443        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56444      fi
56445    fi
56446  fi
56447
56448
56449  # Only process if variable expands to non-empty
56450
56451  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56452    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56453
56454  # Input might be given as Windows format, start by converting to
56455  # unix format.
56456  path="$POTENTIAL_FREETYPE_LIB_PATH"
56457  new_path=`$CYGPATH -u "$path"`
56458
56459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56462  # "foo.exe" is OK but "foo" is an error.
56463  #
56464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56465  # It is also a way to make sure we got the proper file name for the real test later on.
56466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56467  if test "x$test_shortpath" = x; then
56468    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56469$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56470    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56471  fi
56472
56473  # Call helper function which possibly converts this using DOS-style short mode.
56474  # If so, the updated path is stored in $new_path.
56475
56476  input_path="$new_path"
56477  # Check if we need to convert this using DOS-style short mode. If the path
56478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56479  # take no chances and rewrite it.
56480  # Note: m4 eats our [], so we need to use [ and ] instead.
56481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56482  if test "x$has_forbidden_chars" != x; then
56483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56487      # Going to short mode and back again did indeed matter. Since short mode is
56488      # case insensitive, let's make it lowercase to improve readability.
56489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56490      # Now convert it back to Unix-style (cygpath)
56491      input_path=`$CYGPATH -u "$shortmode_path"`
56492      new_path="$input_path"
56493    fi
56494  fi
56495
56496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56497  if test "x$test_cygdrive_prefix" = x; then
56498    # As a simple fix, exclude /usr/bin since it's not a real path.
56499    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56501      # a path prefixed by /cygdrive for fixpath to work.
56502      new_path="$CYGWIN_ROOT_PATH$input_path"
56503    fi
56504  fi
56505
56506
56507  if test "x$path" != "x$new_path"; then
56508    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56511  fi
56512
56513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56514
56515  path="$POTENTIAL_FREETYPE_LIB_PATH"
56516  has_colon=`$ECHO $path | $GREP ^.:`
56517  new_path="$path"
56518  if test "x$has_colon" = x; then
56519    # Not in mixed or Windows style, start by that.
56520    new_path=`cmd //c echo $path`
56521  fi
56522
56523
56524  input_path="$new_path"
56525  # Check if we need to convert this using DOS-style short mode. If the path
56526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56527  # take no chances and rewrite it.
56528  # Note: m4 eats our [], so we need to use [ and ] instead.
56529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56530  if test "x$has_forbidden_chars" != x; then
56531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56533  fi
56534
56535
56536  windows_path="$new_path"
56537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56538    unix_path=`$CYGPATH -u "$windows_path"`
56539    new_path="$unix_path"
56540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56542    new_path="$unix_path"
56543  fi
56544
56545  if test "x$path" != "x$new_path"; then
56546    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56548$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56549  fi
56550
56551  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56552  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56553
56554    else
56555      # We're on a unix platform. Hooray! :)
56556      path="$POTENTIAL_FREETYPE_LIB_PATH"
56557      has_space=`$ECHO "$path" | $GREP " "`
56558      if test "x$has_space" != x; then
56559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56560$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56561        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56562      fi
56563
56564      # Use eval to expand a potential ~
56565      eval path="$path"
56566      if test ! -f "$path" && test ! -d "$path"; then
56567        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56568      fi
56569
56570      if test -d "$path"; then
56571        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56572      else
56573        dir="`$DIRNAME "$path"`"
56574        base="`$BASENAME "$path"`"
56575        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56576      fi
56577    fi
56578  fi
56579
56580
56581    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56583$as_echo_n "checking for freetype includes... " >&6; }
56584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56585$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56586    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56588$as_echo_n "checking for freetype libraries... " >&6; }
56589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56590$as_echo "$FREETYPE_LIB_PATH" >&6; }
56591  fi
56592
56593          fi
56594
56595          if test "x$FOUND_FREETYPE" != xyes; then
56596            FREETYPE_BASE_DIR="$SYSROOT/usr"
56597            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56598
56599  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56600  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56601  METHOD="well-known location"
56602
56603  # Let's start with an optimistic view of the world :-)
56604  FOUND_FREETYPE=yes
56605
56606  # First look for the canonical freetype main include file ft2build.h.
56607  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56608    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56609    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56610    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56611      # Fail.
56612      FOUND_FREETYPE=no
56613    fi
56614  fi
56615
56616  if test "x$FOUND_FREETYPE" = xyes; then
56617    # Include file found, let's continue the sanity check.
56618    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56619$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56620
56621    # Reset to default value
56622    FREETYPE_BASE_NAME=freetype
56623    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56624    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56625      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56626          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56627        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56628        # for the .6 version explicitly.
56629        FREETYPE_BASE_NAME=freetype.6
56630        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56631        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56632$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56633      else
56634        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56636        FOUND_FREETYPE=no
56637      fi
56638    else
56639      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56640        # On Windows, we will need both .lib and .dll file.
56641        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56642          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56643$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56644          FOUND_FREETYPE=no
56645        fi
56646      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56647          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56648        # Found lib in isa dir, use that instead.
56649        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56650        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56651$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56652      fi
56653    fi
56654  fi
56655
56656  if test "x$FOUND_FREETYPE" = xyes; then
56657
56658  # Only process if variable expands to non-empty
56659
56660  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56662
56663  # Input might be given as Windows format, start by converting to
56664  # unix format.
56665  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56666  new_path=`$CYGPATH -u "$path"`
56667
56668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56671  # "foo.exe" is OK but "foo" is an error.
56672  #
56673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56674  # It is also a way to make sure we got the proper file name for the real test later on.
56675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56676  if test "x$test_shortpath" = x; then
56677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56680  fi
56681
56682  # Call helper function which possibly converts this using DOS-style short mode.
56683  # If so, the updated path is stored in $new_path.
56684
56685  input_path="$new_path"
56686  # Check if we need to convert this using DOS-style short mode. If the path
56687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56688  # take no chances and rewrite it.
56689  # Note: m4 eats our [], so we need to use [ and ] instead.
56690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56691  if test "x$has_forbidden_chars" != x; then
56692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56696      # Going to short mode and back again did indeed matter. Since short mode is
56697      # case insensitive, let's make it lowercase to improve readability.
56698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56699      # Now convert it back to Unix-style (cygpath)
56700      input_path=`$CYGPATH -u "$shortmode_path"`
56701      new_path="$input_path"
56702    fi
56703  fi
56704
56705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56706  if test "x$test_cygdrive_prefix" = x; then
56707    # As a simple fix, exclude /usr/bin since it's not a real path.
56708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56710      # a path prefixed by /cygdrive for fixpath to work.
56711      new_path="$CYGWIN_ROOT_PATH$input_path"
56712    fi
56713  fi
56714
56715
56716  if test "x$path" != "x$new_path"; then
56717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56720  fi
56721
56722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56723
56724  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56725  has_colon=`$ECHO $path | $GREP ^.:`
56726  new_path="$path"
56727  if test "x$has_colon" = x; then
56728    # Not in mixed or Windows style, start by that.
56729    new_path=`cmd //c echo $path`
56730  fi
56731
56732
56733  input_path="$new_path"
56734  # Check if we need to convert this using DOS-style short mode. If the path
56735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56736  # take no chances and rewrite it.
56737  # Note: m4 eats our [], so we need to use [ and ] instead.
56738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56739  if test "x$has_forbidden_chars" != x; then
56740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56742  fi
56743
56744
56745  windows_path="$new_path"
56746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56747    unix_path=`$CYGPATH -u "$windows_path"`
56748    new_path="$unix_path"
56749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56751    new_path="$unix_path"
56752  fi
56753
56754  if test "x$path" != "x$new_path"; then
56755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56758  fi
56759
56760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56762
56763    else
56764      # We're on a unix platform. Hooray! :)
56765      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56766      has_space=`$ECHO "$path" | $GREP " "`
56767      if test "x$has_space" != x; then
56768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56771      fi
56772
56773      # Use eval to expand a potential ~
56774      eval path="$path"
56775      if test ! -f "$path" && test ! -d "$path"; then
56776        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56777      fi
56778
56779      if test -d "$path"; then
56780        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56781      else
56782        dir="`$DIRNAME "$path"`"
56783        base="`$BASENAME "$path"`"
56784        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56785      fi
56786    fi
56787  fi
56788
56789
56790  # Only process if variable expands to non-empty
56791
56792  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56794
56795  # Input might be given as Windows format, start by converting to
56796  # unix format.
56797  path="$POTENTIAL_FREETYPE_LIB_PATH"
56798  new_path=`$CYGPATH -u "$path"`
56799
56800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56803  # "foo.exe" is OK but "foo" is an error.
56804  #
56805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56806  # It is also a way to make sure we got the proper file name for the real test later on.
56807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56808  if test "x$test_shortpath" = x; then
56809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56811    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56812  fi
56813
56814  # Call helper function which possibly converts this using DOS-style short mode.
56815  # If so, the updated path is stored in $new_path.
56816
56817  input_path="$new_path"
56818  # Check if we need to convert this using DOS-style short mode. If the path
56819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56820  # take no chances and rewrite it.
56821  # Note: m4 eats our [], so we need to use [ and ] instead.
56822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56823  if test "x$has_forbidden_chars" != x; then
56824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56828      # Going to short mode and back again did indeed matter. Since short mode is
56829      # case insensitive, let's make it lowercase to improve readability.
56830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56831      # Now convert it back to Unix-style (cygpath)
56832      input_path=`$CYGPATH -u "$shortmode_path"`
56833      new_path="$input_path"
56834    fi
56835  fi
56836
56837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56838  if test "x$test_cygdrive_prefix" = x; then
56839    # As a simple fix, exclude /usr/bin since it's not a real path.
56840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56842      # a path prefixed by /cygdrive for fixpath to work.
56843      new_path="$CYGWIN_ROOT_PATH$input_path"
56844    fi
56845  fi
56846
56847
56848  if test "x$path" != "x$new_path"; then
56849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56852  fi
56853
56854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56855
56856  path="$POTENTIAL_FREETYPE_LIB_PATH"
56857  has_colon=`$ECHO $path | $GREP ^.:`
56858  new_path="$path"
56859  if test "x$has_colon" = x; then
56860    # Not in mixed or Windows style, start by that.
56861    new_path=`cmd //c echo $path`
56862  fi
56863
56864
56865  input_path="$new_path"
56866  # Check if we need to convert this using DOS-style short mode. If the path
56867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56868  # take no chances and rewrite it.
56869  # Note: m4 eats our [], so we need to use [ and ] instead.
56870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56871  if test "x$has_forbidden_chars" != x; then
56872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56874  fi
56875
56876
56877  windows_path="$new_path"
56878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56879    unix_path=`$CYGPATH -u "$windows_path"`
56880    new_path="$unix_path"
56881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56883    new_path="$unix_path"
56884  fi
56885
56886  if test "x$path" != "x$new_path"; then
56887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56890  fi
56891
56892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56894
56895    else
56896      # We're on a unix platform. Hooray! :)
56897      path="$POTENTIAL_FREETYPE_LIB_PATH"
56898      has_space=`$ECHO "$path" | $GREP " "`
56899      if test "x$has_space" != x; then
56900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56903      fi
56904
56905      # Use eval to expand a potential ~
56906      eval path="$path"
56907      if test ! -f "$path" && test ! -d "$path"; then
56908        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56909      fi
56910
56911      if test -d "$path"; then
56912        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56913      else
56914        dir="`$DIRNAME "$path"`"
56915        base="`$BASENAME "$path"`"
56916        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56917      fi
56918    fi
56919  fi
56920
56921
56922    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56924$as_echo_n "checking for freetype includes... " >&6; }
56925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56926$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56927    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56929$as_echo_n "checking for freetype libraries... " >&6; }
56930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56931$as_echo "$FREETYPE_LIB_PATH" >&6; }
56932  fi
56933
56934            else
56935
56936  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56937  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56938  METHOD="well-known location"
56939
56940  # Let's start with an optimistic view of the world :-)
56941  FOUND_FREETYPE=yes
56942
56943  # First look for the canonical freetype main include file ft2build.h.
56944  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56945    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56946    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56947    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56948      # Fail.
56949      FOUND_FREETYPE=no
56950    fi
56951  fi
56952
56953  if test "x$FOUND_FREETYPE" = xyes; then
56954    # Include file found, let's continue the sanity check.
56955    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56956$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56957
56958    # Reset to default value
56959    FREETYPE_BASE_NAME=freetype
56960    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56961    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56962      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56963          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56964        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56965        # for the .6 version explicitly.
56966        FREETYPE_BASE_NAME=freetype.6
56967        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56968        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56969$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56970      else
56971        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56973        FOUND_FREETYPE=no
56974      fi
56975    else
56976      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56977        # On Windows, we will need both .lib and .dll file.
56978        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56979          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56980$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56981          FOUND_FREETYPE=no
56982        fi
56983      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56984          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56985        # Found lib in isa dir, use that instead.
56986        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56987        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56988$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56989      fi
56990    fi
56991  fi
56992
56993  if test "x$FOUND_FREETYPE" = xyes; then
56994
56995  # Only process if variable expands to non-empty
56996
56997  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56999
57000  # Input might be given as Windows format, start by converting to
57001  # unix format.
57002  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57003  new_path=`$CYGPATH -u "$path"`
57004
57005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57008  # "foo.exe" is OK but "foo" is an error.
57009  #
57010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57011  # It is also a way to make sure we got the proper file name for the real test later on.
57012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57013  if test "x$test_shortpath" = x; then
57014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57016    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57017  fi
57018
57019  # Call helper function which possibly converts this using DOS-style short mode.
57020  # If so, the updated path is stored in $new_path.
57021
57022  input_path="$new_path"
57023  # Check if we need to convert this using DOS-style short mode. If the path
57024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57025  # take no chances and rewrite it.
57026  # Note: m4 eats our [], so we need to use [ and ] instead.
57027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57028  if test "x$has_forbidden_chars" != x; then
57029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57033      # Going to short mode and back again did indeed matter. Since short mode is
57034      # case insensitive, let's make it lowercase to improve readability.
57035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57036      # Now convert it back to Unix-style (cygpath)
57037      input_path=`$CYGPATH -u "$shortmode_path"`
57038      new_path="$input_path"
57039    fi
57040  fi
57041
57042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57043  if test "x$test_cygdrive_prefix" = x; then
57044    # As a simple fix, exclude /usr/bin since it's not a real path.
57045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57047      # a path prefixed by /cygdrive for fixpath to work.
57048      new_path="$CYGWIN_ROOT_PATH$input_path"
57049    fi
57050  fi
57051
57052
57053  if test "x$path" != "x$new_path"; then
57054    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57057  fi
57058
57059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57060
57061  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57062  has_colon=`$ECHO $path | $GREP ^.:`
57063  new_path="$path"
57064  if test "x$has_colon" = x; then
57065    # Not in mixed or Windows style, start by that.
57066    new_path=`cmd //c echo $path`
57067  fi
57068
57069
57070  input_path="$new_path"
57071  # Check if we need to convert this using DOS-style short mode. If the path
57072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57073  # take no chances and rewrite it.
57074  # Note: m4 eats our [], so we need to use [ and ] instead.
57075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57076  if test "x$has_forbidden_chars" != x; then
57077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57079  fi
57080
57081
57082  windows_path="$new_path"
57083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57084    unix_path=`$CYGPATH -u "$windows_path"`
57085    new_path="$unix_path"
57086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57088    new_path="$unix_path"
57089  fi
57090
57091  if test "x$path" != "x$new_path"; then
57092    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57095  fi
57096
57097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57099
57100    else
57101      # We're on a unix platform. Hooray! :)
57102      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57103      has_space=`$ECHO "$path" | $GREP " "`
57104      if test "x$has_space" != x; then
57105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57108      fi
57109
57110      # Use eval to expand a potential ~
57111      eval path="$path"
57112      if test ! -f "$path" && test ! -d "$path"; then
57113        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57114      fi
57115
57116      if test -d "$path"; then
57117        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57118      else
57119        dir="`$DIRNAME "$path"`"
57120        base="`$BASENAME "$path"`"
57121        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57122      fi
57123    fi
57124  fi
57125
57126
57127  # Only process if variable expands to non-empty
57128
57129  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57131
57132  # Input might be given as Windows format, start by converting to
57133  # unix format.
57134  path="$POTENTIAL_FREETYPE_LIB_PATH"
57135  new_path=`$CYGPATH -u "$path"`
57136
57137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57140  # "foo.exe" is OK but "foo" is an error.
57141  #
57142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57143  # It is also a way to make sure we got the proper file name for the real test later on.
57144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57145  if test "x$test_shortpath" = x; then
57146    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57147$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57148    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57149  fi
57150
57151  # Call helper function which possibly converts this using DOS-style short mode.
57152  # If so, the updated path is stored in $new_path.
57153
57154  input_path="$new_path"
57155  # Check if we need to convert this using DOS-style short mode. If the path
57156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57157  # take no chances and rewrite it.
57158  # Note: m4 eats our [], so we need to use [ and ] instead.
57159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57160  if test "x$has_forbidden_chars" != x; then
57161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57165      # Going to short mode and back again did indeed matter. Since short mode is
57166      # case insensitive, let's make it lowercase to improve readability.
57167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57168      # Now convert it back to Unix-style (cygpath)
57169      input_path=`$CYGPATH -u "$shortmode_path"`
57170      new_path="$input_path"
57171    fi
57172  fi
57173
57174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57175  if test "x$test_cygdrive_prefix" = x; then
57176    # As a simple fix, exclude /usr/bin since it's not a real path.
57177    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57179      # a path prefixed by /cygdrive for fixpath to work.
57180      new_path="$CYGWIN_ROOT_PATH$input_path"
57181    fi
57182  fi
57183
57184
57185  if test "x$path" != "x$new_path"; then
57186    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57188$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57189  fi
57190
57191    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57192
57193  path="$POTENTIAL_FREETYPE_LIB_PATH"
57194  has_colon=`$ECHO $path | $GREP ^.:`
57195  new_path="$path"
57196  if test "x$has_colon" = x; then
57197    # Not in mixed or Windows style, start by that.
57198    new_path=`cmd //c echo $path`
57199  fi
57200
57201
57202  input_path="$new_path"
57203  # Check if we need to convert this using DOS-style short mode. If the path
57204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57205  # take no chances and rewrite it.
57206  # Note: m4 eats our [], so we need to use [ and ] instead.
57207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57208  if test "x$has_forbidden_chars" != x; then
57209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57211  fi
57212
57213
57214  windows_path="$new_path"
57215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57216    unix_path=`$CYGPATH -u "$windows_path"`
57217    new_path="$unix_path"
57218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57220    new_path="$unix_path"
57221  fi
57222
57223  if test "x$path" != "x$new_path"; then
57224    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57226$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57227  fi
57228
57229  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57230  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57231
57232    else
57233      # We're on a unix platform. Hooray! :)
57234      path="$POTENTIAL_FREETYPE_LIB_PATH"
57235      has_space=`$ECHO "$path" | $GREP " "`
57236      if test "x$has_space" != x; then
57237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57238$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57239        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57240      fi
57241
57242      # Use eval to expand a potential ~
57243      eval path="$path"
57244      if test ! -f "$path" && test ! -d "$path"; then
57245        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57246      fi
57247
57248      if test -d "$path"; then
57249        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57250      else
57251        dir="`$DIRNAME "$path"`"
57252        base="`$BASENAME "$path"`"
57253        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57254      fi
57255    fi
57256  fi
57257
57258
57259    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57261$as_echo_n "checking for freetype includes... " >&6; }
57262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57263$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57264    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57266$as_echo_n "checking for freetype libraries... " >&6; }
57267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57268$as_echo "$FREETYPE_LIB_PATH" >&6; }
57269  fi
57270
57271              if test "x$FOUND_FREETYPE" != xyes; then
57272
57273  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57274  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
57275  METHOD="well-known location"
57276
57277  # Let's start with an optimistic view of the world :-)
57278  FOUND_FREETYPE=yes
57279
57280  # First look for the canonical freetype main include file ft2build.h.
57281  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57282    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57283    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57284    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57285      # Fail.
57286      FOUND_FREETYPE=no
57287    fi
57288  fi
57289
57290  if test "x$FOUND_FREETYPE" = xyes; then
57291    # Include file found, let's continue the sanity check.
57292    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57293$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57294
57295    # Reset to default value
57296    FREETYPE_BASE_NAME=freetype
57297    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57298    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57299      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57300          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57301        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57302        # for the .6 version explicitly.
57303        FREETYPE_BASE_NAME=freetype.6
57304        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57305        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57306$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57307      else
57308        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57309$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57310        FOUND_FREETYPE=no
57311      fi
57312    else
57313      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57314        # On Windows, we will need both .lib and .dll file.
57315        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57316          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57317$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57318          FOUND_FREETYPE=no
57319        fi
57320      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57321          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57322        # Found lib in isa dir, use that instead.
57323        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57324        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57325$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57326      fi
57327    fi
57328  fi
57329
57330  if test "x$FOUND_FREETYPE" = xyes; then
57331
57332  # Only process if variable expands to non-empty
57333
57334  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57336
57337  # Input might be given as Windows format, start by converting to
57338  # unix format.
57339  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57340  new_path=`$CYGPATH -u "$path"`
57341
57342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57345  # "foo.exe" is OK but "foo" is an error.
57346  #
57347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57348  # It is also a way to make sure we got the proper file name for the real test later on.
57349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57350  if test "x$test_shortpath" = x; then
57351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57352$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57353    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57354  fi
57355
57356  # Call helper function which possibly converts this using DOS-style short mode.
57357  # If so, the updated path is stored in $new_path.
57358
57359  input_path="$new_path"
57360  # Check if we need to convert this using DOS-style short mode. If the path
57361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57362  # take no chances and rewrite it.
57363  # Note: m4 eats our [], so we need to use [ and ] instead.
57364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57365  if test "x$has_forbidden_chars" != x; then
57366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57370      # Going to short mode and back again did indeed matter. Since short mode is
57371      # case insensitive, let's make it lowercase to improve readability.
57372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57373      # Now convert it back to Unix-style (cygpath)
57374      input_path=`$CYGPATH -u "$shortmode_path"`
57375      new_path="$input_path"
57376    fi
57377  fi
57378
57379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57380  if test "x$test_cygdrive_prefix" = x; then
57381    # As a simple fix, exclude /usr/bin since it's not a real path.
57382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57384      # a path prefixed by /cygdrive for fixpath to work.
57385      new_path="$CYGWIN_ROOT_PATH$input_path"
57386    fi
57387  fi
57388
57389
57390  if test "x$path" != "x$new_path"; then
57391    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57393$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57394  fi
57395
57396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57397
57398  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57399  has_colon=`$ECHO $path | $GREP ^.:`
57400  new_path="$path"
57401  if test "x$has_colon" = x; then
57402    # Not in mixed or Windows style, start by that.
57403    new_path=`cmd //c echo $path`
57404  fi
57405
57406
57407  input_path="$new_path"
57408  # Check if we need to convert this using DOS-style short mode. If the path
57409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57410  # take no chances and rewrite it.
57411  # Note: m4 eats our [], so we need to use [ and ] instead.
57412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57413  if test "x$has_forbidden_chars" != x; then
57414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57416  fi
57417
57418
57419  windows_path="$new_path"
57420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57421    unix_path=`$CYGPATH -u "$windows_path"`
57422    new_path="$unix_path"
57423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57425    new_path="$unix_path"
57426  fi
57427
57428  if test "x$path" != "x$new_path"; then
57429    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57431$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57432  fi
57433
57434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57436
57437    else
57438      # We're on a unix platform. Hooray! :)
57439      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57440      has_space=`$ECHO "$path" | $GREP " "`
57441      if test "x$has_space" != x; then
57442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57444        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57445      fi
57446
57447      # Use eval to expand a potential ~
57448      eval path="$path"
57449      if test ! -f "$path" && test ! -d "$path"; then
57450        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57451      fi
57452
57453      if test -d "$path"; then
57454        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57455      else
57456        dir="`$DIRNAME "$path"`"
57457        base="`$BASENAME "$path"`"
57458        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57459      fi
57460    fi
57461  fi
57462
57463
57464  # Only process if variable expands to non-empty
57465
57466  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57468
57469  # Input might be given as Windows format, start by converting to
57470  # unix format.
57471  path="$POTENTIAL_FREETYPE_LIB_PATH"
57472  new_path=`$CYGPATH -u "$path"`
57473
57474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57477  # "foo.exe" is OK but "foo" is an error.
57478  #
57479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57480  # It is also a way to make sure we got the proper file name for the real test later on.
57481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57482  if test "x$test_shortpath" = x; then
57483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57485    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57486  fi
57487
57488  # Call helper function which possibly converts this using DOS-style short mode.
57489  # If so, the updated path is stored in $new_path.
57490
57491  input_path="$new_path"
57492  # Check if we need to convert this using DOS-style short mode. If the path
57493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57494  # take no chances and rewrite it.
57495  # Note: m4 eats our [], so we need to use [ and ] instead.
57496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57497  if test "x$has_forbidden_chars" != x; then
57498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57502      # Going to short mode and back again did indeed matter. Since short mode is
57503      # case insensitive, let's make it lowercase to improve readability.
57504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57505      # Now convert it back to Unix-style (cygpath)
57506      input_path=`$CYGPATH -u "$shortmode_path"`
57507      new_path="$input_path"
57508    fi
57509  fi
57510
57511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57512  if test "x$test_cygdrive_prefix" = x; then
57513    # As a simple fix, exclude /usr/bin since it's not a real path.
57514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57516      # a path prefixed by /cygdrive for fixpath to work.
57517      new_path="$CYGWIN_ROOT_PATH$input_path"
57518    fi
57519  fi
57520
57521
57522  if test "x$path" != "x$new_path"; then
57523    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57525$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57526  fi
57527
57528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57529
57530  path="$POTENTIAL_FREETYPE_LIB_PATH"
57531  has_colon=`$ECHO $path | $GREP ^.:`
57532  new_path="$path"
57533  if test "x$has_colon" = x; then
57534    # Not in mixed or Windows style, start by that.
57535    new_path=`cmd //c echo $path`
57536  fi
57537
57538
57539  input_path="$new_path"
57540  # Check if we need to convert this using DOS-style short mode. If the path
57541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57542  # take no chances and rewrite it.
57543  # Note: m4 eats our [], so we need to use [ and ] instead.
57544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57545  if test "x$has_forbidden_chars" != x; then
57546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57548  fi
57549
57550
57551  windows_path="$new_path"
57552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57553    unix_path=`$CYGPATH -u "$windows_path"`
57554    new_path="$unix_path"
57555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57557    new_path="$unix_path"
57558  fi
57559
57560  if test "x$path" != "x$new_path"; then
57561    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57563$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57564  fi
57565
57566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57568
57569    else
57570      # We're on a unix platform. Hooray! :)
57571      path="$POTENTIAL_FREETYPE_LIB_PATH"
57572      has_space=`$ECHO "$path" | $GREP " "`
57573      if test "x$has_space" != x; then
57574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57577      fi
57578
57579      # Use eval to expand a potential ~
57580      eval path="$path"
57581      if test ! -f "$path" && test ! -d "$path"; then
57582        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57583      fi
57584
57585      if test -d "$path"; then
57586        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57587      else
57588        dir="`$DIRNAME "$path"`"
57589        base="`$BASENAME "$path"`"
57590        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57591      fi
57592    fi
57593  fi
57594
57595
57596    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57598$as_echo_n "checking for freetype includes... " >&6; }
57599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57600$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57601    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57603$as_echo_n "checking for freetype libraries... " >&6; }
57604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57605$as_echo "$FREETYPE_LIB_PATH" >&6; }
57606  fi
57607
57608              fi
57609            fi
57610          fi
57611        fi
57612      fi # end check in well-known locations
57613
57614      if test "x$FOUND_FREETYPE" != xyes; then
57615
57616  # Print a helpful message on how to acquire the necessary build dependency.
57617  # freetype is the help tag: freetype, cups, alsa etc
57618  MISSING_DEPENDENCY=freetype
57619
57620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57621    cygwin_help $MISSING_DEPENDENCY
57622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57623    msys_help $MISSING_DEPENDENCY
57624  else
57625    PKGHANDLER_COMMAND=
57626
57627    case $PKGHANDLER in
57628      apt-get)
57629        apt_help     $MISSING_DEPENDENCY ;;
57630      yum)
57631        yum_help     $MISSING_DEPENDENCY ;;
57632      port)
57633        port_help    $MISSING_DEPENDENCY ;;
57634      pkgutil)
57635        pkgutil_help $MISSING_DEPENDENCY ;;
57636      pkgadd)
57637        pkgadd_help  $MISSING_DEPENDENCY ;;
57638    esac
57639
57640    if test "x$PKGHANDLER_COMMAND" != x; then
57641      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57642    fi
57643  fi
57644
57645        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57646      fi
57647    fi # end user specified settings
57648
57649    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57650    if test "x$FREETYPE_CFLAGS" = x; then
57651
57652  # Only process if variable expands to non-empty
57653
57654  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57656
57657  # Input might be given as Windows format, start by converting to
57658  # unix format.
57659  path="$FREETYPE_INCLUDE_PATH"
57660  new_path=`$CYGPATH -u "$path"`
57661
57662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57665  # "foo.exe" is OK but "foo" is an error.
57666  #
57667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57668  # It is also a way to make sure we got the proper file name for the real test later on.
57669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57670  if test "x$test_shortpath" = x; then
57671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57672$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57673    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57674  fi
57675
57676  # Call helper function which possibly converts this using DOS-style short mode.
57677  # If so, the updated path is stored in $new_path.
57678
57679  input_path="$new_path"
57680  # Check if we need to convert this using DOS-style short mode. If the path
57681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57682  # take no chances and rewrite it.
57683  # Note: m4 eats our [], so we need to use [ and ] instead.
57684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57685  if test "x$has_forbidden_chars" != x; then
57686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57690      # Going to short mode and back again did indeed matter. Since short mode is
57691      # case insensitive, let's make it lowercase to improve readability.
57692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57693      # Now convert it back to Unix-style (cygpath)
57694      input_path=`$CYGPATH -u "$shortmode_path"`
57695      new_path="$input_path"
57696    fi
57697  fi
57698
57699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57700  if test "x$test_cygdrive_prefix" = x; then
57701    # As a simple fix, exclude /usr/bin since it's not a real path.
57702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57704      # a path prefixed by /cygdrive for fixpath to work.
57705      new_path="$CYGWIN_ROOT_PATH$input_path"
57706    fi
57707  fi
57708
57709
57710  if test "x$path" != "x$new_path"; then
57711    FREETYPE_INCLUDE_PATH="$new_path"
57712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57713$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57714  fi
57715
57716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57717
57718  path="$FREETYPE_INCLUDE_PATH"
57719  has_colon=`$ECHO $path | $GREP ^.:`
57720  new_path="$path"
57721  if test "x$has_colon" = x; then
57722    # Not in mixed or Windows style, start by that.
57723    new_path=`cmd //c echo $path`
57724  fi
57725
57726
57727  input_path="$new_path"
57728  # Check if we need to convert this using DOS-style short mode. If the path
57729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57730  # take no chances and rewrite it.
57731  # Note: m4 eats our [], so we need to use [ and ] instead.
57732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57733  if test "x$has_forbidden_chars" != x; then
57734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57736  fi
57737
57738
57739  windows_path="$new_path"
57740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57741    unix_path=`$CYGPATH -u "$windows_path"`
57742    new_path="$unix_path"
57743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57745    new_path="$unix_path"
57746  fi
57747
57748  if test "x$path" != "x$new_path"; then
57749    FREETYPE_INCLUDE_PATH="$new_path"
57750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57751$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57752  fi
57753
57754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57756
57757    else
57758      # We're on a unix platform. Hooray! :)
57759      path="$FREETYPE_INCLUDE_PATH"
57760      has_space=`$ECHO "$path" | $GREP " "`
57761      if test "x$has_space" != x; then
57762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57763$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57765      fi
57766
57767      # Use eval to expand a potential ~
57768      eval path="$path"
57769      if test ! -f "$path" && test ! -d "$path"; then
57770        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57771      fi
57772
57773      if test -d "$path"; then
57774        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57775      else
57776        dir="`$DIRNAME "$path"`"
57777        base="`$BASENAME "$path"`"
57778        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57779      fi
57780    fi
57781  fi
57782
57783      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57784        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57785      else
57786        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57787      fi
57788    fi
57789
57790    if test "x$FREETYPE_LIBS" = x; then
57791
57792  # Only process if variable expands to non-empty
57793
57794  if test "x$FREETYPE_LIB_PATH" != x; then
57795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57796
57797  # Input might be given as Windows format, start by converting to
57798  # unix format.
57799  path="$FREETYPE_LIB_PATH"
57800  new_path=`$CYGPATH -u "$path"`
57801
57802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57805  # "foo.exe" is OK but "foo" is an error.
57806  #
57807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57808  # It is also a way to make sure we got the proper file name for the real test later on.
57809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57810  if test "x$test_shortpath" = x; then
57811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57812$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57813    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57814  fi
57815
57816  # Call helper function which possibly converts this using DOS-style short mode.
57817  # If so, the updated path is stored in $new_path.
57818
57819  input_path="$new_path"
57820  # Check if we need to convert this using DOS-style short mode. If the path
57821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57822  # take no chances and rewrite it.
57823  # Note: m4 eats our [], so we need to use [ and ] instead.
57824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57825  if test "x$has_forbidden_chars" != x; then
57826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57830      # Going to short mode and back again did indeed matter. Since short mode is
57831      # case insensitive, let's make it lowercase to improve readability.
57832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57833      # Now convert it back to Unix-style (cygpath)
57834      input_path=`$CYGPATH -u "$shortmode_path"`
57835      new_path="$input_path"
57836    fi
57837  fi
57838
57839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57840  if test "x$test_cygdrive_prefix" = x; then
57841    # As a simple fix, exclude /usr/bin since it's not a real path.
57842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57844      # a path prefixed by /cygdrive for fixpath to work.
57845      new_path="$CYGWIN_ROOT_PATH$input_path"
57846    fi
57847  fi
57848
57849
57850  if test "x$path" != "x$new_path"; then
57851    FREETYPE_LIB_PATH="$new_path"
57852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57853$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57854  fi
57855
57856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57857
57858  path="$FREETYPE_LIB_PATH"
57859  has_colon=`$ECHO $path | $GREP ^.:`
57860  new_path="$path"
57861  if test "x$has_colon" = x; then
57862    # Not in mixed or Windows style, start by that.
57863    new_path=`cmd //c echo $path`
57864  fi
57865
57866
57867  input_path="$new_path"
57868  # Check if we need to convert this using DOS-style short mode. If the path
57869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57870  # take no chances and rewrite it.
57871  # Note: m4 eats our [], so we need to use [ and ] instead.
57872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57873  if test "x$has_forbidden_chars" != x; then
57874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57876  fi
57877
57878
57879  windows_path="$new_path"
57880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57881    unix_path=`$CYGPATH -u "$windows_path"`
57882    new_path="$unix_path"
57883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57885    new_path="$unix_path"
57886  fi
57887
57888  if test "x$path" != "x$new_path"; then
57889    FREETYPE_LIB_PATH="$new_path"
57890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57891$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57892  fi
57893
57894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57896
57897    else
57898      # We're on a unix platform. Hooray! :)
57899      path="$FREETYPE_LIB_PATH"
57900      has_space=`$ECHO "$path" | $GREP " "`
57901      if test "x$has_space" != x; then
57902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57903$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57905      fi
57906
57907      # Use eval to expand a potential ~
57908      eval path="$path"
57909      if test ! -f "$path" && test ! -d "$path"; then
57910        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57911      fi
57912
57913      if test -d "$path"; then
57914        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57915      else
57916        dir="`$DIRNAME "$path"`"
57917        base="`$BASENAME "$path"`"
57918        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57919      fi
57920    fi
57921  fi
57922
57923      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57924        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57925      else
57926        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57927      fi
57928    fi
57929
57930    # Try to compile it
57931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57932$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57933    ac_ext=cpp
57934ac_cpp='$CXXCPP $CPPFLAGS'
57935ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57936ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57937ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57938
57939    PREV_CXXCFLAGS="$CXXFLAGS"
57940    PREV_LIBS="$LIBS"
57941    PREV_CXX="$CXX"
57942    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57943    LIBS="$LIBS $FREETYPE_LIBS"
57944    CXX="$FIXPATH $CXX"
57945    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57946/* end confdefs.h.  */
57947
57948          #include<ft2build.h>
57949          #include FT_FREETYPE_H
57950          int main () {
57951            FT_Init_FreeType(NULL);
57952            return 0;
57953          }
57954
57955_ACEOF
57956if ac_fn_cxx_try_link "$LINENO"; then :
57957
57958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57959$as_echo "yes" >&6; }
57960
57961else
57962
57963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57964$as_echo "no" >&6; }
57965          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57966$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57967          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57968$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57969
57970
57971  # Print a helpful message on how to acquire the necessary build dependency.
57972  # freetype is the help tag: freetype, cups, alsa etc
57973  MISSING_DEPENDENCY=freetype
57974
57975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57976    cygwin_help $MISSING_DEPENDENCY
57977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57978    msys_help $MISSING_DEPENDENCY
57979  else
57980    PKGHANDLER_COMMAND=
57981
57982    case $PKGHANDLER in
57983      apt-get)
57984        apt_help     $MISSING_DEPENDENCY ;;
57985      yum)
57986        yum_help     $MISSING_DEPENDENCY ;;
57987      port)
57988        port_help    $MISSING_DEPENDENCY ;;
57989      pkgutil)
57990        pkgutil_help $MISSING_DEPENDENCY ;;
57991      pkgadd)
57992        pkgadd_help  $MISSING_DEPENDENCY ;;
57993    esac
57994
57995    if test "x$PKGHANDLER_COMMAND" != x; then
57996      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57997    fi
57998  fi
57999
58000
58001          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
58002
58003
58004fi
58005rm -f core conftest.err conftest.$ac_objext \
58006    conftest$ac_exeext conftest.$ac_ext
58007    CXXCFLAGS="$PREV_CXXFLAGS"
58008    LIBS="$PREV_LIBS"
58009    CXX="$PREV_CXX"
58010    ac_ext=cpp
58011ac_cpp='$CXXCPP $CPPFLAGS'
58012ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58013ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58014ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58015
58016
58017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
58018$as_echo_n "checking if we should bundle freetype... " >&6; }
58019    if test "x$BUNDLE_FREETYPE" = xyes; then
58020      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
58021    fi
58022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
58023$as_echo "$BUNDLE_FREETYPE" >&6; }
58024
58025  fi # end freetype needed
58026
58027
58028
58029
58030
58031
58032
58033# Check whether --with-alsa was given.
58034if test "${with_alsa+set}" = set; then :
58035  withval=$with_alsa;
58036fi
58037
58038
58039# Check whether --with-alsa-include was given.
58040if test "${with_alsa_include+set}" = set; then :
58041  withval=$with_alsa_include;
58042fi
58043
58044
58045# Check whether --with-alsa-lib was given.
58046if test "${with_alsa_lib+set}" = set; then :
58047  withval=$with_alsa_lib;
58048fi
58049
58050
58051  if test "x$NEEDS_LIB_ALSA" = xfalse; then
58052    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
58053        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
58054        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
58055      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
58056$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
58057    fi
58058    ALSA_CFLAGS=
58059    ALSA_LIBS=
58060  else
58061    ALSA_FOUND=no
58062
58063    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
58064      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
58065    fi
58066
58067    if test "x${with_alsa}" != x; then
58068      ALSA_LIBS="-L${with_alsa}/lib -lasound"
58069      ALSA_CFLAGS="-I${with_alsa}/include"
58070      ALSA_FOUND=yes
58071    fi
58072    if test "x${with_alsa_include}" != x; then
58073      ALSA_CFLAGS="-I${with_alsa_include}"
58074      ALSA_FOUND=yes
58075    fi
58076    if test "x${with_alsa_lib}" != x; then
58077      ALSA_LIBS="-L${with_alsa_lib} -lasound"
58078      ALSA_FOUND=yes
58079    fi
58080    # Do not try pkg-config if we have a sysroot set.
58081    if test "x$SYSROOT" = x; then
58082      if test "x$ALSA_FOUND" = xno; then
58083
58084pkg_failed=no
58085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
58086$as_echo_n "checking for ALSA... " >&6; }
58087
58088if test -n "$ALSA_CFLAGS"; then
58089    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
58090 elif test -n "$PKG_CONFIG"; then
58091    if test -n "$PKG_CONFIG" && \
58092    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
58093  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
58094  ac_status=$?
58095  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58096  test $ac_status = 0; }; then
58097  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
58098else
58099  pkg_failed=yes
58100fi
58101 else
58102    pkg_failed=untried
58103fi
58104if test -n "$ALSA_LIBS"; then
58105    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
58106 elif test -n "$PKG_CONFIG"; then
58107    if test -n "$PKG_CONFIG" && \
58108    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
58109  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
58110  ac_status=$?
58111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58112  test $ac_status = 0; }; then
58113  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
58114else
58115  pkg_failed=yes
58116fi
58117 else
58118    pkg_failed=untried
58119fi
58120
58121
58122
58123if test $pkg_failed = yes; then
58124
58125if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58126        _pkg_short_errors_supported=yes
58127else
58128        _pkg_short_errors_supported=no
58129fi
58130        if test $_pkg_short_errors_supported = yes; then
58131	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
58132        else
58133	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
58134        fi
58135	# Put the nasty error message in config.log where it belongs
58136	echo "$ALSA_PKG_ERRORS" >&5
58137
58138	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58139$as_echo "no" >&6; }
58140                ALSA_FOUND=no
58141elif test $pkg_failed = untried; then
58142	ALSA_FOUND=no
58143else
58144	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
58145	ALSA_LIBS=$pkg_cv_ALSA_LIBS
58146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58147$as_echo "yes" >&6; }
58148	ALSA_FOUND=yes
58149fi
58150      fi
58151    fi
58152    if test "x$ALSA_FOUND" = xno; then
58153      for ac_header in alsa/asoundlib.h
58154do :
58155  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
58156if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
58157  cat >>confdefs.h <<_ACEOF
58158#define HAVE_ALSA_ASOUNDLIB_H 1
58159_ACEOF
58160
58161            ALSA_FOUND=yes
58162            ALSA_CFLAGS=-Iignoreme
58163            ALSA_LIBS=-lasound
58164            DEFAULT_ALSA=yes
58165
58166else
58167  ALSA_FOUND=no
58168
58169fi
58170
58171done
58172
58173    fi
58174    if test "x$ALSA_FOUND" = xno; then
58175
58176  # Print a helpful message on how to acquire the necessary build dependency.
58177  # alsa is the help tag: freetype, cups, alsa etc
58178  MISSING_DEPENDENCY=alsa
58179
58180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58181    cygwin_help $MISSING_DEPENDENCY
58182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58183    msys_help $MISSING_DEPENDENCY
58184  else
58185    PKGHANDLER_COMMAND=
58186
58187    case $PKGHANDLER in
58188      apt-get)
58189        apt_help     $MISSING_DEPENDENCY ;;
58190      yum)
58191        yum_help     $MISSING_DEPENDENCY ;;
58192      port)
58193        port_help    $MISSING_DEPENDENCY ;;
58194      pkgutil)
58195        pkgutil_help $MISSING_DEPENDENCY ;;
58196      pkgadd)
58197        pkgadd_help  $MISSING_DEPENDENCY ;;
58198    esac
58199
58200    if test "x$PKGHANDLER_COMMAND" != x; then
58201      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58202    fi
58203  fi
58204
58205      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
58206    fi
58207  fi
58208
58209
58210
58211
58212
58213
58214# Check whether --with-libffi was given.
58215if test "${with_libffi+set}" = set; then :
58216  withval=$with_libffi;
58217fi
58218
58219
58220# Check whether --with-libffi-include was given.
58221if test "${with_libffi_include+set}" = set; then :
58222  withval=$with_libffi_include;
58223fi
58224
58225
58226# Check whether --with-libffi-lib was given.
58227if test "${with_libffi_lib+set}" = set; then :
58228  withval=$with_libffi_lib;
58229fi
58230
58231
58232  if test "x$NEEDS_LIB_FFI" = xfalse; then
58233    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
58234        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
58235        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
58236      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
58237$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
58238    fi
58239    LIBFFI_CFLAGS=
58240    LIBFFI_LIBS=
58241  else
58242    LIBFFI_FOUND=no
58243
58244    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
58245      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
58246    fi
58247
58248    if test "x${with_libffi}" != x; then
58249      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
58250      LIBFFI_CFLAGS="-I${with_libffi}/include"
58251      LIBFFI_FOUND=yes
58252    fi
58253    if test "x${with_libffi_include}" != x; then
58254      LIBFFI_CFLAGS="-I${with_libffi_include}"
58255      LIBFFI_FOUND=yes
58256    fi
58257    if test "x${with_libffi_lib}" != x; then
58258      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
58259      LIBFFI_FOUND=yes
58260    fi
58261    # Do not try pkg-config if we have a sysroot set.
58262    if test "x$SYSROOT" = x; then
58263      if test "x$LIBFFI_FOUND" = xno; then
58264        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
58265
58266pkg_failed=no
58267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
58268$as_echo_n "checking for LIBFFI... " >&6; }
58269
58270if test -n "$LIBFFI_CFLAGS"; then
58271    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
58272 elif test -n "$PKG_CONFIG"; then
58273    if test -n "$PKG_CONFIG" && \
58274    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
58275  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
58276  ac_status=$?
58277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58278  test $ac_status = 0; }; then
58279  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
58280else
58281  pkg_failed=yes
58282fi
58283 else
58284    pkg_failed=untried
58285fi
58286if test -n "$LIBFFI_LIBS"; then
58287    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
58288 elif test -n "$PKG_CONFIG"; then
58289    if test -n "$PKG_CONFIG" && \
58290    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
58291  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
58292  ac_status=$?
58293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58294  test $ac_status = 0; }; then
58295  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
58296else
58297  pkg_failed=yes
58298fi
58299 else
58300    pkg_failed=untried
58301fi
58302
58303
58304
58305if test $pkg_failed = yes; then
58306
58307if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58308        _pkg_short_errors_supported=yes
58309else
58310        _pkg_short_errors_supported=no
58311fi
58312        if test $_pkg_short_errors_supported = yes; then
58313	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
58314        else
58315	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
58316        fi
58317	# Put the nasty error message in config.log where it belongs
58318	echo "$LIBFFI_PKG_ERRORS" >&5
58319
58320	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58321$as_echo "no" >&6; }
58322                LIBFFI_FOUND=no
58323elif test $pkg_failed = untried; then
58324	LIBFFI_FOUND=no
58325else
58326	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
58327	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
58328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58329$as_echo "yes" >&6; }
58330	LIBFFI_FOUND=yes
58331fi
58332      fi
58333    fi
58334    if test "x$LIBFFI_FOUND" = xno; then
58335      for ac_header in ffi.h
58336do :
58337  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
58338if test "x$ac_cv_header_ffi_h" = xyes; then :
58339  cat >>confdefs.h <<_ACEOF
58340#define HAVE_FFI_H 1
58341_ACEOF
58342
58343            LIBFFI_FOUND=yes
58344            LIBFFI_CFLAGS=
58345            LIBFFI_LIBS=-lffi
58346
58347else
58348  LIBFFI_FOUND=no
58349
58350fi
58351
58352done
58353
58354    fi
58355    if test "x$LIBFFI_FOUND" = xno; then
58356
58357  # Print a helpful message on how to acquire the necessary build dependency.
58358  # ffi is the help tag: freetype, cups, alsa etc
58359  MISSING_DEPENDENCY=ffi
58360
58361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58362    cygwin_help $MISSING_DEPENDENCY
58363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58364    msys_help $MISSING_DEPENDENCY
58365  else
58366    PKGHANDLER_COMMAND=
58367
58368    case $PKGHANDLER in
58369      apt-get)
58370        apt_help     $MISSING_DEPENDENCY ;;
58371      yum)
58372        yum_help     $MISSING_DEPENDENCY ;;
58373      port)
58374        port_help    $MISSING_DEPENDENCY ;;
58375      pkgutil)
58376        pkgutil_help $MISSING_DEPENDENCY ;;
58377      pkgadd)
58378        pkgadd_help  $MISSING_DEPENDENCY ;;
58379    esac
58380
58381    if test "x$PKGHANDLER_COMMAND" != x; then
58382      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58383    fi
58384  fi
58385
58386      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
58387    fi
58388
58389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
58390$as_echo_n "checking if libffi works... " >&6; }
58391    ac_ext=c
58392ac_cpp='$CPP $CPPFLAGS'
58393ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58394ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58395ac_compiler_gnu=$ac_cv_c_compiler_gnu
58396
58397    OLD_CFLAGS="$CFLAGS"
58398    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
58399    OLD_LIBS="$LIBS"
58400    LIBS="$LIBS $LIBFFI_LIBS"
58401    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58402/* end confdefs.h.  */
58403#include <ffi.h>
58404int
58405main ()
58406{
58407
58408          ffi_call(NULL, NULL, NULL, NULL);
58409          return 0;
58410
58411  ;
58412  return 0;
58413}
58414_ACEOF
58415if ac_fn_c_try_link "$LINENO"; then :
58416  LIBFFI_WORKS=yes
58417else
58418  LIBFFI_WORKS=no
58419
58420fi
58421rm -f core conftest.err conftest.$ac_objext \
58422    conftest$ac_exeext conftest.$ac_ext
58423    CFLAGS="$OLD_CFLAGS"
58424    LIBS="$OLD_LIBS"
58425    ac_ext=cpp
58426ac_cpp='$CXXCPP $CPPFLAGS'
58427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58430
58431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
58432$as_echo "$LIBFFI_WORKS" >&6; }
58433
58434    if test "x$LIBFFI_WORKS" = xno; then
58435
58436  # Print a helpful message on how to acquire the necessary build dependency.
58437  # ffi is the help tag: freetype, cups, alsa etc
58438  MISSING_DEPENDENCY=ffi
58439
58440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58441    cygwin_help $MISSING_DEPENDENCY
58442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58443    msys_help $MISSING_DEPENDENCY
58444  else
58445    PKGHANDLER_COMMAND=
58446
58447    case $PKGHANDLER in
58448      apt-get)
58449        apt_help     $MISSING_DEPENDENCY ;;
58450      yum)
58451        yum_help     $MISSING_DEPENDENCY ;;
58452      port)
58453        port_help    $MISSING_DEPENDENCY ;;
58454      pkgutil)
58455        pkgutil_help $MISSING_DEPENDENCY ;;
58456      pkgadd)
58457        pkgadd_help  $MISSING_DEPENDENCY ;;
58458    esac
58459
58460    if test "x$PKGHANDLER_COMMAND" != x; then
58461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58462    fi
58463  fi
58464
58465      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
58466    fi
58467  fi
58468
58469
58470
58471
58472
58473  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
58474    # Extract the first word of "llvm-config", so it can be a program name with args.
58475set dummy llvm-config; ac_word=$2
58476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58477$as_echo_n "checking for $ac_word... " >&6; }
58478if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
58479  $as_echo_n "(cached) " >&6
58480else
58481  if test -n "$LLVM_CONFIG"; then
58482  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
58483else
58484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58485for as_dir in $PATH
58486do
58487  IFS=$as_save_IFS
58488  test -z "$as_dir" && as_dir=.
58489    for ac_exec_ext in '' $ac_executable_extensions; do
58490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58491    ac_cv_prog_LLVM_CONFIG="llvm-config"
58492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58493    break 2
58494  fi
58495done
58496  done
58497IFS=$as_save_IFS
58498
58499fi
58500fi
58501LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
58502if test -n "$LLVM_CONFIG"; then
58503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
58504$as_echo "$LLVM_CONFIG" >&6; }
58505else
58506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58507$as_echo "no" >&6; }
58508fi
58509
58510
58511
58512    if test "x$LLVM_CONFIG" != xllvm-config; then
58513      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
58514    fi
58515
58516    llvm_components="jit mcjit engine nativecodegen native"
58517    unset LLVM_CFLAGS
58518    for flag in $("$LLVM_CONFIG" --cxxflags); do
58519      if echo "${flag}" | grep -q '^-[ID]'; then
58520        if test "${flag}" != "-D_DEBUG" ; then
58521          if test "${LLVM_CFLAGS}" != "" ; then
58522            LLVM_CFLAGS="${LLVM_CFLAGS} "
58523          fi
58524          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
58525        fi
58526      fi
58527    done
58528    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
58529    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
58530
58531    unset LLVM_LDFLAGS
58532    for flag in $("${LLVM_CONFIG}" --ldflags); do
58533      if echo "${flag}" | grep -q '^-L'; then
58534        if test "${LLVM_LDFLAGS}" != ""; then
58535          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
58536        fi
58537        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
58538      fi
58539    done
58540
58541    unset LLVM_LIBS
58542    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
58543      if echo "${flag}" | grep -q '^-l'; then
58544        if test "${LLVM_LIBS}" != ""; then
58545          LLVM_LIBS="${LLVM_LIBS} "
58546        fi
58547        LLVM_LIBS="${LLVM_LIBS}${flag}"
58548      fi
58549    done
58550
58551    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
58552    # always properly detect -ltinfo
58553    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
58554
58555
58556
58557
58558  fi
58559
58560
58561
58562# Check whether --with-libjpeg was given.
58563if test "${with_libjpeg+set}" = set; then :
58564  withval=$with_libjpeg;
58565fi
58566
58567
58568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58569$as_echo_n "checking for which libjpeg to use... " >&6; }
58570  # default is bundled
58571  DEFAULT_LIBJPEG=bundled
58572  # if user didn't specify, use DEFAULT_LIBJPEG
58573  if test "x${with_libjpeg}" = "x"; then
58574    with_libjpeg=${DEFAULT_LIBJPEG}
58575  fi
58576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58577$as_echo "${with_libjpeg}" >&6; }
58578
58579  if test "x${with_libjpeg}" = "xbundled"; then
58580    USE_EXTERNAL_LIBJPEG=false
58581  elif test "x${with_libjpeg}" = "xsystem"; then
58582    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58583if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58584
58585else
58586   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58587fi
58588
58589
58590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58591$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58592if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58593  $as_echo_n "(cached) " >&6
58594else
58595  ac_check_lib_save_LIBS=$LIBS
58596LIBS="-ljpeg  $LIBS"
58597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58598/* end confdefs.h.  */
58599
58600/* Override any GCC internal prototype to avoid an error.
58601   Use char because int might match the return type of a GCC
58602   builtin and then its argument prototype would still apply.  */
58603#ifdef __cplusplus
58604extern "C"
58605#endif
58606char jpeg_CreateDecompress ();
58607int
58608main ()
58609{
58610return jpeg_CreateDecompress ();
58611  ;
58612  return 0;
58613}
58614_ACEOF
58615if ac_fn_cxx_try_link "$LINENO"; then :
58616  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58617else
58618  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58619fi
58620rm -f core conftest.err conftest.$ac_objext \
58621    conftest$ac_exeext conftest.$ac_ext
58622LIBS=$ac_check_lib_save_LIBS
58623fi
58624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58625$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58626if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58627  cat >>confdefs.h <<_ACEOF
58628#define HAVE_LIBJPEG 1
58629_ACEOF
58630
58631  LIBS="-ljpeg $LIBS"
58632
58633else
58634   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58635fi
58636
58637
58638    USE_EXTERNAL_LIBJPEG=true
58639  else
58640    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58641  fi
58642
58643
58644
58645
58646
58647# Check whether --with-giflib was given.
58648if test "${with_giflib+set}" = set; then :
58649  withval=$with_giflib;
58650fi
58651
58652
58653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58654$as_echo_n "checking for which giflib to use... " >&6; }
58655  # default is bundled
58656  DEFAULT_GIFLIB=bundled
58657  # if user didn't specify, use DEFAULT_GIFLIB
58658  if test "x${with_giflib}" = "x"; then
58659    with_giflib=${DEFAULT_GIFLIB}
58660  fi
58661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58662$as_echo "${with_giflib}" >&6; }
58663
58664  if test "x${with_giflib}" = "xbundled"; then
58665    USE_EXTERNAL_LIBGIF=false
58666  elif test "x${with_giflib}" = "xsystem"; then
58667    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58668if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58669
58670else
58671   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58672fi
58673
58674
58675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58676$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58677if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58678  $as_echo_n "(cached) " >&6
58679else
58680  ac_check_lib_save_LIBS=$LIBS
58681LIBS="-lgif  $LIBS"
58682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58683/* end confdefs.h.  */
58684
58685/* Override any GCC internal prototype to avoid an error.
58686   Use char because int might match the return type of a GCC
58687   builtin and then its argument prototype would still apply.  */
58688#ifdef __cplusplus
58689extern "C"
58690#endif
58691char DGifGetCode ();
58692int
58693main ()
58694{
58695return DGifGetCode ();
58696  ;
58697  return 0;
58698}
58699_ACEOF
58700if ac_fn_cxx_try_link "$LINENO"; then :
58701  ac_cv_lib_gif_DGifGetCode=yes
58702else
58703  ac_cv_lib_gif_DGifGetCode=no
58704fi
58705rm -f core conftest.err conftest.$ac_objext \
58706    conftest$ac_exeext conftest.$ac_ext
58707LIBS=$ac_check_lib_save_LIBS
58708fi
58709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58710$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58711if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58712  cat >>confdefs.h <<_ACEOF
58713#define HAVE_LIBGIF 1
58714_ACEOF
58715
58716  LIBS="-lgif $LIBS"
58717
58718else
58719   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58720fi
58721
58722
58723    USE_EXTERNAL_LIBGIF=true
58724  else
58725    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58726  fi
58727
58728
58729
58730
58731
58732# Check whether --with-libpng was given.
58733if test "${with_libpng+set}" = set; then :
58734  withval=$with_libpng;
58735fi
58736
58737
58738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58739$as_echo_n "checking for which libpng to use... " >&6; }
58740
58741  # default is bundled
58742  DEFAULT_LIBPNG=bundled
58743  # if user didn't specify, use DEFAULT_LIBPNG
58744  if test "x${with_libpng}" = "x"; then
58745      with_libpng=${DEFAULT_LIBPNG}
58746  fi
58747
58748  if test "x${with_libpng}" = "xbundled"; then
58749      USE_EXTERNAL_LIBPNG=false
58750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58751$as_echo "bundled" >&6; }
58752  elif test "x${with_libpng}" = "xsystem"; then
58753
58754pkg_failed=no
58755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58756$as_echo_n "checking for PNG... " >&6; }
58757
58758if test -n "$PNG_CFLAGS"; then
58759    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58760 elif test -n "$PKG_CONFIG"; then
58761    if test -n "$PKG_CONFIG" && \
58762    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58763  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58764  ac_status=$?
58765  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58766  test $ac_status = 0; }; then
58767  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58768else
58769  pkg_failed=yes
58770fi
58771 else
58772    pkg_failed=untried
58773fi
58774if test -n "$PNG_LIBS"; then
58775    pkg_cv_PNG_LIBS="$PNG_LIBS"
58776 elif test -n "$PKG_CONFIG"; then
58777    if test -n "$PKG_CONFIG" && \
58778    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58779  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58780  ac_status=$?
58781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58782  test $ac_status = 0; }; then
58783  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58784else
58785  pkg_failed=yes
58786fi
58787 else
58788    pkg_failed=untried
58789fi
58790
58791
58792
58793if test $pkg_failed = yes; then
58794
58795if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58796        _pkg_short_errors_supported=yes
58797else
58798        _pkg_short_errors_supported=no
58799fi
58800        if test $_pkg_short_errors_supported = yes; then
58801	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58802        else
58803	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58804        fi
58805	# Put the nasty error message in config.log where it belongs
58806	echo "$PNG_PKG_ERRORS" >&5
58807
58808	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58809$as_echo "no" >&6; }
58810                 LIBPNG_FOUND=no
58811elif test $pkg_failed = untried; then
58812	 LIBPNG_FOUND=no
58813else
58814	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58815	PNG_LIBS=$pkg_cv_PNG_LIBS
58816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58817$as_echo "yes" >&6; }
58818	 LIBPNG_FOUND=yes
58819fi
58820      if test "x${LIBPNG_FOUND}" = "xyes"; then
58821          USE_EXTERNAL_LIBPNG=true
58822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58823$as_echo "system" >&6; }
58824      else
58825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58826$as_echo "system not found" >&6; }
58827          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58828      fi
58829  else
58830      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58831  fi
58832
58833
58834
58835
58836
58837# Check whether --with-zlib was given.
58838if test "${with_zlib+set}" = set; then :
58839  withval=$with_zlib;
58840fi
58841
58842
58843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58844$as_echo_n "checking for compress in -lz... " >&6; }
58845if ${ac_cv_lib_z_compress+:} false; then :
58846  $as_echo_n "(cached) " >&6
58847else
58848  ac_check_lib_save_LIBS=$LIBS
58849LIBS="-lz  $LIBS"
58850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58851/* end confdefs.h.  */
58852
58853/* Override any GCC internal prototype to avoid an error.
58854   Use char because int might match the return type of a GCC
58855   builtin and then its argument prototype would still apply.  */
58856#ifdef __cplusplus
58857extern "C"
58858#endif
58859char compress ();
58860int
58861main ()
58862{
58863return compress ();
58864  ;
58865  return 0;
58866}
58867_ACEOF
58868if ac_fn_cxx_try_link "$LINENO"; then :
58869  ac_cv_lib_z_compress=yes
58870else
58871  ac_cv_lib_z_compress=no
58872fi
58873rm -f core conftest.err conftest.$ac_objext \
58874    conftest$ac_exeext conftest.$ac_ext
58875LIBS=$ac_check_lib_save_LIBS
58876fi
58877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58878$as_echo "$ac_cv_lib_z_compress" >&6; }
58879if test "x$ac_cv_lib_z_compress" = xyes; then :
58880   ZLIB_FOUND=yes
58881else
58882   ZLIB_FOUND=no
58883fi
58884
58885
58886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58887$as_echo_n "checking for which zlib to use... " >&6; }
58888
58889  DEFAULT_ZLIB=bundled
58890  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58891    # On macosx default is system...on others default is bundled
58892    DEFAULT_ZLIB=system
58893  fi
58894
58895  if test "x${ZLIB_FOUND}" != "xyes"; then
58896    # If we don't find any system...set default to bundled
58897    DEFAULT_ZLIB=bundled
58898  fi
58899
58900  # If user didn't specify, use DEFAULT_ZLIB
58901  if test "x${with_zlib}" = "x"; then
58902    with_zlib=${DEFAULT_ZLIB}
58903  fi
58904
58905  if test "x${with_zlib}" = "xbundled"; then
58906    USE_EXTERNAL_LIBZ=false
58907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58908$as_echo "bundled" >&6; }
58909  elif test "x${with_zlib}" = "xsystem"; then
58910    if test "x${ZLIB_FOUND}" = "xyes"; then
58911      USE_EXTERNAL_LIBZ=true
58912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58913$as_echo "system" >&6; }
58914    else
58915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58916$as_echo "system not found" >&6; }
58917      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58918    fi
58919  else
58920    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58921  fi
58922
58923
58924
58925
58926
58927# Check whether --with-lcms was given.
58928if test "${with_lcms+set}" = set; then :
58929  withval=$with_lcms;
58930fi
58931
58932
58933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58934$as_echo_n "checking for which lcms to use... " >&6; }
58935
58936  DEFAULT_LCMS=bundled
58937  # If user didn't specify, use DEFAULT_LCMS
58938  if test "x${with_lcms}" = "x"; then
58939      with_lcms=${DEFAULT_LCMS}
58940  fi
58941
58942  if test "x${with_lcms}" = "xbundled"; then
58943    USE_EXTERNAL_LCMS=false
58944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58945$as_echo "bundled" >&6; }
58946  elif test "x${with_lcms}" = "xsystem"; then
58947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58948$as_echo "system" >&6; }
58949
58950pkg_failed=no
58951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58952$as_echo_n "checking for LCMS... " >&6; }
58953
58954if test -n "$LCMS_CFLAGS"; then
58955    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58956 elif test -n "$PKG_CONFIG"; then
58957    if test -n "$PKG_CONFIG" && \
58958    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58959  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58960  ac_status=$?
58961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58962  test $ac_status = 0; }; then
58963  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58964else
58965  pkg_failed=yes
58966fi
58967 else
58968    pkg_failed=untried
58969fi
58970if test -n "$LCMS_LIBS"; then
58971    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58972 elif test -n "$PKG_CONFIG"; then
58973    if test -n "$PKG_CONFIG" && \
58974    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58975  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58976  ac_status=$?
58977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58978  test $ac_status = 0; }; then
58979  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58980else
58981  pkg_failed=yes
58982fi
58983 else
58984    pkg_failed=untried
58985fi
58986
58987
58988
58989if test $pkg_failed = yes; then
58990
58991if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58992        _pkg_short_errors_supported=yes
58993else
58994        _pkg_short_errors_supported=no
58995fi
58996        if test $_pkg_short_errors_supported = yes; then
58997	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58998        else
58999	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
59000        fi
59001	# Put the nasty error message in config.log where it belongs
59002	echo "$LCMS_PKG_ERRORS" >&5
59003
59004	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59005$as_echo "no" >&6; }
59006                LCMS_FOUND=no
59007elif test $pkg_failed = untried; then
59008	LCMS_FOUND=no
59009else
59010	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
59011	LCMS_LIBS=$pkg_cv_LCMS_LIBS
59012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59013$as_echo "yes" >&6; }
59014	LCMS_FOUND=yes
59015fi
59016    if test "x${LCMS_FOUND}" = "xyes"; then
59017      USE_EXTERNAL_LCMS=true
59018    else
59019      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
59020    fi
59021  else
59022    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
59023  fi
59024
59025
59026
59027
59028
59029
59030
59031
59032
59033
59034
59035  # Setup libm (the maths library)
59036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
59037$as_echo_n "checking for cos in -lm... " >&6; }
59038if ${ac_cv_lib_m_cos+:} false; then :
59039  $as_echo_n "(cached) " >&6
59040else
59041  ac_check_lib_save_LIBS=$LIBS
59042LIBS="-lm  $LIBS"
59043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59044/* end confdefs.h.  */
59045
59046/* Override any GCC internal prototype to avoid an error.
59047   Use char because int might match the return type of a GCC
59048   builtin and then its argument prototype would still apply.  */
59049#ifdef __cplusplus
59050extern "C"
59051#endif
59052char cos ();
59053int
59054main ()
59055{
59056return cos ();
59057  ;
59058  return 0;
59059}
59060_ACEOF
59061if ac_fn_cxx_try_link "$LINENO"; then :
59062  ac_cv_lib_m_cos=yes
59063else
59064  ac_cv_lib_m_cos=no
59065fi
59066rm -f core conftest.err conftest.$ac_objext \
59067    conftest$ac_exeext conftest.$ac_ext
59068LIBS=$ac_check_lib_save_LIBS
59069fi
59070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
59071$as_echo "$ac_cv_lib_m_cos" >&6; }
59072if test "x$ac_cv_lib_m_cos" = xyes; then :
59073  cat >>confdefs.h <<_ACEOF
59074#define HAVE_LIBM 1
59075_ACEOF
59076
59077  LIBS="-lm $LIBS"
59078
59079else
59080
59081      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
59082$as_echo "$as_me: Maths library was not found" >&6;}
59083
59084fi
59085
59086  LIBM=-lm
59087
59088
59089  # Setup libdl (for dynamic library loading)
59090  save_LIBS="$LIBS"
59091  LIBS=""
59092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
59093$as_echo_n "checking for dlopen in -ldl... " >&6; }
59094if ${ac_cv_lib_dl_dlopen+:} false; then :
59095  $as_echo_n "(cached) " >&6
59096else
59097  ac_check_lib_save_LIBS=$LIBS
59098LIBS="-ldl  $LIBS"
59099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59100/* end confdefs.h.  */
59101
59102/* Override any GCC internal prototype to avoid an error.
59103   Use char because int might match the return type of a GCC
59104   builtin and then its argument prototype would still apply.  */
59105#ifdef __cplusplus
59106extern "C"
59107#endif
59108char dlopen ();
59109int
59110main ()
59111{
59112return dlopen ();
59113  ;
59114  return 0;
59115}
59116_ACEOF
59117if ac_fn_cxx_try_link "$LINENO"; then :
59118  ac_cv_lib_dl_dlopen=yes
59119else
59120  ac_cv_lib_dl_dlopen=no
59121fi
59122rm -f core conftest.err conftest.$ac_objext \
59123    conftest$ac_exeext conftest.$ac_ext
59124LIBS=$ac_check_lib_save_LIBS
59125fi
59126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
59127$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
59128if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
59129  cat >>confdefs.h <<_ACEOF
59130#define HAVE_LIBDL 1
59131_ACEOF
59132
59133  LIBS="-ldl $LIBS"
59134
59135fi
59136
59137  LIBDL="$LIBS"
59138
59139  LIBS="$save_LIBS"
59140
59141  # Deprecated libraries, keep the flags for backwards compatibility
59142  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
59143
59144
59145# Check whether --with-dxsdk was given.
59146if test "${with_dxsdk+set}" = set; then :
59147  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
59148$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
59149fi
59150
59151
59152
59153
59154# Check whether --with-dxsdk-lib was given.
59155if test "${with_dxsdk_lib+set}" = set; then :
59156  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
59157$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
59158fi
59159
59160
59161
59162
59163# Check whether --with-dxsdk-include was given.
59164if test "${with_dxsdk_include+set}" = set; then :
59165  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
59166$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
59167fi
59168
59169
59170  fi
59171
59172  # Control if libzip can use mmap. Available for purposes of overriding.
59173  LIBZIP_CAN_USE_MMAP=true
59174
59175
59176
59177
59178
59179
59180
59181
59182
59183
59184
59185
59186
59187
59188###############################################################################
59189#
59190# We need to do some final tweaking, when everything else is done.
59191#
59192###############################################################################
59193
59194
59195  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
59196
59197
59198
59199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
59200$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
59201
59202  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
59203    ENABLE_INTREE_EC=yes
59204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59205$as_echo "yes" >&6; }
59206  else
59207    ENABLE_INTREE_EC=no
59208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59209$as_echo "no" >&6; }
59210  fi
59211
59212
59213
59214
59215###############################################################################
59216#
59217# Configure parts of the build that only affect the build performance,
59218# not the result.
59219#
59220###############################################################################
59221
59222
59223  # How many cores do we have on this build system?
59224
59225# Check whether --with-num-cores was given.
59226if test "${with_num_cores+set}" = set; then :
59227  withval=$with_num_cores;
59228fi
59229
59230  if test "x$with_num_cores" = x; then
59231    # The number of cores were not specified, try to probe them.
59232
59233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
59234$as_echo_n "checking for number of cores... " >&6; }
59235  NUM_CORES=1
59236  FOUND_CORES=no
59237
59238  if test -f /proc/cpuinfo; then
59239    # Looks like a Linux (or cygwin) system
59240    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
59241    FOUND_CORES=yes
59242  elif test -x /usr/sbin/psrinfo; then
59243    # Looks like a Solaris system
59244    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
59245    FOUND_CORES=yes
59246  elif test -x /usr/sbin/sysctl; then
59247    # Looks like a MacOSX system
59248    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
59249    FOUND_CORES=yes
59250  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
59251    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
59252    FOUND_CORES=yes
59253  elif test -n "$NUMBER_OF_PROCESSORS"; then
59254    # On windows, look in the env
59255    NUM_CORES=$NUMBER_OF_PROCESSORS
59256    FOUND_CORES=yes
59257  fi
59258
59259  if test "x$FOUND_CORES" = xyes; then
59260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
59261$as_echo "$NUM_CORES" >&6; }
59262  else
59263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
59264$as_echo "could not detect number of cores, defaulting to 1" >&6; }
59265    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
59266$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
59267  fi
59268
59269  else
59270    NUM_CORES=$with_num_cores
59271  fi
59272
59273
59274
59275  # How much memory do we have on this build system?
59276
59277# Check whether --with-memory-size was given.
59278if test "${with_memory_size+set}" = set; then :
59279  withval=$with_memory_size;
59280fi
59281
59282  if test "x$with_memory_size" = x; then
59283    # The memory size was not specified, try to probe it.
59284
59285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
59286$as_echo_n "checking for memory size... " >&6; }
59287  # Default to 1024 MB
59288  MEMORY_SIZE=1024
59289  FOUND_MEM=no
59290
59291  if test -f /proc/meminfo; then
59292    # Looks like a Linux (or cygwin) system
59293    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
59294    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
59295    FOUND_MEM=yes
59296  elif test -x /usr/sbin/prtconf; then
59297    # Looks like a Solaris or AIX system
59298    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
59299    FOUND_MEM=yes
59300  elif test -x /usr/sbin/sysctl; then
59301    # Looks like a MacOSX system
59302    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
59303    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
59304    FOUND_MEM=yes
59305  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
59306    # Windows, but without cygwin
59307    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
59308    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
59309    FOUND_MEM=yes
59310  fi
59311
59312  if test "x$FOUND_MEM" = xyes; then
59313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
59314$as_echo "$MEMORY_SIZE MB" >&6; }
59315  else
59316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
59317$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
59318    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
59319$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
59320  fi
59321
59322  else
59323    MEMORY_SIZE=$with_memory_size
59324  fi
59325
59326
59327
59328  # Provide a decent default number of parallel jobs for make depending on
59329  # number of cores, amount of memory and machine architecture.
59330
59331# Check whether --with-jobs was given.
59332if test "${with_jobs+set}" = set; then :
59333  withval=$with_jobs;
59334fi
59335
59336  if test "x$with_jobs" = x; then
59337    # Number of jobs was not specified, calculate.
59338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
59339$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
59340    # Approximate memory in GB.
59341    memory_gb=`expr $MEMORY_SIZE / 1024`
59342    # Pick the lowest of memory in gb and number of cores.
59343    if test "$memory_gb" -lt "$NUM_CORES"; then
59344      JOBS="$memory_gb"
59345    else
59346      JOBS="$NUM_CORES"
59347    fi
59348    if test "$JOBS" -eq "0"; then
59349      JOBS=1
59350    fi
59351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
59352$as_echo "$JOBS" >&6; }
59353  else
59354    JOBS=$with_jobs
59355  fi
59356
59357
59358
59359  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
59360
59361# Check whether --with-test-jobs was given.
59362if test "${with_test_jobs+set}" = set; then :
59363  withval=$with_test_jobs;
59364fi
59365
59366  if test "x$with_test_jobs" = x; then
59367      TEST_JOBS=0
59368  else
59369      TEST_JOBS=$with_test_jobs
59370  fi
59371
59372
59373
59374# Setup arguments for the boot jdk (after cores and memory have been setup)
59375
59376  ##############################################################################
59377  #
59378  # Specify jvm options for anything that is run with the Boot JDK.
59379  # Not all JVM:s accept the same arguments on the command line.
59380  #
59381
59382# Check whether --with-boot-jdk-jvmargs was given.
59383if test "${with_boot_jdk_jvmargs+set}" = set; then :
59384  withval=$with_boot_jdk_jvmargs;
59385fi
59386
59387
59388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
59389$as_echo_n "checking flags for boot jdk java command ... " >&6; }
59390
59391  # Disable special log output when a debug build is used as Boot JDK...
59392
59393  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
59394  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
59395  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
59396  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59397  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59398  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59399    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
59400    JVM_ARG_OK=true
59401  else
59402    $ECHO "Arg failed:" >&5
59403    $ECHO "$OUTPUT" >&5
59404    JVM_ARG_OK=false
59405  fi
59406
59407
59408  # Apply user provided options.
59409
59410  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
59411  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
59412  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
59413  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59414  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59415  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59416    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
59417    JVM_ARG_OK=true
59418  else
59419    $ECHO "Arg failed:" >&5
59420    $ECHO "$OUTPUT" >&5
59421    JVM_ARG_OK=false
59422  fi
59423
59424
59425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
59426$as_echo "$boot_jdk_jvmargs" >&6; }
59427
59428  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
59429  JAVA_FLAGS=$boot_jdk_jvmargs
59430
59431
59432
59433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
59434$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
59435
59436  # Starting amount of heap memory.
59437
59438  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
59439  $ECHO "Command: $JAVA -Xms64M -version" >&5
59440  OUTPUT=`$JAVA -Xms64M -version 2>&1`
59441  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59442  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59443  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59444    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
59445    JVM_ARG_OK=true
59446  else
59447    $ECHO "Arg failed:" >&5
59448    $ECHO "$OUTPUT" >&5
59449    JVM_ARG_OK=false
59450  fi
59451
59452
59453  # Maximum amount of heap memory.
59454  # Maximum stack size.
59455  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
59456  if test "x$BOOT_JDK_BITS" = "x32"; then
59457    if test "$JVM_MAX_HEAP" -gt "1100"; then
59458      JVM_MAX_HEAP=1100
59459    elif test "$JVM_MAX_HEAP" -lt "512"; then
59460      JVM_MAX_HEAP=512
59461    fi
59462    STACK_SIZE=768
59463  else
59464    # Running a 64 bit JVM allows for and requires a bigger heap
59465    if test "$JVM_MAX_HEAP" -gt "1600"; then
59466      JVM_MAX_HEAP=1600
59467    elif test "$JVM_MAX_HEAP" -lt "512"; then
59468      JVM_MAX_HEAP=512
59469    fi
59470    STACK_SIZE=1536
59471  fi
59472
59473  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
59474  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
59475  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
59476  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59477  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59478  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59479    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
59480    JVM_ARG_OK=true
59481  else
59482    $ECHO "Arg failed:" >&5
59483    $ECHO "$OUTPUT" >&5
59484    JVM_ARG_OK=false
59485  fi
59486
59487
59488  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
59489  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
59490  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
59491  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59492  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59493  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59494    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
59495    JVM_ARG_OK=true
59496  else
59497    $ECHO "Arg failed:" >&5
59498    $ECHO "$OUTPUT" >&5
59499    JVM_ARG_OK=false
59500  fi
59501
59502
59503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
59504$as_echo "$boot_jdk_jvmargs_big" >&6; }
59505
59506  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
59507
59508
59509  # By default, the main javac compilations use big
59510  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
59511
59512
59513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
59514$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
59515
59516  # Use serial gc for small short lived tools if possible
59517
59518  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
59519  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
59520  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
59521  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59522  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59523  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59524    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
59525    JVM_ARG_OK=true
59526  else
59527    $ECHO "Arg failed:" >&5
59528    $ECHO "$OUTPUT" >&5
59529    JVM_ARG_OK=false
59530  fi
59531
59532
59533  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
59534  $ECHO "Command: $JAVA -Xms32M -version" >&5
59535  OUTPUT=`$JAVA -Xms32M -version 2>&1`
59536  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59537  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59538  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59539    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
59540    JVM_ARG_OK=true
59541  else
59542    $ECHO "Arg failed:" >&5
59543    $ECHO "$OUTPUT" >&5
59544    JVM_ARG_OK=false
59545  fi
59546
59547
59548  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
59549  $ECHO "Command: $JAVA -Xmx512M -version" >&5
59550  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
59551  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59552  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59553  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59554    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
59555    JVM_ARG_OK=true
59556  else
59557    $ECHO "Arg failed:" >&5
59558    $ECHO "$OUTPUT" >&5
59559    JVM_ARG_OK=false
59560  fi
59561
59562
59563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59564$as_echo "$boot_jdk_jvmargs_small" >&6; }
59565
59566  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59567
59568
59569  JAVA_TOOL_FLAGS_SMALL=""
59570  for f in $JAVA_FLAGS_SMALL; do
59571    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59572  done
59573
59574
59575
59576# Setup smart javac (after cores and memory have been setup)
59577
59578
59579# Check whether --with-sjavac-server-java was given.
59580if test "${with_sjavac_server_java+set}" = set; then :
59581  withval=$with_sjavac_server_java;
59582fi
59583
59584
59585  if test "x$with_sjavac_server_java" != x; then
59586    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59587    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59588    if test "x$FOUND_VERSION" = x; then
59589      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59590    fi
59591  else
59592    SJAVAC_SERVER_JAVA="$JAVA"
59593  fi
59594
59595
59596  if test "$MEMORY_SIZE" -gt "3000"; then
59597
59598  $ECHO "Check if jvm arg is ok: -d64" >&5
59599  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59600  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59601  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59602  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59603  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59604    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59605    JVM_ARG_OK=true
59606  else
59607    $ECHO "Arg failed:" >&5
59608    $ECHO "$OUTPUT" >&5
59609    JVM_ARG_OK=false
59610  fi
59611
59612    if test "$JVM_ARG_OK" = true; then
59613      JVM_64BIT=true
59614      JVM_ARG_OK=false
59615    fi
59616  fi
59617
59618  MX_VALUE=`expr $MEMORY_SIZE / 2`
59619  if test "$JVM_64BIT" = true; then
59620    # Set ms lower than mx since more than one instance of the server might
59621    # get launched at the same time before they figure out which instance won.
59622    MS_VALUE=512
59623    if test "$MX_VALUE" -gt "2048"; then
59624      MX_VALUE=2048
59625    fi
59626  else
59627    MS_VALUE=256
59628    if test "$MX_VALUE" -gt "1500"; then
59629      MX_VALUE=1500
59630    fi
59631  fi
59632  if test "$MX_VALUE" -lt "512"; then
59633    MX_VALUE=512
59634  fi
59635
59636  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59637  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59638  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59639  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59640  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59641  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59642    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59643    JVM_ARG_OK=true
59644  else
59645    $ECHO "Arg failed:" >&5
59646    $ECHO "$OUTPUT" >&5
59647    JVM_ARG_OK=false
59648  fi
59649
59650
59651
59652  # Check whether --enable-sjavac was given.
59653if test "${enable_sjavac+set}" = set; then :
59654  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59655else
59656  ENABLE_SJAVAC="no"
59657fi
59658
59659  if test "x$JVM_ARG_OK" = "xfalse"; then
59660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59661$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59662    ENABLE_SJAVAC="no"
59663  fi
59664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59665$as_echo_n "checking whether to use sjavac... " >&6; }
59666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59667$as_echo "$ENABLE_SJAVAC" >&6; }
59668
59669
59670  # Check whether --enable-javac-server was given.
59671if test "${enable_javac_server+set}" = set; then :
59672  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59673else
59674  ENABLE_JAVAC_SERVER="yes"
59675fi
59676
59677  if test "x$JVM_ARG_OK" = "xfalse"; then
59678    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59679$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59680    ENABLE_JAVAC_SERVER="no"
59681  fi
59682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59683$as_echo_n "checking whether to use javac server... " >&6; }
59684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59685$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59686
59687
59688  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59689    # When using a server javac, the small client instances do not need much
59690    # resources.
59691    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59692  fi
59693
59694
59695# Setup use of icecc if requested
59696
59697  # Check whether --enable-icecc was given.
59698if test "${enable_icecc+set}" = set; then :
59699  enableval=$enable_icecc;
59700fi
59701
59702
59703  if test "x${enable_icecc}" = "xyes"; then
59704
59705
59706
59707  # Publish this variable in the help.
59708
59709
59710  if [ -z "${ICECC_CMD+x}" ]; then
59711    # The variable is not set by user, try to locate tool using the code snippet
59712    for ac_prog in icecc
59713do
59714  # Extract the first word of "$ac_prog", so it can be a program name with args.
59715set dummy $ac_prog; ac_word=$2
59716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59717$as_echo_n "checking for $ac_word... " >&6; }
59718if ${ac_cv_path_ICECC_CMD+:} false; then :
59719  $as_echo_n "(cached) " >&6
59720else
59721  case $ICECC_CMD in
59722  [\\/]* | ?:[\\/]*)
59723  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59724  ;;
59725  *)
59726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59727for as_dir in $PATH
59728do
59729  IFS=$as_save_IFS
59730  test -z "$as_dir" && as_dir=.
59731    for ac_exec_ext in '' $ac_executable_extensions; do
59732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59733    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59735    break 2
59736  fi
59737done
59738  done
59739IFS=$as_save_IFS
59740
59741  ;;
59742esac
59743fi
59744ICECC_CMD=$ac_cv_path_ICECC_CMD
59745if test -n "$ICECC_CMD"; then
59746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59747$as_echo "$ICECC_CMD" >&6; }
59748else
59749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59750$as_echo "no" >&6; }
59751fi
59752
59753
59754  test -n "$ICECC_CMD" && break
59755done
59756
59757  else
59758    # The variable is set, but is it from the command line or the environment?
59759
59760    # Try to remove the string !ICECC_CMD! from our list.
59761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59763      # If it failed, the variable was not from the command line. Ignore it,
59764      # but warn the user (except for BASH, which is always set by the calling BASH).
59765      if test "xICECC_CMD" != xBASH; then
59766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59767$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59768      fi
59769      # Try to locate tool using the code snippet
59770      for ac_prog in icecc
59771do
59772  # Extract the first word of "$ac_prog", so it can be a program name with args.
59773set dummy $ac_prog; ac_word=$2
59774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59775$as_echo_n "checking for $ac_word... " >&6; }
59776if ${ac_cv_path_ICECC_CMD+:} false; then :
59777  $as_echo_n "(cached) " >&6
59778else
59779  case $ICECC_CMD in
59780  [\\/]* | ?:[\\/]*)
59781  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59782  ;;
59783  *)
59784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59785for as_dir in $PATH
59786do
59787  IFS=$as_save_IFS
59788  test -z "$as_dir" && as_dir=.
59789    for ac_exec_ext in '' $ac_executable_extensions; do
59790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59791    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59793    break 2
59794  fi
59795done
59796  done
59797IFS=$as_save_IFS
59798
59799  ;;
59800esac
59801fi
59802ICECC_CMD=$ac_cv_path_ICECC_CMD
59803if test -n "$ICECC_CMD"; then
59804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59805$as_echo "$ICECC_CMD" >&6; }
59806else
59807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59808$as_echo "no" >&6; }
59809fi
59810
59811
59812  test -n "$ICECC_CMD" && break
59813done
59814
59815    else
59816      # If it succeeded, then it was overridden by the user. We will use it
59817      # for the tool.
59818
59819      # First remove it from the list of overridden variables, so we can test
59820      # for unknown variables in the end.
59821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59822
59823      # Check if we try to supply an empty value
59824      if test "x$ICECC_CMD" = x; then
59825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59826$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59828$as_echo_n "checking for ICECC_CMD... " >&6; }
59829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59830$as_echo "disabled" >&6; }
59831      else
59832        # Check if the provided tool contains a complete path.
59833        tool_specified="$ICECC_CMD"
59834        tool_basename="${tool_specified##*/}"
59835        if test "x$tool_basename" = "x$tool_specified"; then
59836          # A command without a complete path is provided, search $PATH.
59837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59838$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59839          # Extract the first word of "$tool_basename", so it can be a program name with args.
59840set dummy $tool_basename; ac_word=$2
59841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59842$as_echo_n "checking for $ac_word... " >&6; }
59843if ${ac_cv_path_ICECC_CMD+:} false; then :
59844  $as_echo_n "(cached) " >&6
59845else
59846  case $ICECC_CMD in
59847  [\\/]* | ?:[\\/]*)
59848  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59849  ;;
59850  *)
59851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59852for as_dir in $PATH
59853do
59854  IFS=$as_save_IFS
59855  test -z "$as_dir" && as_dir=.
59856    for ac_exec_ext in '' $ac_executable_extensions; do
59857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59858    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59860    break 2
59861  fi
59862done
59863  done
59864IFS=$as_save_IFS
59865
59866  ;;
59867esac
59868fi
59869ICECC_CMD=$ac_cv_path_ICECC_CMD
59870if test -n "$ICECC_CMD"; then
59871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59872$as_echo "$ICECC_CMD" >&6; }
59873else
59874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59875$as_echo "no" >&6; }
59876fi
59877
59878
59879          if test "x$ICECC_CMD" = x; then
59880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59881          fi
59882        else
59883          # Otherwise we believe it is a complete path. Use it as it is.
59884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59885$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59887$as_echo_n "checking for ICECC_CMD... " >&6; }
59888          if test ! -x "$tool_specified"; then
59889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59890$as_echo "not found" >&6; }
59891            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59892          fi
59893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59894$as_echo "$tool_specified" >&6; }
59895        fi
59896      fi
59897    fi
59898
59899  fi
59900
59901
59902
59903  if test "x$ICECC_CMD" = x; then
59904    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59905  fi
59906
59907
59908    old_path="$PATH"
59909
59910    # Look for icecc-create-env in some known places
59911    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59912
59913
59914
59915  # Publish this variable in the help.
59916
59917
59918  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59919    # The variable is not set by user, try to locate tool using the code snippet
59920    for ac_prog in icecc-create-env
59921do
59922  # Extract the first word of "$ac_prog", so it can be a program name with args.
59923set dummy $ac_prog; ac_word=$2
59924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59925$as_echo_n "checking for $ac_word... " >&6; }
59926if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59927  $as_echo_n "(cached) " >&6
59928else
59929  case $ICECC_CREATE_ENV in
59930  [\\/]* | ?:[\\/]*)
59931  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59932  ;;
59933  *)
59934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59935for as_dir in $PATH
59936do
59937  IFS=$as_save_IFS
59938  test -z "$as_dir" && as_dir=.
59939    for ac_exec_ext in '' $ac_executable_extensions; do
59940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59941    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59943    break 2
59944  fi
59945done
59946  done
59947IFS=$as_save_IFS
59948
59949  ;;
59950esac
59951fi
59952ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59953if test -n "$ICECC_CREATE_ENV"; then
59954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59955$as_echo "$ICECC_CREATE_ENV" >&6; }
59956else
59957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59958$as_echo "no" >&6; }
59959fi
59960
59961
59962  test -n "$ICECC_CREATE_ENV" && break
59963done
59964
59965  else
59966    # The variable is set, but is it from the command line or the environment?
59967
59968    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59971      # If it failed, the variable was not from the command line. Ignore it,
59972      # but warn the user (except for BASH, which is always set by the calling BASH).
59973      if test "xICECC_CREATE_ENV" != xBASH; then
59974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59975$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59976      fi
59977      # Try to locate tool using the code snippet
59978      for ac_prog in icecc-create-env
59979do
59980  # Extract the first word of "$ac_prog", so it can be a program name with args.
59981set dummy $ac_prog; ac_word=$2
59982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59983$as_echo_n "checking for $ac_word... " >&6; }
59984if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59985  $as_echo_n "(cached) " >&6
59986else
59987  case $ICECC_CREATE_ENV in
59988  [\\/]* | ?:[\\/]*)
59989  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59990  ;;
59991  *)
59992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59993for as_dir in $PATH
59994do
59995  IFS=$as_save_IFS
59996  test -z "$as_dir" && as_dir=.
59997    for ac_exec_ext in '' $ac_executable_extensions; do
59998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59999    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
60000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60001    break 2
60002  fi
60003done
60004  done
60005IFS=$as_save_IFS
60006
60007  ;;
60008esac
60009fi
60010ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
60011if test -n "$ICECC_CREATE_ENV"; then
60012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
60013$as_echo "$ICECC_CREATE_ENV" >&6; }
60014else
60015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60016$as_echo "no" >&6; }
60017fi
60018
60019
60020  test -n "$ICECC_CREATE_ENV" && break
60021done
60022
60023    else
60024      # If it succeeded, then it was overridden by the user. We will use it
60025      # for the tool.
60026
60027      # First remove it from the list of overridden variables, so we can test
60028      # for unknown variables in the end.
60029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60030
60031      # Check if we try to supply an empty value
60032      if test "x$ICECC_CREATE_ENV" = x; then
60033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
60034$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
60035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
60036$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
60037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60038$as_echo "disabled" >&6; }
60039      else
60040        # Check if the provided tool contains a complete path.
60041        tool_specified="$ICECC_CREATE_ENV"
60042        tool_basename="${tool_specified##*/}"
60043        if test "x$tool_basename" = "x$tool_specified"; then
60044          # A command without a complete path is provided, search $PATH.
60045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
60046$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
60047          # Extract the first word of "$tool_basename", so it can be a program name with args.
60048set dummy $tool_basename; ac_word=$2
60049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60050$as_echo_n "checking for $ac_word... " >&6; }
60051if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
60052  $as_echo_n "(cached) " >&6
60053else
60054  case $ICECC_CREATE_ENV in
60055  [\\/]* | ?:[\\/]*)
60056  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
60057  ;;
60058  *)
60059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60060for as_dir in $PATH
60061do
60062  IFS=$as_save_IFS
60063  test -z "$as_dir" && as_dir=.
60064    for ac_exec_ext in '' $ac_executable_extensions; do
60065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60066    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
60067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60068    break 2
60069  fi
60070done
60071  done
60072IFS=$as_save_IFS
60073
60074  ;;
60075esac
60076fi
60077ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
60078if test -n "$ICECC_CREATE_ENV"; then
60079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
60080$as_echo "$ICECC_CREATE_ENV" >&6; }
60081else
60082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60083$as_echo "no" >&6; }
60084fi
60085
60086
60087          if test "x$ICECC_CREATE_ENV" = x; then
60088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60089          fi
60090        else
60091          # Otherwise we believe it is a complete path. Use it as it is.
60092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
60093$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
60094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
60095$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
60096          if test ! -x "$tool_specified"; then
60097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60098$as_echo "not found" >&6; }
60099            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
60100          fi
60101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60102$as_echo "$tool_specified" >&6; }
60103        fi
60104      fi
60105    fi
60106
60107  fi
60108
60109
60110
60111  if test "x$ICECC_CREATE_ENV" = x; then
60112    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
60113  fi
60114
60115
60116    # Use icecc-create-env to create a minimal compilation environment that can
60117    # be sent to the other hosts in the icecream cluster.
60118    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
60119    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
60120    # Older versions of icecc does not have the --gcc parameter
60121    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
60122      icecc_gcc_arg="--gcc"
60123    fi
60124    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
60125
60126  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60127      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
60128          ${icecc_create_env_log} 2>&1
60129  if test "$?" != "0"; then
60130    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60131$as_echo "$as_me: icecc-create-env output:" >&6;}
60132    cat \
60133          ${icecc_create_env_log}
60134    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60135  fi
60136
60137    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
60138      # For clang, the icecc compilerwrapper is needed. It usually resides next
60139      # to icecc-create-env.
60140
60141
60142
60143  # Publish this variable in the help.
60144
60145
60146  if [ -z "${ICECC_WRAPPER+x}" ]; then
60147    # The variable is not set by user, try to locate tool using the code snippet
60148    for ac_prog in compilerwrapper
60149do
60150  # Extract the first word of "$ac_prog", so it can be a program name with args.
60151set dummy $ac_prog; ac_word=$2
60152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60153$as_echo_n "checking for $ac_word... " >&6; }
60154if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60155  $as_echo_n "(cached) " >&6
60156else
60157  case $ICECC_WRAPPER in
60158  [\\/]* | ?:[\\/]*)
60159  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60160  ;;
60161  *)
60162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60163for as_dir in $PATH
60164do
60165  IFS=$as_save_IFS
60166  test -z "$as_dir" && as_dir=.
60167    for ac_exec_ext in '' $ac_executable_extensions; do
60168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60169    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60171    break 2
60172  fi
60173done
60174  done
60175IFS=$as_save_IFS
60176
60177  ;;
60178esac
60179fi
60180ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60181if test -n "$ICECC_WRAPPER"; then
60182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60183$as_echo "$ICECC_WRAPPER" >&6; }
60184else
60185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60186$as_echo "no" >&6; }
60187fi
60188
60189
60190  test -n "$ICECC_WRAPPER" && break
60191done
60192
60193  else
60194    # The variable is set, but is it from the command line or the environment?
60195
60196    # Try to remove the string !ICECC_WRAPPER! from our list.
60197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
60198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60199      # If it failed, the variable was not from the command line. Ignore it,
60200      # but warn the user (except for BASH, which is always set by the calling BASH).
60201      if test "xICECC_WRAPPER" != xBASH; then
60202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
60203$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
60204      fi
60205      # Try to locate tool using the code snippet
60206      for ac_prog in compilerwrapper
60207do
60208  # Extract the first word of "$ac_prog", so it can be a program name with args.
60209set dummy $ac_prog; ac_word=$2
60210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60211$as_echo_n "checking for $ac_word... " >&6; }
60212if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60213  $as_echo_n "(cached) " >&6
60214else
60215  case $ICECC_WRAPPER in
60216  [\\/]* | ?:[\\/]*)
60217  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60218  ;;
60219  *)
60220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60221for as_dir in $PATH
60222do
60223  IFS=$as_save_IFS
60224  test -z "$as_dir" && as_dir=.
60225    for ac_exec_ext in '' $ac_executable_extensions; do
60226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60227    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60229    break 2
60230  fi
60231done
60232  done
60233IFS=$as_save_IFS
60234
60235  ;;
60236esac
60237fi
60238ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60239if test -n "$ICECC_WRAPPER"; then
60240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60241$as_echo "$ICECC_WRAPPER" >&6; }
60242else
60243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60244$as_echo "no" >&6; }
60245fi
60246
60247
60248  test -n "$ICECC_WRAPPER" && break
60249done
60250
60251    else
60252      # If it succeeded, then it was overridden by the user. We will use it
60253      # for the tool.
60254
60255      # First remove it from the list of overridden variables, so we can test
60256      # for unknown variables in the end.
60257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60258
60259      # Check if we try to supply an empty value
60260      if test "x$ICECC_WRAPPER" = x; then
60261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
60262$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
60263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
60264$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
60265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60266$as_echo "disabled" >&6; }
60267      else
60268        # Check if the provided tool contains a complete path.
60269        tool_specified="$ICECC_WRAPPER"
60270        tool_basename="${tool_specified##*/}"
60271        if test "x$tool_basename" = "x$tool_specified"; then
60272          # A command without a complete path is provided, search $PATH.
60273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
60274$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
60275          # Extract the first word of "$tool_basename", so it can be a program name with args.
60276set dummy $tool_basename; ac_word=$2
60277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60278$as_echo_n "checking for $ac_word... " >&6; }
60279if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60280  $as_echo_n "(cached) " >&6
60281else
60282  case $ICECC_WRAPPER in
60283  [\\/]* | ?:[\\/]*)
60284  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60285  ;;
60286  *)
60287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60288for as_dir in $PATH
60289do
60290  IFS=$as_save_IFS
60291  test -z "$as_dir" && as_dir=.
60292    for ac_exec_ext in '' $ac_executable_extensions; do
60293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60294    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60296    break 2
60297  fi
60298done
60299  done
60300IFS=$as_save_IFS
60301
60302  ;;
60303esac
60304fi
60305ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60306if test -n "$ICECC_WRAPPER"; then
60307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60308$as_echo "$ICECC_WRAPPER" >&6; }
60309else
60310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60311$as_echo "no" >&6; }
60312fi
60313
60314
60315          if test "x$ICECC_WRAPPER" = x; then
60316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60317          fi
60318        else
60319          # Otherwise we believe it is a complete path. Use it as it is.
60320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
60321$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
60322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
60323$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
60324          if test ! -x "$tool_specified"; then
60325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60326$as_echo "not found" >&6; }
60327            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
60328          fi
60329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60330$as_echo "$tool_specified" >&6; }
60331        fi
60332      fi
60333    fi
60334
60335  fi
60336
60337
60338
60339  if test "x$ICECC_WRAPPER" = x; then
60340    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
60341  fi
60342
60343
60344
60345  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60346      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1
60347  if test "$?" != "0"; then
60348    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60349$as_echo "$as_me: icecc-create-env output:" >&6;}
60350    cat ${icecc_create_env_log}
60351    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60352  fi
60353
60354    else
60355      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
60356    fi
60357    PATH="$old_path"
60358    # The bundle with the compiler gets a name based on checksums. Parse log file
60359    # to find it.
60360    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
60361    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60362    if test ! -f ${ICECC_ENV_BUNDLE}; then
60363      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60364    fi
60365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
60366$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
60367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60368$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60369    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
60370
60371    if test "x${COMPILE_TYPE}" = "xcross"; then
60372      # If cross compiling, create a separate env package for the build compiler
60373      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
60374      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
60375      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
60376
60377  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60378      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
60379            ${icecc_create_env_log_build} 2>&1
60380  if test "$?" != "0"; then
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60382$as_echo "$as_me: icecc-create-env output:" >&6;}
60383    cat \
60384            ${icecc_create_env_log_build}
60385    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60386  fi
60387
60388      elif test "x${BUILD_CC##*/}" = "xclang"; then
60389
60390  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60391      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1
60392  if test "$?" != "0"; then
60393    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60394$as_echo "$as_me: icecc-create-env output:" >&6;}
60395    cat ${icecc_create_env_log_build}
60396    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60397  fi
60398
60399      else
60400        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
60401      fi
60402      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
60403      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60404      if test ! -f ${ICECC_ENV_BUNDLE}; then
60405        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60406      fi
60407      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
60408$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
60409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60410$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60411      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
60412          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
60413    else
60414      BUILD_ICECC="${ICECC}"
60415    fi
60416
60417
60418  fi
60419
60420
60421# Can the C/C++ compiler use precompiled headers?
60422
60423
60424  ###############################################################################
60425  #
60426  # Can the C/C++ compiler use precompiled headers?
60427  #
60428  # Check whether --enable-precompiled-headers was given.
60429if test "${enable_precompiled_headers+set}" = set; then :
60430  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
60431else
60432  ENABLE_PRECOMPH=yes
60433fi
60434
60435
60436  USE_PRECOMPILED_HEADER=1
60437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
60438$as_echo_n "checking If precompiled header is enabled... " >&6; }
60439  if test "x$ENABLE_PRECOMPH" = xno; then
60440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
60441$as_echo "no, forced" >&6; }
60442    USE_PRECOMPILED_HEADER=0
60443  elif test "x$ICECC" != "x"; then
60444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
60445$as_echo "no, does not work effectively with icecc" >&6; }
60446    USE_PRECOMPILED_HEADER=0
60447  else
60448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60449$as_echo "yes" >&6; }
60450  fi
60451
60452  if test "x$ENABLE_PRECOMPH" = xyes; then
60453    # Check that the compiler actually supports precomp headers.
60454    if test "x$TOOLCHAIN_TYPE" = xgcc; then
60455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
60456$as_echo_n "checking that precompiled headers work... " >&6; }
60457      echo "int alfa();" > conftest.h
60458      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
60459      if test ! -f conftest.hpp.gch; then
60460        USE_PRECOMPILED_HEADER=0
60461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60462$as_echo "no" >&6; }
60463      else
60464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60465$as_echo "yes" >&6; }
60466      fi
60467      rm -f conftest.h conftest.hpp.gch
60468    fi
60469  fi
60470
60471
60472
60473
60474# Setup use of ccache, if available
60475
60476  # Check whether --enable-ccache was given.
60477if test "${enable_ccache+set}" = set; then :
60478  enableval=$enable_ccache;
60479fi
60480
60481
60482  CCACHE=
60483  CCACHE_STATUS=
60484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
60485$as_echo_n "checking is ccache enabled... " >&6; }
60486  if test "x$enable_ccache" = xyes; then
60487    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
60488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60489$as_echo "yes" >&6; }
60490      OLD_PATH="$PATH"
60491      if test "x$TOOLCHAIN_PATH" != x; then
60492        PATH=$TOOLCHAIN_PATH:$PATH
60493      fi
60494
60495
60496
60497  # Publish this variable in the help.
60498
60499
60500  if [ -z "${CCACHE+x}" ]; then
60501    # The variable is not set by user, try to locate tool using the code snippet
60502    for ac_prog in ccache
60503do
60504  # Extract the first word of "$ac_prog", so it can be a program name with args.
60505set dummy $ac_prog; ac_word=$2
60506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60507$as_echo_n "checking for $ac_word... " >&6; }
60508if ${ac_cv_path_CCACHE+:} false; then :
60509  $as_echo_n "(cached) " >&6
60510else
60511  case $CCACHE in
60512  [\\/]* | ?:[\\/]*)
60513  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60514  ;;
60515  *)
60516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60517for as_dir in $PATH
60518do
60519  IFS=$as_save_IFS
60520  test -z "$as_dir" && as_dir=.
60521    for ac_exec_ext in '' $ac_executable_extensions; do
60522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60523    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60525    break 2
60526  fi
60527done
60528  done
60529IFS=$as_save_IFS
60530
60531  ;;
60532esac
60533fi
60534CCACHE=$ac_cv_path_CCACHE
60535if test -n "$CCACHE"; then
60536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60537$as_echo "$CCACHE" >&6; }
60538else
60539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60540$as_echo "no" >&6; }
60541fi
60542
60543
60544  test -n "$CCACHE" && break
60545done
60546
60547  else
60548    # The variable is set, but is it from the command line or the environment?
60549
60550    # Try to remove the string !CCACHE! from our list.
60551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
60552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60553      # If it failed, the variable was not from the command line. Ignore it,
60554      # but warn the user (except for BASH, which is always set by the calling BASH).
60555      if test "xCCACHE" != xBASH; then
60556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
60557$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
60558      fi
60559      # Try to locate tool using the code snippet
60560      for ac_prog in ccache
60561do
60562  # Extract the first word of "$ac_prog", so it can be a program name with args.
60563set dummy $ac_prog; ac_word=$2
60564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60565$as_echo_n "checking for $ac_word... " >&6; }
60566if ${ac_cv_path_CCACHE+:} false; then :
60567  $as_echo_n "(cached) " >&6
60568else
60569  case $CCACHE in
60570  [\\/]* | ?:[\\/]*)
60571  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60572  ;;
60573  *)
60574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60575for as_dir in $PATH
60576do
60577  IFS=$as_save_IFS
60578  test -z "$as_dir" && as_dir=.
60579    for ac_exec_ext in '' $ac_executable_extensions; do
60580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60581    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60583    break 2
60584  fi
60585done
60586  done
60587IFS=$as_save_IFS
60588
60589  ;;
60590esac
60591fi
60592CCACHE=$ac_cv_path_CCACHE
60593if test -n "$CCACHE"; then
60594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60595$as_echo "$CCACHE" >&6; }
60596else
60597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60598$as_echo "no" >&6; }
60599fi
60600
60601
60602  test -n "$CCACHE" && break
60603done
60604
60605    else
60606      # If it succeeded, then it was overridden by the user. We will use it
60607      # for the tool.
60608
60609      # First remove it from the list of overridden variables, so we can test
60610      # for unknown variables in the end.
60611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60612
60613      # Check if we try to supply an empty value
60614      if test "x$CCACHE" = x; then
60615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60616$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60618$as_echo_n "checking for CCACHE... " >&6; }
60619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60620$as_echo "disabled" >&6; }
60621      else
60622        # Check if the provided tool contains a complete path.
60623        tool_specified="$CCACHE"
60624        tool_basename="${tool_specified##*/}"
60625        if test "x$tool_basename" = "x$tool_specified"; then
60626          # A command without a complete path is provided, search $PATH.
60627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60628$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60629          # Extract the first word of "$tool_basename", so it can be a program name with args.
60630set dummy $tool_basename; ac_word=$2
60631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60632$as_echo_n "checking for $ac_word... " >&6; }
60633if ${ac_cv_path_CCACHE+:} false; then :
60634  $as_echo_n "(cached) " >&6
60635else
60636  case $CCACHE in
60637  [\\/]* | ?:[\\/]*)
60638  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60639  ;;
60640  *)
60641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60642for as_dir in $PATH
60643do
60644  IFS=$as_save_IFS
60645  test -z "$as_dir" && as_dir=.
60646    for ac_exec_ext in '' $ac_executable_extensions; do
60647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60648    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60650    break 2
60651  fi
60652done
60653  done
60654IFS=$as_save_IFS
60655
60656  ;;
60657esac
60658fi
60659CCACHE=$ac_cv_path_CCACHE
60660if test -n "$CCACHE"; then
60661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60662$as_echo "$CCACHE" >&6; }
60663else
60664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60665$as_echo "no" >&6; }
60666fi
60667
60668
60669          if test "x$CCACHE" = x; then
60670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60671          fi
60672        else
60673          # Otherwise we believe it is a complete path. Use it as it is.
60674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60675$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60677$as_echo_n "checking for CCACHE... " >&6; }
60678          if test ! -x "$tool_specified"; then
60679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60680$as_echo "not found" >&6; }
60681            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60682          fi
60683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60684$as_echo "$tool_specified" >&6; }
60685        fi
60686      fi
60687    fi
60688
60689  fi
60690
60691
60692
60693  if test "x$CCACHE" = x; then
60694    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60695  fi
60696
60697
60698      PATH="$OLD_PATH"
60699      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60700      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60701    else
60702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60703$as_echo "no" >&6; }
60704      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60705$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60706    fi
60707  elif test "x$enable_ccache" = xno; then
60708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60709$as_echo "no, explicitly disabled" >&6; }
60710    CCACHE_STATUS="Disabled"
60711  elif test "x$enable_ccache" = x; then
60712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60713$as_echo "no" >&6; }
60714  else
60715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60716$as_echo "unknown" >&6; }
60717    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60718  fi
60719
60720
60721
60722# Check whether --with-ccache-dir was given.
60723if test "${with_ccache_dir+set}" = set; then :
60724  withval=$with_ccache_dir;
60725fi
60726
60727
60728  if test "x$with_ccache_dir" != x; then
60729    # When using a non home ccache directory, assume the use is to share ccache files
60730    # with other users. Thus change the umask.
60731    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60732    if test "x$CCACHE" = x; then
60733      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60734$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60735    fi
60736  fi
60737
60738  if test "x$CCACHE" != x; then
60739
60740  if test "x$CCACHE" != x; then
60741    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60742      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60743          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60744      if test "x$HAS_BAD_CCACHE" != "x"; then
60745        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60746      fi
60747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60748$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60749      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60750      PUSHED_FLAGS="$CXXFLAGS"
60751      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60752      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60753/* end confdefs.h.  */
60754
60755int
60756main ()
60757{
60758
60759  ;
60760  return 0;
60761}
60762_ACEOF
60763if ac_fn_cxx_try_compile "$LINENO"; then :
60764  CC_KNOWS_CCACHE_TRICK=yes
60765else
60766  CC_KNOWS_CCACHE_TRICK=no
60767fi
60768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60769      CXXFLAGS="$PUSHED_FLAGS"
60770      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60772$as_echo "yes" >&6; }
60773        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60774
60775        CCACHE_SLOPPINESS=pch_defines,time_macros
60776      else
60777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60778$as_echo "no" >&6; }
60779        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60780      fi
60781    fi
60782
60783    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60784        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60785
60786    if test "x$SET_CCACHE_DIR" != x; then
60787      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60788      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60789    fi
60790  fi
60791
60792  fi
60793
60794
60795###############################################################################
60796#
60797# And now the finish...
60798#
60799###############################################################################
60800
60801# Check for some common pitfalls
60802
60803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60804    file_to_test="$SRC_ROOT/LICENSE"
60805    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60806      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
60807    fi
60808  fi
60809
60810
60811  # Did user specify any unknown variables?
60812
60813  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60814    # Replace the separating ! with spaces before presenting for end user.
60815    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60816    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60817$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60818  fi
60819
60820
60821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60822$as_echo_n "checking if build directory is on local disk... " >&6; }
60823
60824  # df -l lists only local disks; if the given directory is not found then
60825  # a non-zero exit code is given
60826  if test "x$DF" = x; then
60827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60828      # msys does not have df; use Windows "net use" instead.
60829      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60830      if test "x$IS_NETWORK_DISK" = x; then
60831        OUTPUT_DIR_IS_LOCAL="yes"
60832      else
60833        OUTPUT_DIR_IS_LOCAL="no"
60834      fi
60835    else
60836      # No df here, say it's local
60837      OUTPUT_DIR_IS_LOCAL="yes"
60838    fi
60839  else
60840    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60841      OUTPUT_DIR_IS_LOCAL="yes"
60842    else
60843      OUTPUT_DIR_IS_LOCAL="no"
60844    fi
60845  fi
60846
60847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60848$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60849
60850
60851
60852  # Check if the user has any old-style ALT_ variables set.
60853  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60854
60855  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60856  # Since we can't properly handle the dependencies for this, warn the user about the situation
60857  if test -e $OUTPUT_ROOT/spec.gmk; then
60858    IS_RECONFIGURE=yes
60859  else
60860    IS_RECONFIGURE=no
60861  fi
60862
60863
60864# At the end, call the custom hook. (Dummy macro if no custom sources available)
60865
60866
60867# We're messing a bit with internal autoconf variables to put the config.status
60868# in the output directory instead of the current directory.
60869CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60870
60871# Create the actual output files. Now the main work of configure is done.
60872cat >confcache <<\_ACEOF
60873# This file is a shell script that caches the results of configure
60874# tests run on this system so they can be shared between configure
60875# scripts and configure runs, see configure's option --config-cache.
60876# It is not useful on other systems.  If it contains results you don't
60877# want to keep, you may remove or edit it.
60878#
60879# config.status only pays attention to the cache file if you give it
60880# the --recheck option to rerun configure.
60881#
60882# `ac_cv_env_foo' variables (set or unset) will be overridden when
60883# loading this file, other *unset* `ac_cv_foo' will be assigned the
60884# following values.
60885
60886_ACEOF
60887
60888# The following way of writing the cache mishandles newlines in values,
60889# but we know of no workaround that is simple, portable, and efficient.
60890# So, we kill variables containing newlines.
60891# Ultrix sh set writes to stderr and can't be redirected directly,
60892# and sets the high bit in the cache file unless we assign to the vars.
60893(
60894  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60895    eval ac_val=\$$ac_var
60896    case $ac_val in #(
60897    *${as_nl}*)
60898      case $ac_var in #(
60899      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60900$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60901      esac
60902      case $ac_var in #(
60903      _ | IFS | as_nl) ;; #(
60904      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60905      *) { eval $ac_var=; unset $ac_var;} ;;
60906      esac ;;
60907    esac
60908  done
60909
60910  (set) 2>&1 |
60911    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60912    *${as_nl}ac_space=\ *)
60913      # `set' does not quote correctly, so add quotes: double-quote
60914      # substitution turns \\\\ into \\, and sed turns \\ into \.
60915      sed -n \
60916	"s/'/'\\\\''/g;
60917	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60918      ;; #(
60919    *)
60920      # `set' quotes correctly as required by POSIX, so do not add quotes.
60921      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60922      ;;
60923    esac |
60924    sort
60925) |
60926  sed '
60927     /^ac_cv_env_/b end
60928     t clear
60929     :clear
60930     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60931     t end
60932     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60933     :end' >>confcache
60934if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60935  if test -w "$cache_file"; then
60936    if test "x$cache_file" != "x/dev/null"; then
60937      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60938$as_echo "$as_me: updating cache $cache_file" >&6;}
60939      if test ! -f "$cache_file" || test -h "$cache_file"; then
60940	cat confcache >"$cache_file"
60941      else
60942        case $cache_file in #(
60943        */* | ?:*)
60944	  mv -f confcache "$cache_file"$$ &&
60945	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60946        *)
60947	  mv -f confcache "$cache_file" ;;
60948	esac
60949      fi
60950    fi
60951  else
60952    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60953$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60954  fi
60955fi
60956rm -f confcache
60957
60958test "x$prefix" = xNONE && prefix=$ac_default_prefix
60959# Let make expand exec_prefix.
60960test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60961
60962# Transform confdefs.h into DEFS.
60963# Protect against shell expansion while executing Makefile rules.
60964# Protect against Makefile macro expansion.
60965#
60966# If the first sed substitution is executed (which looks for macros that
60967# take arguments), then branch to the quote section.  Otherwise,
60968# look for a macro that doesn't take arguments.
60969ac_script='
60970:mline
60971/\\$/{
60972 N
60973 s,\\\n,,
60974 b mline
60975}
60976t clear
60977:clear
60978s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60979t quote
60980s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60981t quote
60982b any
60983:quote
60984s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60985s/\[/\\&/g
60986s/\]/\\&/g
60987s/\$/$$/g
60988H
60989:any
60990${
60991	g
60992	s/^\n//
60993	s/\n/ /g
60994	p
60995}
60996'
60997DEFS=`sed -n "$ac_script" confdefs.h`
60998
60999
61000ac_libobjs=
61001ac_ltlibobjs=
61002U=
61003for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
61004  # 1. Remove the extension, and $U if already installed.
61005  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
61006  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
61007  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
61008  #    will be set to the directory where LIBOBJS objects are built.
61009  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
61010  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
61011done
61012LIBOBJS=$ac_libobjs
61013
61014LTLIBOBJS=$ac_ltlibobjs
61015
61016
61017
61018: "${CONFIG_STATUS=./config.status}"
61019ac_write_fail=0
61020ac_clean_files_save=$ac_clean_files
61021ac_clean_files="$ac_clean_files $CONFIG_STATUS"
61022{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
61023$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
61024as_write_fail=0
61025cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
61026#! $SHELL
61027# Generated by $as_me.
61028# Run this file to recreate the current configuration.
61029# Compiler output produced by configure, useful for debugging
61030# configure, is in config.log if it exists.
61031
61032debug=false
61033ac_cs_recheck=false
61034ac_cs_silent=false
61035
61036SHELL=\${CONFIG_SHELL-$SHELL}
61037export SHELL
61038_ASEOF
61039cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
61040## -------------------- ##
61041## M4sh Initialization. ##
61042## -------------------- ##
61043
61044# Be more Bourne compatible
61045DUALCASE=1; export DUALCASE # for MKS sh
61046if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
61047  emulate sh
61048  NULLCMD=:
61049  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
61050  # is contrary to our usage.  Disable this feature.
61051  alias -g '${1+"$@"}'='"$@"'
61052  setopt NO_GLOB_SUBST
61053else
61054  case `(set -o) 2>/dev/null` in #(
61055  *posix*) :
61056    set -o posix ;; #(
61057  *) :
61058     ;;
61059esac
61060fi
61061
61062
61063as_nl='
61064'
61065export as_nl
61066# Printing a long string crashes Solaris 7 /usr/bin/printf.
61067as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
61068as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
61069as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
61070# Prefer a ksh shell builtin over an external printf program on Solaris,
61071# but without wasting forks for bash or zsh.
61072if test -z "$BASH_VERSION$ZSH_VERSION" \
61073    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
61074  as_echo='print -r --'
61075  as_echo_n='print -rn --'
61076elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
61077  as_echo='printf %s\n'
61078  as_echo_n='printf %s'
61079else
61080  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
61081    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61082    as_echo_n='/usr/ucb/echo -n'
61083  else
61084    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61085    as_echo_n_body='eval
61086      arg=$1;
61087      case $arg in #(
61088      *"$as_nl"*)
61089	expr "X$arg" : "X\\(.*\\)$as_nl";
61090	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61091      esac;
61092      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
61093    '
61094    export as_echo_n_body
61095    as_echo_n='sh -c $as_echo_n_body as_echo'
61096  fi
61097  export as_echo_body
61098  as_echo='sh -c $as_echo_body as_echo'
61099fi
61100
61101# The user is always right.
61102if test "${PATH_SEPARATOR+set}" != set; then
61103  PATH_SEPARATOR=:
61104  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
61105    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
61106      PATH_SEPARATOR=';'
61107  }
61108fi
61109
61110
61111# IFS
61112# We need space, tab and new line, in precisely that order.  Quoting is
61113# there to prevent editors from complaining about space-tab.
61114# (If _AS_PATH_WALK were called with IFS unset, it would disable word
61115# splitting by setting IFS to empty value.)
61116IFS=" ""	$as_nl"
61117
61118# Find who we are.  Look in the path if we contain no directory separator.
61119as_myself=
61120case $0 in #((
61121  *[\\/]* ) as_myself=$0 ;;
61122  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61123for as_dir in $PATH
61124do
61125  IFS=$as_save_IFS
61126  test -z "$as_dir" && as_dir=.
61127    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
61128  done
61129IFS=$as_save_IFS
61130
61131     ;;
61132esac
61133# We did not find ourselves, most probably we were run as `sh COMMAND'
61134# in which case we are not to be found in the path.
61135if test "x$as_myself" = x; then
61136  as_myself=$0
61137fi
61138if test ! -f "$as_myself"; then
61139  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
61140  exit 1
61141fi
61142
61143# Unset variables that we do not need and which cause bugs (e.g. in
61144# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
61145# suppresses any "Segmentation fault" message there.  '((' could
61146# trigger a bug in pdksh 5.2.14.
61147for as_var in BASH_ENV ENV MAIL MAILPATH
61148do eval test x\${$as_var+set} = xset \
61149  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
61150done
61151PS1='$ '
61152PS2='> '
61153PS4='+ '
61154
61155# NLS nuisances.
61156LC_ALL=C
61157export LC_ALL
61158LANGUAGE=C
61159export LANGUAGE
61160
61161# CDPATH.
61162(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
61163
61164
61165# as_fn_error STATUS ERROR [LINENO LOG_FD]
61166# ----------------------------------------
61167# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
61168# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
61169# script with STATUS, using 1 if that was 0.
61170as_fn_error ()
61171{
61172  as_status=$1; test $as_status -eq 0 && as_status=1
61173  if test "$4"; then
61174    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
61175    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
61176  fi
61177  $as_echo "$as_me: error: $2" >&2
61178  as_fn_exit $as_status
61179} # as_fn_error
61180
61181
61182# as_fn_set_status STATUS
61183# -----------------------
61184# Set $? to STATUS, without forking.
61185as_fn_set_status ()
61186{
61187  return $1
61188} # as_fn_set_status
61189
61190# as_fn_exit STATUS
61191# -----------------
61192# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
61193as_fn_exit ()
61194{
61195  set +e
61196  as_fn_set_status $1
61197  exit $1
61198} # as_fn_exit
61199
61200# as_fn_unset VAR
61201# ---------------
61202# Portably unset VAR.
61203as_fn_unset ()
61204{
61205  { eval $1=; unset $1;}
61206}
61207as_unset=as_fn_unset
61208# as_fn_append VAR VALUE
61209# ----------------------
61210# Append the text in VALUE to the end of the definition contained in VAR. Take
61211# advantage of any shell optimizations that allow amortized linear growth over
61212# repeated appends, instead of the typical quadratic growth present in naive
61213# implementations.
61214if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
61215  eval 'as_fn_append ()
61216  {
61217    eval $1+=\$2
61218  }'
61219else
61220  as_fn_append ()
61221  {
61222    eval $1=\$$1\$2
61223  }
61224fi # as_fn_append
61225
61226# as_fn_arith ARG...
61227# ------------------
61228# Perform arithmetic evaluation on the ARGs, and store the result in the
61229# global $as_val. Take advantage of shells that can avoid forks. The arguments
61230# must be portable across $(()) and expr.
61231if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
61232  eval 'as_fn_arith ()
61233  {
61234    as_val=$(( $* ))
61235  }'
61236else
61237  as_fn_arith ()
61238  {
61239    as_val=`expr "$@" || test $? -eq 1`
61240  }
61241fi # as_fn_arith
61242
61243
61244if expr a : '\(a\)' >/dev/null 2>&1 &&
61245   test "X`expr 00001 : '.*\(...\)'`" = X001; then
61246  as_expr=expr
61247else
61248  as_expr=false
61249fi
61250
61251if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
61252  as_basename=basename
61253else
61254  as_basename=false
61255fi
61256
61257if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
61258  as_dirname=dirname
61259else
61260  as_dirname=false
61261fi
61262
61263as_me=`$as_basename -- "$0" ||
61264$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
61265	 X"$0" : 'X\(//\)$' \| \
61266	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
61267$as_echo X/"$0" |
61268    sed '/^.*\/\([^/][^/]*\)\/*$/{
61269	    s//\1/
61270	    q
61271	  }
61272	  /^X\/\(\/\/\)$/{
61273	    s//\1/
61274	    q
61275	  }
61276	  /^X\/\(\/\).*/{
61277	    s//\1/
61278	    q
61279	  }
61280	  s/.*/./; q'`
61281
61282# Avoid depending upon Character Ranges.
61283as_cr_letters='abcdefghijklmnopqrstuvwxyz'
61284as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
61285as_cr_Letters=$as_cr_letters$as_cr_LETTERS
61286as_cr_digits='0123456789'
61287as_cr_alnum=$as_cr_Letters$as_cr_digits
61288
61289ECHO_C= ECHO_N= ECHO_T=
61290case `echo -n x` in #(((((
61291-n*)
61292  case `echo 'xy\c'` in
61293  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
61294  xy)  ECHO_C='\c';;
61295  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
61296       ECHO_T='	';;
61297  esac;;
61298*)
61299  ECHO_N='-n';;
61300esac
61301
61302rm -f conf$$ conf$$.exe conf$$.file
61303if test -d conf$$.dir; then
61304  rm -f conf$$.dir/conf$$.file
61305else
61306  rm -f conf$$.dir
61307  mkdir conf$$.dir 2>/dev/null
61308fi
61309if (echo >conf$$.file) 2>/dev/null; then
61310  if ln -s conf$$.file conf$$ 2>/dev/null; then
61311    as_ln_s='ln -s'
61312    # ... but there are two gotchas:
61313    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
61314    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
61315    # In both cases, we have to default to `cp -pR'.
61316    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
61317      as_ln_s='cp -pR'
61318  elif ln conf$$.file conf$$ 2>/dev/null; then
61319    as_ln_s=ln
61320  else
61321    as_ln_s='cp -pR'
61322  fi
61323else
61324  as_ln_s='cp -pR'
61325fi
61326rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
61327rmdir conf$$.dir 2>/dev/null
61328
61329
61330# as_fn_mkdir_p
61331# -------------
61332# Create "$as_dir" as a directory, including parents if necessary.
61333as_fn_mkdir_p ()
61334{
61335
61336  case $as_dir in #(
61337  -*) as_dir=./$as_dir;;
61338  esac
61339  test -d "$as_dir" || eval $as_mkdir_p || {
61340    as_dirs=
61341    while :; do
61342      case $as_dir in #(
61343      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
61344      *) as_qdir=$as_dir;;
61345      esac
61346      as_dirs="'$as_qdir' $as_dirs"
61347      as_dir=`$as_dirname -- "$as_dir" ||
61348$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61349	 X"$as_dir" : 'X\(//\)[^/]' \| \
61350	 X"$as_dir" : 'X\(//\)$' \| \
61351	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
61352$as_echo X"$as_dir" |
61353    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61354	    s//\1/
61355	    q
61356	  }
61357	  /^X\(\/\/\)[^/].*/{
61358	    s//\1/
61359	    q
61360	  }
61361	  /^X\(\/\/\)$/{
61362	    s//\1/
61363	    q
61364	  }
61365	  /^X\(\/\).*/{
61366	    s//\1/
61367	    q
61368	  }
61369	  s/.*/./; q'`
61370      test -d "$as_dir" && break
61371    done
61372    test -z "$as_dirs" || eval "mkdir $as_dirs"
61373  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
61374
61375
61376} # as_fn_mkdir_p
61377if mkdir -p . 2>/dev/null; then
61378  as_mkdir_p='mkdir -p "$as_dir"'
61379else
61380  test -d ./-p && rmdir ./-p
61381  as_mkdir_p=false
61382fi
61383
61384
61385# as_fn_executable_p FILE
61386# -----------------------
61387# Test if FILE is an executable regular file.
61388as_fn_executable_p ()
61389{
61390  test -f "$1" && test -x "$1"
61391} # as_fn_executable_p
61392as_test_x='test -x'
61393as_executable_p=as_fn_executable_p
61394
61395# Sed expression to map a string onto a valid CPP name.
61396as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
61397
61398# Sed expression to map a string onto a valid variable name.
61399as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
61400
61401
61402exec 6>&1
61403## ----------------------------------- ##
61404## Main body of $CONFIG_STATUS script. ##
61405## ----------------------------------- ##
61406_ASEOF
61407test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61408
61409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61410# Save the log message, to keep $0 and so on meaningful, and to
61411# report actual input values of CONFIG_FILES etc. instead of their
61412# values after options handling.
61413ac_log="
61414This file was extended by OpenJDK $as_me jdk9, which was
61415generated by GNU Autoconf 2.69.  Invocation command line was
61416
61417  CONFIG_FILES    = $CONFIG_FILES
61418  CONFIG_HEADERS  = $CONFIG_HEADERS
61419  CONFIG_LINKS    = $CONFIG_LINKS
61420  CONFIG_COMMANDS = $CONFIG_COMMANDS
61421  $ $0 $@
61422
61423on `(hostname || uname -n) 2>/dev/null | sed 1q`
61424"
61425
61426_ACEOF
61427
61428case $ac_config_files in *"
61429"*) set x $ac_config_files; shift; ac_config_files=$*;;
61430esac
61431
61432
61433
61434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61435# Files that config.status was made for.
61436config_files="$ac_config_files"
61437
61438_ACEOF
61439
61440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61441ac_cs_usage="\
61442\`$as_me' instantiates files and other configuration actions
61443from templates according to the current configuration.  Unless the files
61444and actions are specified as TAGs, all are instantiated by default.
61445
61446Usage: $0 [OPTION]... [TAG]...
61447
61448  -h, --help       print this help, then exit
61449  -V, --version    print version number and configuration settings, then exit
61450      --config     print configuration, then exit
61451  -q, --quiet, --silent
61452                   do not print progress messages
61453  -d, --debug      don't remove temporary files
61454      --recheck    update $as_me by reconfiguring in the same conditions
61455      --file=FILE[:TEMPLATE]
61456                   instantiate the configuration file FILE
61457
61458Configuration files:
61459$config_files
61460
61461Report bugs to <build-dev@openjdk.java.net>.
61462OpenJDK home page: <http://openjdk.java.net>."
61463
61464_ACEOF
61465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61466ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
61467ac_cs_version="\\
61468OpenJDK config.status jdk9
61469configured by $0, generated by GNU Autoconf 2.69,
61470  with options \\"\$ac_cs_config\\"
61471
61472Copyright (C) 2012 Free Software Foundation, Inc.
61473This config.status script is free software; the Free Software Foundation
61474gives unlimited permission to copy, distribute and modify it."
61475
61476ac_pwd='$ac_pwd'
61477srcdir='$srcdir'
61478AWK='$AWK'
61479test -n "\$AWK" || AWK=awk
61480_ACEOF
61481
61482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61483# The default lists apply if the user does not specify any file.
61484ac_need_defaults=:
61485while test $# != 0
61486do
61487  case $1 in
61488  --*=?*)
61489    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61490    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61491    ac_shift=:
61492    ;;
61493  --*=)
61494    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61495    ac_optarg=
61496    ac_shift=:
61497    ;;
61498  *)
61499    ac_option=$1
61500    ac_optarg=$2
61501    ac_shift=shift
61502    ;;
61503  esac
61504
61505  case $ac_option in
61506  # Handling of the options.
61507  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61508    ac_cs_recheck=: ;;
61509  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61510    $as_echo "$ac_cs_version"; exit ;;
61511  --config | --confi | --conf | --con | --co | --c )
61512    $as_echo "$ac_cs_config"; exit ;;
61513  --debug | --debu | --deb | --de | --d | -d )
61514    debug=: ;;
61515  --file | --fil | --fi | --f )
61516    $ac_shift
61517    case $ac_optarg in
61518    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61519    '') as_fn_error $? "missing file argument" ;;
61520    esac
61521    as_fn_append CONFIG_FILES " '$ac_optarg'"
61522    ac_need_defaults=false;;
61523  --he | --h |  --help | --hel | -h )
61524    $as_echo "$ac_cs_usage"; exit ;;
61525  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61526  | -silent | --silent | --silen | --sile | --sil | --si | --s)
61527    ac_cs_silent=: ;;
61528
61529  # This is an error.
61530  -*) as_fn_error $? "unrecognized option: \`$1'
61531Try \`$0 --help' for more information." ;;
61532
61533  *) as_fn_append ac_config_targets " $1"
61534     ac_need_defaults=false ;;
61535
61536  esac
61537  shift
61538done
61539
61540ac_configure_extra_args=
61541
61542if $ac_cs_silent; then
61543  exec 6>/dev/null
61544  ac_configure_extra_args="$ac_configure_extra_args --silent"
61545fi
61546
61547_ACEOF
61548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61549if \$ac_cs_recheck; then
61550  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
61551  shift
61552  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
61553  CONFIG_SHELL='$SHELL'
61554  export CONFIG_SHELL
61555  exec "\$@"
61556fi
61557
61558_ACEOF
61559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61560exec 5>>config.log
61561{
61562  echo
61563  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
61564## Running $as_me. ##
61565_ASBOX
61566  $as_echo "$ac_log"
61567} >&5
61568
61569_ACEOF
61570cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61571_ACEOF
61572
61573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61574
61575# Handling of arguments.
61576for ac_config_target in $ac_config_targets
61577do
61578  case $ac_config_target in
61579    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
61580    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
61581    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
61582    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
61583    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
61584
61585  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61586  esac
61587done
61588
61589
61590# If the user did not use the arguments to specify the items to instantiate,
61591# then the envvar interface is used.  Set only those that are not.
61592# We use the long form for the default assignment because of an extremely
61593# bizarre bug on SunOS 4.1.3.
61594if $ac_need_defaults; then
61595  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
61596fi
61597
61598# Have a temporary directory for convenience.  Make it in the build tree
61599# simply because there is no reason against having it here, and in addition,
61600# creating and moving files from /tmp can sometimes cause problems.
61601# Hook for its removal unless debugging.
61602# Note that there is a small window in which the directory will not be cleaned:
61603# after its creation but before its name has been assigned to `$tmp'.
61604$debug ||
61605{
61606  tmp= ac_tmp=
61607  trap 'exit_status=$?
61608  : "${ac_tmp:=$tmp}"
61609  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61610' 0
61611  trap 'as_fn_exit 1' 1 2 13 15
61612}
61613# Create a (secure) tmp directory for tmp files.
61614
61615{
61616  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61617  test -d "$tmp"
61618}  ||
61619{
61620  tmp=./conf$$-$RANDOM
61621  (umask 077 && mkdir "$tmp")
61622} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61623ac_tmp=$tmp
61624
61625# Set up the scripts for CONFIG_FILES section.
61626# No need to generate them if there are no CONFIG_FILES.
61627# This happens for instance with `./config.status config.h'.
61628if test -n "$CONFIG_FILES"; then
61629
61630
61631ac_cr=`echo X | tr X '\015'`
61632# On cygwin, bash can eat \r inside `` if the user requested igncr.
61633# But we know of no other shell where ac_cr would be empty at this
61634# point, so we can use a bashism as a fallback.
61635if test "x$ac_cr" = x; then
61636  eval ac_cr=\$\'\\r\'
61637fi
61638ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61639if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61640  ac_cs_awk_cr='\\r'
61641else
61642  ac_cs_awk_cr=$ac_cr
61643fi
61644
61645echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61646_ACEOF
61647
61648
61649{
61650  echo "cat >conf$$subs.awk <<_ACEOF" &&
61651  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61652  echo "_ACEOF"
61653} >conf$$subs.sh ||
61654  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61655ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61656ac_delim='%!_!# '
61657for ac_last_try in false false false false false :; do
61658  . ./conf$$subs.sh ||
61659    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61660
61661  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61662  if test $ac_delim_n = $ac_delim_num; then
61663    break
61664  elif $ac_last_try; then
61665    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61666  else
61667    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61668  fi
61669done
61670rm -f conf$$subs.sh
61671
61672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61673cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61674_ACEOF
61675sed -n '
61676h
61677s/^/S["/; s/!.*/"]=/
61678p
61679g
61680s/^[^!]*!//
61681:repl
61682t repl
61683s/'"$ac_delim"'$//
61684t delim
61685:nl
61686h
61687s/\(.\{148\}\)..*/\1/
61688t more1
61689s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61690p
61691n
61692b repl
61693:more1
61694s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61695p
61696g
61697s/.\{148\}//
61698t nl
61699:delim
61700h
61701s/\(.\{148\}\)..*/\1/
61702t more2
61703s/["\\]/\\&/g; s/^/"/; s/$/"/
61704p
61705b
61706:more2
61707s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61708p
61709g
61710s/.\{148\}//
61711t delim
61712' <conf$$subs.awk | sed '
61713/^[^""]/{
61714  N
61715  s/\n//
61716}
61717' >>$CONFIG_STATUS || ac_write_fail=1
61718rm -f conf$$subs.awk
61719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61720_ACAWK
61721cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61722  for (key in S) S_is_set[key] = 1
61723  FS = ""
61724
61725}
61726{
61727  line = $ 0
61728  nfields = split(line, field, "@")
61729  substed = 0
61730  len = length(field[1])
61731  for (i = 2; i < nfields; i++) {
61732    key = field[i]
61733    keylen = length(key)
61734    if (S_is_set[key]) {
61735      value = S[key]
61736      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61737      len += length(value) + length(field[++i])
61738      substed = 1
61739    } else
61740      len += 1 + keylen
61741  }
61742
61743  print line
61744}
61745
61746_ACAWK
61747_ACEOF
61748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61749if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61750  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61751else
61752  cat
61753fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61754  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61755_ACEOF
61756
61757# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61758# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61759# trailing colons and then remove the whole line if VPATH becomes empty
61760# (actually we leave an empty line to preserve line numbers).
61761if test "x$srcdir" = x.; then
61762  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61763h
61764s///
61765s/^/:/
61766s/[	 ]*$/:/
61767s/:\$(srcdir):/:/g
61768s/:\${srcdir}:/:/g
61769s/:@srcdir@:/:/g
61770s/^:*//
61771s/:*$//
61772x
61773s/\(=[	 ]*\).*/\1/
61774G
61775s/\n//
61776s/^[^=]*=[	 ]*$//
61777}'
61778fi
61779
61780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61781fi # test -n "$CONFIG_FILES"
61782
61783
61784eval set X "  :F $CONFIG_FILES      "
61785shift
61786for ac_tag
61787do
61788  case $ac_tag in
61789  :[FHLC]) ac_mode=$ac_tag; continue;;
61790  esac
61791  case $ac_mode$ac_tag in
61792  :[FHL]*:*);;
61793  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61794  :[FH]-) ac_tag=-:-;;
61795  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61796  esac
61797  ac_save_IFS=$IFS
61798  IFS=:
61799  set x $ac_tag
61800  IFS=$ac_save_IFS
61801  shift
61802  ac_file=$1
61803  shift
61804
61805  case $ac_mode in
61806  :L) ac_source=$1;;
61807  :[FH])
61808    ac_file_inputs=
61809    for ac_f
61810    do
61811      case $ac_f in
61812      -) ac_f="$ac_tmp/stdin";;
61813      *) # Look for the file first in the build tree, then in the source tree
61814	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61815	 # because $ac_f cannot contain `:'.
61816	 test -f "$ac_f" ||
61817	   case $ac_f in
61818	   [\\/$]*) false;;
61819	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61820	   esac ||
61821	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61822      esac
61823      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61824      as_fn_append ac_file_inputs " '$ac_f'"
61825    done
61826
61827    # Let's still pretend it is `configure' which instantiates (i.e., don't
61828    # use $as_me), people would be surprised to read:
61829    #    /* config.h.  Generated by config.status.  */
61830    configure_input='Generated from '`
61831	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61832	`' by configure.'
61833    if test x"$ac_file" != x-; then
61834      configure_input="$ac_file.  $configure_input"
61835      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61836$as_echo "$as_me: creating $ac_file" >&6;}
61837    fi
61838    # Neutralize special characters interpreted by sed in replacement strings.
61839    case $configure_input in #(
61840    *\&* | *\|* | *\\* )
61841       ac_sed_conf_input=`$as_echo "$configure_input" |
61842       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61843    *) ac_sed_conf_input=$configure_input;;
61844    esac
61845
61846    case $ac_tag in
61847    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61848      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61849    esac
61850    ;;
61851  esac
61852
61853  ac_dir=`$as_dirname -- "$ac_file" ||
61854$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61855	 X"$ac_file" : 'X\(//\)[^/]' \| \
61856	 X"$ac_file" : 'X\(//\)$' \| \
61857	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61858$as_echo X"$ac_file" |
61859    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61860	    s//\1/
61861	    q
61862	  }
61863	  /^X\(\/\/\)[^/].*/{
61864	    s//\1/
61865	    q
61866	  }
61867	  /^X\(\/\/\)$/{
61868	    s//\1/
61869	    q
61870	  }
61871	  /^X\(\/\).*/{
61872	    s//\1/
61873	    q
61874	  }
61875	  s/.*/./; q'`
61876  as_dir="$ac_dir"; as_fn_mkdir_p
61877  ac_builddir=.
61878
61879case "$ac_dir" in
61880.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61881*)
61882  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61883  # A ".." for each directory in $ac_dir_suffix.
61884  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61885  case $ac_top_builddir_sub in
61886  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61887  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61888  esac ;;
61889esac
61890ac_abs_top_builddir=$ac_pwd
61891ac_abs_builddir=$ac_pwd$ac_dir_suffix
61892# for backward compatibility:
61893ac_top_builddir=$ac_top_build_prefix
61894
61895case $srcdir in
61896  .)  # We are building in place.
61897    ac_srcdir=.
61898    ac_top_srcdir=$ac_top_builddir_sub
61899    ac_abs_top_srcdir=$ac_pwd ;;
61900  [\\/]* | ?:[\\/]* )  # Absolute name.
61901    ac_srcdir=$srcdir$ac_dir_suffix;
61902    ac_top_srcdir=$srcdir
61903    ac_abs_top_srcdir=$srcdir ;;
61904  *) # Relative name.
61905    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61906    ac_top_srcdir=$ac_top_build_prefix$srcdir
61907    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61908esac
61909ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61910
61911
61912  case $ac_mode in
61913  :F)
61914  #
61915  # CONFIG_FILE
61916  #
61917
61918_ACEOF
61919
61920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61921# If the template does not know about datarootdir, expand it.
61922# FIXME: This hack should be removed a few years after 2.60.
61923ac_datarootdir_hack=; ac_datarootdir_seen=
61924ac_sed_dataroot='
61925/datarootdir/ {
61926  p
61927  q
61928}
61929/@datadir@/p
61930/@docdir@/p
61931/@infodir@/p
61932/@localedir@/p
61933/@mandir@/p'
61934case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61935*datarootdir*) ac_datarootdir_seen=yes;;
61936*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61937  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61938$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61939_ACEOF
61940cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61941  ac_datarootdir_hack='
61942  s&@datadir@&$datadir&g
61943  s&@docdir@&$docdir&g
61944  s&@infodir@&$infodir&g
61945  s&@localedir@&$localedir&g
61946  s&@mandir@&$mandir&g
61947  s&\\\${datarootdir}&$datarootdir&g' ;;
61948esac
61949_ACEOF
61950
61951# Neutralize VPATH when `$srcdir' = `.'.
61952# Shell code in configure.ac might set extrasub.
61953# FIXME: do we really want to maintain this feature?
61954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61955ac_sed_extra="$ac_vpsub
61956$extrasub
61957_ACEOF
61958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61959:t
61960/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61961s|@configure_input@|$ac_sed_conf_input|;t t
61962s&@top_builddir@&$ac_top_builddir_sub&;t t
61963s&@top_build_prefix@&$ac_top_build_prefix&;t t
61964s&@srcdir@&$ac_srcdir&;t t
61965s&@abs_srcdir@&$ac_abs_srcdir&;t t
61966s&@top_srcdir@&$ac_top_srcdir&;t t
61967s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61968s&@builddir@&$ac_builddir&;t t
61969s&@abs_builddir@&$ac_abs_builddir&;t t
61970s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61971$ac_datarootdir_hack
61972"
61973eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61974  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61975
61976test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61977  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61978  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61979      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61980  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61981which seems to be undefined.  Please make sure it is defined" >&5
61982$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61983which seems to be undefined.  Please make sure it is defined" >&2;}
61984
61985  rm -f "$ac_tmp/stdin"
61986  case $ac_file in
61987  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61988  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61989  esac \
61990  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61991 ;;
61992
61993
61994
61995  esac
61996
61997done # for ac_tag
61998
61999
62000as_fn_exit 0
62001_ACEOF
62002ac_clean_files=$ac_clean_files_save
62003
62004test $ac_write_fail = 0 ||
62005  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
62006
62007
62008# configure is writing to config.log, and then calls config.status.
62009# config.status does its own redirection, appending to config.log.
62010# Unfortunately, on DOS this fails, as config.log is still kept open
62011# by configure, so config.status won't be able to write to it; its
62012# output is simply discarded.  So we exec the FD to /dev/null,
62013# effectively closing config.log, so it can be properly (re)opened and
62014# appended to by config.status.  When coming back to configure, we
62015# need to make the FD available again.
62016if test "$no_create" != yes; then
62017  ac_cs_success=:
62018  ac_config_status_args=
62019  test "$silent" = yes &&
62020    ac_config_status_args="$ac_config_status_args --quiet"
62021  exec 5>/dev/null
62022  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
62023  exec 5>>config.log
62024  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
62025  # would make configure fail if this is the last instruction.
62026  $ac_cs_success || as_fn_exit 1
62027fi
62028if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
62029  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
62030$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
62031fi
62032
62033
62034# After AC_OUTPUT, we need to do final work
62035
62036
62037  # Try to move config.log (generated by autoconf) to the configure-support directory.
62038  if test -e ./config.log; then
62039    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
62040  fi
62041
62042  # Rotate our log file (configure.log)
62043  if test -e "$OUTPUT_ROOT/configure.log.old"; then
62044    $RM -f "$OUTPUT_ROOT/configure.log.old"
62045  fi
62046  if test -e "$OUTPUT_ROOT/configure.log"; then
62047    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
62048  fi
62049
62050  # Move configure.log from current directory to the build output root
62051  if test -e ./configure.log; then
62052    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
62053  fi
62054
62055  # Make the compare script executable
62056  $CHMOD +x $OUTPUT_ROOT/compare.sh
62057
62058
62059# Finally output some useful information to the user
62060
62061  # Finally output some useful information to the user
62062
62063  printf "\n"
62064  printf "====================================================\n"
62065  if test "x$no_create" != "xyes"; then
62066    if test "x$IS_RECONFIGURE" != "xyes"; then
62067      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
62068    else
62069      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
62070    fi
62071  else
62072    if test "x$IS_RECONFIGURE" != "xyes"; then
62073      printf "A configuration has been successfully checked but not created\n"
62074    else
62075      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
62076    fi
62077  fi
62078  if test "x$CONFIGURE_COMMAND_LINE" != x; then
62079    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
62080  else
62081    printf "using default settings.\n"
62082  fi
62083
62084  printf "\n"
62085  printf "Configuration summary:\n"
62086  printf "* Debug level:    $DEBUG_LEVEL\n"
62087  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
62088  printf "* JDK variant:    $JDK_VARIANT\n"
62089  printf "* JVM variants:   $with_jvm_variants\n"
62090  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
62091  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
62092
62093  printf "\n"
62094  printf "Tools summary:\n"
62095  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
62096    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
62097  fi
62098  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
62099  if test "x$TOOLCHAIN_VERSION" != "x"; then
62100    print_version=" $TOOLCHAIN_VERSION"
62101  fi
62102  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
62103  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
62104  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
62105
62106  printf "\n"
62107  printf "Build performance summary:\n"
62108  printf "* Cores to use:   $JOBS\n"
62109  printf "* Memory limit:   $MEMORY_SIZE MB\n"
62110  if test "x$CCACHE_STATUS" != "x"; then
62111    printf "* ccache status:  $CCACHE_STATUS\n"
62112  fi
62113  printf "\n"
62114
62115  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
62116    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
62117    printf "will result in longer build times.\n"
62118    printf "\n"
62119  fi
62120
62121  if test "x$FOUND_ALT_VARIABLES" != "x"; then
62122    printf "WARNING: You have old-style ALT_ environment variables set.\n"
62123    printf "These are not respected, and will be ignored. It is recommended\n"
62124    printf "that you clean your environment. The following variables are set:\n"
62125    printf "$FOUND_ALT_VARIABLES\n"
62126    printf "\n"
62127  fi
62128
62129  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
62130    printf "WARNING: Your build output directory is not on a local disk.\n"
62131    printf "This will severely degrade build performance!\n"
62132    printf "It is recommended that you create an output directory on a local disk,\n"
62133    printf "and run the configure script again from that directory.\n"
62134    printf "\n"
62135  fi
62136
62137  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
62138    printf "WARNING: The result of this configuration has overridden an older\n"
62139    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
62140    printf "proper build. Failure to do so might result in strange build problems.\n"
62141    printf "\n"
62142  fi
62143
62144  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
62145    printf "WARNING: The result of this configuration was not saved.\n"
62146    printf "You should run without '--no-create | -n' to create the configuration.\n"
62147    printf "\n"
62148  fi
62149
62150
62151
62152  # Locate config.log.
62153  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
62154    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
62155  elif test -e "./config.log"; then
62156    CONFIG_LOG_PATH="."
62157  fi
62158
62159  if test -e "$CONFIG_LOG_PATH/config.log"; then
62160    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
62161    if test $? -eq 0; then
62162      printf "The following warnings were produced. Repeated here for convenience:\n"
62163      # We must quote sed expression (using []) to stop m4 from eating the [].
62164      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
62165      printf "\n"
62166    fi
62167  fi
62168
62169