generated-configure.sh revision 1963:5d868c42d888
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_HASH_STYLE
705LDFLAGS_CXX_JDK
706JDKEXE_LIBS
707JDKLIB_LIBS
708LDFLAGS_JDKEXE
709LDFLAGS_JDKLIB
710CXXFLAGS_TESTEXE
711CXXFLAGS_TESTLIB
712CFLAGS_TESTEXE
713CFLAGS_TESTLIB
714CXXFLAGS_JDKEXE
715CXXFLAGS_JDKLIB
716CFLAGS_JDKEXE
717CFLAGS_JDKLIB
718MACOSX_VERSION_MIN
719CXX_O_FLAG_NONE
720CXX_O_FLAG_DEBUG
721CXX_O_FLAG_NORM
722CXX_O_FLAG_HI
723CXX_O_FLAG_HIGHEST
724C_O_FLAG_NONE
725C_O_FLAG_DEBUG
726C_O_FLAG_NORM
727C_O_FLAG_HI
728C_O_FLAG_HIGHEST
729CXXFLAGS_DEBUG_SYMBOLS
730CFLAGS_DEBUG_SYMBOLS
731CXX_FLAG_DEPS
732C_FLAG_DEPS
733SHARED_LIBRARY_FLAGS
734SET_SHARED_LIBRARY_MAPFILE
735SET_SHARED_LIBRARY_NAME
736SET_SHARED_LIBRARY_ORIGIN
737SET_EXECUTABLE_ORIGIN
738CXX_FLAG_REORDER
739C_FLAG_REORDER
740RC_FLAGS
741AR_OUT_OPTION
742LD_OUT_OPTION
743EXE_OUT_OPTION
744CC_OUT_OPTION
745STRIPFLAGS
746ARFLAGS
747COMPILER_BINDCMD_FILE_FLAG
748COMPILER_COMMAND_FILE_FLAG
749COMPILER_TARGET_BITS_FLAG
750JT_HOME
751JTREGEXE
752USING_BROKEN_SUSE_LD
753PACKAGE_PATH
754USE_CLANG
755HOTSPOT_LD
756HOTSPOT_CXX
757HOTSPOT_RC
758HOTSPOT_MT
759BUILD_AS
760BUILD_LDCXX
761BUILD_LD
762BUILD_AR
763BUILD_NM
764BUILD_CXX
765BUILD_CC
766BUILD_SYSROOT_LDFLAGS
767BUILD_SYSROOT_CFLAGS
768ac_ct_OBJDUMP
769OBJDUMP
770ac_ct_OBJCOPY
771OBJCOPY
772ac_ct_NM
773ac_ct_STRIP
774GNM
775NM
776STRIP
777MSBUILD
778DUMPBIN
779RC
780MT
781LIPO
782ac_ct_AR
783AR
784AS
785LDCXX
786LD
787CXXCPP
788CPP
789CXX_VERSION_NUMBER
790CC_VERSION_NUMBER
791ac_ct_CXX
792CXXFLAGS
793CXX
794TOOLCHAIN_PATH_CXX
795POTENTIAL_CXX
796OBJEXT
797EXEEXT
798ac_ct_CC
799CPPFLAGS
800LDFLAGS
801CFLAGS
802CC
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
867INCLUDE_SA
868UNLIMITED_CRYPTO
869CACERTS_FILE
870BUILD_HEADLESS
871SUPPORT_HEADFUL
872SUPPORT_HEADLESS
873DEFAULT_MAKE_TARGET
874OS_VERSION_MICRO
875OS_VERSION_MINOR
876OS_VERSION_MAJOR
877PKG_CONFIG
878BASH_ARGS
879SETFILE
880CODESIGN
881XATTR
882DSYMUTIL
883IS_GNU_TIME
884PATCH
885TIME
886STAT
887HG
888READELF
889OTOOL
890LDD
891ZIP
892UNZIP
893FIND_DELETE
894OUTPUT_SYNC
895OUTPUT_SYNC_SUPPORTED
896CHECK_TOOLSDIR_MAKE
897CHECK_TOOLSDIR_GMAKE
898CHECK_MAKE
899CHECK_GMAKE
900MAKE
901PKGHANDLER
902CONFIGURESUPPORT_OUTPUTDIR
903OUTPUT_ROOT
904CONF_NAME
905SPEC
906SDKROOT
907XCODEBUILD
908BUILD_VARIANT_RELEASE
909DEBUG_CLASSFILES
910FASTDEBUG
911VARIANT
912DEBUG_LEVEL
913MACOSX_UNIVERSAL
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
924USERNAME
925CANONICAL_TOPDIR
926ORIGINAL_TOPDIR
927TOPDIR
928PATH_SEP
929ZERO_ARCHDEF
930DEFINE_CROSS_COMPILE_ARCH
931LP64
932OPENJDK_TARGET_OS_EXPORT_DIR
933OPENJDK_TARGET_CPU_JLI_CFLAGS
934OPENJDK_TARGET_CPU_OSARCH
935OPENJDK_TARGET_CPU_ISADIR
936OPENJDK_TARGET_CPU_LIBDIR
937OPENJDK_TARGET_CPU_LEGACY_LIB
938OPENJDK_TARGET_CPU_LEGACY
939REQUIRED_OS_VERSION
940REQUIRED_OS_NAME
941COMPILE_TYPE
942OPENJDK_TARGET_CPU_ENDIAN
943OPENJDK_TARGET_CPU_BITS
944OPENJDK_TARGET_CPU_ARCH
945OPENJDK_TARGET_CPU
946OPENJDK_TARGET_OS_ENV
947OPENJDK_TARGET_OS_TYPE
948OPENJDK_TARGET_OS
949OPENJDK_BUILD_CPU_ENDIAN
950OPENJDK_BUILD_CPU_BITS
951OPENJDK_BUILD_CPU_ARCH
952OPENJDK_BUILD_CPU
953OPENJDK_BUILD_OS_ENV
954OPENJDK_BUILD_OS_TYPE
955OPENJDK_BUILD_OS
956OPENJDK_BUILD_AUTOCONF_NAME
957OPENJDK_TARGET_AUTOCONF_NAME
958target_os
959target_vendor
960target_cpu
961target
962host_os
963host_vendor
964host_cpu
965host
966build_os
967build_vendor
968build_cpu
969build
970NICE
971CPIO
972DF
973READLINK
974CYGPATH
975SED
976FGREP
977EGREP
978GREP
979AWK
980XARGS
981WHICH
982WC
983UNIQ
984UNAME
985TR
986TOUCH
987TEE
988TAR
989TAIL
990SORT
991SH
992RMDIR
993RM
994PRINTF
995NAWK
996MV
997MKTEMP
998MKDIR
999LS
1000LN
1001HEAD
1002FIND
1003FILE
1004EXPR
1005ECHO
1006DIRNAME
1007DIFF
1008DATE
1009CUT
1010CP
1011COMM
1012CMP
1013CHMOD
1014CAT
1015BASH
1016BASENAME
1017DATE_WHEN_CONFIGURED
1018ORIGINAL_PATH
1019CONFIGURE_COMMAND_LINE
1020target_alias
1021host_alias
1022build_alias
1023LIBS
1024ECHO_T
1025ECHO_N
1026ECHO_C
1027DEFS
1028mandir
1029localedir
1030libdir
1031psdir
1032pdfdir
1033dvidir
1034htmldir
1035infodir
1036docdir
1037oldincludedir
1038includedir
1039localstatedir
1040sharedstatedir
1041sysconfdir
1042datadir
1043datarootdir
1044libexecdir
1045sbindir
1046bindir
1047program_transform_name
1048prefix
1049exec_prefix
1050PACKAGE_URL
1051PACKAGE_BUGREPORT
1052PACKAGE_STRING
1053PACKAGE_VERSION
1054PACKAGE_TARNAME
1055PACKAGE_NAME
1056PATH_SEPARATOR
1057SHELL'
1058ac_subst_files=''
1059ac_user_opts='
1060enable_option_checking
1061with_target_bits
1062enable_openjdk_only
1063with_custom_make_dir
1064with_jdk_variant
1065with_jvm_interpreter
1066with_jvm_variants
1067enable_debug
1068with_debug_level
1069with_devkit
1070with_sys_root
1071with_sysroot
1072with_tools_dir
1073with_toolchain_path
1074with_extra_path
1075with_sdk_name
1076with_conf_name
1077with_output_sync
1078with_default_make_target
1079enable_headful
1080with_cacerts_file
1081enable_unlimited_crypto
1082with_copyright_year
1083enable_hotspot_test_in_build
1084with_milestone
1085with_update_version
1086with_user_release_suffix
1087with_build_number
1088with_version_string
1089with_version_pre
1090with_version_opt
1091with_version_build
1092with_version_major
1093with_version_minor
1094with_version_security
1095with_version_patch
1096with_boot_jdk
1097with_add_source_root
1098with_override_source_root
1099with_adds_and_overrides
1100with_override_langtools
1101with_override_corba
1102with_override_jaxp
1103with_override_jaxws
1104with_override_hotspot
1105with_override_nashorn
1106with_override_jdk
1107with_import_hotspot
1108enable_static_build
1109with_toolchain_type
1110with_extra_cflags
1111with_extra_cxxflags
1112with_extra_ldflags
1113with_toolchain_version
1114with_build_devkit
1115with_jtreg
1116enable_warnings_as_errors
1117with_native_debug_symbols
1118enable_debug_symbols
1119enable_zip_debug_info
1120enable_native_coverage
1121with_stdc__lib
1122with_msvcr_dll
1123with_msvcp_dll
1124with_x
1125with_cups
1126with_cups_include
1127with_freetype
1128with_freetype_include
1129with_freetype_lib
1130with_freetype_src
1131enable_freetype_bundling
1132with_alsa
1133with_alsa_include
1134with_alsa_lib
1135with_libffi
1136with_libffi_include
1137with_libffi_lib
1138with_libjpeg
1139with_giflib
1140with_libpng
1141with_zlib
1142with_lcms
1143with_dxsdk
1144with_dxsdk_lib
1145with_dxsdk_include
1146with_num_cores
1147with_memory_size
1148with_jobs
1149with_test_jobs
1150with_boot_jdk_jvmargs
1151with_sjavac_server_java
1152enable_sjavac
1153enable_javac_server
1154enable_icecc
1155enable_precompiled_headers
1156enable_ccache
1157with_ccache_dir
1158'
1159      ac_precious_vars='build_alias
1160host_alias
1161target_alias
1162BASENAME
1163BASH
1164CAT
1165CHMOD
1166CMP
1167COMM
1168CP
1169CUT
1170DATE
1171DIFF
1172DIRNAME
1173ECHO
1174EXPR
1175FILE
1176FIND
1177HEAD
1178LN
1179LS
1180MKDIR
1181MKTEMP
1182MV
1183NAWK
1184PRINTF
1185RM
1186RMDIR
1187SH
1188SORT
1189TAIL
1190TAR
1191TEE
1192TOUCH
1193TR
1194UNAME
1195UNIQ
1196WC
1197WHICH
1198XARGS
1199AWK
1200GREP
1201EGREP
1202FGREP
1203SED
1204CYGPATH
1205READLINK
1206DF
1207CPIO
1208NICE
1209MAKE
1210UNZIP
1211ZIP
1212LDD
1213OTOOL
1214READELF
1215HG
1216STAT
1217TIME
1218PATCH
1219DSYMUTIL
1220XATTR
1221CODESIGN
1222SETFILE
1223PKG_CONFIG
1224JAVA
1225JAVAC
1226JAVAH
1227JAR
1228JARSIGNER
1229CC
1230CFLAGS
1231LDFLAGS
1232LIBS
1233CPPFLAGS
1234CXX
1235CXXFLAGS
1236CCC
1237CPP
1238CXXCPP
1239AS
1240AR
1241LIPO
1242STRIP
1243NM
1244GNM
1245OBJCOPY
1246OBJDUMP
1247BUILD_CC
1248BUILD_CXX
1249BUILD_NM
1250BUILD_AR
1251JTREGEXE
1252XMKMF
1253FREETYPE_CFLAGS
1254FREETYPE_LIBS
1255ALSA_CFLAGS
1256ALSA_LIBS
1257LIBFFI_CFLAGS
1258LIBFFI_LIBS
1259PNG_CFLAGS
1260PNG_LIBS
1261LCMS_CFLAGS
1262LCMS_LIBS
1263ICECC_CMD
1264ICECC_CREATE_ENV
1265ICECC_WRAPPER
1266CCACHE'
1267
1268
1269# Initialize some variables set by options.
1270ac_init_help=
1271ac_init_version=false
1272ac_unrecognized_opts=
1273ac_unrecognized_sep=
1274# The variables have the same names as the options, with
1275# dashes changed to underlines.
1276cache_file=/dev/null
1277exec_prefix=NONE
1278no_create=
1279no_recursion=
1280prefix=NONE
1281program_prefix=NONE
1282program_suffix=NONE
1283program_transform_name=s,x,x,
1284silent=
1285site=
1286srcdir=
1287verbose=
1288x_includes=NONE
1289x_libraries=NONE
1290
1291# Installation directory options.
1292# These are left unexpanded so users can "make install exec_prefix=/foo"
1293# and all the variables that are supposed to be based on exec_prefix
1294# by default will actually change.
1295# Use braces instead of parens because sh, perl, etc. also accept them.
1296# (The list follows the same order as the GNU Coding Standards.)
1297bindir='${exec_prefix}/bin'
1298sbindir='${exec_prefix}/sbin'
1299libexecdir='${exec_prefix}/libexec'
1300datarootdir='${prefix}/share'
1301datadir='${datarootdir}'
1302sysconfdir='${prefix}/etc'
1303sharedstatedir='${prefix}/com'
1304localstatedir='${prefix}/var'
1305includedir='${prefix}/include'
1306oldincludedir='/usr/include'
1307docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1308infodir='${datarootdir}/info'
1309htmldir='${docdir}'
1310dvidir='${docdir}'
1311pdfdir='${docdir}'
1312psdir='${docdir}'
1313libdir='${exec_prefix}/lib'
1314localedir='${datarootdir}/locale'
1315mandir='${datarootdir}/man'
1316
1317ac_prev=
1318ac_dashdash=
1319for ac_option
1320do
1321  # If the previous option needs an argument, assign it.
1322  if test -n "$ac_prev"; then
1323    eval $ac_prev=\$ac_option
1324    ac_prev=
1325    continue
1326  fi
1327
1328  case $ac_option in
1329  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1330  *=)   ac_optarg= ;;
1331  *)    ac_optarg=yes ;;
1332  esac
1333
1334  # Accept the important Cygnus configure options, so we can diagnose typos.
1335
1336  case $ac_dashdash$ac_option in
1337  --)
1338    ac_dashdash=yes ;;
1339
1340  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1341    ac_prev=bindir ;;
1342  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1343    bindir=$ac_optarg ;;
1344
1345  -build | --build | --buil | --bui | --bu)
1346    ac_prev=build_alias ;;
1347  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1348    build_alias=$ac_optarg ;;
1349
1350  -cache-file | --cache-file | --cache-fil | --cache-fi \
1351  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1352    ac_prev=cache_file ;;
1353  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1354  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1355    cache_file=$ac_optarg ;;
1356
1357  --config-cache | -C)
1358    cache_file=config.cache ;;
1359
1360  -datadir | --datadir | --datadi | --datad)
1361    ac_prev=datadir ;;
1362  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1363    datadir=$ac_optarg ;;
1364
1365  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1366  | --dataroo | --dataro | --datar)
1367    ac_prev=datarootdir ;;
1368  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1369  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1370    datarootdir=$ac_optarg ;;
1371
1372  -disable-* | --disable-*)
1373    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1374    # Reject names that are not valid shell variable names.
1375    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1376      as_fn_error $? "invalid feature name: $ac_useropt"
1377    ac_useropt_orig=$ac_useropt
1378    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1379    case $ac_user_opts in
1380      *"
1381"enable_$ac_useropt"
1382"*) ;;
1383      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1384	 ac_unrecognized_sep=', ';;
1385    esac
1386    eval enable_$ac_useropt=no ;;
1387
1388  -docdir | --docdir | --docdi | --doc | --do)
1389    ac_prev=docdir ;;
1390  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1391    docdir=$ac_optarg ;;
1392
1393  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1394    ac_prev=dvidir ;;
1395  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1396    dvidir=$ac_optarg ;;
1397
1398  -enable-* | --enable-*)
1399    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1400    # Reject names that are not valid shell variable names.
1401    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1402      as_fn_error $? "invalid feature name: $ac_useropt"
1403    ac_useropt_orig=$ac_useropt
1404    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1405    case $ac_user_opts in
1406      *"
1407"enable_$ac_useropt"
1408"*) ;;
1409      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1410	 ac_unrecognized_sep=', ';;
1411    esac
1412    eval enable_$ac_useropt=\$ac_optarg ;;
1413
1414  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1415  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1416  | --exec | --exe | --ex)
1417    ac_prev=exec_prefix ;;
1418  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1419  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1420  | --exec=* | --exe=* | --ex=*)
1421    exec_prefix=$ac_optarg ;;
1422
1423  -gas | --gas | --ga | --g)
1424    # Obsolete; use --with-gas.
1425    with_gas=yes ;;
1426
1427  -help | --help | --hel | --he | -h)
1428    ac_init_help=long ;;
1429  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1430    ac_init_help=recursive ;;
1431  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1432    ac_init_help=short ;;
1433
1434  -host | --host | --hos | --ho)
1435    ac_prev=host_alias ;;
1436  -host=* | --host=* | --hos=* | --ho=*)
1437    host_alias=$ac_optarg ;;
1438
1439  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1440    ac_prev=htmldir ;;
1441  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1442  | --ht=*)
1443    htmldir=$ac_optarg ;;
1444
1445  -includedir | --includedir | --includedi | --included | --include \
1446  | --includ | --inclu | --incl | --inc)
1447    ac_prev=includedir ;;
1448  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1449  | --includ=* | --inclu=* | --incl=* | --inc=*)
1450    includedir=$ac_optarg ;;
1451
1452  -infodir | --infodir | --infodi | --infod | --info | --inf)
1453    ac_prev=infodir ;;
1454  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1455    infodir=$ac_optarg ;;
1456
1457  -libdir | --libdir | --libdi | --libd)
1458    ac_prev=libdir ;;
1459  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1460    libdir=$ac_optarg ;;
1461
1462  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1463  | --libexe | --libex | --libe)
1464    ac_prev=libexecdir ;;
1465  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1466  | --libexe=* | --libex=* | --libe=*)
1467    libexecdir=$ac_optarg ;;
1468
1469  -localedir | --localedir | --localedi | --localed | --locale)
1470    ac_prev=localedir ;;
1471  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1472    localedir=$ac_optarg ;;
1473
1474  -localstatedir | --localstatedir | --localstatedi | --localstated \
1475  | --localstate | --localstat | --localsta | --localst | --locals)
1476    ac_prev=localstatedir ;;
1477  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1478  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1479    localstatedir=$ac_optarg ;;
1480
1481  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1482    ac_prev=mandir ;;
1483  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1484    mandir=$ac_optarg ;;
1485
1486  -nfp | --nfp | --nf)
1487    # Obsolete; use --without-fp.
1488    with_fp=no ;;
1489
1490  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1491  | --no-cr | --no-c | -n)
1492    no_create=yes ;;
1493
1494  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1495  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1496    no_recursion=yes ;;
1497
1498  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1499  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1500  | --oldin | --oldi | --old | --ol | --o)
1501    ac_prev=oldincludedir ;;
1502  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1503  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1504  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1505    oldincludedir=$ac_optarg ;;
1506
1507  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1508    ac_prev=prefix ;;
1509  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1510    prefix=$ac_optarg ;;
1511
1512  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1513  | --program-pre | --program-pr | --program-p)
1514    ac_prev=program_prefix ;;
1515  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1516  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1517    program_prefix=$ac_optarg ;;
1518
1519  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1520  | --program-suf | --program-su | --program-s)
1521    ac_prev=program_suffix ;;
1522  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1523  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1524    program_suffix=$ac_optarg ;;
1525
1526  -program-transform-name | --program-transform-name \
1527  | --program-transform-nam | --program-transform-na \
1528  | --program-transform-n | --program-transform- \
1529  | --program-transform | --program-transfor \
1530  | --program-transfo | --program-transf \
1531  | --program-trans | --program-tran \
1532  | --progr-tra | --program-tr | --program-t)
1533    ac_prev=program_transform_name ;;
1534  -program-transform-name=* | --program-transform-name=* \
1535  | --program-transform-nam=* | --program-transform-na=* \
1536  | --program-transform-n=* | --program-transform-=* \
1537  | --program-transform=* | --program-transfor=* \
1538  | --program-transfo=* | --program-transf=* \
1539  | --program-trans=* | --program-tran=* \
1540  | --progr-tra=* | --program-tr=* | --program-t=*)
1541    program_transform_name=$ac_optarg ;;
1542
1543  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1544    ac_prev=pdfdir ;;
1545  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1546    pdfdir=$ac_optarg ;;
1547
1548  -psdir | --psdir | --psdi | --psd | --ps)
1549    ac_prev=psdir ;;
1550  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1551    psdir=$ac_optarg ;;
1552
1553  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1554  | -silent | --silent | --silen | --sile | --sil)
1555    silent=yes ;;
1556
1557  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1558    ac_prev=sbindir ;;
1559  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1560  | --sbi=* | --sb=*)
1561    sbindir=$ac_optarg ;;
1562
1563  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1564  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1565  | --sharedst | --shareds | --shared | --share | --shar \
1566  | --sha | --sh)
1567    ac_prev=sharedstatedir ;;
1568  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1569  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1570  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1571  | --sha=* | --sh=*)
1572    sharedstatedir=$ac_optarg ;;
1573
1574  -site | --site | --sit)
1575    ac_prev=site ;;
1576  -site=* | --site=* | --sit=*)
1577    site=$ac_optarg ;;
1578
1579  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1580    ac_prev=srcdir ;;
1581  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1582    srcdir=$ac_optarg ;;
1583
1584  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1585  | --syscon | --sysco | --sysc | --sys | --sy)
1586    ac_prev=sysconfdir ;;
1587  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1588  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1589    sysconfdir=$ac_optarg ;;
1590
1591  -target | --target | --targe | --targ | --tar | --ta | --t)
1592    ac_prev=target_alias ;;
1593  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1594    target_alias=$ac_optarg ;;
1595
1596  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1597    verbose=yes ;;
1598
1599  -version | --version | --versio | --versi | --vers | -V)
1600    ac_init_version=: ;;
1601
1602  -with-* | --with-*)
1603    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1604    # Reject names that are not valid shell variable names.
1605    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1606      as_fn_error $? "invalid package name: $ac_useropt"
1607    ac_useropt_orig=$ac_useropt
1608    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1609    case $ac_user_opts in
1610      *"
1611"with_$ac_useropt"
1612"*) ;;
1613      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1614	 ac_unrecognized_sep=', ';;
1615    esac
1616    eval with_$ac_useropt=\$ac_optarg ;;
1617
1618  -without-* | --without-*)
1619    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1620    # Reject names that are not valid shell variable names.
1621    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1622      as_fn_error $? "invalid package name: $ac_useropt"
1623    ac_useropt_orig=$ac_useropt
1624    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1625    case $ac_user_opts in
1626      *"
1627"with_$ac_useropt"
1628"*) ;;
1629      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1630	 ac_unrecognized_sep=', ';;
1631    esac
1632    eval with_$ac_useropt=no ;;
1633
1634  --x)
1635    # Obsolete; use --with-x.
1636    with_x=yes ;;
1637
1638  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1639  | --x-incl | --x-inc | --x-in | --x-i)
1640    ac_prev=x_includes ;;
1641  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1642  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1643    x_includes=$ac_optarg ;;
1644
1645  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1646  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1647    ac_prev=x_libraries ;;
1648  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1649  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1650    x_libraries=$ac_optarg ;;
1651
1652  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1653Try \`$0 --help' for more information"
1654    ;;
1655
1656  *=*)
1657    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1658    # Reject names that are not valid shell variable names.
1659    case $ac_envvar in #(
1660      '' | [0-9]* | *[!_$as_cr_alnum]* )
1661      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1662    esac
1663    eval $ac_envvar=\$ac_optarg
1664    export $ac_envvar ;;
1665
1666  *)
1667    # FIXME: should be removed in autoconf 3.0.
1668    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1669    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1670      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1671    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1672    ;;
1673
1674  esac
1675done
1676
1677if test -n "$ac_prev"; then
1678  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1679  as_fn_error $? "missing argument to $ac_option"
1680fi
1681
1682if test -n "$ac_unrecognized_opts"; then
1683  case $enable_option_checking in
1684    no) ;;
1685    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1686    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1687  esac
1688fi
1689
1690# Check all directory arguments for consistency.
1691for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1692		datadir sysconfdir sharedstatedir localstatedir includedir \
1693		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1694		libdir localedir mandir
1695do
1696  eval ac_val=\$$ac_var
1697  # Remove trailing slashes.
1698  case $ac_val in
1699    */ )
1700      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1701      eval $ac_var=\$ac_val;;
1702  esac
1703  # Be sure to have absolute directory names.
1704  case $ac_val in
1705    [\\/$]* | ?:[\\/]* )  continue;;
1706    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1707  esac
1708  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1709done
1710
1711# There might be people who depend on the old broken behavior: `$host'
1712# used to hold the argument of --host etc.
1713# FIXME: To remove some day.
1714build=$build_alias
1715host=$host_alias
1716target=$target_alias
1717
1718# FIXME: To remove some day.
1719if test "x$host_alias" != x; then
1720  if test "x$build_alias" = x; then
1721    cross_compiling=maybe
1722  elif test "x$build_alias" != "x$host_alias"; then
1723    cross_compiling=yes
1724  fi
1725fi
1726
1727ac_tool_prefix=
1728test -n "$host_alias" && ac_tool_prefix=$host_alias-
1729
1730test "$silent" = yes && exec 6>/dev/null
1731
1732
1733ac_pwd=`pwd` && test -n "$ac_pwd" &&
1734ac_ls_di=`ls -di .` &&
1735ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1736  as_fn_error $? "working directory cannot be determined"
1737test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1738  as_fn_error $? "pwd does not report name of working directory"
1739
1740
1741# Find the source files, if location was not specified.
1742if test -z "$srcdir"; then
1743  ac_srcdir_defaulted=yes
1744  # Try the directory containing this script, then the parent directory.
1745  ac_confdir=`$as_dirname -- "$as_myself" ||
1746$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1747	 X"$as_myself" : 'X\(//\)[^/]' \| \
1748	 X"$as_myself" : 'X\(//\)$' \| \
1749	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1750$as_echo X"$as_myself" |
1751    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1752	    s//\1/
1753	    q
1754	  }
1755	  /^X\(\/\/\)[^/].*/{
1756	    s//\1/
1757	    q
1758	  }
1759	  /^X\(\/\/\)$/{
1760	    s//\1/
1761	    q
1762	  }
1763	  /^X\(\/\).*/{
1764	    s//\1/
1765	    q
1766	  }
1767	  s/.*/./; q'`
1768  srcdir=$ac_confdir
1769  if test ! -r "$srcdir/$ac_unique_file"; then
1770    srcdir=..
1771  fi
1772else
1773  ac_srcdir_defaulted=no
1774fi
1775if test ! -r "$srcdir/$ac_unique_file"; then
1776  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1777  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1778fi
1779ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1780ac_abs_confdir=`(
1781	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1782	pwd)`
1783# When building in place, set srcdir=.
1784if test "$ac_abs_confdir" = "$ac_pwd"; then
1785  srcdir=.
1786fi
1787# Remove unnecessary trailing slashes from srcdir.
1788# Double slashes in file names in object file debugging info
1789# mess up M-x gdb in Emacs.
1790case $srcdir in
1791*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1792esac
1793for ac_var in $ac_precious_vars; do
1794  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1795  eval ac_env_${ac_var}_value=\$${ac_var}
1796  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1797  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1798done
1799
1800#
1801# Report the --help message.
1802#
1803if test "$ac_init_help" = "long"; then
1804  # Omit some internal or obsolete options to make the list less imposing.
1805  # This message is too long to be a string in the A/UX 3.1 sh.
1806  cat <<_ACEOF
1807\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1808
1809Usage: $0 [OPTION]... [VAR=VALUE]...
1810
1811To assign environment variables (e.g., CC, CFLAGS...), specify them as
1812VAR=VALUE.  See below for descriptions of some of the useful variables.
1813
1814Defaults for the options are specified in brackets.
1815
1816Configuration:
1817  -h, --help              display this help and exit
1818      --help=short        display options specific to this package
1819      --help=recursive    display the short help of all the included packages
1820  -V, --version           display version information and exit
1821  -q, --quiet, --silent   do not print \`checking ...' messages
1822      --cache-file=FILE   cache test results in FILE [disabled]
1823  -C, --config-cache      alias for \`--cache-file=config.cache'
1824  -n, --no-create         do not create output files
1825      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1826
1827Installation directories:
1828  --prefix=PREFIX         install architecture-independent files in PREFIX
1829                          [$ac_default_prefix]
1830  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1831                          [PREFIX]
1832
1833By default, \`make install' will install all the files in
1834\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1835an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1836for instance \`--prefix=\$HOME'.
1837
1838For better control, use the options below.
1839
1840Fine tuning of the installation directories:
1841  --bindir=DIR            user executables [EPREFIX/bin]
1842  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1843  --libexecdir=DIR        program executables [EPREFIX/libexec]
1844  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1845  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1846  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1847  --libdir=DIR            object code libraries [EPREFIX/lib]
1848  --includedir=DIR        C header files [PREFIX/include]
1849  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1850  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1851  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1852  --infodir=DIR           info documentation [DATAROOTDIR/info]
1853  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1854  --mandir=DIR            man documentation [DATAROOTDIR/man]
1855  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1856  --htmldir=DIR           html documentation [DOCDIR]
1857  --dvidir=DIR            dvi documentation [DOCDIR]
1858  --pdfdir=DIR            pdf documentation [DOCDIR]
1859  --psdir=DIR             ps documentation [DOCDIR]
1860_ACEOF
1861
1862  cat <<\_ACEOF
1863
1864X features:
1865  --x-includes=DIR    X include files are in DIR
1866  --x-libraries=DIR   X library files are in DIR
1867
1868System types:
1869  --build=BUILD     configure for building on BUILD [guessed]
1870  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1871  --target=TARGET   configure for building compilers for TARGET [HOST]
1872_ACEOF
1873fi
1874
1875if test -n "$ac_init_help"; then
1876  case $ac_init_help in
1877     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1878   esac
1879  cat <<\_ACEOF
1880
1881Optional Features:
1882  --disable-option-checking  ignore unrecognized --enable/--with options
1883  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1884  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1885  --enable-openjdk-only   suppress building custom source even if present
1886                          [disabled]
1887  --enable-debug          set the debug level to fastdebug (shorthand for
1888                          --with-debug-level=fastdebug) [disabled]
1889  --disable-headful       disable building headful support (graphical UI
1890                          support) [enabled]
1891  --enable-unlimited-crypto
1892                          Enable unlimited crypto policy [disabled]
1893  --enable-hotspot-test-in-build
1894                          run the Queens test after Hotspot build [disabled]
1895  --enable-static-build   enable static library build [disabled]
1896  --disable-warnings-as-errors
1897                          do not consider native warnings to be an error
1898                          [enabled]
1899  --enable-debug-symbols  Deprecated. Option is kept for backwards
1900                          compatibility and is ignored
1901  --enable-zip-debug-info Deprecated. Option is kept for backwards
1902                          compatibility and is ignored
1903  --enable-native-coverage
1904                          enable native compilation with code coverage
1905                          data[disabled]
1906  --disable-freetype-bundling
1907                          disable bundling of the freetype library with the
1908                          build result [enabled on Windows or when using
1909                          --with-freetype, disabled otherwise]
1910  --enable-sjavac         use sjavac to do fast incremental compiles
1911                          [disabled]
1912  --disable-javac-server  disable javac server [enabled]
1913  --enable-icecc          enable distribted compilation of native code using
1914                          icecc/icecream [disabled]
1915  --disable-precompiled-headers
1916                          disable using precompiled headers when compiling C++
1917                          [enabled]
1918  --enable-ccache         enable using ccache to speed up recompilations
1919                          [disabled]
1920
1921Optional Packages:
1922  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1923  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1924  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1925                          support it), e.g. --with-target-bits=32 [guessed]
1926  --with-custom-make-dir  Deprecated. Option is kept for backwards
1927                          compatibility and is ignored
1928  --with-jdk-variant      JDK variant to build (normal) [normal]
1929  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1930  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1931                          client, minimal1, zero, zeroshark, core) [server]
1932  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1933                          optimized) [release]
1934  --with-devkit           use this devkit for compilers, tools and resources
1935  --with-sys-root         alias for --with-sysroot for backwards compatability
1936  --with-sysroot          use this directory as sysroot
1937  --with-tools-dir        alias for --with-toolchain-path for backwards
1938                          compatibility
1939  --with-toolchain-path   prepend these directories when searching for
1940                          toolchain binaries (compilers etc)
1941  --with-extra-path       prepend these directories to the default path
1942  --with-sdk-name         use the platform SDK of the given name. [macosx]
1943  --with-conf-name        use this as the name of the configuration [generated
1944                          from important configuration options]
1945  --with-output-sync      set make output sync type if supported by make.
1946                          [recurse]
1947  --with-default-make-target
1948                          set the default make target [exploded-image]
1949  --with-cacerts-file     specify alternative cacerts file
1950  --with-copyright-year   Set copyright year value for build [current year]
1951  --with-milestone        Deprecated. Option is kept for backwards
1952                          compatibility and is ignored
1953  --with-update-version   Deprecated. Option is kept for backwards
1954                          compatibility and is ignored
1955  --with-user-release-suffix
1956                          Deprecated. Option is kept for backwards
1957                          compatibility and is ignored
1958  --with-build-number     Deprecated. Option is kept for backwards
1959                          compatibility and is ignored
1960  --with-version-string   Set version string [calculated]
1961  --with-version-pre      Set the base part of the version 'PRE' field
1962                          (pre-release identifier) ['internal']
1963  --with-version-opt      Set version 'OPT' field (build metadata)
1964                          [<timestamp>.<user>.<dirname>]
1965  --with-version-build    Set version 'BUILD' field (build number) [not
1966                          specified]
1967  --with-version-major    Set version 'MAJOR' field (first number) [current
1968                          source value]
1969  --with-version-minor    Set version 'MINOR' field (second number) [current
1970                          source value]
1971  --with-version-security Set version 'SECURITY' field (third number) [current
1972                          source value]
1973  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1974                          specified]
1975  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1976  --with-add-source-root  Deprecated. Option is kept for backwards
1977                          compatibility and is ignored
1978  --with-override-source-root
1979                          Deprecated. Option is kept for backwards
1980                          compatibility and is ignored
1981  --with-adds-and-overrides
1982                          Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --with-override-langtools
1985                          Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-override-corba   Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-override-jaxp    Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-override-jaxws   Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-override-hotspot Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-override-nashorn Deprecated. Option is kept for backwards
1996                          compatibility and is ignored
1997  --with-override-jdk     Deprecated. Option is kept for backwards
1998                          compatibility and is ignored
1999  --with-import-hotspot   import hotspot binaries from this jdk image or
2000                          hotspot build dist dir instead of building from
2001                          source
2002  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2003                          to show possible values [platform dependent]
2004  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2005  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2006  --with-extra-ldflags    extra flags to be used when linking jdk
2007  --with-toolchain-version
2008                          the version of the toolchain to look for, use
2009                          '--help' to show possible values [platform
2010                          dependent]
2011  --with-build-devkit     Devkit to use for the build platform toolchain
2012  --with-jtreg            Regression Test Harness [probed]
2013  --with-native-debug-symbols
2014                          set the native debug symbol configuration (none,
2015                          internal, external, zipped) [varying]
2016  --with-stdc++lib=<static>,<dynamic>,<default>
2017                          force linking of the C++ runtime on Linux to either
2018                          static or dynamic, default is static with dynamic as
2019                          fallback
2020  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2021                          (Windows only) [probed]
2022  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2023                          (Windows only) [probed]
2024  --with-x                use the X Window System
2025  --with-cups             specify prefix directory for the cups package
2026                          (expecting the headers under PATH/include)
2027  --with-cups-include     specify directory for the cups include files
2028  --with-freetype         specify prefix directory for the freetype package
2029                          (expecting the libraries under PATH/lib and the
2030                          headers under PATH/include)
2031  --with-freetype-include specify directory for the freetype include files
2032  --with-freetype-lib     specify directory for the freetype library
2033  --with-freetype-src     specify directory with freetype sources to
2034                          automatically build the library (experimental,
2035                          Windows-only)
2036  --with-alsa             specify prefix directory for the alsa package
2037                          (expecting the libraries under PATH/lib and the
2038                          headers under PATH/include)
2039  --with-alsa-include     specify directory for the alsa include files
2040  --with-alsa-lib         specify directory for the alsa library
2041  --with-libffi           specify prefix directory for the libffi package
2042                          (expecting the libraries under PATH/lib and the
2043                          headers under PATH/include)
2044  --with-libffi-include   specify directory for the libffi include files
2045  --with-libffi-lib       specify directory for the libffi library
2046  --with-libjpeg          use libjpeg from build system or OpenJDK source
2047                          (system, bundled) [bundled]
2048  --with-giflib           use giflib from build system or OpenJDK source
2049                          (system, bundled) [bundled]
2050  --with-libpng           use libpng from build system or OpenJDK source
2051                          (system, bundled) [bundled]
2052  --with-zlib             use zlib from build system or OpenJDK source
2053                          (system, bundled) [bundled]
2054  --with-lcms             use lcms2 from build system or OpenJDK source
2055                          (system, bundled) [bundled]
2056  --with-dxsdk            Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-dxsdk-include    Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-num-cores        number of cores in the build system, e.g.
2063                          --with-num-cores=8 [probed]
2064  --with-memory-size      memory (in MB) available in the build system, e.g.
2065                          --with-memory-size=1024 [probed]
2066  --with-jobs             number of parallel jobs to let make run [calculated
2067                          based on cores and memory]
2068  --with-test-jobs        number of parallel tests jobs to run [based on build
2069                          jobs]
2070  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2071                          invocations of boot JDK, overriding the default
2072                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2073                          -enableassertions"
2074  --with-sjavac-server-java
2075                          use this java binary for running the sjavac
2076                          background server [Boot JDK java]
2077  --with-ccache-dir       where to store ccache files [~/.ccache]
2078
2079Some influential environment variables:
2080  BASENAME    Override default value for BASENAME
2081  BASH        Override default value for BASH
2082  CAT         Override default value for CAT
2083  CHMOD       Override default value for CHMOD
2084  CMP         Override default value for CMP
2085  COMM        Override default value for COMM
2086  CP          Override default value for CP
2087  CUT         Override default value for CUT
2088  DATE        Override default value for DATE
2089  DIFF        Override default value for DIFF
2090  DIRNAME     Override default value for DIRNAME
2091  ECHO        Override default value for ECHO
2092  EXPR        Override default value for EXPR
2093  FILE        Override default value for FILE
2094  FIND        Override default value for FIND
2095  HEAD        Override default value for HEAD
2096  LN          Override default value for LN
2097  LS          Override default value for LS
2098  MKDIR       Override default value for MKDIR
2099  MKTEMP      Override default value for MKTEMP
2100  MV          Override default value for MV
2101  NAWK        Override default value for NAWK
2102  PRINTF      Override default value for PRINTF
2103  RM          Override default value for RM
2104  RMDIR       Override default value for RMDIR
2105  SH          Override default value for SH
2106  SORT        Override default value for SORT
2107  TAIL        Override default value for TAIL
2108  TAR         Override default value for TAR
2109  TEE         Override default value for TEE
2110  TOUCH       Override default value for TOUCH
2111  TR          Override default value for TR
2112  UNAME       Override default value for UNAME
2113  UNIQ        Override default value for UNIQ
2114  WC          Override default value for WC
2115  WHICH       Override default value for WHICH
2116  XARGS       Override default value for XARGS
2117  AWK         Override default value for AWK
2118  GREP        Override default value for GREP
2119  EGREP       Override default value for EGREP
2120  FGREP       Override default value for FGREP
2121  SED         Override default value for SED
2122  CYGPATH     Override default value for CYGPATH
2123  READLINK    Override default value for READLINK
2124  DF          Override default value for DF
2125  CPIO        Override default value for CPIO
2126  NICE        Override default value for NICE
2127  MAKE        Override default value for MAKE
2128  UNZIP       Override default value for UNZIP
2129  ZIP         Override default value for ZIP
2130  LDD         Override default value for LDD
2131  OTOOL       Override default value for OTOOL
2132  READELF     Override default value for READELF
2133  HG          Override default value for HG
2134  STAT        Override default value for STAT
2135  TIME        Override default value for TIME
2136  PATCH       Override default value for PATCH
2137  DSYMUTIL    Override default value for DSYMUTIL
2138  XATTR       Override default value for XATTR
2139  CODESIGN    Override default value for CODESIGN
2140  SETFILE     Override default value for SETFILE
2141  PKG_CONFIG  path to pkg-config utility
2142  JAVA        Override default value for JAVA
2143  JAVAC       Override default value for JAVAC
2144  JAVAH       Override default value for JAVAH
2145  JAR         Override default value for JAR
2146  JARSIGNER   Override default value for JARSIGNER
2147  CC          C compiler command
2148  CFLAGS      C compiler flags
2149  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2150              nonstandard directory <lib dir>
2151  LIBS        libraries to pass to the linker, e.g. -l<library>
2152  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2153              you have headers in a nonstandard directory <include dir>
2154  CXX         C++ compiler command
2155  CXXFLAGS    C++ compiler flags
2156  CPP         C preprocessor
2157  CXXCPP      C++ preprocessor
2158  AS          Override default value for AS
2159  AR          Override default value for AR
2160  LIPO        Override default value for LIPO
2161  STRIP       Override default value for STRIP
2162  NM          Override default value for NM
2163  GNM         Override default value for GNM
2164  OBJCOPY     Override default value for OBJCOPY
2165  OBJDUMP     Override default value for OBJDUMP
2166  BUILD_CC    Override default value for BUILD_CC
2167  BUILD_CXX   Override default value for BUILD_CXX
2168  BUILD_NM    Override default value for BUILD_NM
2169  BUILD_AR    Override default value for BUILD_AR
2170  JTREGEXE    Override default value for JTREGEXE
2171  XMKMF       Path to xmkmf, Makefile generator for X Window System
2172  FREETYPE_CFLAGS
2173              C compiler flags for FREETYPE, overriding pkg-config
2174  FREETYPE_LIBS
2175              linker flags for FREETYPE, overriding pkg-config
2176  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2177  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2178  LIBFFI_CFLAGS
2179              C compiler flags for LIBFFI, overriding pkg-config
2180  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2181  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2182  PNG_LIBS    linker flags for PNG, overriding pkg-config
2183  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2184  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2185  ICECC_CMD   Override default value for ICECC_CMD
2186  ICECC_CREATE_ENV
2187              Override default value for ICECC_CREATE_ENV
2188  ICECC_WRAPPER
2189              Override default value for ICECC_WRAPPER
2190  CCACHE      Override default value for CCACHE
2191
2192Use these variables to override the choices made by `configure' or to help
2193it to find libraries and programs with nonstandard names/locations.
2194
2195Report bugs to <build-dev@openjdk.java.net>.
2196OpenJDK home page: <http://openjdk.java.net>.
2197_ACEOF
2198ac_status=$?
2199fi
2200
2201if test "$ac_init_help" = "recursive"; then
2202  # If there are subdirs, report their specific --help.
2203  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2204    test -d "$ac_dir" ||
2205      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2206      continue
2207    ac_builddir=.
2208
2209case "$ac_dir" in
2210.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2211*)
2212  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2213  # A ".." for each directory in $ac_dir_suffix.
2214  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2215  case $ac_top_builddir_sub in
2216  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2217  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2218  esac ;;
2219esac
2220ac_abs_top_builddir=$ac_pwd
2221ac_abs_builddir=$ac_pwd$ac_dir_suffix
2222# for backward compatibility:
2223ac_top_builddir=$ac_top_build_prefix
2224
2225case $srcdir in
2226  .)  # We are building in place.
2227    ac_srcdir=.
2228    ac_top_srcdir=$ac_top_builddir_sub
2229    ac_abs_top_srcdir=$ac_pwd ;;
2230  [\\/]* | ?:[\\/]* )  # Absolute name.
2231    ac_srcdir=$srcdir$ac_dir_suffix;
2232    ac_top_srcdir=$srcdir
2233    ac_abs_top_srcdir=$srcdir ;;
2234  *) # Relative name.
2235    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2236    ac_top_srcdir=$ac_top_build_prefix$srcdir
2237    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2238esac
2239ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2240
2241    cd "$ac_dir" || { ac_status=$?; continue; }
2242    # Check for guested configure.
2243    if test -f "$ac_srcdir/configure.gnu"; then
2244      echo &&
2245      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2246    elif test -f "$ac_srcdir/configure"; then
2247      echo &&
2248      $SHELL "$ac_srcdir/configure" --help=recursive
2249    else
2250      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2251    fi || ac_status=$?
2252    cd "$ac_pwd" || { ac_status=$?; break; }
2253  done
2254fi
2255
2256test -n "$ac_init_help" && exit $ac_status
2257if $ac_init_version; then
2258  cat <<\_ACEOF
2259OpenJDK configure jdk9
2260generated by GNU Autoconf 2.69
2261
2262Copyright (C) 2012 Free Software Foundation, Inc.
2263This configure script is free software; the Free Software Foundation
2264gives unlimited permission to copy, distribute and modify it.
2265_ACEOF
2266  exit
2267fi
2268
2269## ------------------------ ##
2270## Autoconf initialization. ##
2271## ------------------------ ##
2272
2273# ac_fn_c_try_compile LINENO
2274# --------------------------
2275# Try to compile conftest.$ac_ext, and return whether this succeeded.
2276ac_fn_c_try_compile ()
2277{
2278  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279  rm -f conftest.$ac_objext
2280  if { { ac_try="$ac_compile"
2281case "(($ac_try" in
2282  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2283  *) ac_try_echo=$ac_try;;
2284esac
2285eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2286$as_echo "$ac_try_echo"; } >&5
2287  (eval "$ac_compile") 2>conftest.err
2288  ac_status=$?
2289  if test -s conftest.err; then
2290    grep -v '^ *+' conftest.err >conftest.er1
2291    cat conftest.er1 >&5
2292    mv -f conftest.er1 conftest.err
2293  fi
2294  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2295  test $ac_status = 0; } && {
2296	 test -z "$ac_c_werror_flag" ||
2297	 test ! -s conftest.err
2298       } && test -s conftest.$ac_objext; then :
2299  ac_retval=0
2300else
2301  $as_echo "$as_me: failed program was:" >&5
2302sed 's/^/| /' conftest.$ac_ext >&5
2303
2304	ac_retval=1
2305fi
2306  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2307  as_fn_set_status $ac_retval
2308
2309} # ac_fn_c_try_compile
2310
2311# ac_fn_cxx_try_compile LINENO
2312# ----------------------------
2313# Try to compile conftest.$ac_ext, and return whether this succeeded.
2314ac_fn_cxx_try_compile ()
2315{
2316  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317  rm -f conftest.$ac_objext
2318  if { { ac_try="$ac_compile"
2319case "(($ac_try" in
2320  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2321  *) ac_try_echo=$ac_try;;
2322esac
2323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2324$as_echo "$ac_try_echo"; } >&5
2325  (eval "$ac_compile") 2>conftest.err
2326  ac_status=$?
2327  if test -s conftest.err; then
2328    grep -v '^ *+' conftest.err >conftest.er1
2329    cat conftest.er1 >&5
2330    mv -f conftest.er1 conftest.err
2331  fi
2332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2333  test $ac_status = 0; } && {
2334	 test -z "$ac_cxx_werror_flag" ||
2335	 test ! -s conftest.err
2336       } && test -s conftest.$ac_objext; then :
2337  ac_retval=0
2338else
2339  $as_echo "$as_me: failed program was:" >&5
2340sed 's/^/| /' conftest.$ac_ext >&5
2341
2342	ac_retval=1
2343fi
2344  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345  as_fn_set_status $ac_retval
2346
2347} # ac_fn_cxx_try_compile
2348
2349# ac_fn_c_try_cpp LINENO
2350# ----------------------
2351# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2352ac_fn_c_try_cpp ()
2353{
2354  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355  if { { ac_try="$ac_cpp conftest.$ac_ext"
2356case "(($ac_try" in
2357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2358  *) ac_try_echo=$ac_try;;
2359esac
2360eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2361$as_echo "$ac_try_echo"; } >&5
2362  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2363  ac_status=$?
2364  if test -s conftest.err; then
2365    grep -v '^ *+' conftest.err >conftest.er1
2366    cat conftest.er1 >&5
2367    mv -f conftest.er1 conftest.err
2368  fi
2369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2370  test $ac_status = 0; } > conftest.i && {
2371	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2372	 test ! -s conftest.err
2373       }; then :
2374  ac_retval=0
2375else
2376  $as_echo "$as_me: failed program was:" >&5
2377sed 's/^/| /' conftest.$ac_ext >&5
2378
2379    ac_retval=1
2380fi
2381  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2382  as_fn_set_status $ac_retval
2383
2384} # ac_fn_c_try_cpp
2385
2386# ac_fn_cxx_try_cpp LINENO
2387# ------------------------
2388# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2389ac_fn_cxx_try_cpp ()
2390{
2391  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392  if { { ac_try="$ac_cpp conftest.$ac_ext"
2393case "(($ac_try" in
2394  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2395  *) ac_try_echo=$ac_try;;
2396esac
2397eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2398$as_echo "$ac_try_echo"; } >&5
2399  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2400  ac_status=$?
2401  if test -s conftest.err; then
2402    grep -v '^ *+' conftest.err >conftest.er1
2403    cat conftest.er1 >&5
2404    mv -f conftest.er1 conftest.err
2405  fi
2406  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2407  test $ac_status = 0; } > conftest.i && {
2408	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2409	 test ! -s conftest.err
2410       }; then :
2411  ac_retval=0
2412else
2413  $as_echo "$as_me: failed program was:" >&5
2414sed 's/^/| /' conftest.$ac_ext >&5
2415
2416    ac_retval=1
2417fi
2418  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419  as_fn_set_status $ac_retval
2420
2421} # ac_fn_cxx_try_cpp
2422
2423# ac_fn_c_try_link LINENO
2424# -----------------------
2425# Try to link conftest.$ac_ext, and return whether this succeeded.
2426ac_fn_c_try_link ()
2427{
2428  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429  rm -f conftest.$ac_objext conftest$ac_exeext
2430  if { { ac_try="$ac_link"
2431case "(($ac_try" in
2432  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2433  *) ac_try_echo=$ac_try;;
2434esac
2435eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2436$as_echo "$ac_try_echo"; } >&5
2437  (eval "$ac_link") 2>conftest.err
2438  ac_status=$?
2439  if test -s conftest.err; then
2440    grep -v '^ *+' conftest.err >conftest.er1
2441    cat conftest.er1 >&5
2442    mv -f conftest.er1 conftest.err
2443  fi
2444  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2445  test $ac_status = 0; } && {
2446	 test -z "$ac_c_werror_flag" ||
2447	 test ! -s conftest.err
2448       } && test -s conftest$ac_exeext && {
2449	 test "$cross_compiling" = yes ||
2450	 test -x conftest$ac_exeext
2451       }; then :
2452  ac_retval=0
2453else
2454  $as_echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
2456
2457	ac_retval=1
2458fi
2459  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2460  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2461  # interfere with the next link command; also delete a directory that is
2462  # left behind by Apple's compiler.  We do this before executing the actions.
2463  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2464  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2465  as_fn_set_status $ac_retval
2466
2467} # ac_fn_c_try_link
2468
2469# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2470# ---------------------------------------------------------
2471# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2472# the include files in INCLUDES and setting the cache variable VAR
2473# accordingly.
2474ac_fn_cxx_check_header_mongrel ()
2475{
2476  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477  if eval \${$3+:} false; then :
2478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2479$as_echo_n "checking for $2... " >&6; }
2480if eval \${$3+:} false; then :
2481  $as_echo_n "(cached) " >&6
2482fi
2483eval ac_res=\$$3
2484	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2485$as_echo "$ac_res" >&6; }
2486else
2487  # Is the header compilable?
2488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2489$as_echo_n "checking $2 usability... " >&6; }
2490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2491/* end confdefs.h.  */
2492$4
2493#include <$2>
2494_ACEOF
2495if ac_fn_cxx_try_compile "$LINENO"; then :
2496  ac_header_compiler=yes
2497else
2498  ac_header_compiler=no
2499fi
2500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2502$as_echo "$ac_header_compiler" >&6; }
2503
2504# Is the header present?
2505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2506$as_echo_n "checking $2 presence... " >&6; }
2507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2508/* end confdefs.h.  */
2509#include <$2>
2510_ACEOF
2511if ac_fn_cxx_try_cpp "$LINENO"; then :
2512  ac_header_preproc=yes
2513else
2514  ac_header_preproc=no
2515fi
2516rm -f conftest.err conftest.i conftest.$ac_ext
2517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2518$as_echo "$ac_header_preproc" >&6; }
2519
2520# So?  What about this header?
2521case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2522  yes:no: )
2523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2524$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2525    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2526$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2527    ;;
2528  no:yes:* )
2529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2530$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2532$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2533    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2534$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2535    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2536$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2537    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2538$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2539( $as_echo "## ----------------------------------------- ##
2540## Report this to build-dev@openjdk.java.net ##
2541## ----------------------------------------- ##"
2542     ) | sed "s/^/$as_me: WARNING:     /" >&2
2543    ;;
2544esac
2545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2546$as_echo_n "checking for $2... " >&6; }
2547if eval \${$3+:} false; then :
2548  $as_echo_n "(cached) " >&6
2549else
2550  eval "$3=\$ac_header_compiler"
2551fi
2552eval ac_res=\$$3
2553	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2554$as_echo "$ac_res" >&6; }
2555fi
2556  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2557
2558} # ac_fn_cxx_check_header_mongrel
2559
2560# ac_fn_cxx_try_run LINENO
2561# ------------------------
2562# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2563# that executables *can* be run.
2564ac_fn_cxx_try_run ()
2565{
2566  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567  if { { ac_try="$ac_link"
2568case "(($ac_try" in
2569  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2570  *) ac_try_echo=$ac_try;;
2571esac
2572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2573$as_echo "$ac_try_echo"; } >&5
2574  (eval "$ac_link") 2>&5
2575  ac_status=$?
2576  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2577  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2578  { { case "(($ac_try" in
2579  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2580  *) ac_try_echo=$ac_try;;
2581esac
2582eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2583$as_echo "$ac_try_echo"; } >&5
2584  (eval "$ac_try") 2>&5
2585  ac_status=$?
2586  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2587  test $ac_status = 0; }; }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: program exited with status $ac_status" >&5
2591       $as_echo "$as_me: failed program was:" >&5
2592sed 's/^/| /' conftest.$ac_ext >&5
2593
2594       ac_retval=$ac_status
2595fi
2596  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2597  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2598  as_fn_set_status $ac_retval
2599
2600} # ac_fn_cxx_try_run
2601
2602# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2603# ---------------------------------------------------------
2604# Tests whether HEADER exists and can be compiled using the include files in
2605# INCLUDES, setting the cache variable VAR accordingly.
2606ac_fn_cxx_check_header_compile ()
2607{
2608  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2610$as_echo_n "checking for $2... " >&6; }
2611if eval \${$3+:} false; then :
2612  $as_echo_n "(cached) " >&6
2613else
2614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616$4
2617#include <$2>
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  eval "$3=yes"
2621else
2622  eval "$3=no"
2623fi
2624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2625fi
2626eval ac_res=\$$3
2627	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2628$as_echo "$ac_res" >&6; }
2629  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2630
2631} # ac_fn_cxx_check_header_compile
2632
2633# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2634# ----------------------------------------------
2635# Tries to find the compile-time value of EXPR in a program that includes
2636# INCLUDES, setting VAR accordingly. Returns whether the value could be
2637# computed
2638ac_fn_cxx_compute_int ()
2639{
2640  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2641  if test "$cross_compiling" = yes; then
2642    # Depending upon the size, compute the lo and hi bounds.
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645$4
2646int
2647main ()
2648{
2649static int test_array [1 - 2 * !(($2) >= 0)];
2650test_array [0] = 0;
2651return test_array [0];
2652
2653  ;
2654  return 0;
2655}
2656_ACEOF
2657if ac_fn_cxx_try_compile "$LINENO"; then :
2658  ac_lo=0 ac_mid=0
2659  while :; do
2660    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2661/* end confdefs.h.  */
2662$4
2663int
2664main ()
2665{
2666static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2667test_array [0] = 0;
2668return test_array [0];
2669
2670  ;
2671  return 0;
2672}
2673_ACEOF
2674if ac_fn_cxx_try_compile "$LINENO"; then :
2675  ac_hi=$ac_mid; break
2676else
2677  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2678			if test $ac_lo -le $ac_mid; then
2679			  ac_lo= ac_hi=
2680			  break
2681			fi
2682			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2683fi
2684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2685  done
2686else
2687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2688/* end confdefs.h.  */
2689$4
2690int
2691main ()
2692{
2693static int test_array [1 - 2 * !(($2) < 0)];
2694test_array [0] = 0;
2695return test_array [0];
2696
2697  ;
2698  return 0;
2699}
2700_ACEOF
2701if ac_fn_cxx_try_compile "$LINENO"; then :
2702  ac_hi=-1 ac_mid=-1
2703  while :; do
2704    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2705/* end confdefs.h.  */
2706$4
2707int
2708main ()
2709{
2710static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2711test_array [0] = 0;
2712return test_array [0];
2713
2714  ;
2715  return 0;
2716}
2717_ACEOF
2718if ac_fn_cxx_try_compile "$LINENO"; then :
2719  ac_lo=$ac_mid; break
2720else
2721  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2722			if test $ac_mid -le $ac_hi; then
2723			  ac_lo= ac_hi=
2724			  break
2725			fi
2726			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2727fi
2728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2729  done
2730else
2731  ac_lo= ac_hi=
2732fi
2733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2734fi
2735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2736# Binary search between lo and hi bounds.
2737while test "x$ac_lo" != "x$ac_hi"; do
2738  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2740/* end confdefs.h.  */
2741$4
2742int
2743main ()
2744{
2745static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2746test_array [0] = 0;
2747return test_array [0];
2748
2749  ;
2750  return 0;
2751}
2752_ACEOF
2753if ac_fn_cxx_try_compile "$LINENO"; then :
2754  ac_hi=$ac_mid
2755else
2756  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2757fi
2758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2759done
2760case $ac_lo in #((
2761?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2762'') ac_retval=1 ;;
2763esac
2764  else
2765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2766/* end confdefs.h.  */
2767$4
2768static long int longval () { return $2; }
2769static unsigned long int ulongval () { return $2; }
2770#include <stdio.h>
2771#include <stdlib.h>
2772int
2773main ()
2774{
2775
2776  FILE *f = fopen ("conftest.val", "w");
2777  if (! f)
2778    return 1;
2779  if (($2) < 0)
2780    {
2781      long int i = longval ();
2782      if (i != ($2))
2783	return 1;
2784      fprintf (f, "%ld", i);
2785    }
2786  else
2787    {
2788      unsigned long int i = ulongval ();
2789      if (i != ($2))
2790	return 1;
2791      fprintf (f, "%lu", i);
2792    }
2793  /* Do not output a trailing newline, as this causes \r\n confusion
2794     on some platforms.  */
2795  return ferror (f) || fclose (f) != 0;
2796
2797  ;
2798  return 0;
2799}
2800_ACEOF
2801if ac_fn_cxx_try_run "$LINENO"; then :
2802  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2803else
2804  ac_retval=1
2805fi
2806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2807  conftest.$ac_objext conftest.beam conftest.$ac_ext
2808rm -f conftest.val
2809
2810  fi
2811  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2812  as_fn_set_status $ac_retval
2813
2814} # ac_fn_cxx_compute_int
2815
2816# ac_fn_cxx_try_link LINENO
2817# -------------------------
2818# Try to link conftest.$ac_ext, and return whether this succeeded.
2819ac_fn_cxx_try_link ()
2820{
2821  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2822  rm -f conftest.$ac_objext conftest$ac_exeext
2823  if { { ac_try="$ac_link"
2824case "(($ac_try" in
2825  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2826  *) ac_try_echo=$ac_try;;
2827esac
2828eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2829$as_echo "$ac_try_echo"; } >&5
2830  (eval "$ac_link") 2>conftest.err
2831  ac_status=$?
2832  if test -s conftest.err; then
2833    grep -v '^ *+' conftest.err >conftest.er1
2834    cat conftest.er1 >&5
2835    mv -f conftest.er1 conftest.err
2836  fi
2837  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2838  test $ac_status = 0; } && {
2839	 test -z "$ac_cxx_werror_flag" ||
2840	 test ! -s conftest.err
2841       } && test -s conftest$ac_exeext && {
2842	 test "$cross_compiling" = yes ||
2843	 test -x conftest$ac_exeext
2844       }; then :
2845  ac_retval=0
2846else
2847  $as_echo "$as_me: failed program was:" >&5
2848sed 's/^/| /' conftest.$ac_ext >&5
2849
2850	ac_retval=1
2851fi
2852  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2853  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2854  # interfere with the next link command; also delete a directory that is
2855  # left behind by Apple's compiler.  We do this before executing the actions.
2856  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2857  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2858  as_fn_set_status $ac_retval
2859
2860} # ac_fn_cxx_try_link
2861
2862# ac_fn_cxx_check_func LINENO FUNC VAR
2863# ------------------------------------
2864# Tests whether FUNC exists, setting the cache variable VAR accordingly
2865ac_fn_cxx_check_func ()
2866{
2867  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2869$as_echo_n "checking for $2... " >&6; }
2870if eval \${$3+:} false; then :
2871  $as_echo_n "(cached) " >&6
2872else
2873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2874/* end confdefs.h.  */
2875/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2876   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2877#define $2 innocuous_$2
2878
2879/* System header to define __stub macros and hopefully few prototypes,
2880    which can conflict with char $2 (); below.
2881    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2882    <limits.h> exists even on freestanding compilers.  */
2883
2884#ifdef __STDC__
2885# include <limits.h>
2886#else
2887# include <assert.h>
2888#endif
2889
2890#undef $2
2891
2892/* Override any GCC internal prototype to avoid an error.
2893   Use char because int might match the return type of a GCC
2894   builtin and then its argument prototype would still apply.  */
2895#ifdef __cplusplus
2896extern "C"
2897#endif
2898char $2 ();
2899/* The GNU C library defines this for functions which it implements
2900    to always fail with ENOSYS.  Some functions are actually named
2901    something starting with __ and the normal name is an alias.  */
2902#if defined __stub_$2 || defined __stub___$2
2903choke me
2904#endif
2905
2906int
2907main ()
2908{
2909return $2 ();
2910  ;
2911  return 0;
2912}
2913_ACEOF
2914if ac_fn_cxx_try_link "$LINENO"; then :
2915  eval "$3=yes"
2916else
2917  eval "$3=no"
2918fi
2919rm -f core conftest.err conftest.$ac_objext \
2920    conftest$ac_exeext conftest.$ac_ext
2921fi
2922eval ac_res=\$$3
2923	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2924$as_echo "$ac_res" >&6; }
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926
2927} # ac_fn_cxx_check_func
2928
2929# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2930# -------------------------------------------------------
2931# Tests whether HEADER exists and can be compiled using the include files in
2932# INCLUDES, setting the cache variable VAR accordingly.
2933ac_fn_c_check_header_compile ()
2934{
2935  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2937$as_echo_n "checking for $2... " >&6; }
2938if eval \${$3+:} false; then :
2939  $as_echo_n "(cached) " >&6
2940else
2941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2942/* end confdefs.h.  */
2943$4
2944#include <$2>
2945_ACEOF
2946if ac_fn_c_try_compile "$LINENO"; then :
2947  eval "$3=yes"
2948else
2949  eval "$3=no"
2950fi
2951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2952fi
2953eval ac_res=\$$3
2954	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2955$as_echo "$ac_res" >&6; }
2956  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2957
2958} # ac_fn_c_check_header_compile
2959cat >config.log <<_ACEOF
2960This file contains any messages produced by compilers while
2961running configure, to aid debugging if configure makes a mistake.
2962
2963It was created by OpenJDK $as_me jdk9, which was
2964generated by GNU Autoconf 2.69.  Invocation command line was
2965
2966  $ $0 $@
2967
2968_ACEOF
2969exec 5>>config.log
2970{
2971cat <<_ASUNAME
2972## --------- ##
2973## Platform. ##
2974## --------- ##
2975
2976hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2977uname -m = `(uname -m) 2>/dev/null || echo unknown`
2978uname -r = `(uname -r) 2>/dev/null || echo unknown`
2979uname -s = `(uname -s) 2>/dev/null || echo unknown`
2980uname -v = `(uname -v) 2>/dev/null || echo unknown`
2981
2982/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2983/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2984
2985/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2986/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2987/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2988/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2989/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2990/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2991/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2992
2993_ASUNAME
2994
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998  IFS=$as_save_IFS
2999  test -z "$as_dir" && as_dir=.
3000    $as_echo "PATH: $as_dir"
3001  done
3002IFS=$as_save_IFS
3003
3004} >&5
3005
3006cat >&5 <<_ACEOF
3007
3008
3009## ----------- ##
3010## Core tests. ##
3011## ----------- ##
3012
3013_ACEOF
3014
3015
3016# Keep a trace of the command line.
3017# Strip out --no-create and --no-recursion so they do not pile up.
3018# Strip out --silent because we don't want to record it for future runs.
3019# Also quote any args containing shell meta-characters.
3020# Make two passes to allow for proper duplicate-argument suppression.
3021ac_configure_args=
3022ac_configure_args0=
3023ac_configure_args1=
3024ac_must_keep_next=false
3025for ac_pass in 1 2
3026do
3027  for ac_arg
3028  do
3029    case $ac_arg in
3030    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3031    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3032    | -silent | --silent | --silen | --sile | --sil)
3033      continue ;;
3034    *\'*)
3035      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3036    esac
3037    case $ac_pass in
3038    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3039    2)
3040      as_fn_append ac_configure_args1 " '$ac_arg'"
3041      if test $ac_must_keep_next = true; then
3042	ac_must_keep_next=false # Got value, back to normal.
3043      else
3044	case $ac_arg in
3045	  *=* | --config-cache | -C | -disable-* | --disable-* \
3046	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3047	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3048	  | -with-* | --with-* | -without-* | --without-* | --x)
3049	    case "$ac_configure_args0 " in
3050	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3051	    esac
3052	    ;;
3053	  -* ) ac_must_keep_next=true ;;
3054	esac
3055      fi
3056      as_fn_append ac_configure_args " '$ac_arg'"
3057      ;;
3058    esac
3059  done
3060done
3061{ ac_configure_args0=; unset ac_configure_args0;}
3062{ ac_configure_args1=; unset ac_configure_args1;}
3063
3064# When interrupted or exit'd, cleanup temporary files, and complete
3065# config.log.  We remove comments because anyway the quotes in there
3066# would cause problems or look ugly.
3067# WARNING: Use '\'' to represent an apostrophe within the trap.
3068# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3069trap 'exit_status=$?
3070  # Save into config.log some information that might help in debugging.
3071  {
3072    echo
3073
3074    $as_echo "## ---------------- ##
3075## Cache variables. ##
3076## ---------------- ##"
3077    echo
3078    # The following way of writing the cache mishandles newlines in values,
3079(
3080  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3081    eval ac_val=\$$ac_var
3082    case $ac_val in #(
3083    *${as_nl}*)
3084      case $ac_var in #(
3085      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3086$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3087      esac
3088      case $ac_var in #(
3089      _ | IFS | as_nl) ;; #(
3090      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3091      *) { eval $ac_var=; unset $ac_var;} ;;
3092      esac ;;
3093    esac
3094  done
3095  (set) 2>&1 |
3096    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3097    *${as_nl}ac_space=\ *)
3098      sed -n \
3099	"s/'\''/'\''\\\\'\'''\''/g;
3100	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3101      ;; #(
3102    *)
3103      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3104      ;;
3105    esac |
3106    sort
3107)
3108    echo
3109
3110    $as_echo "## ----------------- ##
3111## Output variables. ##
3112## ----------------- ##"
3113    echo
3114    for ac_var in $ac_subst_vars
3115    do
3116      eval ac_val=\$$ac_var
3117      case $ac_val in
3118      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3119      esac
3120      $as_echo "$ac_var='\''$ac_val'\''"
3121    done | sort
3122    echo
3123
3124    if test -n "$ac_subst_files"; then
3125      $as_echo "## ------------------- ##
3126## File substitutions. ##
3127## ------------------- ##"
3128      echo
3129      for ac_var in $ac_subst_files
3130      do
3131	eval ac_val=\$$ac_var
3132	case $ac_val in
3133	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3134	esac
3135	$as_echo "$ac_var='\''$ac_val'\''"
3136      done | sort
3137      echo
3138    fi
3139
3140    if test -s confdefs.h; then
3141      $as_echo "## ----------- ##
3142## confdefs.h. ##
3143## ----------- ##"
3144      echo
3145      cat confdefs.h
3146      echo
3147    fi
3148    test "$ac_signal" != 0 &&
3149      $as_echo "$as_me: caught signal $ac_signal"
3150    $as_echo "$as_me: exit $exit_status"
3151  } >&5
3152  rm -f core *.core core.conftest.* &&
3153    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3154    exit $exit_status
3155' 0
3156for ac_signal in 1 2 13 15; do
3157  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3158done
3159ac_signal=0
3160
3161# confdefs.h avoids OS command line length limits that DEFS can exceed.
3162rm -f -r conftest* confdefs.h
3163
3164$as_echo "/* confdefs.h */" > confdefs.h
3165
3166# Predefined preprocessor variables.
3167
3168cat >>confdefs.h <<_ACEOF
3169#define PACKAGE_NAME "$PACKAGE_NAME"
3170_ACEOF
3171
3172cat >>confdefs.h <<_ACEOF
3173#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3174_ACEOF
3175
3176cat >>confdefs.h <<_ACEOF
3177#define PACKAGE_VERSION "$PACKAGE_VERSION"
3178_ACEOF
3179
3180cat >>confdefs.h <<_ACEOF
3181#define PACKAGE_STRING "$PACKAGE_STRING"
3182_ACEOF
3183
3184cat >>confdefs.h <<_ACEOF
3185#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3186_ACEOF
3187
3188cat >>confdefs.h <<_ACEOF
3189#define PACKAGE_URL "$PACKAGE_URL"
3190_ACEOF
3191
3192
3193# Let the site file select an alternate cache file if it wants to.
3194# Prefer an explicitly selected file to automatically selected ones.
3195ac_site_file1=NONE
3196ac_site_file2=NONE
3197if test -n "$CONFIG_SITE"; then
3198  # We do not want a PATH search for config.site.
3199  case $CONFIG_SITE in #((
3200    -*)  ac_site_file1=./$CONFIG_SITE;;
3201    */*) ac_site_file1=$CONFIG_SITE;;
3202    *)   ac_site_file1=./$CONFIG_SITE;;
3203  esac
3204elif test "x$prefix" != xNONE; then
3205  ac_site_file1=$prefix/share/config.site
3206  ac_site_file2=$prefix/etc/config.site
3207else
3208  ac_site_file1=$ac_default_prefix/share/config.site
3209  ac_site_file2=$ac_default_prefix/etc/config.site
3210fi
3211for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3212do
3213  test "x$ac_site_file" = xNONE && continue
3214  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3215    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3216$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3217    sed 's/^/| /' "$ac_site_file" >&5
3218    . "$ac_site_file" \
3219      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3221as_fn_error $? "failed to load site script $ac_site_file
3222See \`config.log' for more details" "$LINENO" 5; }
3223  fi
3224done
3225
3226if test -r "$cache_file"; then
3227  # Some versions of bash will fail to source /dev/null (special files
3228  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3229  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3230    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3231$as_echo "$as_me: loading cache $cache_file" >&6;}
3232    case $cache_file in
3233      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3234      *)                      . "./$cache_file";;
3235    esac
3236  fi
3237else
3238  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3239$as_echo "$as_me: creating cache $cache_file" >&6;}
3240  >$cache_file
3241fi
3242
3243# Check that the precious variables saved in the cache have kept the same
3244# value.
3245ac_cache_corrupted=false
3246for ac_var in $ac_precious_vars; do
3247  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3248  eval ac_new_set=\$ac_env_${ac_var}_set
3249  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3250  eval ac_new_val=\$ac_env_${ac_var}_value
3251  case $ac_old_set,$ac_new_set in
3252    set,)
3253      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3254$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3255      ac_cache_corrupted=: ;;
3256    ,set)
3257      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3258$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3259      ac_cache_corrupted=: ;;
3260    ,);;
3261    *)
3262      if test "x$ac_old_val" != "x$ac_new_val"; then
3263	# differences in whitespace do not lead to failure.
3264	ac_old_val_w=`echo x $ac_old_val`
3265	ac_new_val_w=`echo x $ac_new_val`
3266	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3267	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3268$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3269	  ac_cache_corrupted=:
3270	else
3271	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3272$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3273	  eval $ac_var=\$ac_old_val
3274	fi
3275	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3276$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3277	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3278$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3279      fi;;
3280  esac
3281  # Pass precious variables to config.status.
3282  if test "$ac_new_set" = set; then
3283    case $ac_new_val in
3284    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3285    *) ac_arg=$ac_var=$ac_new_val ;;
3286    esac
3287    case " $ac_configure_args " in
3288      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3289      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3290    esac
3291  fi
3292done
3293if $ac_cache_corrupted; then
3294  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3296  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3297$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3298  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3299fi
3300## -------------------- ##
3301## Main body of script. ##
3302## -------------------- ##
3303
3304ac_ext=c
3305ac_cpp='$CPP $CPPFLAGS'
3306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3308ac_compiler_gnu=$ac_cv_c_compiler_gnu
3309
3310
3311
3312ac_aux_dir=
3313for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3314  if test -f "$ac_dir/install-sh"; then
3315    ac_aux_dir=$ac_dir
3316    ac_install_sh="$ac_aux_dir/install-sh -c"
3317    break
3318  elif test -f "$ac_dir/install.sh"; then
3319    ac_aux_dir=$ac_dir
3320    ac_install_sh="$ac_aux_dir/install.sh -c"
3321    break
3322  elif test -f "$ac_dir/shtool"; then
3323    ac_aux_dir=$ac_dir
3324    ac_install_sh="$ac_aux_dir/shtool install -c"
3325    break
3326  fi
3327done
3328if test -z "$ac_aux_dir"; then
3329  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
3330fi
3331
3332# These three variables are undocumented and unsupported,
3333# and are intended to be withdrawn in a future Autoconf release.
3334# They can cause serious problems if a builder's source tree is in a directory
3335# whose full name contains unusual characters.
3336ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3337ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3338ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3339
3340
3341# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3342
3343#
3344# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3345# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3346#
3347# This code is free software; you can redistribute it and/or modify it
3348# under the terms of the GNU General Public License version 2 only, as
3349# published by the Free Software Foundation.  Oracle designates this
3350# particular file as subject to the "Classpath" exception as provided
3351# by Oracle in the LICENSE file that accompanied this code.
3352#
3353# This code is distributed in the hope that it will be useful, but WITHOUT
3354# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3355# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3356# version 2 for more details (a copy is included in the LICENSE file that
3357# accompanied this code).
3358#
3359# You should have received a copy of the GNU General Public License version
3360# 2 along with this work; if not, write to the Free Software Foundation,
3361# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3362#
3363# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3364# or visit www.oracle.com if you need additional information or have any
3365# questions.
3366#
3367
3368#
3369# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3370#
3371# This program is free software; you can redistribute it and/or modify
3372# it under the terms of the GNU General Public License as published by
3373# the Free Software Foundation; either version 2 of the License, or
3374# (at your option) any later version.
3375#
3376# This program is distributed in the hope that it will be useful, but
3377# WITHOUT ANY WARRANTY; without even the implied warranty of
3378# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3379# General Public License for more details.
3380#
3381# You should have received a copy of the GNU General Public License
3382# along with this program; if not, write to the Free Software
3383# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3384#
3385# As a special exception to the GNU General Public License, if you
3386# distribute this file as part of a program that contains a
3387# configuration script generated by Autoconf, you may include it under
3388# the same distribution terms that you use for the rest of that program.
3389
3390# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3391# ----------------------------------
3392# PKG_PROG_PKG_CONFIG
3393
3394# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3395#
3396# Check to see whether a particular set of modules exists.  Similar
3397# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3398#
3399#
3400# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3401# this or PKG_CHECK_MODULES is called, or make sure to call
3402# PKG_CHECK_EXISTS manually
3403# --------------------------------------------------------------
3404
3405
3406
3407# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3408# ---------------------------------------------
3409# _PKG_CONFIG
3410
3411# _PKG_SHORT_ERRORS_SUPPORTED
3412# -----------------------------
3413# _PKG_SHORT_ERRORS_SUPPORTED
3414
3415
3416# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3417# [ACTION-IF-NOT-FOUND])
3418#
3419#
3420# Note that if there is a possibility the first call to
3421# PKG_CHECK_MODULES might not happen, you should be sure to include an
3422# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3423#
3424#
3425# --------------------------------------------------------------
3426# PKG_CHECK_MODULES
3427
3428
3429# Include these first...
3430#
3431# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3432# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3433#
3434# This code is free software; you can redistribute it and/or modify it
3435# under the terms of the GNU General Public License version 2 only, as
3436# published by the Free Software Foundation.  Oracle designates this
3437# particular file as subject to the "Classpath" exception as provided
3438# by Oracle in the LICENSE file that accompanied this code.
3439#
3440# This code is distributed in the hope that it will be useful, but WITHOUT
3441# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3442# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3443# version 2 for more details (a copy is included in the LICENSE file that
3444# accompanied this code).
3445#
3446# You should have received a copy of the GNU General Public License version
3447# 2 along with this work; if not, write to the Free Software Foundation,
3448# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3449#
3450# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3451# or visit www.oracle.com if you need additional information or have any
3452# questions.
3453#
3454
3455# Create a function/macro that takes a series of named arguments. The call is
3456# similar to AC_DEFUN, but the setup of the function looks like this:
3457# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3458# ... do something
3459#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3460# ])
3461# A star (*) in front of a named argument means that it is required and it's
3462# presence will be verified. To pass e.g. the first value as a normal indexed
3463# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3464# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3465# "ARG_FOO".
3466#
3467# The generated function can be called like this:
3468# MYFUNC(FOO: [foo-val],
3469#     BAR: [
3470#         $ECHO hello world
3471#     ])
3472# Note that the argument value must start on the same line as the argument name.
3473#
3474# Argument 1: Name of the function to define
3475# Argument 2: List of legal named arguments, with a * prefix for required arguments
3476# Argument 3: Argument array to treat as named, typically $@
3477# Argument 4: The main function body
3478
3479
3480# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3481# If so, then append $1 to $2 \
3482# Also set JVM_ARG_OK to true/false depending on outcome.
3483
3484
3485# Appends a string to a path variable, only adding the : when needed.
3486
3487
3488# Prepends a string to a path variable, only adding the : when needed.
3489
3490
3491# This will make sure the given variable points to a full and proper
3492# path. This means:
3493# 1) There will be no spaces in the path. On unix platforms,
3494#    spaces in the path will result in an error. On Windows,
3495#    the path will be rewritten using short-style to be space-free.
3496# 2) The path will be absolute, and it will be in unix-style (on
3497#     cygwin).
3498# $1: The name of the variable to fix
3499
3500
3501# This will make sure the given variable points to a executable
3502# with a full and proper path. This means:
3503# 1) There will be no spaces in the path. On unix platforms,
3504#    spaces in the path will result in an error. On Windows,
3505#    the path will be rewritten using short-style to be space-free.
3506# 2) The path will be absolute, and it will be in unix-style (on
3507#     cygwin).
3508# Any arguments given to the executable is preserved.
3509# If the input variable does not have a directory specification, then
3510# it need to be in the PATH.
3511# $1: The name of the variable to fix
3512
3513
3514
3515
3516# Register a --with argument but mark it as deprecated
3517# $1: The name of the with argument to deprecate, not including --with-
3518
3519
3520# Register a --enable argument but mark it as deprecated
3521# $1: The name of the with argument to deprecate, not including --enable-
3522# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3523# $3: Messages to user.
3524
3525
3526
3527
3528# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3529# $1: variable to check
3530
3531
3532# Check that there are no unprocessed overridden variables left.
3533# If so, they are an incorrect argument and we will exit with an error.
3534
3535
3536# Setup a tool for the given variable. If correctly specified by the user,
3537# use that value, otherwise search for the tool using the supplied code snippet.
3538# $1: variable to set
3539# $2: code snippet to call to look for the tool
3540# $3: code snippet to call if variable was used to find tool
3541
3542
3543# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3544# $1: variable to set
3545# $2: executable name (or list of names) to look for
3546
3547
3548# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3549# $1: variable to set
3550# $2: executable name (or list of names) to look for
3551
3552
3553# Like BASIC_PATH_PROGS but fails if no tool was found.
3554# $1: variable to set
3555# $2: executable name (or list of names) to look for
3556
3557
3558# Like BASIC_SETUP_TOOL but fails if no tool was found.
3559# $1: variable to set
3560# $2: autoconf macro to call to look for the special tool
3561
3562
3563# Setup the most fundamental tools that relies on not much else to set up,
3564# but is used by much of the early bootstrap code.
3565
3566
3567# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3568
3569
3570# Evaluates platform specific overrides for devkit variables.
3571# $1: Name of variable
3572
3573
3574
3575
3576
3577
3578#%%% Simple tools %%%
3579
3580# Check if we have found a usable version of make
3581# $1: the path to a potential make binary (or empty)
3582# $2: the description on how we found this
3583
3584
3585
3586
3587# Goes looking for a usable version of GNU make.
3588
3589
3590
3591
3592
3593
3594# Check if build directory is on local disk. If not possible to determine,
3595# we prefer to claim it's local.
3596# Argument 1: directory to test
3597# Argument 2: what to do if it is on local disk
3598# Argument 3: what to do otherwise (remote disk or failure)
3599
3600
3601# Check that source files have basic read permissions set. This might
3602# not be the case in cygwin in certain conditions.
3603
3604
3605
3606
3607# Check for support for specific options in bash
3608
3609
3610################################################################################
3611#
3612# Default make target
3613#
3614
3615
3616# Code to run after AC_OUTPUT
3617
3618
3619#
3620# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644
3645
3646
3647
3648# Helper function which possibly converts a path using DOS-style short mode.
3649# If so, the updated path is stored in $new_path.
3650# $1: The path to check
3651
3652
3653# Helper function which possibly converts a path using DOS-style short mode.
3654# If so, the updated path is stored in $new_path.
3655# $1: The path to check
3656
3657
3658# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3659# and could probably be heavily simplified. However, all changes in this
3660# area tend to need lot of testing in different scenarios, and in lack of
3661# proper unit testing, cleaning this up has not been deemed worth the effort
3662# at the moment.
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3673
3674
3675
3676
3677# ... then the rest
3678#
3679# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3680# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3681#
3682# This code is free software; you can redistribute it and/or modify it
3683# under the terms of the GNU General Public License version 2 only, as
3684# published by the Free Software Foundation.  Oracle designates this
3685# particular file as subject to the "Classpath" exception as provided
3686# by Oracle in the LICENSE file that accompanied this code.
3687#
3688# This code is distributed in the hope that it will be useful, but WITHOUT
3689# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3690# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3691# version 2 for more details (a copy is included in the LICENSE file that
3692# accompanied this code).
3693#
3694# You should have received a copy of the GNU General Public License version
3695# 2 along with this work; if not, write to the Free Software Foundation,
3696# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3697#
3698# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3699# or visit www.oracle.com if you need additional information or have any
3700# questions.
3701#
3702
3703########################################################################
3704# This file handles detection of the Boot JDK. The Boot JDK detection
3705# process has been developed as a response to solve a complex real-world
3706# problem. Initially, it was simple, but it has grown as platform after
3707# platform, idiosyncracy after idiosyncracy has been supported.
3708#
3709# The basic idea is this:
3710# 1) You need an acceptable *) JDK to use as a Boot JDK
3711# 2) There are several ways to locate a JDK, that are mostly platform
3712#    dependent **)
3713# 3) You can have multiple JDKs installed
3714# 4) If possible, configure should try to dig out an acceptable JDK
3715#    automatically, without having to resort to command-line options
3716#
3717# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3718#     javac) and not a JRE, etc.
3719#
3720# **) On Windows we typically use a well-known path.
3721#     On MacOSX we typically use the tool java_home.
3722#     On Linux we typically find javac in the $PATH, and then follow a
3723#     chain of symlinks that often ends up in a real JDK.
3724#
3725# This leads to the code where we check in different ways to locate a
3726# JDK, and if one is found, check if it is acceptable. If not, we print
3727# our reasons for rejecting it (useful when debugging non-working
3728# configure situations) and continue checking the next one.
3729########################################################################
3730
3731# Execute the check given as argument, and verify the result
3732# If the Boot JDK was previously found, do nothing
3733# $1 A command line (typically autoconf macro) to execute
3734
3735
3736# Test: Is bootjdk explicitely set by command line arguments?
3737
3738
3739# Test: Is $JAVA_HOME set?
3740
3741
3742# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3743
3744
3745# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3746# $1: Argument to the java_home binary (optional)
3747
3748
3749# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3750
3751
3752# Look for a jdk in the given path. If there are multiple, try to select the newest.
3753# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3754# $1 = Path to directory containing jdk installations.
3755# $2 = String to append to the found JDK directory to get the proper JDK home
3756
3757
3758# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3759# environmental variable as base for where to look.
3760# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3761
3762
3763# Test: Is there a JDK installed in default, well-known locations?
3764
3765
3766# Check that a command-line tool in the Boot JDK is correct
3767# $1 = name of variable to assign
3768# $2 = name of binary
3769
3770
3771###############################################################################
3772#
3773# We need a Boot JDK to bootstrap the build.
3774#
3775
3776
3777
3778
3779
3780#
3781# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3782# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3783#
3784# This code is free software; you can redistribute it and/or modify it
3785# under the terms of the GNU General Public License version 2 only, as
3786# published by the Free Software Foundation.  Oracle designates this
3787# particular file as subject to the "Classpath" exception as provided
3788# by Oracle in the LICENSE file that accompanied this code.
3789#
3790# This code is distributed in the hope that it will be useful, but WITHOUT
3791# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3792# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3793# version 2 for more details (a copy is included in the LICENSE file that
3794# accompanied this code).
3795#
3796# You should have received a copy of the GNU General Public License version
3797# 2 along with this work; if not, write to the Free Software Foundation,
3798# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3799#
3800# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3801# or visit www.oracle.com if you need additional information or have any
3802# questions.
3803#
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821################################################################################
3822#
3823# Runs icecc-create-env once and prints the error if it fails
3824#
3825# $1: arguments to icecc-create-env
3826# $2: log file
3827#
3828
3829
3830################################################################################
3831#
3832# Optionally enable distributed compilation of native code using icecc/icecream
3833#
3834
3835
3836
3837
3838
3839
3840
3841#
3842# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3843# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3844#
3845# This code is free software; you can redistribute it and/or modify it
3846# under the terms of the GNU General Public License version 2 only, as
3847# published by the Free Software Foundation.  Oracle designates this
3848# particular file as subject to the "Classpath" exception as provided
3849# by Oracle in the LICENSE file that accompanied this code.
3850#
3851# This code is distributed in the hope that it will be useful, but WITHOUT
3852# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3853# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3854# version 2 for more details (a copy is included in the LICENSE file that
3855# accompanied this code).
3856#
3857# You should have received a copy of the GNU General Public License version
3858# 2 along with this work; if not, write to the Free Software Foundation,
3859# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3860#
3861# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3862# or visit www.oracle.com if you need additional information or have any
3863# questions.
3864#
3865
3866# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3867# corresponding configure arguments instead
3868
3869
3870# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3871# that configure can use them while detecting compilers.
3872# TOOLCHAIN_TYPE is available here.
3873# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3874
3875
3876
3877
3878
3879
3880# Documentation on common flags used for solstudio in HIGHEST.
3881#
3882# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3883#          done with care, there are some assumptions below that need to
3884#          be understood about the use of pointers, and IEEE behavior.
3885#
3886# -fns: Use non-standard floating point mode (not IEEE 754)
3887# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3888# -fsingle: Use single precision floating point with 'float'
3889# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3890#   (Source with excessing pointer casting and data access with mixed
3891#    pointer types are not recommended)
3892# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3893#   (If you expect perfect errno behavior, do not use this)
3894# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3895# -xrestrict: Pointer parameters to functions do not overlap
3896#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3897#    If you pass in multiple pointers to the same data, do not use this)
3898# -xlibmil: Inline some library routines
3899#   (If you expect perfect errno behavior, do not use this)
3900# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3901#   (If you expect perfect errno behavior, do not use this)
3902#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3903
3904    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3905    # Bug?
3906    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3907    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3908    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3909    #fi
3910
3911
3912
3913
3914
3915# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3916#                                   IF_FALSE: [RUN-IF-FALSE])
3917# ------------------------------------------------------------
3918# Check that the c and c++ compilers support an argument
3919
3920
3921
3922
3923# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3924#                                   IF_FALSE: [RUN-IF-FALSE])
3925# ------------------------------------------------------------
3926# Check that the linker support an argument
3927
3928
3929
3930
3931
3932
3933#
3934# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3935# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3936#
3937# This code is free software; you can redistribute it and/or modify it
3938# under the terms of the GNU General Public License version 2 only, as
3939# published by the Free Software Foundation.  Oracle designates this
3940# particular file as subject to the "Classpath" exception as provided
3941# by Oracle in the LICENSE file that accompanied this code.
3942#
3943# This code is distributed in the hope that it will be useful, but WITHOUT
3944# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3945# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3946# version 2 for more details (a copy is included in the LICENSE file that
3947# accompanied this code).
3948#
3949# You should have received a copy of the GNU General Public License version
3950# 2 along with this work; if not, write to the Free Software Foundation,
3951# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3952#
3953# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3954# or visit www.oracle.com if you need additional information or have any
3955# questions.
3956#
3957
3958
3959
3960
3961
3962cygwin_help() {
3963  case $1 in
3964    unzip)
3965      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3966      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3967      ;;
3968    zip)
3969      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3970      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3971      ;;
3972    make)
3973      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3974      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3975      ;;
3976    freetype)
3977      HELP_MSG="
3978The freetype library can now be build during the configure process.
3979Download the freetype sources and unpack them into an arbitrary directory:
3980
3981wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3982tar -xzf freetype-2.5.3.tar.gz
3983
3984Then run configure with '--with-freetype-src=<freetype_src>'. This will
3985automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3986builds or into '<freetype_src>/lib32' for 32-bit builds.
3987Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3988and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3989
3990Alternatively you can unpack the sources like this to use the default directory:
3991
3992tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3993      ;;
3994  esac
3995}
3996
3997msys_help() {
3998  PKGHANDLER_COMMAND=""
3999}
4000
4001apt_help() {
4002  case $1 in
4003    reduced)
4004      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4005    devkit)
4006      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4007    openjdk)
4008      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4009    alsa)
4010      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4011    cups)
4012      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4013    freetype)
4014      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4015    ffi)
4016      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4017    x11)
4018      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4019    ccache)
4020      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4021  esac
4022}
4023
4024yum_help() {
4025  case $1 in
4026    devkit)
4027      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4028    openjdk)
4029      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4030    alsa)
4031      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4032    cups)
4033      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4034    freetype)
4035      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4036    x11)
4037      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4038    ccache)
4039      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4040  esac
4041}
4042
4043port_help() {
4044  PKGHANDLER_COMMAND=""
4045}
4046
4047pkgutil_help() {
4048  PKGHANDLER_COMMAND=""
4049}
4050
4051pkgadd_help() {
4052  PKGHANDLER_COMMAND=""
4053}
4054
4055# This function will check if we're called from the "configure" wrapper while
4056# printing --help. If so, we will print out additional information that can
4057# only be extracted within the autoconf script, and then exit. This must be
4058# called at the very beginning in configure.ac.
4059
4060
4061
4062
4063
4064
4065#
4066# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4067# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4068#
4069# This code is free software; you can redistribute it and/or modify it
4070# under the terms of the GNU General Public License version 2 only, as
4071# published by the Free Software Foundation.  Oracle designates this
4072# particular file as subject to the "Classpath" exception as provided
4073# by Oracle in the LICENSE file that accompanied this code.
4074#
4075# This code is distributed in the hope that it will be useful, but WITHOUT
4076# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4077# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4078# version 2 for more details (a copy is included in the LICENSE file that
4079# accompanied this code).
4080#
4081# You should have received a copy of the GNU General Public License version
4082# 2 along with this work; if not, write to the Free Software Foundation,
4083# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4084#
4085# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4086# or visit www.oracle.com if you need additional information or have any
4087# questions.
4088#
4089
4090###############################################################################
4091# Check which interpreter of the JVM we want to build.
4092# Currently we have:
4093#    template: Template interpreter (the default)
4094#    cpp     : C++ interpreter
4095
4096
4097###############################################################################
4098# Check which variants of the JVM that we want to build.
4099# Currently we have:
4100#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4101#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4102#    minimal1: reduced form of client with optional VM services and features stripped out
4103#    zero: no machine code interpreter, no compiler
4104#    zeroshark: zero interpreter and shark/llvm compiler backend
4105#    core: interpreter only, no compiler (only works on some platforms)
4106
4107
4108
4109###############################################################################
4110# Setup legacy vars/targets and new vars to deal with different debug levels.
4111#
4112#    release: no debug information, all optimizations, no asserts.
4113#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4114#    fastdebug: debug information (-g), all optimizations, all asserts
4115#    slowdebug: debug information (-g), no optimizations, all asserts
4116#
4117
4118
4119
4120
4121
4122
4123#
4124# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126#
4127# This code is free software; you can redistribute it and/or modify it
4128# under the terms of the GNU General Public License version 2 only, as
4129# published by the Free Software Foundation.  Oracle designates this
4130# particular file as subject to the "Classpath" exception as provided
4131# by Oracle in the LICENSE file that accompanied this code.
4132#
4133# This code is distributed in the hope that it will be useful, but WITHOUT
4134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136# version 2 for more details (a copy is included in the LICENSE file that
4137# accompanied this code).
4138#
4139# You should have received a copy of the GNU General Public License version
4140# 2 along with this work; if not, write to the Free Software Foundation,
4141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142#
4143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144# or visit www.oracle.com if you need additional information or have any
4145# questions.
4146#
4147
4148###############################################################################
4149# Check which variant of the JDK that we want to build.
4150# Currently we have:
4151#    normal:   standard edition
4152# but the custom make system may add other variants
4153#
4154# Effectively the JDK variant gives a name to a specific set of
4155# modules to compile into the JDK.
4156
4157
4158###############################################################################
4159# Set the debug level
4160#    release: no debug information, all optimizations, no asserts.
4161#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4162#    fastdebug: debug information (-g), all optimizations, all asserts
4163#    slowdebug: debug information (-g), no optimizations, all asserts
4164
4165
4166###############################################################################
4167#
4168# Should we build only OpenJDK even if closed sources are present?
4169#
4170
4171
4172
4173
4174###############################################################################
4175#
4176# Enable or disable the elliptic curve crypto implementation
4177#
4178
4179
4180
4181
4182################################################################################
4183#
4184# Gcov coverage data for hotspot
4185#
4186
4187
4188################################################################################
4189#
4190# Static build support.  When enabled will generate static
4191# libraries instead of shared libraries for all JDK libs.
4192#
4193
4194
4195#
4196# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4197# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4198#
4199# This code is free software; you can redistribute it and/or modify it
4200# under the terms of the GNU General Public License version 2 only, as
4201# published by the Free Software Foundation.  Oracle designates this
4202# particular file as subject to the "Classpath" exception as provided
4203# by Oracle in the LICENSE file that accompanied this code.
4204#
4205# This code is distributed in the hope that it will be useful, but WITHOUT
4206# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4207# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4208# version 2 for more details (a copy is included in the LICENSE file that
4209# accompanied this code).
4210#
4211# You should have received a copy of the GNU General Public License version
4212# 2 along with this work; if not, write to the Free Software Foundation,
4213# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4214#
4215# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4216# or visit www.oracle.com if you need additional information or have any
4217# questions.
4218#
4219
4220###############################################################################
4221#
4222# Setup version numbers
4223#
4224
4225# Verify that a given string represents a valid version number, and assign it
4226# to a variable.
4227
4228# Argument 1: the variable to assign to
4229# Argument 2: the value given by the user
4230
4231
4232
4233
4234#
4235# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4236# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4237#
4238# This code is free software; you can redistribute it and/or modify it
4239# under the terms of the GNU General Public License version 2 only, as
4240# published by the Free Software Foundation.  Oracle designates this
4241# particular file as subject to the "Classpath" exception as provided
4242# by Oracle in the LICENSE file that accompanied this code.
4243#
4244# This code is distributed in the hope that it will be useful, but WITHOUT
4245# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4246# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4247# version 2 for more details (a copy is included in the LICENSE file that
4248# accompanied this code).
4249#
4250# You should have received a copy of the GNU General Public License version
4251# 2 along with this work; if not, write to the Free Software Foundation,
4252# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4253#
4254# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4255# or visit www.oracle.com if you need additional information or have any
4256# questions.
4257#
4258
4259# Major library component reside in separate files.
4260#
4261# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4262# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4263#
4264# This code is free software; you can redistribute it and/or modify it
4265# under the terms of the GNU General Public License version 2 only, as
4266# published by the Free Software Foundation.  Oracle designates this
4267# particular file as subject to the "Classpath" exception as provided
4268# by Oracle in the LICENSE file that accompanied this code.
4269#
4270# This code is distributed in the hope that it will be useful, but WITHOUT
4271# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4272# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4273# version 2 for more details (a copy is included in the LICENSE file that
4274# accompanied this code).
4275#
4276# You should have received a copy of the GNU General Public License version
4277# 2 along with this work; if not, write to the Free Software Foundation,
4278# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4279#
4280# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4281# or visit www.oracle.com if you need additional information or have any
4282# questions.
4283#
4284
4285################################################################################
4286# Setup alsa (Advanced Linux Sound Architecture)
4287################################################################################
4288
4289
4290#
4291# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4293#
4294# This code is free software; you can redistribute it and/or modify it
4295# under the terms of the GNU General Public License version 2 only, as
4296# published by the Free Software Foundation.  Oracle designates this
4297# particular file as subject to the "Classpath" exception as provided
4298# by Oracle in the LICENSE file that accompanied this code.
4299#
4300# This code is distributed in the hope that it will be useful, but WITHOUT
4301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4303# version 2 for more details (a copy is included in the LICENSE file that
4304# accompanied this code).
4305#
4306# You should have received a copy of the GNU General Public License version
4307# 2 along with this work; if not, write to the Free Software Foundation,
4308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4309#
4310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4311# or visit www.oracle.com if you need additional information or have any
4312# questions.
4313#
4314
4315################################################################################
4316# Setup bundled libraries.
4317#
4318# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4319# OpenJDK repository. Default is to use these libraries as bundled, but they
4320# might be replaced by en external version by the user.
4321################################################################################
4322
4323
4324################################################################################
4325# Setup libjpeg
4326################################################################################
4327
4328
4329################################################################################
4330# Setup giflib
4331################################################################################
4332
4333
4334################################################################################
4335# Setup libpng
4336################################################################################
4337
4338
4339################################################################################
4340# Setup zlib
4341################################################################################
4342
4343
4344################################################################################
4345# Setup lcms (Little CMS)
4346################################################################################
4347
4348
4349#
4350# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4351# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4352#
4353# This code is free software; you can redistribute it and/or modify it
4354# under the terms of the GNU General Public License version 2 only, as
4355# published by the Free Software Foundation.  Oracle designates this
4356# particular file as subject to the "Classpath" exception as provided
4357# by Oracle in the LICENSE file that accompanied this code.
4358#
4359# This code is distributed in the hope that it will be useful, but WITHOUT
4360# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4361# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4362# version 2 for more details (a copy is included in the LICENSE file that
4363# accompanied this code).
4364#
4365# You should have received a copy of the GNU General Public License version
4366# 2 along with this work; if not, write to the Free Software Foundation,
4367# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4368#
4369# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4370# or visit www.oracle.com if you need additional information or have any
4371# questions.
4372#
4373
4374################################################################################
4375# Setup cups (Common Unix Printing System)
4376################################################################################
4377
4378
4379#
4380# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4381# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4382#
4383# This code is free software; you can redistribute it and/or modify it
4384# under the terms of the GNU General Public License version 2 only, as
4385# published by the Free Software Foundation.  Oracle designates this
4386# particular file as subject to the "Classpath" exception as provided
4387# by Oracle in the LICENSE file that accompanied this code.
4388#
4389# This code is distributed in the hope that it will be useful, but WITHOUT
4390# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4391# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4392# version 2 for more details (a copy is included in the LICENSE file that
4393# accompanied this code).
4394#
4395# You should have received a copy of the GNU General Public License version
4396# 2 along with this work; if not, write to the Free Software Foundation,
4397# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4398#
4399# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4400# or visit www.oracle.com if you need additional information or have any
4401# questions.
4402#
4403
4404################################################################################
4405# Setup libffi (Foreign Function Interface)
4406################################################################################
4407
4408
4409#
4410# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4411# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4412#
4413# This code is free software; you can redistribute it and/or modify it
4414# under the terms of the GNU General Public License version 2 only, as
4415# published by the Free Software Foundation.  Oracle designates this
4416# particular file as subject to the "Classpath" exception as provided
4417# by Oracle in the LICENSE file that accompanied this code.
4418#
4419# This code is distributed in the hope that it will be useful, but WITHOUT
4420# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4421# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4422# version 2 for more details (a copy is included in the LICENSE file that
4423# accompanied this code).
4424#
4425# You should have received a copy of the GNU General Public License version
4426# 2 along with this work; if not, write to the Free Software Foundation,
4427# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4428#
4429# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4430# or visit www.oracle.com if you need additional information or have any
4431# questions.
4432#
4433
4434################################################################################
4435# Build the freetype lib from source
4436################################################################################
4437
4438
4439################################################################################
4440# Check if a potential freeype library match is correct and usable
4441################################################################################
4442
4443
4444################################################################################
4445# Setup freetype (The FreeType2 font rendering library)
4446################################################################################
4447
4448
4449#
4450# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4451# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4452#
4453# This code is free software; you can redistribute it and/or modify it
4454# under the terms of the GNU General Public License version 2 only, as
4455# published by the Free Software Foundation.  Oracle designates this
4456# particular file as subject to the "Classpath" exception as provided
4457# by Oracle in the LICENSE file that accompanied this code.
4458#
4459# This code is distributed in the hope that it will be useful, but WITHOUT
4460# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4461# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4462# version 2 for more details (a copy is included in the LICENSE file that
4463# accompanied this code).
4464#
4465# You should have received a copy of the GNU General Public License version
4466# 2 along with this work; if not, write to the Free Software Foundation,
4467# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4468#
4469# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4470# or visit www.oracle.com if you need additional information or have any
4471# questions.
4472#
4473
4474################################################################################
4475# Setup the standard C/C++ runtime libraries.
4476#
4477# Most importantly, determine if stdc++ should be linked statically or
4478# dynamically.
4479################################################################################
4480
4481
4482#
4483# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4485#
4486# This code is free software; you can redistribute it and/or modify it
4487# under the terms of the GNU General Public License version 2 only, as
4488# published by the Free Software Foundation.  Oracle designates this
4489# particular file as subject to the "Classpath" exception as provided
4490# by Oracle in the LICENSE file that accompanied this code.
4491#
4492# This code is distributed in the hope that it will be useful, but WITHOUT
4493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4495# version 2 for more details (a copy is included in the LICENSE file that
4496# accompanied this code).
4497#
4498# You should have received a copy of the GNU General Public License version
4499# 2 along with this work; if not, write to the Free Software Foundation,
4500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4501#
4502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4503# or visit www.oracle.com if you need additional information or have any
4504# questions.
4505#
4506
4507################################################################################
4508# Setup X11 Windows system
4509################################################################################
4510
4511
4512
4513################################################################################
4514# Determine which libraries are needed for this configuration
4515################################################################################
4516
4517
4518################################################################################
4519# Parse library options, and setup needed libraries
4520################################################################################
4521
4522
4523################################################################################
4524# Setup llvm (Low-Level VM)
4525################################################################################
4526
4527
4528################################################################################
4529# Setup various libraries, typically small system libraries
4530################################################################################
4531
4532
4533#
4534# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4535# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4536#
4537# This code is free software; you can redistribute it and/or modify it
4538# under the terms of the GNU General Public License version 2 only, as
4539# published by the Free Software Foundation.  Oracle designates this
4540# particular file as subject to the "Classpath" exception as provided
4541# by Oracle in the LICENSE file that accompanied this code.
4542#
4543# This code is distributed in the hope that it will be useful, but WITHOUT
4544# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4545# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4546# version 2 for more details (a copy is included in the LICENSE file that
4547# accompanied this code).
4548#
4549# You should have received a copy of the GNU General Public License version
4550# 2 along with this work; if not, write to the Free Software Foundation,
4551# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4552#
4553# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4554# or visit www.oracle.com if you need additional information or have any
4555# questions.
4556#
4557
4558# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4559# Converts autoconf style CPU name to OpenJDK style, into
4560# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4561
4562
4563# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4564# Converts autoconf style OS name to OpenJDK style, into
4565# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4566
4567
4568# Expects $host_os $host_cpu $build_os and $build_cpu
4569# and $with_target_bits to have been setup!
4570#
4571# Translate the standard triplet(quadruplet) definition
4572# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4573# OPENJDK_BUILD_OS, etc.
4574
4575
4576# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4577# accordingly. Must be done after setting up build and target system, but before
4578# doing anything else with these values.
4579
4580
4581# Setup the legacy variables, for controlling the old makefiles.
4582#
4583
4584
4585
4586
4587#%%% Build and target systems %%%
4588
4589
4590
4591
4592# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4593# Add -mX to various FLAGS variables.
4594
4595
4596
4597
4598
4599
4600#
4601# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4602# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4603#
4604# This code is free software; you can redistribute it and/or modify it
4605# under the terms of the GNU General Public License version 2 only, as
4606# published by the Free Software Foundation.  Oracle designates this
4607# particular file as subject to the "Classpath" exception as provided
4608# by Oracle in the LICENSE file that accompanied this code.
4609#
4610# This code is distributed in the hope that it will be useful, but WITHOUT
4611# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4612# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4613# version 2 for more details (a copy is included in the LICENSE file that
4614# accompanied this code).
4615#
4616# You should have received a copy of the GNU General Public License version
4617# 2 along with this work; if not, write to the Free Software Foundation,
4618# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4619#
4620# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4621# or visit www.oracle.com if you need additional information or have any
4622# questions.
4623#
4624
4625
4626
4627
4628
4629
4630
4631#
4632# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4633# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4634#
4635# This code is free software; you can redistribute it and/or modify it
4636# under the terms of the GNU General Public License version 2 only, as
4637# published by the Free Software Foundation.  Oracle designates this
4638# particular file as subject to the "Classpath" exception as provided
4639# by Oracle in the LICENSE file that accompanied this code.
4640#
4641# This code is distributed in the hope that it will be useful, but WITHOUT
4642# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4643# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4644# version 2 for more details (a copy is included in the LICENSE file that
4645# accompanied this code).
4646#
4647# You should have received a copy of the GNU General Public License version
4648# 2 along with this work; if not, write to the Free Software Foundation,
4649# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4650#
4651# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4652# or visit www.oracle.com if you need additional information or have any
4653# questions.
4654#
4655
4656########################################################################
4657# This file is responsible for detecting, verifying and setting up the
4658# toolchain, i.e. the compiler, linker and related utilities. It will setup
4659# proper paths to the binaries, but it will not setup any flags.
4660#
4661# The binaries used is determined by the toolchain type, which is the family of
4662# compilers and related tools that are used.
4663########################################################################
4664
4665
4666# All valid toolchains, regardless of platform (used by help.m4)
4667VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4668
4669# These toolchains are valid on different platforms
4670VALID_TOOLCHAINS_linux="gcc clang"
4671VALID_TOOLCHAINS_solaris="solstudio"
4672VALID_TOOLCHAINS_macosx="gcc clang"
4673VALID_TOOLCHAINS_aix="xlc"
4674VALID_TOOLCHAINS_windows="microsoft"
4675
4676# Toolchain descriptions
4677TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4678TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4679TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4680TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4681TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4682
4683# Minimum supported versions, empty means unspecified
4684TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4685TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4686TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4687TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4688TOOLCHAIN_MINIMUM_VERSION_xlc=""
4689
4690# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4691# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4692
4693
4694# Check if the configured compiler (C and C++) is of a specific version or
4695# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4696#
4697# Arguments:
4698#   VERSION:   The version string to check against the found version
4699#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4700#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4701
4702
4703
4704
4705# Setup a number of variables describing how native output files are
4706# named on this platform/toolchain.
4707
4708
4709# Determine which toolchain type to use, and make sure it is valid for this
4710# platform. Setup various information about the selected toolchain.
4711
4712
4713# Before we start detecting the toolchain executables, we might need some
4714# special setup, e.g. additional paths etc.
4715
4716
4717# Restore path, etc
4718
4719
4720# Check if a compiler is of the toolchain type we expect, and save the version
4721# information from it. If the compiler does not match the expected type,
4722# this function will abort using AC_MSG_ERROR. If it matches, the version will
4723# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4724# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4725#
4726# $1 = compiler to test (CC or CXX)
4727# $2 = human readable name of compiler (C or C++)
4728
4729
4730# Try to locate the given C or C++ compiler in the path, or otherwise.
4731#
4732# $1 = compiler to test (CC or CXX)
4733# $2 = human readable name of compiler (C or C++)
4734# $3 = list of compiler names to search for
4735
4736
4737# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4738# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4739# archiver (AR). Verify that the compilers are correct according to the
4740# toolchain type.
4741
4742
4743# Setup additional tools that is considered a part of the toolchain, but not the
4744# core part. Many of these are highly platform-specific and do not exist,
4745# and/or are not needed on all platforms.
4746
4747
4748# Setup the build tools (i.e, the compiler and linker used to build programs
4749# that should be run on the build platform, not the target platform, as a build
4750# helper). Since the non-cross-compile case uses the normal, target compilers
4751# for this, we can only do this after these have been setup.
4752
4753
4754# Setup legacy variables that are still needed as alternative ways to refer to
4755# parts of the toolchain.
4756
4757
4758# Do some additional checks on the detected tools.
4759
4760
4761# Setup the JTReg Regression Test Harness.
4762
4763
4764#
4765# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4766# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4767#
4768# This code is free software; you can redistribute it and/or modify it
4769# under the terms of the GNU General Public License version 2 only, as
4770# published by the Free Software Foundation.  Oracle designates this
4771# particular file as subject to the "Classpath" exception as provided
4772# by Oracle in the LICENSE file that accompanied this code.
4773#
4774# This code is distributed in the hope that it will be useful, but WITHOUT
4775# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4776# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4777# version 2 for more details (a copy is included in the LICENSE file that
4778# accompanied this code).
4779#
4780# You should have received a copy of the GNU General Public License version
4781# 2 along with this work; if not, write to the Free Software Foundation,
4782# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4783#
4784# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4785# or visit www.oracle.com if you need additional information or have any
4786# questions.
4787#
4788
4789################################################################################
4790# The order of these defines the priority by which we try to find them.
4791VALID_VS_VERSIONS="2013 2012 2010"
4792
4793VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4794VS_VERSION_INTERNAL_2010=100
4795VS_MSVCR_2010=msvcr100.dll
4796# We don't use msvcp on Visual Studio 2010
4797#VS_MSVCP_2010=msvcp100.dll
4798VS_ENVVAR_2010="VS100COMNTOOLS"
4799VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4800VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4801VS_VS_PLATFORM_NAME_2010="v100"
4802VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4803
4804VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4805VS_VERSION_INTERNAL_2012=110
4806VS_MSVCR_2012=msvcr110.dll
4807VS_MSVCP_2012=msvcp110.dll
4808VS_ENVVAR_2012="VS110COMNTOOLS"
4809VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4810VS_SDK_INSTALLDIR_2012=
4811VS_VS_PLATFORM_NAME_2012="v110"
4812VS_SDK_PLATFORM_NAME_2012=
4813
4814VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4815VS_VERSION_INTERNAL_2013=120
4816VS_MSVCR_2013=msvcr120.dll
4817VS_MSVCP_2013=msvcp120.dll
4818VS_ENVVAR_2013="VS120COMNTOOLS"
4819VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4820VS_SDK_INSTALLDIR_2013=
4821VS_VS_PLATFORM_NAME_2013="v120"
4822VS_SDK_PLATFORM_NAME_2013=
4823
4824################################################################################
4825
4826
4827
4828################################################################################
4829
4830
4831
4832################################################################################
4833# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4834# build environment and assigns it to VS_ENV_CMD
4835
4836
4837################################################################################
4838
4839
4840
4841################################################################################
4842# Check if the VS env variables were setup prior to running configure.
4843# If not, then find vcvarsall.bat and run it automatically, and integrate
4844# the set env variables into the spec file.
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859# This line needs to be here, verbatim, after all includes and the dummy hook
4860# definitions. It is replaced with custom functionality when building
4861# custom sources.
4862#CUSTOM_AUTOCONF_INCLUDE
4863
4864# Do not change or remove the following line, it is needed for consistency checks:
4865DATE_WHEN_GENERATED=1457953189
4866
4867###############################################################################
4868#
4869# Initialization / Boot-strapping
4870#
4871# The bootstrapping process needs to solve the "chicken or the egg" problem,
4872# thus it jumps back and forth, each time gaining something needed later on.
4873#
4874###############################################################################
4875
4876# If we are requested to print additional help, do that and then exit.
4877# This must be the very first call.
4878
4879  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
4880
4881    # Print available toolchains
4882    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4883    $PRINTF "Which are valid to use depends on the build platform.\n"
4884    for toolchain in $VALID_TOOLCHAINS_all; do
4885      # Use indirect variable referencing
4886      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4887      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4888      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4889    done
4890
4891    # And now exit directly
4892    exit 0
4893  fi
4894
4895
4896# Basic initialization that must happen first of all in the normal process.
4897
4898  # Save the original command line. This is passed to us by the wrapper configure script.
4899
4900  # Save the path variable before it gets changed
4901  ORIGINAL_PATH="$PATH"
4902
4903  DATE_WHEN_CONFIGURED=`LANG=C date`
4904
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4906$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4908$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4909
4910
4911  # Start with tools that do not need have cross compilation support
4912  # and can be expected to be found in the default PATH. These tools are
4913  # used by configure.
4914
4915  # First are all the simple required tools.
4916
4917
4918
4919  # Publish this variable in the help.
4920
4921
4922  if [ -z "${BASENAME+x}" ]; then
4923    # The variable is not set by user, try to locate tool using the code snippet
4924    for ac_prog in basename
4925do
4926  # Extract the first word of "$ac_prog", so it can be a program name with args.
4927set dummy $ac_prog; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_BASENAME+:} false; then :
4931  $as_echo_n "(cached) " >&6
4932else
4933  case $BASENAME in
4934  [\\/]* | ?:[\\/]*)
4935  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4936  ;;
4937  *)
4938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in $PATH
4940do
4941  IFS=$as_save_IFS
4942  test -z "$as_dir" && as_dir=.
4943    for ac_exec_ext in '' $ac_executable_extensions; do
4944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4945    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947    break 2
4948  fi
4949done
4950  done
4951IFS=$as_save_IFS
4952
4953  ;;
4954esac
4955fi
4956BASENAME=$ac_cv_path_BASENAME
4957if test -n "$BASENAME"; then
4958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4959$as_echo "$BASENAME" >&6; }
4960else
4961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
4965
4966  test -n "$BASENAME" && break
4967done
4968
4969  else
4970    # The variable is set, but is it from the command line or the environment?
4971
4972    # Try to remove the string !BASENAME! from our list.
4973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4975      # If it failed, the variable was not from the command line. Ignore it,
4976      # but warn the user (except for BASH, which is always set by the calling BASH).
4977      if test "xBASENAME" != xBASH; then
4978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4979$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4980      fi
4981      # Try to locate tool using the code snippet
4982      for ac_prog in basename
4983do
4984  # Extract the first word of "$ac_prog", so it can be a program name with args.
4985set dummy $ac_prog; ac_word=$2
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
4988if ${ac_cv_path_BASENAME+:} false; then :
4989  $as_echo_n "(cached) " >&6
4990else
4991  case $BASENAME in
4992  [\\/]* | ?:[\\/]*)
4993  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4994  ;;
4995  *)
4996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997for as_dir in $PATH
4998do
4999  IFS=$as_save_IFS
5000  test -z "$as_dir" && as_dir=.
5001    for ac_exec_ext in '' $ac_executable_extensions; do
5002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5003    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5005    break 2
5006  fi
5007done
5008  done
5009IFS=$as_save_IFS
5010
5011  ;;
5012esac
5013fi
5014BASENAME=$ac_cv_path_BASENAME
5015if test -n "$BASENAME"; then
5016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5017$as_echo "$BASENAME" >&6; }
5018else
5019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
5021fi
5022
5023
5024  test -n "$BASENAME" && break
5025done
5026
5027    else
5028      # If it succeeded, then it was overridden by the user. We will use it
5029      # for the tool.
5030
5031      # First remove it from the list of overridden variables, so we can test
5032      # for unknown variables in the end.
5033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5034
5035      # Check if we try to supply an empty value
5036      if test "x$BASENAME" = x; then
5037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5038$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5040$as_echo_n "checking for BASENAME... " >&6; }
5041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5042$as_echo "disabled" >&6; }
5043      else
5044        # Check if the provided tool contains a complete path.
5045        tool_specified="$BASENAME"
5046        tool_basename="${tool_specified##*/}"
5047        if test "x$tool_basename" = "x$tool_specified"; then
5048          # A command without a complete path is provided, search $PATH.
5049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5050$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5051          # Extract the first word of "$tool_basename", so it can be a program name with args.
5052set dummy $tool_basename; ac_word=$2
5053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5054$as_echo_n "checking for $ac_word... " >&6; }
5055if ${ac_cv_path_BASENAME+:} false; then :
5056  $as_echo_n "(cached) " >&6
5057else
5058  case $BASENAME in
5059  [\\/]* | ?:[\\/]*)
5060  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5061  ;;
5062  *)
5063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066  IFS=$as_save_IFS
5067  test -z "$as_dir" && as_dir=.
5068    for ac_exec_ext in '' $ac_executable_extensions; do
5069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5070    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5072    break 2
5073  fi
5074done
5075  done
5076IFS=$as_save_IFS
5077
5078  ;;
5079esac
5080fi
5081BASENAME=$ac_cv_path_BASENAME
5082if test -n "$BASENAME"; then
5083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5084$as_echo "$BASENAME" >&6; }
5085else
5086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087$as_echo "no" >&6; }
5088fi
5089
5090
5091          if test "x$BASENAME" = x; then
5092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5093          fi
5094        else
5095          # Otherwise we believe it is a complete path. Use it as it is.
5096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5097$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5099$as_echo_n "checking for BASENAME... " >&6; }
5100          if test ! -x "$tool_specified"; then
5101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5102$as_echo "not found" >&6; }
5103            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5104          fi
5105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5106$as_echo "$tool_specified" >&6; }
5107        fi
5108      fi
5109    fi
5110
5111  fi
5112
5113
5114
5115  if test "x$BASENAME" = x; then
5116    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5117  fi
5118
5119
5120
5121
5122
5123  # Publish this variable in the help.
5124
5125
5126  if [ -z "${BASH+x}" ]; then
5127    # The variable is not set by user, try to locate tool using the code snippet
5128    for ac_prog in bash
5129do
5130  # Extract the first word of "$ac_prog", so it can be a program name with args.
5131set dummy $ac_prog; ac_word=$2
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5133$as_echo_n "checking for $ac_word... " >&6; }
5134if ${ac_cv_path_BASH+:} false; then :
5135  $as_echo_n "(cached) " >&6
5136else
5137  case $BASH in
5138  [\\/]* | ?:[\\/]*)
5139  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5140  ;;
5141  *)
5142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143for as_dir in $PATH
5144do
5145  IFS=$as_save_IFS
5146  test -z "$as_dir" && as_dir=.
5147    for ac_exec_ext in '' $ac_executable_extensions; do
5148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5149    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5151    break 2
5152  fi
5153done
5154  done
5155IFS=$as_save_IFS
5156
5157  ;;
5158esac
5159fi
5160BASH=$ac_cv_path_BASH
5161if test -n "$BASH"; then
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5163$as_echo "$BASH" >&6; }
5164else
5165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170  test -n "$BASH" && break
5171done
5172
5173  else
5174    # The variable is set, but is it from the command line or the environment?
5175
5176    # Try to remove the string !BASH! from our list.
5177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5179      # If it failed, the variable was not from the command line. Ignore it,
5180      # but warn the user (except for BASH, which is always set by the calling BASH).
5181      if test "xBASH" != xBASH; then
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5183$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5184      fi
5185      # Try to locate tool using the code snippet
5186      for ac_prog in bash
5187do
5188  # Extract the first word of "$ac_prog", so it can be a program name with args.
5189set dummy $ac_prog; ac_word=$2
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191$as_echo_n "checking for $ac_word... " >&6; }
5192if ${ac_cv_path_BASH+:} false; then :
5193  $as_echo_n "(cached) " >&6
5194else
5195  case $BASH in
5196  [\\/]* | ?:[\\/]*)
5197  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5198  ;;
5199  *)
5200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201for as_dir in $PATH
5202do
5203  IFS=$as_save_IFS
5204  test -z "$as_dir" && as_dir=.
5205    for ac_exec_ext in '' $ac_executable_extensions; do
5206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5207    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209    break 2
5210  fi
5211done
5212  done
5213IFS=$as_save_IFS
5214
5215  ;;
5216esac
5217fi
5218BASH=$ac_cv_path_BASH
5219if test -n "$BASH"; then
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5221$as_echo "$BASH" >&6; }
5222else
5223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224$as_echo "no" >&6; }
5225fi
5226
5227
5228  test -n "$BASH" && break
5229done
5230
5231    else
5232      # If it succeeded, then it was overridden by the user. We will use it
5233      # for the tool.
5234
5235      # First remove it from the list of overridden variables, so we can test
5236      # for unknown variables in the end.
5237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5238
5239      # Check if we try to supply an empty value
5240      if test "x$BASH" = x; then
5241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5242$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5244$as_echo_n "checking for BASH... " >&6; }
5245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5246$as_echo "disabled" >&6; }
5247      else
5248        # Check if the provided tool contains a complete path.
5249        tool_specified="$BASH"
5250        tool_basename="${tool_specified##*/}"
5251        if test "x$tool_basename" = "x$tool_specified"; then
5252          # A command without a complete path is provided, search $PATH.
5253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5254$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5255          # Extract the first word of "$tool_basename", so it can be a program name with args.
5256set dummy $tool_basename; ac_word=$2
5257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5258$as_echo_n "checking for $ac_word... " >&6; }
5259if ${ac_cv_path_BASH+:} false; then :
5260  $as_echo_n "(cached) " >&6
5261else
5262  case $BASH in
5263  [\\/]* | ?:[\\/]*)
5264  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5265  ;;
5266  *)
5267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5268for as_dir in $PATH
5269do
5270  IFS=$as_save_IFS
5271  test -z "$as_dir" && as_dir=.
5272    for ac_exec_ext in '' $ac_executable_extensions; do
5273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5274    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5276    break 2
5277  fi
5278done
5279  done
5280IFS=$as_save_IFS
5281
5282  ;;
5283esac
5284fi
5285BASH=$ac_cv_path_BASH
5286if test -n "$BASH"; then
5287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5288$as_echo "$BASH" >&6; }
5289else
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5291$as_echo "no" >&6; }
5292fi
5293
5294
5295          if test "x$BASH" = x; then
5296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5297          fi
5298        else
5299          # Otherwise we believe it is a complete path. Use it as it is.
5300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5301$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5303$as_echo_n "checking for BASH... " >&6; }
5304          if test ! -x "$tool_specified"; then
5305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5306$as_echo "not found" >&6; }
5307            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5308          fi
5309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5310$as_echo "$tool_specified" >&6; }
5311        fi
5312      fi
5313    fi
5314
5315  fi
5316
5317
5318
5319  if test "x$BASH" = x; then
5320    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5321  fi
5322
5323
5324
5325
5326
5327  # Publish this variable in the help.
5328
5329
5330  if [ -z "${CAT+x}" ]; then
5331    # The variable is not set by user, try to locate tool using the code snippet
5332    for ac_prog in cat
5333do
5334  # Extract the first word of "$ac_prog", so it can be a program name with args.
5335set dummy $ac_prog; ac_word=$2
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337$as_echo_n "checking for $ac_word... " >&6; }
5338if ${ac_cv_path_CAT+:} false; then :
5339  $as_echo_n "(cached) " >&6
5340else
5341  case $CAT in
5342  [\\/]* | ?:[\\/]*)
5343  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5344  ;;
5345  *)
5346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5347for as_dir in $PATH
5348do
5349  IFS=$as_save_IFS
5350  test -z "$as_dir" && as_dir=.
5351    for ac_exec_ext in '' $ac_executable_extensions; do
5352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5353    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5355    break 2
5356  fi
5357done
5358  done
5359IFS=$as_save_IFS
5360
5361  ;;
5362esac
5363fi
5364CAT=$ac_cv_path_CAT
5365if test -n "$CAT"; then
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5367$as_echo "$CAT" >&6; }
5368else
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
5371fi
5372
5373
5374  test -n "$CAT" && break
5375done
5376
5377  else
5378    # The variable is set, but is it from the command line or the environment?
5379
5380    # Try to remove the string !CAT! from our list.
5381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5383      # If it failed, the variable was not from the command line. Ignore it,
5384      # but warn the user (except for BASH, which is always set by the calling BASH).
5385      if test "xCAT" != xBASH; then
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5387$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5388      fi
5389      # Try to locate tool using the code snippet
5390      for ac_prog in cat
5391do
5392  # Extract the first word of "$ac_prog", so it can be a program name with args.
5393set dummy $ac_prog; ac_word=$2
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395$as_echo_n "checking for $ac_word... " >&6; }
5396if ${ac_cv_path_CAT+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  case $CAT in
5400  [\\/]* | ?:[\\/]*)
5401  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5402  ;;
5403  *)
5404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407  IFS=$as_save_IFS
5408  test -z "$as_dir" && as_dir=.
5409    for ac_exec_ext in '' $ac_executable_extensions; do
5410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413    break 2
5414  fi
5415done
5416  done
5417IFS=$as_save_IFS
5418
5419  ;;
5420esac
5421fi
5422CAT=$ac_cv_path_CAT
5423if test -n "$CAT"; then
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5425$as_echo "$CAT" >&6; }
5426else
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
5430
5431
5432  test -n "$CAT" && break
5433done
5434
5435    else
5436      # If it succeeded, then it was overridden by the user. We will use it
5437      # for the tool.
5438
5439      # First remove it from the list of overridden variables, so we can test
5440      # for unknown variables in the end.
5441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5442
5443      # Check if we try to supply an empty value
5444      if test "x$CAT" = x; then
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5446$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5448$as_echo_n "checking for CAT... " >&6; }
5449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5450$as_echo "disabled" >&6; }
5451      else
5452        # Check if the provided tool contains a complete path.
5453        tool_specified="$CAT"
5454        tool_basename="${tool_specified##*/}"
5455        if test "x$tool_basename" = "x$tool_specified"; then
5456          # A command without a complete path is provided, search $PATH.
5457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5458$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5459          # Extract the first word of "$tool_basename", so it can be a program name with args.
5460set dummy $tool_basename; ac_word=$2
5461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5462$as_echo_n "checking for $ac_word... " >&6; }
5463if ${ac_cv_path_CAT+:} false; then :
5464  $as_echo_n "(cached) " >&6
5465else
5466  case $CAT in
5467  [\\/]* | ?:[\\/]*)
5468  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5469  ;;
5470  *)
5471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5472for as_dir in $PATH
5473do
5474  IFS=$as_save_IFS
5475  test -z "$as_dir" && as_dir=.
5476    for ac_exec_ext in '' $ac_executable_extensions; do
5477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5478    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5480    break 2
5481  fi
5482done
5483  done
5484IFS=$as_save_IFS
5485
5486  ;;
5487esac
5488fi
5489CAT=$ac_cv_path_CAT
5490if test -n "$CAT"; then
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5492$as_echo "$CAT" >&6; }
5493else
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5495$as_echo "no" >&6; }
5496fi
5497
5498
5499          if test "x$CAT" = x; then
5500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5501          fi
5502        else
5503          # Otherwise we believe it is a complete path. Use it as it is.
5504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5505$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5507$as_echo_n "checking for CAT... " >&6; }
5508          if test ! -x "$tool_specified"; then
5509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5510$as_echo "not found" >&6; }
5511            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5512          fi
5513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5514$as_echo "$tool_specified" >&6; }
5515        fi
5516      fi
5517    fi
5518
5519  fi
5520
5521
5522
5523  if test "x$CAT" = x; then
5524    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5525  fi
5526
5527
5528
5529
5530
5531  # Publish this variable in the help.
5532
5533
5534  if [ -z "${CHMOD+x}" ]; then
5535    # The variable is not set by user, try to locate tool using the code snippet
5536    for ac_prog in chmod
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if ${ac_cv_path_CHMOD+:} false; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $CHMOD in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5557    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568CHMOD=$ac_cv_path_CHMOD
5569if test -n "$CHMOD"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5571$as_echo "$CHMOD" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$CHMOD" && break
5579done
5580
5581  else
5582    # The variable is set, but is it from the command line or the environment?
5583
5584    # Try to remove the string !CHMOD! from our list.
5585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5587      # If it failed, the variable was not from the command line. Ignore it,
5588      # but warn the user (except for BASH, which is always set by the calling BASH).
5589      if test "xCHMOD" != xBASH; then
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5591$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5592      fi
5593      # Try to locate tool using the code snippet
5594      for ac_prog in chmod
5595do
5596  # Extract the first word of "$ac_prog", so it can be a program name with args.
5597set dummy $ac_prog; ac_word=$2
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599$as_echo_n "checking for $ac_word... " >&6; }
5600if ${ac_cv_path_CHMOD+:} false; then :
5601  $as_echo_n "(cached) " >&6
5602else
5603  case $CHMOD in
5604  [\\/]* | ?:[\\/]*)
5605  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5606  ;;
5607  *)
5608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611  IFS=$as_save_IFS
5612  test -z "$as_dir" && as_dir=.
5613    for ac_exec_ext in '' $ac_executable_extensions; do
5614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5615    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617    break 2
5618  fi
5619done
5620  done
5621IFS=$as_save_IFS
5622
5623  ;;
5624esac
5625fi
5626CHMOD=$ac_cv_path_CHMOD
5627if test -n "$CHMOD"; then
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5629$as_echo "$CHMOD" >&6; }
5630else
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
5633fi
5634
5635
5636  test -n "$CHMOD" && break
5637done
5638
5639    else
5640      # If it succeeded, then it was overridden by the user. We will use it
5641      # for the tool.
5642
5643      # First remove it from the list of overridden variables, so we can test
5644      # for unknown variables in the end.
5645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5646
5647      # Check if we try to supply an empty value
5648      if test "x$CHMOD" = x; then
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5650$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5652$as_echo_n "checking for CHMOD... " >&6; }
5653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5654$as_echo "disabled" >&6; }
5655      else
5656        # Check if the provided tool contains a complete path.
5657        tool_specified="$CHMOD"
5658        tool_basename="${tool_specified##*/}"
5659        if test "x$tool_basename" = "x$tool_specified"; then
5660          # A command without a complete path is provided, search $PATH.
5661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5662$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5663          # Extract the first word of "$tool_basename", so it can be a program name with args.
5664set dummy $tool_basename; ac_word=$2
5665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5666$as_echo_n "checking for $ac_word... " >&6; }
5667if ${ac_cv_path_CHMOD+:} false; then :
5668  $as_echo_n "(cached) " >&6
5669else
5670  case $CHMOD in
5671  [\\/]* | ?:[\\/]*)
5672  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5673  ;;
5674  *)
5675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676for as_dir in $PATH
5677do
5678  IFS=$as_save_IFS
5679  test -z "$as_dir" && as_dir=.
5680    for ac_exec_ext in '' $ac_executable_extensions; do
5681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5682    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5684    break 2
5685  fi
5686done
5687  done
5688IFS=$as_save_IFS
5689
5690  ;;
5691esac
5692fi
5693CHMOD=$ac_cv_path_CHMOD
5694if test -n "$CHMOD"; then
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5696$as_echo "$CHMOD" >&6; }
5697else
5698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
5700fi
5701
5702
5703          if test "x$CHMOD" = x; then
5704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5705          fi
5706        else
5707          # Otherwise we believe it is a complete path. Use it as it is.
5708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5709$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5711$as_echo_n "checking for CHMOD... " >&6; }
5712          if test ! -x "$tool_specified"; then
5713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5714$as_echo "not found" >&6; }
5715            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5716          fi
5717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5718$as_echo "$tool_specified" >&6; }
5719        fi
5720      fi
5721    fi
5722
5723  fi
5724
5725
5726
5727  if test "x$CHMOD" = x; then
5728    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5729  fi
5730
5731
5732
5733
5734
5735  # Publish this variable in the help.
5736
5737
5738  if [ -z "${CMP+x}" ]; then
5739    # The variable is not set by user, try to locate tool using the code snippet
5740    for ac_prog in cmp
5741do
5742  # Extract the first word of "$ac_prog", so it can be a program name with args.
5743set dummy $ac_prog; ac_word=$2
5744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5745$as_echo_n "checking for $ac_word... " >&6; }
5746if ${ac_cv_path_CMP+:} false; then :
5747  $as_echo_n "(cached) " >&6
5748else
5749  case $CMP in
5750  [\\/]* | ?:[\\/]*)
5751  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5752  ;;
5753  *)
5754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5755for as_dir in $PATH
5756do
5757  IFS=$as_save_IFS
5758  test -z "$as_dir" && as_dir=.
5759    for ac_exec_ext in '' $ac_executable_extensions; do
5760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5761    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5763    break 2
5764  fi
5765done
5766  done
5767IFS=$as_save_IFS
5768
5769  ;;
5770esac
5771fi
5772CMP=$ac_cv_path_CMP
5773if test -n "$CMP"; then
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5775$as_echo "$CMP" >&6; }
5776else
5777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5778$as_echo "no" >&6; }
5779fi
5780
5781
5782  test -n "$CMP" && break
5783done
5784
5785  else
5786    # The variable is set, but is it from the command line or the environment?
5787
5788    # Try to remove the string !CMP! from our list.
5789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5791      # If it failed, the variable was not from the command line. Ignore it,
5792      # but warn the user (except for BASH, which is always set by the calling BASH).
5793      if test "xCMP" != xBASH; then
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5795$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5796      fi
5797      # Try to locate tool using the code snippet
5798      for ac_prog in cmp
5799do
5800  # Extract the first word of "$ac_prog", so it can be a program name with args.
5801set dummy $ac_prog; ac_word=$2
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
5804if ${ac_cv_path_CMP+:} false; then :
5805  $as_echo_n "(cached) " >&6
5806else
5807  case $CMP in
5808  [\\/]* | ?:[\\/]*)
5809  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5810  ;;
5811  *)
5812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815  IFS=$as_save_IFS
5816  test -z "$as_dir" && as_dir=.
5817    for ac_exec_ext in '' $ac_executable_extensions; do
5818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5819    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821    break 2
5822  fi
5823done
5824  done
5825IFS=$as_save_IFS
5826
5827  ;;
5828esac
5829fi
5830CMP=$ac_cv_path_CMP
5831if test -n "$CMP"; then
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5833$as_echo "$CMP" >&6; }
5834else
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840  test -n "$CMP" && break
5841done
5842
5843    else
5844      # If it succeeded, then it was overridden by the user. We will use it
5845      # for the tool.
5846
5847      # First remove it from the list of overridden variables, so we can test
5848      # for unknown variables in the end.
5849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5850
5851      # Check if we try to supply an empty value
5852      if test "x$CMP" = x; then
5853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5854$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5856$as_echo_n "checking for CMP... " >&6; }
5857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5858$as_echo "disabled" >&6; }
5859      else
5860        # Check if the provided tool contains a complete path.
5861        tool_specified="$CMP"
5862        tool_basename="${tool_specified##*/}"
5863        if test "x$tool_basename" = "x$tool_specified"; then
5864          # A command without a complete path is provided, search $PATH.
5865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5866$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5867          # Extract the first word of "$tool_basename", so it can be a program name with args.
5868set dummy $tool_basename; ac_word=$2
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5870$as_echo_n "checking for $ac_word... " >&6; }
5871if ${ac_cv_path_CMP+:} false; then :
5872  $as_echo_n "(cached) " >&6
5873else
5874  case $CMP in
5875  [\\/]* | ?:[\\/]*)
5876  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5877  ;;
5878  *)
5879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5880for as_dir in $PATH
5881do
5882  IFS=$as_save_IFS
5883  test -z "$as_dir" && as_dir=.
5884    for ac_exec_ext in '' $ac_executable_extensions; do
5885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5886    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5888    break 2
5889  fi
5890done
5891  done
5892IFS=$as_save_IFS
5893
5894  ;;
5895esac
5896fi
5897CMP=$ac_cv_path_CMP
5898if test -n "$CMP"; then
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5900$as_echo "$CMP" >&6; }
5901else
5902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903$as_echo "no" >&6; }
5904fi
5905
5906
5907          if test "x$CMP" = x; then
5908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5909          fi
5910        else
5911          # Otherwise we believe it is a complete path. Use it as it is.
5912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5913$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5915$as_echo_n "checking for CMP... " >&6; }
5916          if test ! -x "$tool_specified"; then
5917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5918$as_echo "not found" >&6; }
5919            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5920          fi
5921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5922$as_echo "$tool_specified" >&6; }
5923        fi
5924      fi
5925    fi
5926
5927  fi
5928
5929
5930
5931  if test "x$CMP" = x; then
5932    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5933  fi
5934
5935
5936
5937
5938
5939  # Publish this variable in the help.
5940
5941
5942  if [ -z "${COMM+x}" ]; then
5943    # The variable is not set by user, try to locate tool using the code snippet
5944    for ac_prog in comm
5945do
5946  # Extract the first word of "$ac_prog", so it can be a program name with args.
5947set dummy $ac_prog; ac_word=$2
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5949$as_echo_n "checking for $ac_word... " >&6; }
5950if ${ac_cv_path_COMM+:} false; then :
5951  $as_echo_n "(cached) " >&6
5952else
5953  case $COMM in
5954  [\\/]* | ?:[\\/]*)
5955  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5956  ;;
5957  *)
5958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5959for as_dir in $PATH
5960do
5961  IFS=$as_save_IFS
5962  test -z "$as_dir" && as_dir=.
5963    for ac_exec_ext in '' $ac_executable_extensions; do
5964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5965    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5967    break 2
5968  fi
5969done
5970  done
5971IFS=$as_save_IFS
5972
5973  ;;
5974esac
5975fi
5976COMM=$ac_cv_path_COMM
5977if test -n "$COMM"; then
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5979$as_echo "$COMM" >&6; }
5980else
5981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
5983fi
5984
5985
5986  test -n "$COMM" && break
5987done
5988
5989  else
5990    # The variable is set, but is it from the command line or the environment?
5991
5992    # Try to remove the string !COMM! from our list.
5993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5995      # If it failed, the variable was not from the command line. Ignore it,
5996      # but warn the user (except for BASH, which is always set by the calling BASH).
5997      if test "xCOMM" != xBASH; then
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5999$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6000      fi
6001      # Try to locate tool using the code snippet
6002      for ac_prog in comm
6003do
6004  # Extract the first word of "$ac_prog", so it can be a program name with args.
6005set dummy $ac_prog; ac_word=$2
6006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
6008if ${ac_cv_path_COMM+:} false; then :
6009  $as_echo_n "(cached) " >&6
6010else
6011  case $COMM in
6012  [\\/]* | ?:[\\/]*)
6013  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6014  ;;
6015  *)
6016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017for as_dir in $PATH
6018do
6019  IFS=$as_save_IFS
6020  test -z "$as_dir" && as_dir=.
6021    for ac_exec_ext in '' $ac_executable_extensions; do
6022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6023    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6025    break 2
6026  fi
6027done
6028  done
6029IFS=$as_save_IFS
6030
6031  ;;
6032esac
6033fi
6034COMM=$ac_cv_path_COMM
6035if test -n "$COMM"; then
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6037$as_echo "$COMM" >&6; }
6038else
6039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041fi
6042
6043
6044  test -n "$COMM" && break
6045done
6046
6047    else
6048      # If it succeeded, then it was overridden by the user. We will use it
6049      # for the tool.
6050
6051      # First remove it from the list of overridden variables, so we can test
6052      # for unknown variables in the end.
6053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6054
6055      # Check if we try to supply an empty value
6056      if test "x$COMM" = x; then
6057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6058$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6060$as_echo_n "checking for COMM... " >&6; }
6061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6062$as_echo "disabled" >&6; }
6063      else
6064        # Check if the provided tool contains a complete path.
6065        tool_specified="$COMM"
6066        tool_basename="${tool_specified##*/}"
6067        if test "x$tool_basename" = "x$tool_specified"; then
6068          # A command without a complete path is provided, search $PATH.
6069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6070$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6071          # Extract the first word of "$tool_basename", so it can be a program name with args.
6072set dummy $tool_basename; ac_word=$2
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
6075if ${ac_cv_path_COMM+:} false; then :
6076  $as_echo_n "(cached) " >&6
6077else
6078  case $COMM in
6079  [\\/]* | ?:[\\/]*)
6080  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6081  ;;
6082  *)
6083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH
6085do
6086  IFS=$as_save_IFS
6087  test -z "$as_dir" && as_dir=.
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6090    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6092    break 2
6093  fi
6094done
6095  done
6096IFS=$as_save_IFS
6097
6098  ;;
6099esac
6100fi
6101COMM=$ac_cv_path_COMM
6102if test -n "$COMM"; then
6103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6104$as_echo "$COMM" >&6; }
6105else
6106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
6108fi
6109
6110
6111          if test "x$COMM" = x; then
6112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6113          fi
6114        else
6115          # Otherwise we believe it is a complete path. Use it as it is.
6116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6117$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6119$as_echo_n "checking for COMM... " >&6; }
6120          if test ! -x "$tool_specified"; then
6121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6122$as_echo "not found" >&6; }
6123            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6124          fi
6125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6126$as_echo "$tool_specified" >&6; }
6127        fi
6128      fi
6129    fi
6130
6131  fi
6132
6133
6134
6135  if test "x$COMM" = x; then
6136    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6137  fi
6138
6139
6140
6141
6142
6143  # Publish this variable in the help.
6144
6145
6146  if [ -z "${CP+x}" ]; then
6147    # The variable is not set by user, try to locate tool using the code snippet
6148    for ac_prog in cp
6149do
6150  # Extract the first word of "$ac_prog", so it can be a program name with args.
6151set dummy $ac_prog; ac_word=$2
6152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6153$as_echo_n "checking for $ac_word... " >&6; }
6154if ${ac_cv_path_CP+:} false; then :
6155  $as_echo_n "(cached) " >&6
6156else
6157  case $CP in
6158  [\\/]* | ?:[\\/]*)
6159  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6160  ;;
6161  *)
6162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6163for as_dir in $PATH
6164do
6165  IFS=$as_save_IFS
6166  test -z "$as_dir" && as_dir=.
6167    for ac_exec_ext in '' $ac_executable_extensions; do
6168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6169    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6171    break 2
6172  fi
6173done
6174  done
6175IFS=$as_save_IFS
6176
6177  ;;
6178esac
6179fi
6180CP=$ac_cv_path_CP
6181if test -n "$CP"; then
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6183$as_echo "$CP" >&6; }
6184else
6185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186$as_echo "no" >&6; }
6187fi
6188
6189
6190  test -n "$CP" && break
6191done
6192
6193  else
6194    # The variable is set, but is it from the command line or the environment?
6195
6196    # Try to remove the string !CP! from our list.
6197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6199      # If it failed, the variable was not from the command line. Ignore it,
6200      # but warn the user (except for BASH, which is always set by the calling BASH).
6201      if test "xCP" != xBASH; then
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6203$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6204      fi
6205      # Try to locate tool using the code snippet
6206      for ac_prog in cp
6207do
6208  # Extract the first word of "$ac_prog", so it can be a program name with args.
6209set dummy $ac_prog; ac_word=$2
6210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6211$as_echo_n "checking for $ac_word... " >&6; }
6212if ${ac_cv_path_CP+:} false; then :
6213  $as_echo_n "(cached) " >&6
6214else
6215  case $CP in
6216  [\\/]* | ?:[\\/]*)
6217  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6218  ;;
6219  *)
6220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221for as_dir in $PATH
6222do
6223  IFS=$as_save_IFS
6224  test -z "$as_dir" && as_dir=.
6225    for ac_exec_ext in '' $ac_executable_extensions; do
6226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6227    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6229    break 2
6230  fi
6231done
6232  done
6233IFS=$as_save_IFS
6234
6235  ;;
6236esac
6237fi
6238CP=$ac_cv_path_CP
6239if test -n "$CP"; then
6240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6241$as_echo "$CP" >&6; }
6242else
6243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6244$as_echo "no" >&6; }
6245fi
6246
6247
6248  test -n "$CP" && break
6249done
6250
6251    else
6252      # If it succeeded, then it was overridden by the user. We will use it
6253      # for the tool.
6254
6255      # First remove it from the list of overridden variables, so we can test
6256      # for unknown variables in the end.
6257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6258
6259      # Check if we try to supply an empty value
6260      if test "x$CP" = x; then
6261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6262$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6264$as_echo_n "checking for CP... " >&6; }
6265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6266$as_echo "disabled" >&6; }
6267      else
6268        # Check if the provided tool contains a complete path.
6269        tool_specified="$CP"
6270        tool_basename="${tool_specified##*/}"
6271        if test "x$tool_basename" = "x$tool_specified"; then
6272          # A command without a complete path is provided, search $PATH.
6273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6274$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6275          # Extract the first word of "$tool_basename", so it can be a program name with args.
6276set dummy $tool_basename; ac_word=$2
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6278$as_echo_n "checking for $ac_word... " >&6; }
6279if ${ac_cv_path_CP+:} false; then :
6280  $as_echo_n "(cached) " >&6
6281else
6282  case $CP in
6283  [\\/]* | ?:[\\/]*)
6284  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6285  ;;
6286  *)
6287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288for as_dir in $PATH
6289do
6290  IFS=$as_save_IFS
6291  test -z "$as_dir" && as_dir=.
6292    for ac_exec_ext in '' $ac_executable_extensions; do
6293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6294    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6296    break 2
6297  fi
6298done
6299  done
6300IFS=$as_save_IFS
6301
6302  ;;
6303esac
6304fi
6305CP=$ac_cv_path_CP
6306if test -n "$CP"; then
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6308$as_echo "$CP" >&6; }
6309else
6310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
6312fi
6313
6314
6315          if test "x$CP" = x; then
6316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6317          fi
6318        else
6319          # Otherwise we believe it is a complete path. Use it as it is.
6320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6321$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6323$as_echo_n "checking for CP... " >&6; }
6324          if test ! -x "$tool_specified"; then
6325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6326$as_echo "not found" >&6; }
6327            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6328          fi
6329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6330$as_echo "$tool_specified" >&6; }
6331        fi
6332      fi
6333    fi
6334
6335  fi
6336
6337
6338
6339  if test "x$CP" = x; then
6340    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6341  fi
6342
6343
6344
6345
6346
6347  # Publish this variable in the help.
6348
6349
6350  if [ -z "${CUT+x}" ]; then
6351    # The variable is not set by user, try to locate tool using the code snippet
6352    for ac_prog in cut
6353do
6354  # Extract the first word of "$ac_prog", so it can be a program name with args.
6355set dummy $ac_prog; ac_word=$2
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6357$as_echo_n "checking for $ac_word... " >&6; }
6358if ${ac_cv_path_CUT+:} false; then :
6359  $as_echo_n "(cached) " >&6
6360else
6361  case $CUT in
6362  [\\/]* | ?:[\\/]*)
6363  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6364  ;;
6365  *)
6366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6367for as_dir in $PATH
6368do
6369  IFS=$as_save_IFS
6370  test -z "$as_dir" && as_dir=.
6371    for ac_exec_ext in '' $ac_executable_extensions; do
6372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6373    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6375    break 2
6376  fi
6377done
6378  done
6379IFS=$as_save_IFS
6380
6381  ;;
6382esac
6383fi
6384CUT=$ac_cv_path_CUT
6385if test -n "$CUT"; then
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6387$as_echo "$CUT" >&6; }
6388else
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; }
6391fi
6392
6393
6394  test -n "$CUT" && break
6395done
6396
6397  else
6398    # The variable is set, but is it from the command line or the environment?
6399
6400    # Try to remove the string !CUT! from our list.
6401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6403      # If it failed, the variable was not from the command line. Ignore it,
6404      # but warn the user (except for BASH, which is always set by the calling BASH).
6405      if test "xCUT" != xBASH; then
6406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6407$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6408      fi
6409      # Try to locate tool using the code snippet
6410      for ac_prog in cut
6411do
6412  # Extract the first word of "$ac_prog", so it can be a program name with args.
6413set dummy $ac_prog; ac_word=$2
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6415$as_echo_n "checking for $ac_word... " >&6; }
6416if ${ac_cv_path_CUT+:} false; then :
6417  $as_echo_n "(cached) " >&6
6418else
6419  case $CUT in
6420  [\\/]* | ?:[\\/]*)
6421  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6422  ;;
6423  *)
6424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6425for as_dir in $PATH
6426do
6427  IFS=$as_save_IFS
6428  test -z "$as_dir" && as_dir=.
6429    for ac_exec_ext in '' $ac_executable_extensions; do
6430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6431    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6433    break 2
6434  fi
6435done
6436  done
6437IFS=$as_save_IFS
6438
6439  ;;
6440esac
6441fi
6442CUT=$ac_cv_path_CUT
6443if test -n "$CUT"; then
6444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6445$as_echo "$CUT" >&6; }
6446else
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448$as_echo "no" >&6; }
6449fi
6450
6451
6452  test -n "$CUT" && break
6453done
6454
6455    else
6456      # If it succeeded, then it was overridden by the user. We will use it
6457      # for the tool.
6458
6459      # First remove it from the list of overridden variables, so we can test
6460      # for unknown variables in the end.
6461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6462
6463      # Check if we try to supply an empty value
6464      if test "x$CUT" = x; then
6465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6466$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6468$as_echo_n "checking for CUT... " >&6; }
6469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6470$as_echo "disabled" >&6; }
6471      else
6472        # Check if the provided tool contains a complete path.
6473        tool_specified="$CUT"
6474        tool_basename="${tool_specified##*/}"
6475        if test "x$tool_basename" = "x$tool_specified"; then
6476          # A command without a complete path is provided, search $PATH.
6477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6478$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6479          # Extract the first word of "$tool_basename", so it can be a program name with args.
6480set dummy $tool_basename; ac_word=$2
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if ${ac_cv_path_CUT+:} false; then :
6484  $as_echo_n "(cached) " >&6
6485else
6486  case $CUT in
6487  [\\/]* | ?:[\\/]*)
6488  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6489  ;;
6490  *)
6491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494  IFS=$as_save_IFS
6495  test -z "$as_dir" && as_dir=.
6496    for ac_exec_ext in '' $ac_executable_extensions; do
6497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6498    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500    break 2
6501  fi
6502done
6503  done
6504IFS=$as_save_IFS
6505
6506  ;;
6507esac
6508fi
6509CUT=$ac_cv_path_CUT
6510if test -n "$CUT"; then
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6512$as_echo "$CUT" >&6; }
6513else
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
6516fi
6517
6518
6519          if test "x$CUT" = x; then
6520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6521          fi
6522        else
6523          # Otherwise we believe it is a complete path. Use it as it is.
6524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6525$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6527$as_echo_n "checking for CUT... " >&6; }
6528          if test ! -x "$tool_specified"; then
6529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6530$as_echo "not found" >&6; }
6531            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6532          fi
6533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6534$as_echo "$tool_specified" >&6; }
6535        fi
6536      fi
6537    fi
6538
6539  fi
6540
6541
6542
6543  if test "x$CUT" = x; then
6544    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6545  fi
6546
6547
6548
6549
6550
6551  # Publish this variable in the help.
6552
6553
6554  if [ -z "${DATE+x}" ]; then
6555    # The variable is not set by user, try to locate tool using the code snippet
6556    for ac_prog in date
6557do
6558  # Extract the first word of "$ac_prog", so it can be a program name with args.
6559set dummy $ac_prog; ac_word=$2
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6561$as_echo_n "checking for $ac_word... " >&6; }
6562if ${ac_cv_path_DATE+:} false; then :
6563  $as_echo_n "(cached) " >&6
6564else
6565  case $DATE in
6566  [\\/]* | ?:[\\/]*)
6567  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6568  ;;
6569  *)
6570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6571for as_dir in $PATH
6572do
6573  IFS=$as_save_IFS
6574  test -z "$as_dir" && as_dir=.
6575    for ac_exec_ext in '' $ac_executable_extensions; do
6576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6577    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6579    break 2
6580  fi
6581done
6582  done
6583IFS=$as_save_IFS
6584
6585  ;;
6586esac
6587fi
6588DATE=$ac_cv_path_DATE
6589if test -n "$DATE"; then
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6591$as_echo "$DATE" >&6; }
6592else
6593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597
6598  test -n "$DATE" && break
6599done
6600
6601  else
6602    # The variable is set, but is it from the command line or the environment?
6603
6604    # Try to remove the string !DATE! from our list.
6605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6607      # If it failed, the variable was not from the command line. Ignore it,
6608      # but warn the user (except for BASH, which is always set by the calling BASH).
6609      if test "xDATE" != xBASH; then
6610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6611$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6612      fi
6613      # Try to locate tool using the code snippet
6614      for ac_prog in date
6615do
6616  # Extract the first word of "$ac_prog", so it can be a program name with args.
6617set dummy $ac_prog; ac_word=$2
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619$as_echo_n "checking for $ac_word... " >&6; }
6620if ${ac_cv_path_DATE+:} false; then :
6621  $as_echo_n "(cached) " >&6
6622else
6623  case $DATE in
6624  [\\/]* | ?:[\\/]*)
6625  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6626  ;;
6627  *)
6628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629for as_dir in $PATH
6630do
6631  IFS=$as_save_IFS
6632  test -z "$as_dir" && as_dir=.
6633    for ac_exec_ext in '' $ac_executable_extensions; do
6634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6635    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6637    break 2
6638  fi
6639done
6640  done
6641IFS=$as_save_IFS
6642
6643  ;;
6644esac
6645fi
6646DATE=$ac_cv_path_DATE
6647if test -n "$DATE"; then
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6649$as_echo "$DATE" >&6; }
6650else
6651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652$as_echo "no" >&6; }
6653fi
6654
6655
6656  test -n "$DATE" && break
6657done
6658
6659    else
6660      # If it succeeded, then it was overridden by the user. We will use it
6661      # for the tool.
6662
6663      # First remove it from the list of overridden variables, so we can test
6664      # for unknown variables in the end.
6665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6666
6667      # Check if we try to supply an empty value
6668      if test "x$DATE" = x; then
6669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6670$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6672$as_echo_n "checking for DATE... " >&6; }
6673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6674$as_echo "disabled" >&6; }
6675      else
6676        # Check if the provided tool contains a complete path.
6677        tool_specified="$DATE"
6678        tool_basename="${tool_specified##*/}"
6679        if test "x$tool_basename" = "x$tool_specified"; then
6680          # A command without a complete path is provided, search $PATH.
6681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6682$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6683          # Extract the first word of "$tool_basename", so it can be a program name with args.
6684set dummy $tool_basename; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_DATE+:} false; then :
6688  $as_echo_n "(cached) " >&6
6689else
6690  case $DATE in
6691  [\\/]* | ?:[\\/]*)
6692  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6693  ;;
6694  *)
6695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in $PATH
6697do
6698  IFS=$as_save_IFS
6699  test -z "$as_dir" && as_dir=.
6700    for ac_exec_ext in '' $ac_executable_extensions; do
6701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704    break 2
6705  fi
6706done
6707  done
6708IFS=$as_save_IFS
6709
6710  ;;
6711esac
6712fi
6713DATE=$ac_cv_path_DATE
6714if test -n "$DATE"; then
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6716$as_echo "$DATE" >&6; }
6717else
6718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
6723          if test "x$DATE" = x; then
6724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6725          fi
6726        else
6727          # Otherwise we believe it is a complete path. Use it as it is.
6728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6729$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6731$as_echo_n "checking for DATE... " >&6; }
6732          if test ! -x "$tool_specified"; then
6733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6734$as_echo "not found" >&6; }
6735            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6736          fi
6737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6738$as_echo "$tool_specified" >&6; }
6739        fi
6740      fi
6741    fi
6742
6743  fi
6744
6745
6746
6747  if test "x$DATE" = x; then
6748    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6749  fi
6750
6751
6752
6753
6754
6755  # Publish this variable in the help.
6756
6757
6758  if [ -z "${DIFF+x}" ]; then
6759    # The variable is not set by user, try to locate tool using the code snippet
6760    for ac_prog in gdiff diff
6761do
6762  # Extract the first word of "$ac_prog", so it can be a program name with args.
6763set dummy $ac_prog; ac_word=$2
6764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6765$as_echo_n "checking for $ac_word... " >&6; }
6766if ${ac_cv_path_DIFF+:} false; then :
6767  $as_echo_n "(cached) " >&6
6768else
6769  case $DIFF in
6770  [\\/]* | ?:[\\/]*)
6771  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6772  ;;
6773  *)
6774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6775for as_dir in $PATH
6776do
6777  IFS=$as_save_IFS
6778  test -z "$as_dir" && as_dir=.
6779    for ac_exec_ext in '' $ac_executable_extensions; do
6780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6781    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6783    break 2
6784  fi
6785done
6786  done
6787IFS=$as_save_IFS
6788
6789  ;;
6790esac
6791fi
6792DIFF=$ac_cv_path_DIFF
6793if test -n "$DIFF"; then
6794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6795$as_echo "$DIFF" >&6; }
6796else
6797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6798$as_echo "no" >&6; }
6799fi
6800
6801
6802  test -n "$DIFF" && break
6803done
6804
6805  else
6806    # The variable is set, but is it from the command line or the environment?
6807
6808    # Try to remove the string !DIFF! from our list.
6809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6811      # If it failed, the variable was not from the command line. Ignore it,
6812      # but warn the user (except for BASH, which is always set by the calling BASH).
6813      if test "xDIFF" != xBASH; then
6814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6815$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6816      fi
6817      # Try to locate tool using the code snippet
6818      for ac_prog in gdiff diff
6819do
6820  # Extract the first word of "$ac_prog", so it can be a program name with args.
6821set dummy $ac_prog; ac_word=$2
6822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6823$as_echo_n "checking for $ac_word... " >&6; }
6824if ${ac_cv_path_DIFF+:} false; then :
6825  $as_echo_n "(cached) " >&6
6826else
6827  case $DIFF in
6828  [\\/]* | ?:[\\/]*)
6829  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6830  ;;
6831  *)
6832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6833for as_dir in $PATH
6834do
6835  IFS=$as_save_IFS
6836  test -z "$as_dir" && as_dir=.
6837    for ac_exec_ext in '' $ac_executable_extensions; do
6838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6839    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6841    break 2
6842  fi
6843done
6844  done
6845IFS=$as_save_IFS
6846
6847  ;;
6848esac
6849fi
6850DIFF=$ac_cv_path_DIFF
6851if test -n "$DIFF"; then
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6853$as_echo "$DIFF" >&6; }
6854else
6855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6856$as_echo "no" >&6; }
6857fi
6858
6859
6860  test -n "$DIFF" && break
6861done
6862
6863    else
6864      # If it succeeded, then it was overridden by the user. We will use it
6865      # for the tool.
6866
6867      # First remove it from the list of overridden variables, so we can test
6868      # for unknown variables in the end.
6869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6870
6871      # Check if we try to supply an empty value
6872      if test "x$DIFF" = x; then
6873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6874$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6876$as_echo_n "checking for DIFF... " >&6; }
6877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6878$as_echo "disabled" >&6; }
6879      else
6880        # Check if the provided tool contains a complete path.
6881        tool_specified="$DIFF"
6882        tool_basename="${tool_specified##*/}"
6883        if test "x$tool_basename" = "x$tool_specified"; then
6884          # A command without a complete path is provided, search $PATH.
6885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6886$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6887          # Extract the first word of "$tool_basename", so it can be a program name with args.
6888set dummy $tool_basename; ac_word=$2
6889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6890$as_echo_n "checking for $ac_word... " >&6; }
6891if ${ac_cv_path_DIFF+:} false; then :
6892  $as_echo_n "(cached) " >&6
6893else
6894  case $DIFF in
6895  [\\/]* | ?:[\\/]*)
6896  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6897  ;;
6898  *)
6899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6900for as_dir in $PATH
6901do
6902  IFS=$as_save_IFS
6903  test -z "$as_dir" && as_dir=.
6904    for ac_exec_ext in '' $ac_executable_extensions; do
6905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6906    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6908    break 2
6909  fi
6910done
6911  done
6912IFS=$as_save_IFS
6913
6914  ;;
6915esac
6916fi
6917DIFF=$ac_cv_path_DIFF
6918if test -n "$DIFF"; then
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6920$as_echo "$DIFF" >&6; }
6921else
6922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6923$as_echo "no" >&6; }
6924fi
6925
6926
6927          if test "x$DIFF" = x; then
6928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6929          fi
6930        else
6931          # Otherwise we believe it is a complete path. Use it as it is.
6932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6933$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6935$as_echo_n "checking for DIFF... " >&6; }
6936          if test ! -x "$tool_specified"; then
6937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6938$as_echo "not found" >&6; }
6939            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6940          fi
6941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6942$as_echo "$tool_specified" >&6; }
6943        fi
6944      fi
6945    fi
6946
6947  fi
6948
6949
6950
6951  if test "x$DIFF" = x; then
6952    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6953  fi
6954
6955
6956
6957
6958
6959  # Publish this variable in the help.
6960
6961
6962  if [ -z "${DIRNAME+x}" ]; then
6963    # The variable is not set by user, try to locate tool using the code snippet
6964    for ac_prog in dirname
6965do
6966  # Extract the first word of "$ac_prog", so it can be a program name with args.
6967set dummy $ac_prog; ac_word=$2
6968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6969$as_echo_n "checking for $ac_word... " >&6; }
6970if ${ac_cv_path_DIRNAME+:} false; then :
6971  $as_echo_n "(cached) " >&6
6972else
6973  case $DIRNAME in
6974  [\\/]* | ?:[\\/]*)
6975  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6976  ;;
6977  *)
6978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6979for as_dir in $PATH
6980do
6981  IFS=$as_save_IFS
6982  test -z "$as_dir" && as_dir=.
6983    for ac_exec_ext in '' $ac_executable_extensions; do
6984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6985    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6987    break 2
6988  fi
6989done
6990  done
6991IFS=$as_save_IFS
6992
6993  ;;
6994esac
6995fi
6996DIRNAME=$ac_cv_path_DIRNAME
6997if test -n "$DIRNAME"; then
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6999$as_echo "$DIRNAME" >&6; }
7000else
7001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7002$as_echo "no" >&6; }
7003fi
7004
7005
7006  test -n "$DIRNAME" && break
7007done
7008
7009  else
7010    # The variable is set, but is it from the command line or the environment?
7011
7012    # Try to remove the string !DIRNAME! from our list.
7013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7015      # If it failed, the variable was not from the command line. Ignore it,
7016      # but warn the user (except for BASH, which is always set by the calling BASH).
7017      if test "xDIRNAME" != xBASH; then
7018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7019$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7020      fi
7021      # Try to locate tool using the code snippet
7022      for ac_prog in dirname
7023do
7024  # Extract the first word of "$ac_prog", so it can be a program name with args.
7025set dummy $ac_prog; ac_word=$2
7026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027$as_echo_n "checking for $ac_word... " >&6; }
7028if ${ac_cv_path_DIRNAME+:} false; then :
7029  $as_echo_n "(cached) " >&6
7030else
7031  case $DIRNAME in
7032  [\\/]* | ?:[\\/]*)
7033  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7034  ;;
7035  *)
7036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037for as_dir in $PATH
7038do
7039  IFS=$as_save_IFS
7040  test -z "$as_dir" && as_dir=.
7041    for ac_exec_ext in '' $ac_executable_extensions; do
7042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045    break 2
7046  fi
7047done
7048  done
7049IFS=$as_save_IFS
7050
7051  ;;
7052esac
7053fi
7054DIRNAME=$ac_cv_path_DIRNAME
7055if test -n "$DIRNAME"; then
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7057$as_echo "$DIRNAME" >&6; }
7058else
7059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060$as_echo "no" >&6; }
7061fi
7062
7063
7064  test -n "$DIRNAME" && break
7065done
7066
7067    else
7068      # If it succeeded, then it was overridden by the user. We will use it
7069      # for the tool.
7070
7071      # First remove it from the list of overridden variables, so we can test
7072      # for unknown variables in the end.
7073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7074
7075      # Check if we try to supply an empty value
7076      if test "x$DIRNAME" = x; then
7077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7078$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7080$as_echo_n "checking for DIRNAME... " >&6; }
7081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7082$as_echo "disabled" >&6; }
7083      else
7084        # Check if the provided tool contains a complete path.
7085        tool_specified="$DIRNAME"
7086        tool_basename="${tool_specified##*/}"
7087        if test "x$tool_basename" = "x$tool_specified"; then
7088          # A command without a complete path is provided, search $PATH.
7089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7090$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7091          # Extract the first word of "$tool_basename", so it can be a program name with args.
7092set dummy $tool_basename; ac_word=$2
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7094$as_echo_n "checking for $ac_word... " >&6; }
7095if ${ac_cv_path_DIRNAME+:} false; then :
7096  $as_echo_n "(cached) " >&6
7097else
7098  case $DIRNAME in
7099  [\\/]* | ?:[\\/]*)
7100  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7101  ;;
7102  *)
7103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7104for as_dir in $PATH
7105do
7106  IFS=$as_save_IFS
7107  test -z "$as_dir" && as_dir=.
7108    for ac_exec_ext in '' $ac_executable_extensions; do
7109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7110    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7112    break 2
7113  fi
7114done
7115  done
7116IFS=$as_save_IFS
7117
7118  ;;
7119esac
7120fi
7121DIRNAME=$ac_cv_path_DIRNAME
7122if test -n "$DIRNAME"; then
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7124$as_echo "$DIRNAME" >&6; }
7125else
7126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7127$as_echo "no" >&6; }
7128fi
7129
7130
7131          if test "x$DIRNAME" = x; then
7132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7133          fi
7134        else
7135          # Otherwise we believe it is a complete path. Use it as it is.
7136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7137$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7139$as_echo_n "checking for DIRNAME... " >&6; }
7140          if test ! -x "$tool_specified"; then
7141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7142$as_echo "not found" >&6; }
7143            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7144          fi
7145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7146$as_echo "$tool_specified" >&6; }
7147        fi
7148      fi
7149    fi
7150
7151  fi
7152
7153
7154
7155  if test "x$DIRNAME" = x; then
7156    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7157  fi
7158
7159
7160
7161
7162
7163  # Publish this variable in the help.
7164
7165
7166  if [ -z "${ECHO+x}" ]; then
7167    # The variable is not set by user, try to locate tool using the code snippet
7168    for ac_prog in echo
7169do
7170  # Extract the first word of "$ac_prog", so it can be a program name with args.
7171set dummy $ac_prog; ac_word=$2
7172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7173$as_echo_n "checking for $ac_word... " >&6; }
7174if ${ac_cv_path_ECHO+:} false; then :
7175  $as_echo_n "(cached) " >&6
7176else
7177  case $ECHO in
7178  [\\/]* | ?:[\\/]*)
7179  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7180  ;;
7181  *)
7182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7183for as_dir in $PATH
7184do
7185  IFS=$as_save_IFS
7186  test -z "$as_dir" && as_dir=.
7187    for ac_exec_ext in '' $ac_executable_extensions; do
7188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7189    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7191    break 2
7192  fi
7193done
7194  done
7195IFS=$as_save_IFS
7196
7197  ;;
7198esac
7199fi
7200ECHO=$ac_cv_path_ECHO
7201if test -n "$ECHO"; then
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7203$as_echo "$ECHO" >&6; }
7204else
7205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206$as_echo "no" >&6; }
7207fi
7208
7209
7210  test -n "$ECHO" && break
7211done
7212
7213  else
7214    # The variable is set, but is it from the command line or the environment?
7215
7216    # Try to remove the string !ECHO! from our list.
7217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7219      # If it failed, the variable was not from the command line. Ignore it,
7220      # but warn the user (except for BASH, which is always set by the calling BASH).
7221      if test "xECHO" != xBASH; then
7222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7223$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7224      fi
7225      # Try to locate tool using the code snippet
7226      for ac_prog in echo
7227do
7228  # Extract the first word of "$ac_prog", so it can be a program name with args.
7229set dummy $ac_prog; ac_word=$2
7230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7231$as_echo_n "checking for $ac_word... " >&6; }
7232if ${ac_cv_path_ECHO+:} false; then :
7233  $as_echo_n "(cached) " >&6
7234else
7235  case $ECHO in
7236  [\\/]* | ?:[\\/]*)
7237  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7238  ;;
7239  *)
7240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241for as_dir in $PATH
7242do
7243  IFS=$as_save_IFS
7244  test -z "$as_dir" && as_dir=.
7245    for ac_exec_ext in '' $ac_executable_extensions; do
7246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7249    break 2
7250  fi
7251done
7252  done
7253IFS=$as_save_IFS
7254
7255  ;;
7256esac
7257fi
7258ECHO=$ac_cv_path_ECHO
7259if test -n "$ECHO"; then
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7261$as_echo "$ECHO" >&6; }
7262else
7263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264$as_echo "no" >&6; }
7265fi
7266
7267
7268  test -n "$ECHO" && break
7269done
7270
7271    else
7272      # If it succeeded, then it was overridden by the user. We will use it
7273      # for the tool.
7274
7275      # First remove it from the list of overridden variables, so we can test
7276      # for unknown variables in the end.
7277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7278
7279      # Check if we try to supply an empty value
7280      if test "x$ECHO" = x; then
7281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7282$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7284$as_echo_n "checking for ECHO... " >&6; }
7285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7286$as_echo "disabled" >&6; }
7287      else
7288        # Check if the provided tool contains a complete path.
7289        tool_specified="$ECHO"
7290        tool_basename="${tool_specified##*/}"
7291        if test "x$tool_basename" = "x$tool_specified"; then
7292          # A command without a complete path is provided, search $PATH.
7293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7294$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7295          # Extract the first word of "$tool_basename", so it can be a program name with args.
7296set dummy $tool_basename; ac_word=$2
7297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7298$as_echo_n "checking for $ac_word... " >&6; }
7299if ${ac_cv_path_ECHO+:} false; then :
7300  $as_echo_n "(cached) " >&6
7301else
7302  case $ECHO in
7303  [\\/]* | ?:[\\/]*)
7304  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7305  ;;
7306  *)
7307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308for as_dir in $PATH
7309do
7310  IFS=$as_save_IFS
7311  test -z "$as_dir" && as_dir=.
7312    for ac_exec_ext in '' $ac_executable_extensions; do
7313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7314    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7316    break 2
7317  fi
7318done
7319  done
7320IFS=$as_save_IFS
7321
7322  ;;
7323esac
7324fi
7325ECHO=$ac_cv_path_ECHO
7326if test -n "$ECHO"; then
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7328$as_echo "$ECHO" >&6; }
7329else
7330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7331$as_echo "no" >&6; }
7332fi
7333
7334
7335          if test "x$ECHO" = x; then
7336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7337          fi
7338        else
7339          # Otherwise we believe it is a complete path. Use it as it is.
7340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7341$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7343$as_echo_n "checking for ECHO... " >&6; }
7344          if test ! -x "$tool_specified"; then
7345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7346$as_echo "not found" >&6; }
7347            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7348          fi
7349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7350$as_echo "$tool_specified" >&6; }
7351        fi
7352      fi
7353    fi
7354
7355  fi
7356
7357
7358
7359  if test "x$ECHO" = x; then
7360    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7361  fi
7362
7363
7364
7365
7366
7367  # Publish this variable in the help.
7368
7369
7370  if [ -z "${EXPR+x}" ]; then
7371    # The variable is not set by user, try to locate tool using the code snippet
7372    for ac_prog in expr
7373do
7374  # Extract the first word of "$ac_prog", so it can be a program name with args.
7375set dummy $ac_prog; ac_word=$2
7376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7377$as_echo_n "checking for $ac_word... " >&6; }
7378if ${ac_cv_path_EXPR+:} false; then :
7379  $as_echo_n "(cached) " >&6
7380else
7381  case $EXPR in
7382  [\\/]* | ?:[\\/]*)
7383  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7384  ;;
7385  *)
7386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387for as_dir in $PATH
7388do
7389  IFS=$as_save_IFS
7390  test -z "$as_dir" && as_dir=.
7391    for ac_exec_ext in '' $ac_executable_extensions; do
7392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7393    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7395    break 2
7396  fi
7397done
7398  done
7399IFS=$as_save_IFS
7400
7401  ;;
7402esac
7403fi
7404EXPR=$ac_cv_path_EXPR
7405if test -n "$EXPR"; then
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7407$as_echo "$EXPR" >&6; }
7408else
7409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410$as_echo "no" >&6; }
7411fi
7412
7413
7414  test -n "$EXPR" && break
7415done
7416
7417  else
7418    # The variable is set, but is it from the command line or the environment?
7419
7420    # Try to remove the string !EXPR! from our list.
7421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7423      # If it failed, the variable was not from the command line. Ignore it,
7424      # but warn the user (except for BASH, which is always set by the calling BASH).
7425      if test "xEXPR" != xBASH; then
7426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7427$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7428      fi
7429      # Try to locate tool using the code snippet
7430      for ac_prog in expr
7431do
7432  # Extract the first word of "$ac_prog", so it can be a program name with args.
7433set dummy $ac_prog; ac_word=$2
7434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435$as_echo_n "checking for $ac_word... " >&6; }
7436if ${ac_cv_path_EXPR+:} false; then :
7437  $as_echo_n "(cached) " >&6
7438else
7439  case $EXPR in
7440  [\\/]* | ?:[\\/]*)
7441  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7442  ;;
7443  *)
7444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445for as_dir in $PATH
7446do
7447  IFS=$as_save_IFS
7448  test -z "$as_dir" && as_dir=.
7449    for ac_exec_ext in '' $ac_executable_extensions; do
7450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7451    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7453    break 2
7454  fi
7455done
7456  done
7457IFS=$as_save_IFS
7458
7459  ;;
7460esac
7461fi
7462EXPR=$ac_cv_path_EXPR
7463if test -n "$EXPR"; then
7464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7465$as_echo "$EXPR" >&6; }
7466else
7467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468$as_echo "no" >&6; }
7469fi
7470
7471
7472  test -n "$EXPR" && break
7473done
7474
7475    else
7476      # If it succeeded, then it was overridden by the user. We will use it
7477      # for the tool.
7478
7479      # First remove it from the list of overridden variables, so we can test
7480      # for unknown variables in the end.
7481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7482
7483      # Check if we try to supply an empty value
7484      if test "x$EXPR" = x; then
7485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7486$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7488$as_echo_n "checking for EXPR... " >&6; }
7489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7490$as_echo "disabled" >&6; }
7491      else
7492        # Check if the provided tool contains a complete path.
7493        tool_specified="$EXPR"
7494        tool_basename="${tool_specified##*/}"
7495        if test "x$tool_basename" = "x$tool_specified"; then
7496          # A command without a complete path is provided, search $PATH.
7497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7498$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7499          # Extract the first word of "$tool_basename", so it can be a program name with args.
7500set dummy $tool_basename; ac_word=$2
7501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7502$as_echo_n "checking for $ac_word... " >&6; }
7503if ${ac_cv_path_EXPR+:} false; then :
7504  $as_echo_n "(cached) " >&6
7505else
7506  case $EXPR in
7507  [\\/]* | ?:[\\/]*)
7508  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7509  ;;
7510  *)
7511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7512for as_dir in $PATH
7513do
7514  IFS=$as_save_IFS
7515  test -z "$as_dir" && as_dir=.
7516    for ac_exec_ext in '' $ac_executable_extensions; do
7517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7518    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7520    break 2
7521  fi
7522done
7523  done
7524IFS=$as_save_IFS
7525
7526  ;;
7527esac
7528fi
7529EXPR=$ac_cv_path_EXPR
7530if test -n "$EXPR"; then
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7532$as_echo "$EXPR" >&6; }
7533else
7534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7535$as_echo "no" >&6; }
7536fi
7537
7538
7539          if test "x$EXPR" = x; then
7540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7541          fi
7542        else
7543          # Otherwise we believe it is a complete path. Use it as it is.
7544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7545$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7547$as_echo_n "checking for EXPR... " >&6; }
7548          if test ! -x "$tool_specified"; then
7549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7550$as_echo "not found" >&6; }
7551            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7552          fi
7553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7554$as_echo "$tool_specified" >&6; }
7555        fi
7556      fi
7557    fi
7558
7559  fi
7560
7561
7562
7563  if test "x$EXPR" = x; then
7564    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7565  fi
7566
7567
7568
7569
7570
7571  # Publish this variable in the help.
7572
7573
7574  if [ -z "${FILE+x}" ]; then
7575    # The variable is not set by user, try to locate tool using the code snippet
7576    for ac_prog in file
7577do
7578  # Extract the first word of "$ac_prog", so it can be a program name with args.
7579set dummy $ac_prog; ac_word=$2
7580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7581$as_echo_n "checking for $ac_word... " >&6; }
7582if ${ac_cv_path_FILE+:} false; then :
7583  $as_echo_n "(cached) " >&6
7584else
7585  case $FILE in
7586  [\\/]* | ?:[\\/]*)
7587  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7588  ;;
7589  *)
7590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591for as_dir in $PATH
7592do
7593  IFS=$as_save_IFS
7594  test -z "$as_dir" && as_dir=.
7595    for ac_exec_ext in '' $ac_executable_extensions; do
7596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599    break 2
7600  fi
7601done
7602  done
7603IFS=$as_save_IFS
7604
7605  ;;
7606esac
7607fi
7608FILE=$ac_cv_path_FILE
7609if test -n "$FILE"; then
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7611$as_echo "$FILE" >&6; }
7612else
7613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7614$as_echo "no" >&6; }
7615fi
7616
7617
7618  test -n "$FILE" && break
7619done
7620
7621  else
7622    # The variable is set, but is it from the command line or the environment?
7623
7624    # Try to remove the string !FILE! from our list.
7625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7627      # If it failed, the variable was not from the command line. Ignore it,
7628      # but warn the user (except for BASH, which is always set by the calling BASH).
7629      if test "xFILE" != xBASH; then
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7631$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7632      fi
7633      # Try to locate tool using the code snippet
7634      for ac_prog in file
7635do
7636  # Extract the first word of "$ac_prog", so it can be a program name with args.
7637set dummy $ac_prog; ac_word=$2
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639$as_echo_n "checking for $ac_word... " >&6; }
7640if ${ac_cv_path_FILE+:} false; then :
7641  $as_echo_n "(cached) " >&6
7642else
7643  case $FILE in
7644  [\\/]* | ?:[\\/]*)
7645  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7646  ;;
7647  *)
7648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7649for as_dir in $PATH
7650do
7651  IFS=$as_save_IFS
7652  test -z "$as_dir" && as_dir=.
7653    for ac_exec_ext in '' $ac_executable_extensions; do
7654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7655    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7657    break 2
7658  fi
7659done
7660  done
7661IFS=$as_save_IFS
7662
7663  ;;
7664esac
7665fi
7666FILE=$ac_cv_path_FILE
7667if test -n "$FILE"; then
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7669$as_echo "$FILE" >&6; }
7670else
7671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7672$as_echo "no" >&6; }
7673fi
7674
7675
7676  test -n "$FILE" && break
7677done
7678
7679    else
7680      # If it succeeded, then it was overridden by the user. We will use it
7681      # for the tool.
7682
7683      # First remove it from the list of overridden variables, so we can test
7684      # for unknown variables in the end.
7685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7686
7687      # Check if we try to supply an empty value
7688      if test "x$FILE" = x; then
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7690$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7692$as_echo_n "checking for FILE... " >&6; }
7693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7694$as_echo "disabled" >&6; }
7695      else
7696        # Check if the provided tool contains a complete path.
7697        tool_specified="$FILE"
7698        tool_basename="${tool_specified##*/}"
7699        if test "x$tool_basename" = "x$tool_specified"; then
7700          # A command without a complete path is provided, search $PATH.
7701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7702$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7703          # Extract the first word of "$tool_basename", so it can be a program name with args.
7704set dummy $tool_basename; ac_word=$2
7705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7706$as_echo_n "checking for $ac_word... " >&6; }
7707if ${ac_cv_path_FILE+:} false; then :
7708  $as_echo_n "(cached) " >&6
7709else
7710  case $FILE in
7711  [\\/]* | ?:[\\/]*)
7712  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7713  ;;
7714  *)
7715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7716for as_dir in $PATH
7717do
7718  IFS=$as_save_IFS
7719  test -z "$as_dir" && as_dir=.
7720    for ac_exec_ext in '' $ac_executable_extensions; do
7721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7722    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7724    break 2
7725  fi
7726done
7727  done
7728IFS=$as_save_IFS
7729
7730  ;;
7731esac
7732fi
7733FILE=$ac_cv_path_FILE
7734if test -n "$FILE"; then
7735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7736$as_echo "$FILE" >&6; }
7737else
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7739$as_echo "no" >&6; }
7740fi
7741
7742
7743          if test "x$FILE" = x; then
7744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7745          fi
7746        else
7747          # Otherwise we believe it is a complete path. Use it as it is.
7748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7749$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7751$as_echo_n "checking for FILE... " >&6; }
7752          if test ! -x "$tool_specified"; then
7753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7754$as_echo "not found" >&6; }
7755            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7756          fi
7757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7758$as_echo "$tool_specified" >&6; }
7759        fi
7760      fi
7761    fi
7762
7763  fi
7764
7765
7766
7767  if test "x$FILE" = x; then
7768    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7769  fi
7770
7771
7772
7773
7774
7775  # Publish this variable in the help.
7776
7777
7778  if [ -z "${FIND+x}" ]; then
7779    # The variable is not set by user, try to locate tool using the code snippet
7780    for ac_prog in find
7781do
7782  # Extract the first word of "$ac_prog", so it can be a program name with args.
7783set dummy $ac_prog; ac_word=$2
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785$as_echo_n "checking for $ac_word... " >&6; }
7786if ${ac_cv_path_FIND+:} false; then :
7787  $as_echo_n "(cached) " >&6
7788else
7789  case $FIND in
7790  [\\/]* | ?:[\\/]*)
7791  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7792  ;;
7793  *)
7794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7795for as_dir in $PATH
7796do
7797  IFS=$as_save_IFS
7798  test -z "$as_dir" && as_dir=.
7799    for ac_exec_ext in '' $ac_executable_extensions; do
7800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7801    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7803    break 2
7804  fi
7805done
7806  done
7807IFS=$as_save_IFS
7808
7809  ;;
7810esac
7811fi
7812FIND=$ac_cv_path_FIND
7813if test -n "$FIND"; then
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7815$as_echo "$FIND" >&6; }
7816else
7817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7818$as_echo "no" >&6; }
7819fi
7820
7821
7822  test -n "$FIND" && break
7823done
7824
7825  else
7826    # The variable is set, but is it from the command line or the environment?
7827
7828    # Try to remove the string !FIND! from our list.
7829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7831      # If it failed, the variable was not from the command line. Ignore it,
7832      # but warn the user (except for BASH, which is always set by the calling BASH).
7833      if test "xFIND" != xBASH; then
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7835$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7836      fi
7837      # Try to locate tool using the code snippet
7838      for ac_prog in find
7839do
7840  # Extract the first word of "$ac_prog", so it can be a program name with args.
7841set dummy $ac_prog; ac_word=$2
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7843$as_echo_n "checking for $ac_word... " >&6; }
7844if ${ac_cv_path_FIND+:} false; then :
7845  $as_echo_n "(cached) " >&6
7846else
7847  case $FIND in
7848  [\\/]* | ?:[\\/]*)
7849  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7850  ;;
7851  *)
7852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853for as_dir in $PATH
7854do
7855  IFS=$as_save_IFS
7856  test -z "$as_dir" && as_dir=.
7857    for ac_exec_ext in '' $ac_executable_extensions; do
7858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861    break 2
7862  fi
7863done
7864  done
7865IFS=$as_save_IFS
7866
7867  ;;
7868esac
7869fi
7870FIND=$ac_cv_path_FIND
7871if test -n "$FIND"; then
7872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7873$as_echo "$FIND" >&6; }
7874else
7875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876$as_echo "no" >&6; }
7877fi
7878
7879
7880  test -n "$FIND" && break
7881done
7882
7883    else
7884      # If it succeeded, then it was overridden by the user. We will use it
7885      # for the tool.
7886
7887      # First remove it from the list of overridden variables, so we can test
7888      # for unknown variables in the end.
7889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7890
7891      # Check if we try to supply an empty value
7892      if test "x$FIND" = x; then
7893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7894$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7896$as_echo_n "checking for FIND... " >&6; }
7897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7898$as_echo "disabled" >&6; }
7899      else
7900        # Check if the provided tool contains a complete path.
7901        tool_specified="$FIND"
7902        tool_basename="${tool_specified##*/}"
7903        if test "x$tool_basename" = "x$tool_specified"; then
7904          # A command without a complete path is provided, search $PATH.
7905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7906$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7907          # Extract the first word of "$tool_basename", so it can be a program name with args.
7908set dummy $tool_basename; ac_word=$2
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7910$as_echo_n "checking for $ac_word... " >&6; }
7911if ${ac_cv_path_FIND+:} false; then :
7912  $as_echo_n "(cached) " >&6
7913else
7914  case $FIND in
7915  [\\/]* | ?:[\\/]*)
7916  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7917  ;;
7918  *)
7919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7920for as_dir in $PATH
7921do
7922  IFS=$as_save_IFS
7923  test -z "$as_dir" && as_dir=.
7924    for ac_exec_ext in '' $ac_executable_extensions; do
7925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7926    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7928    break 2
7929  fi
7930done
7931  done
7932IFS=$as_save_IFS
7933
7934  ;;
7935esac
7936fi
7937FIND=$ac_cv_path_FIND
7938if test -n "$FIND"; then
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7940$as_echo "$FIND" >&6; }
7941else
7942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7943$as_echo "no" >&6; }
7944fi
7945
7946
7947          if test "x$FIND" = x; then
7948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7949          fi
7950        else
7951          # Otherwise we believe it is a complete path. Use it as it is.
7952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7953$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7955$as_echo_n "checking for FIND... " >&6; }
7956          if test ! -x "$tool_specified"; then
7957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7958$as_echo "not found" >&6; }
7959            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7960          fi
7961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7962$as_echo "$tool_specified" >&6; }
7963        fi
7964      fi
7965    fi
7966
7967  fi
7968
7969
7970
7971  if test "x$FIND" = x; then
7972    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7973  fi
7974
7975
7976
7977
7978
7979  # Publish this variable in the help.
7980
7981
7982  if [ -z "${HEAD+x}" ]; then
7983    # The variable is not set by user, try to locate tool using the code snippet
7984    for ac_prog in head
7985do
7986  # Extract the first word of "$ac_prog", so it can be a program name with args.
7987set dummy $ac_prog; ac_word=$2
7988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7989$as_echo_n "checking for $ac_word... " >&6; }
7990if ${ac_cv_path_HEAD+:} false; then :
7991  $as_echo_n "(cached) " >&6
7992else
7993  case $HEAD in
7994  [\\/]* | ?:[\\/]*)
7995  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7996  ;;
7997  *)
7998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7999for as_dir in $PATH
8000do
8001  IFS=$as_save_IFS
8002  test -z "$as_dir" && as_dir=.
8003    for ac_exec_ext in '' $ac_executable_extensions; do
8004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8005    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8007    break 2
8008  fi
8009done
8010  done
8011IFS=$as_save_IFS
8012
8013  ;;
8014esac
8015fi
8016HEAD=$ac_cv_path_HEAD
8017if test -n "$HEAD"; then
8018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8019$as_echo "$HEAD" >&6; }
8020else
8021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8022$as_echo "no" >&6; }
8023fi
8024
8025
8026  test -n "$HEAD" && break
8027done
8028
8029  else
8030    # The variable is set, but is it from the command line or the environment?
8031
8032    # Try to remove the string !HEAD! from our list.
8033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8035      # If it failed, the variable was not from the command line. Ignore it,
8036      # but warn the user (except for BASH, which is always set by the calling BASH).
8037      if test "xHEAD" != xBASH; then
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8039$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8040      fi
8041      # Try to locate tool using the code snippet
8042      for ac_prog in head
8043do
8044  # Extract the first word of "$ac_prog", so it can be a program name with args.
8045set dummy $ac_prog; ac_word=$2
8046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8047$as_echo_n "checking for $ac_word... " >&6; }
8048if ${ac_cv_path_HEAD+:} false; then :
8049  $as_echo_n "(cached) " >&6
8050else
8051  case $HEAD in
8052  [\\/]* | ?:[\\/]*)
8053  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8054  ;;
8055  *)
8056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8057for as_dir in $PATH
8058do
8059  IFS=$as_save_IFS
8060  test -z "$as_dir" && as_dir=.
8061    for ac_exec_ext in '' $ac_executable_extensions; do
8062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8063    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8065    break 2
8066  fi
8067done
8068  done
8069IFS=$as_save_IFS
8070
8071  ;;
8072esac
8073fi
8074HEAD=$ac_cv_path_HEAD
8075if test -n "$HEAD"; then
8076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8077$as_echo "$HEAD" >&6; }
8078else
8079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080$as_echo "no" >&6; }
8081fi
8082
8083
8084  test -n "$HEAD" && break
8085done
8086
8087    else
8088      # If it succeeded, then it was overridden by the user. We will use it
8089      # for the tool.
8090
8091      # First remove it from the list of overridden variables, so we can test
8092      # for unknown variables in the end.
8093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8094
8095      # Check if we try to supply an empty value
8096      if test "x$HEAD" = x; then
8097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8098$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8100$as_echo_n "checking for HEAD... " >&6; }
8101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8102$as_echo "disabled" >&6; }
8103      else
8104        # Check if the provided tool contains a complete path.
8105        tool_specified="$HEAD"
8106        tool_basename="${tool_specified##*/}"
8107        if test "x$tool_basename" = "x$tool_specified"; then
8108          # A command without a complete path is provided, search $PATH.
8109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8110$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8111          # Extract the first word of "$tool_basename", so it can be a program name with args.
8112set dummy $tool_basename; ac_word=$2
8113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8114$as_echo_n "checking for $ac_word... " >&6; }
8115if ${ac_cv_path_HEAD+:} false; then :
8116  $as_echo_n "(cached) " >&6
8117else
8118  case $HEAD in
8119  [\\/]* | ?:[\\/]*)
8120  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8121  ;;
8122  *)
8123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8124for as_dir in $PATH
8125do
8126  IFS=$as_save_IFS
8127  test -z "$as_dir" && as_dir=.
8128    for ac_exec_ext in '' $ac_executable_extensions; do
8129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8130    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8132    break 2
8133  fi
8134done
8135  done
8136IFS=$as_save_IFS
8137
8138  ;;
8139esac
8140fi
8141HEAD=$ac_cv_path_HEAD
8142if test -n "$HEAD"; then
8143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8144$as_echo "$HEAD" >&6; }
8145else
8146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
8148fi
8149
8150
8151          if test "x$HEAD" = x; then
8152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8153          fi
8154        else
8155          # Otherwise we believe it is a complete path. Use it as it is.
8156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8157$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8159$as_echo_n "checking for HEAD... " >&6; }
8160          if test ! -x "$tool_specified"; then
8161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8162$as_echo "not found" >&6; }
8163            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8164          fi
8165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8166$as_echo "$tool_specified" >&6; }
8167        fi
8168      fi
8169    fi
8170
8171  fi
8172
8173
8174
8175  if test "x$HEAD" = x; then
8176    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8177  fi
8178
8179
8180
8181
8182
8183  # Publish this variable in the help.
8184
8185
8186  if [ -z "${LN+x}" ]; then
8187    # The variable is not set by user, try to locate tool using the code snippet
8188    for ac_prog in ln
8189do
8190  # Extract the first word of "$ac_prog", so it can be a program name with args.
8191set dummy $ac_prog; ac_word=$2
8192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8193$as_echo_n "checking for $ac_word... " >&6; }
8194if ${ac_cv_path_LN+:} false; then :
8195  $as_echo_n "(cached) " >&6
8196else
8197  case $LN in
8198  [\\/]* | ?:[\\/]*)
8199  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8200  ;;
8201  *)
8202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8203for as_dir in $PATH
8204do
8205  IFS=$as_save_IFS
8206  test -z "$as_dir" && as_dir=.
8207    for ac_exec_ext in '' $ac_executable_extensions; do
8208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8209    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8211    break 2
8212  fi
8213done
8214  done
8215IFS=$as_save_IFS
8216
8217  ;;
8218esac
8219fi
8220LN=$ac_cv_path_LN
8221if test -n "$LN"; then
8222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8223$as_echo "$LN" >&6; }
8224else
8225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8226$as_echo "no" >&6; }
8227fi
8228
8229
8230  test -n "$LN" && break
8231done
8232
8233  else
8234    # The variable is set, but is it from the command line or the environment?
8235
8236    # Try to remove the string !LN! from our list.
8237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8239      # If it failed, the variable was not from the command line. Ignore it,
8240      # but warn the user (except for BASH, which is always set by the calling BASH).
8241      if test "xLN" != xBASH; then
8242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8243$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8244      fi
8245      # Try to locate tool using the code snippet
8246      for ac_prog in ln
8247do
8248  # Extract the first word of "$ac_prog", so it can be a program name with args.
8249set dummy $ac_prog; ac_word=$2
8250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251$as_echo_n "checking for $ac_word... " >&6; }
8252if ${ac_cv_path_LN+:} false; then :
8253  $as_echo_n "(cached) " >&6
8254else
8255  case $LN in
8256  [\\/]* | ?:[\\/]*)
8257  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8258  ;;
8259  *)
8260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261for as_dir in $PATH
8262do
8263  IFS=$as_save_IFS
8264  test -z "$as_dir" && as_dir=.
8265    for ac_exec_ext in '' $ac_executable_extensions; do
8266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269    break 2
8270  fi
8271done
8272  done
8273IFS=$as_save_IFS
8274
8275  ;;
8276esac
8277fi
8278LN=$ac_cv_path_LN
8279if test -n "$LN"; then
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8281$as_echo "$LN" >&6; }
8282else
8283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284$as_echo "no" >&6; }
8285fi
8286
8287
8288  test -n "$LN" && break
8289done
8290
8291    else
8292      # If it succeeded, then it was overridden by the user. We will use it
8293      # for the tool.
8294
8295      # First remove it from the list of overridden variables, so we can test
8296      # for unknown variables in the end.
8297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8298
8299      # Check if we try to supply an empty value
8300      if test "x$LN" = x; then
8301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8302$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8304$as_echo_n "checking for LN... " >&6; }
8305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8306$as_echo "disabled" >&6; }
8307      else
8308        # Check if the provided tool contains a complete path.
8309        tool_specified="$LN"
8310        tool_basename="${tool_specified##*/}"
8311        if test "x$tool_basename" = "x$tool_specified"; then
8312          # A command without a complete path is provided, search $PATH.
8313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8314$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8315          # Extract the first word of "$tool_basename", so it can be a program name with args.
8316set dummy $tool_basename; ac_word=$2
8317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8318$as_echo_n "checking for $ac_word... " >&6; }
8319if ${ac_cv_path_LN+:} false; then :
8320  $as_echo_n "(cached) " >&6
8321else
8322  case $LN in
8323  [\\/]* | ?:[\\/]*)
8324  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8325  ;;
8326  *)
8327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330  IFS=$as_save_IFS
8331  test -z "$as_dir" && as_dir=.
8332    for ac_exec_ext in '' $ac_executable_extensions; do
8333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8334    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8336    break 2
8337  fi
8338done
8339  done
8340IFS=$as_save_IFS
8341
8342  ;;
8343esac
8344fi
8345LN=$ac_cv_path_LN
8346if test -n "$LN"; then
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8348$as_echo "$LN" >&6; }
8349else
8350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8351$as_echo "no" >&6; }
8352fi
8353
8354
8355          if test "x$LN" = x; then
8356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8357          fi
8358        else
8359          # Otherwise we believe it is a complete path. Use it as it is.
8360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8361$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8363$as_echo_n "checking for LN... " >&6; }
8364          if test ! -x "$tool_specified"; then
8365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8366$as_echo "not found" >&6; }
8367            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8368          fi
8369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8370$as_echo "$tool_specified" >&6; }
8371        fi
8372      fi
8373    fi
8374
8375  fi
8376
8377
8378
8379  if test "x$LN" = x; then
8380    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8381  fi
8382
8383
8384
8385
8386
8387  # Publish this variable in the help.
8388
8389
8390  if [ -z "${LS+x}" ]; then
8391    # The variable is not set by user, try to locate tool using the code snippet
8392    for ac_prog in ls
8393do
8394  # Extract the first word of "$ac_prog", so it can be a program name with args.
8395set dummy $ac_prog; ac_word=$2
8396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8397$as_echo_n "checking for $ac_word... " >&6; }
8398if ${ac_cv_path_LS+:} false; then :
8399  $as_echo_n "(cached) " >&6
8400else
8401  case $LS in
8402  [\\/]* | ?:[\\/]*)
8403  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8404  ;;
8405  *)
8406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8407for as_dir in $PATH
8408do
8409  IFS=$as_save_IFS
8410  test -z "$as_dir" && as_dir=.
8411    for ac_exec_ext in '' $ac_executable_extensions; do
8412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8413    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8415    break 2
8416  fi
8417done
8418  done
8419IFS=$as_save_IFS
8420
8421  ;;
8422esac
8423fi
8424LS=$ac_cv_path_LS
8425if test -n "$LS"; then
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8427$as_echo "$LS" >&6; }
8428else
8429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8430$as_echo "no" >&6; }
8431fi
8432
8433
8434  test -n "$LS" && break
8435done
8436
8437  else
8438    # The variable is set, but is it from the command line or the environment?
8439
8440    # Try to remove the string !LS! from our list.
8441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8443      # If it failed, the variable was not from the command line. Ignore it,
8444      # but warn the user (except for BASH, which is always set by the calling BASH).
8445      if test "xLS" != xBASH; then
8446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8447$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8448      fi
8449      # Try to locate tool using the code snippet
8450      for ac_prog in ls
8451do
8452  # Extract the first word of "$ac_prog", so it can be a program name with args.
8453set dummy $ac_prog; ac_word=$2
8454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455$as_echo_n "checking for $ac_word... " >&6; }
8456if ${ac_cv_path_LS+:} false; then :
8457  $as_echo_n "(cached) " >&6
8458else
8459  case $LS in
8460  [\\/]* | ?:[\\/]*)
8461  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8462  ;;
8463  *)
8464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465for as_dir in $PATH
8466do
8467  IFS=$as_save_IFS
8468  test -z "$as_dir" && as_dir=.
8469    for ac_exec_ext in '' $ac_executable_extensions; do
8470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8471    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473    break 2
8474  fi
8475done
8476  done
8477IFS=$as_save_IFS
8478
8479  ;;
8480esac
8481fi
8482LS=$ac_cv_path_LS
8483if test -n "$LS"; then
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8485$as_echo "$LS" >&6; }
8486else
8487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488$as_echo "no" >&6; }
8489fi
8490
8491
8492  test -n "$LS" && break
8493done
8494
8495    else
8496      # If it succeeded, then it was overridden by the user. We will use it
8497      # for the tool.
8498
8499      # First remove it from the list of overridden variables, so we can test
8500      # for unknown variables in the end.
8501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8502
8503      # Check if we try to supply an empty value
8504      if test "x$LS" = x; then
8505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8506$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8508$as_echo_n "checking for LS... " >&6; }
8509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8510$as_echo "disabled" >&6; }
8511      else
8512        # Check if the provided tool contains a complete path.
8513        tool_specified="$LS"
8514        tool_basename="${tool_specified##*/}"
8515        if test "x$tool_basename" = "x$tool_specified"; then
8516          # A command without a complete path is provided, search $PATH.
8517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8518$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8519          # Extract the first word of "$tool_basename", so it can be a program name with args.
8520set dummy $tool_basename; ac_word=$2
8521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8522$as_echo_n "checking for $ac_word... " >&6; }
8523if ${ac_cv_path_LS+:} false; then :
8524  $as_echo_n "(cached) " >&6
8525else
8526  case $LS in
8527  [\\/]* | ?:[\\/]*)
8528  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8529  ;;
8530  *)
8531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8532for as_dir in $PATH
8533do
8534  IFS=$as_save_IFS
8535  test -z "$as_dir" && as_dir=.
8536    for ac_exec_ext in '' $ac_executable_extensions; do
8537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8538    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8540    break 2
8541  fi
8542done
8543  done
8544IFS=$as_save_IFS
8545
8546  ;;
8547esac
8548fi
8549LS=$ac_cv_path_LS
8550if test -n "$LS"; then
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8552$as_echo "$LS" >&6; }
8553else
8554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8555$as_echo "no" >&6; }
8556fi
8557
8558
8559          if test "x$LS" = x; then
8560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8561          fi
8562        else
8563          # Otherwise we believe it is a complete path. Use it as it is.
8564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8565$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8567$as_echo_n "checking for LS... " >&6; }
8568          if test ! -x "$tool_specified"; then
8569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8570$as_echo "not found" >&6; }
8571            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8572          fi
8573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8574$as_echo "$tool_specified" >&6; }
8575        fi
8576      fi
8577    fi
8578
8579  fi
8580
8581
8582
8583  if test "x$LS" = x; then
8584    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8585  fi
8586
8587
8588
8589
8590
8591  # Publish this variable in the help.
8592
8593
8594  if [ -z "${MKDIR+x}" ]; then
8595    # The variable is not set by user, try to locate tool using the code snippet
8596    for ac_prog in mkdir
8597do
8598  # Extract the first word of "$ac_prog", so it can be a program name with args.
8599set dummy $ac_prog; ac_word=$2
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if ${ac_cv_path_MKDIR+:} false; then :
8603  $as_echo_n "(cached) " >&6
8604else
8605  case $MKDIR in
8606  [\\/]* | ?:[\\/]*)
8607  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8608  ;;
8609  *)
8610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613  IFS=$as_save_IFS
8614  test -z "$as_dir" && as_dir=.
8615    for ac_exec_ext in '' $ac_executable_extensions; do
8616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8617    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619    break 2
8620  fi
8621done
8622  done
8623IFS=$as_save_IFS
8624
8625  ;;
8626esac
8627fi
8628MKDIR=$ac_cv_path_MKDIR
8629if test -n "$MKDIR"; then
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8631$as_echo "$MKDIR" >&6; }
8632else
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634$as_echo "no" >&6; }
8635fi
8636
8637
8638  test -n "$MKDIR" && break
8639done
8640
8641  else
8642    # The variable is set, but is it from the command line or the environment?
8643
8644    # Try to remove the string !MKDIR! from our list.
8645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8647      # If it failed, the variable was not from the command line. Ignore it,
8648      # but warn the user (except for BASH, which is always set by the calling BASH).
8649      if test "xMKDIR" != xBASH; then
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8651$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8652      fi
8653      # Try to locate tool using the code snippet
8654      for ac_prog in mkdir
8655do
8656  # Extract the first word of "$ac_prog", so it can be a program name with args.
8657set dummy $ac_prog; ac_word=$2
8658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659$as_echo_n "checking for $ac_word... " >&6; }
8660if ${ac_cv_path_MKDIR+:} false; then :
8661  $as_echo_n "(cached) " >&6
8662else
8663  case $MKDIR in
8664  [\\/]* | ?:[\\/]*)
8665  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8666  ;;
8667  *)
8668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669for as_dir in $PATH
8670do
8671  IFS=$as_save_IFS
8672  test -z "$as_dir" && as_dir=.
8673    for ac_exec_ext in '' $ac_executable_extensions; do
8674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8675    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8677    break 2
8678  fi
8679done
8680  done
8681IFS=$as_save_IFS
8682
8683  ;;
8684esac
8685fi
8686MKDIR=$ac_cv_path_MKDIR
8687if test -n "$MKDIR"; then
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8689$as_echo "$MKDIR" >&6; }
8690else
8691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692$as_echo "no" >&6; }
8693fi
8694
8695
8696  test -n "$MKDIR" && break
8697done
8698
8699    else
8700      # If it succeeded, then it was overridden by the user. We will use it
8701      # for the tool.
8702
8703      # First remove it from the list of overridden variables, so we can test
8704      # for unknown variables in the end.
8705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8706
8707      # Check if we try to supply an empty value
8708      if test "x$MKDIR" = x; then
8709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8710$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8712$as_echo_n "checking for MKDIR... " >&6; }
8713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8714$as_echo "disabled" >&6; }
8715      else
8716        # Check if the provided tool contains a complete path.
8717        tool_specified="$MKDIR"
8718        tool_basename="${tool_specified##*/}"
8719        if test "x$tool_basename" = "x$tool_specified"; then
8720          # A command without a complete path is provided, search $PATH.
8721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8722$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8723          # Extract the first word of "$tool_basename", so it can be a program name with args.
8724set dummy $tool_basename; ac_word=$2
8725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8726$as_echo_n "checking for $ac_word... " >&6; }
8727if ${ac_cv_path_MKDIR+:} false; then :
8728  $as_echo_n "(cached) " >&6
8729else
8730  case $MKDIR in
8731  [\\/]* | ?:[\\/]*)
8732  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8733  ;;
8734  *)
8735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8736for as_dir in $PATH
8737do
8738  IFS=$as_save_IFS
8739  test -z "$as_dir" && as_dir=.
8740    for ac_exec_ext in '' $ac_executable_extensions; do
8741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8742    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8744    break 2
8745  fi
8746done
8747  done
8748IFS=$as_save_IFS
8749
8750  ;;
8751esac
8752fi
8753MKDIR=$ac_cv_path_MKDIR
8754if test -n "$MKDIR"; then
8755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8756$as_echo "$MKDIR" >&6; }
8757else
8758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8759$as_echo "no" >&6; }
8760fi
8761
8762
8763          if test "x$MKDIR" = x; then
8764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8765          fi
8766        else
8767          # Otherwise we believe it is a complete path. Use it as it is.
8768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8769$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8771$as_echo_n "checking for MKDIR... " >&6; }
8772          if test ! -x "$tool_specified"; then
8773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8774$as_echo "not found" >&6; }
8775            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8776          fi
8777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8778$as_echo "$tool_specified" >&6; }
8779        fi
8780      fi
8781    fi
8782
8783  fi
8784
8785
8786
8787  if test "x$MKDIR" = x; then
8788    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8789  fi
8790
8791
8792
8793
8794
8795  # Publish this variable in the help.
8796
8797
8798  if [ -z "${MKTEMP+x}" ]; then
8799    # The variable is not set by user, try to locate tool using the code snippet
8800    for ac_prog in mktemp
8801do
8802  # Extract the first word of "$ac_prog", so it can be a program name with args.
8803set dummy $ac_prog; ac_word=$2
8804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8805$as_echo_n "checking for $ac_word... " >&6; }
8806if ${ac_cv_path_MKTEMP+:} false; then :
8807  $as_echo_n "(cached) " >&6
8808else
8809  case $MKTEMP in
8810  [\\/]* | ?:[\\/]*)
8811  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8812  ;;
8813  *)
8814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8815for as_dir in $PATH
8816do
8817  IFS=$as_save_IFS
8818  test -z "$as_dir" && as_dir=.
8819    for ac_exec_ext in '' $ac_executable_extensions; do
8820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8821    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8823    break 2
8824  fi
8825done
8826  done
8827IFS=$as_save_IFS
8828
8829  ;;
8830esac
8831fi
8832MKTEMP=$ac_cv_path_MKTEMP
8833if test -n "$MKTEMP"; then
8834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8835$as_echo "$MKTEMP" >&6; }
8836else
8837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8838$as_echo "no" >&6; }
8839fi
8840
8841
8842  test -n "$MKTEMP" && break
8843done
8844
8845  else
8846    # The variable is set, but is it from the command line or the environment?
8847
8848    # Try to remove the string !MKTEMP! from our list.
8849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8851      # If it failed, the variable was not from the command line. Ignore it,
8852      # but warn the user (except for BASH, which is always set by the calling BASH).
8853      if test "xMKTEMP" != xBASH; then
8854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8855$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8856      fi
8857      # Try to locate tool using the code snippet
8858      for ac_prog in mktemp
8859do
8860  # Extract the first word of "$ac_prog", so it can be a program name with args.
8861set dummy $ac_prog; ac_word=$2
8862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8863$as_echo_n "checking for $ac_word... " >&6; }
8864if ${ac_cv_path_MKTEMP+:} false; then :
8865  $as_echo_n "(cached) " >&6
8866else
8867  case $MKTEMP in
8868  [\\/]* | ?:[\\/]*)
8869  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8870  ;;
8871  *)
8872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873for as_dir in $PATH
8874do
8875  IFS=$as_save_IFS
8876  test -z "$as_dir" && as_dir=.
8877    for ac_exec_ext in '' $ac_executable_extensions; do
8878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8879    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8881    break 2
8882  fi
8883done
8884  done
8885IFS=$as_save_IFS
8886
8887  ;;
8888esac
8889fi
8890MKTEMP=$ac_cv_path_MKTEMP
8891if test -n "$MKTEMP"; then
8892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8893$as_echo "$MKTEMP" >&6; }
8894else
8895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
8897fi
8898
8899
8900  test -n "$MKTEMP" && break
8901done
8902
8903    else
8904      # If it succeeded, then it was overridden by the user. We will use it
8905      # for the tool.
8906
8907      # First remove it from the list of overridden variables, so we can test
8908      # for unknown variables in the end.
8909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8910
8911      # Check if we try to supply an empty value
8912      if test "x$MKTEMP" = x; then
8913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8914$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8916$as_echo_n "checking for MKTEMP... " >&6; }
8917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8918$as_echo "disabled" >&6; }
8919      else
8920        # Check if the provided tool contains a complete path.
8921        tool_specified="$MKTEMP"
8922        tool_basename="${tool_specified##*/}"
8923        if test "x$tool_basename" = "x$tool_specified"; then
8924          # A command without a complete path is provided, search $PATH.
8925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8926$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8927          # Extract the first word of "$tool_basename", so it can be a program name with args.
8928set dummy $tool_basename; ac_word=$2
8929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8930$as_echo_n "checking for $ac_word... " >&6; }
8931if ${ac_cv_path_MKTEMP+:} false; then :
8932  $as_echo_n "(cached) " >&6
8933else
8934  case $MKTEMP in
8935  [\\/]* | ?:[\\/]*)
8936  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8937  ;;
8938  *)
8939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8940for as_dir in $PATH
8941do
8942  IFS=$as_save_IFS
8943  test -z "$as_dir" && as_dir=.
8944    for ac_exec_ext in '' $ac_executable_extensions; do
8945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8946    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8948    break 2
8949  fi
8950done
8951  done
8952IFS=$as_save_IFS
8953
8954  ;;
8955esac
8956fi
8957MKTEMP=$ac_cv_path_MKTEMP
8958if test -n "$MKTEMP"; then
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8960$as_echo "$MKTEMP" >&6; }
8961else
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963$as_echo "no" >&6; }
8964fi
8965
8966
8967          if test "x$MKTEMP" = x; then
8968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8969          fi
8970        else
8971          # Otherwise we believe it is a complete path. Use it as it is.
8972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8973$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8975$as_echo_n "checking for MKTEMP... " >&6; }
8976          if test ! -x "$tool_specified"; then
8977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8978$as_echo "not found" >&6; }
8979            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8980          fi
8981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8982$as_echo "$tool_specified" >&6; }
8983        fi
8984      fi
8985    fi
8986
8987  fi
8988
8989
8990
8991  if test "x$MKTEMP" = x; then
8992    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8993  fi
8994
8995
8996
8997
8998
8999  # Publish this variable in the help.
9000
9001
9002  if [ -z "${MV+x}" ]; then
9003    # The variable is not set by user, try to locate tool using the code snippet
9004    for ac_prog in mv
9005do
9006  # Extract the first word of "$ac_prog", so it can be a program name with args.
9007set dummy $ac_prog; ac_word=$2
9008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9009$as_echo_n "checking for $ac_word... " >&6; }
9010if ${ac_cv_path_MV+:} false; then :
9011  $as_echo_n "(cached) " >&6
9012else
9013  case $MV in
9014  [\\/]* | ?:[\\/]*)
9015  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9016  ;;
9017  *)
9018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9019for as_dir in $PATH
9020do
9021  IFS=$as_save_IFS
9022  test -z "$as_dir" && as_dir=.
9023    for ac_exec_ext in '' $ac_executable_extensions; do
9024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9025    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9027    break 2
9028  fi
9029done
9030  done
9031IFS=$as_save_IFS
9032
9033  ;;
9034esac
9035fi
9036MV=$ac_cv_path_MV
9037if test -n "$MV"; then
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9039$as_echo "$MV" >&6; }
9040else
9041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9042$as_echo "no" >&6; }
9043fi
9044
9045
9046  test -n "$MV" && break
9047done
9048
9049  else
9050    # The variable is set, but is it from the command line or the environment?
9051
9052    # Try to remove the string !MV! from our list.
9053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9055      # If it failed, the variable was not from the command line. Ignore it,
9056      # but warn the user (except for BASH, which is always set by the calling BASH).
9057      if test "xMV" != xBASH; then
9058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9059$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9060      fi
9061      # Try to locate tool using the code snippet
9062      for ac_prog in mv
9063do
9064  # Extract the first word of "$ac_prog", so it can be a program name with args.
9065set dummy $ac_prog; ac_word=$2
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067$as_echo_n "checking for $ac_word... " >&6; }
9068if ${ac_cv_path_MV+:} false; then :
9069  $as_echo_n "(cached) " >&6
9070else
9071  case $MV in
9072  [\\/]* | ?:[\\/]*)
9073  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9074  ;;
9075  *)
9076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077for as_dir in $PATH
9078do
9079  IFS=$as_save_IFS
9080  test -z "$as_dir" && as_dir=.
9081    for ac_exec_ext in '' $ac_executable_extensions; do
9082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085    break 2
9086  fi
9087done
9088  done
9089IFS=$as_save_IFS
9090
9091  ;;
9092esac
9093fi
9094MV=$ac_cv_path_MV
9095if test -n "$MV"; then
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9097$as_echo "$MV" >&6; }
9098else
9099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100$as_echo "no" >&6; }
9101fi
9102
9103
9104  test -n "$MV" && break
9105done
9106
9107    else
9108      # If it succeeded, then it was overridden by the user. We will use it
9109      # for the tool.
9110
9111      # First remove it from the list of overridden variables, so we can test
9112      # for unknown variables in the end.
9113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9114
9115      # Check if we try to supply an empty value
9116      if test "x$MV" = x; then
9117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9118$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9120$as_echo_n "checking for MV... " >&6; }
9121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9122$as_echo "disabled" >&6; }
9123      else
9124        # Check if the provided tool contains a complete path.
9125        tool_specified="$MV"
9126        tool_basename="${tool_specified##*/}"
9127        if test "x$tool_basename" = "x$tool_specified"; then
9128          # A command without a complete path is provided, search $PATH.
9129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9130$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9131          # Extract the first word of "$tool_basename", so it can be a program name with args.
9132set dummy $tool_basename; ac_word=$2
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9134$as_echo_n "checking for $ac_word... " >&6; }
9135if ${ac_cv_path_MV+:} false; then :
9136  $as_echo_n "(cached) " >&6
9137else
9138  case $MV in
9139  [\\/]* | ?:[\\/]*)
9140  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9141  ;;
9142  *)
9143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9144for as_dir in $PATH
9145do
9146  IFS=$as_save_IFS
9147  test -z "$as_dir" && as_dir=.
9148    for ac_exec_ext in '' $ac_executable_extensions; do
9149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9150    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9152    break 2
9153  fi
9154done
9155  done
9156IFS=$as_save_IFS
9157
9158  ;;
9159esac
9160fi
9161MV=$ac_cv_path_MV
9162if test -n "$MV"; then
9163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9164$as_echo "$MV" >&6; }
9165else
9166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167$as_echo "no" >&6; }
9168fi
9169
9170
9171          if test "x$MV" = x; then
9172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9173          fi
9174        else
9175          # Otherwise we believe it is a complete path. Use it as it is.
9176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9177$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9179$as_echo_n "checking for MV... " >&6; }
9180          if test ! -x "$tool_specified"; then
9181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9182$as_echo "not found" >&6; }
9183            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9184          fi
9185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9186$as_echo "$tool_specified" >&6; }
9187        fi
9188      fi
9189    fi
9190
9191  fi
9192
9193
9194
9195  if test "x$MV" = x; then
9196    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9197  fi
9198
9199
9200
9201
9202
9203  # Publish this variable in the help.
9204
9205
9206  if [ -z "${NAWK+x}" ]; then
9207    # The variable is not set by user, try to locate tool using the code snippet
9208    for ac_prog in nawk gawk awk
9209do
9210  # Extract the first word of "$ac_prog", so it can be a program name with args.
9211set dummy $ac_prog; ac_word=$2
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9213$as_echo_n "checking for $ac_word... " >&6; }
9214if ${ac_cv_path_NAWK+:} false; then :
9215  $as_echo_n "(cached) " >&6
9216else
9217  case $NAWK in
9218  [\\/]* | ?:[\\/]*)
9219  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9220  ;;
9221  *)
9222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9223for as_dir in $PATH
9224do
9225  IFS=$as_save_IFS
9226  test -z "$as_dir" && as_dir=.
9227    for ac_exec_ext in '' $ac_executable_extensions; do
9228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9229    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9231    break 2
9232  fi
9233done
9234  done
9235IFS=$as_save_IFS
9236
9237  ;;
9238esac
9239fi
9240NAWK=$ac_cv_path_NAWK
9241if test -n "$NAWK"; then
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9243$as_echo "$NAWK" >&6; }
9244else
9245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9246$as_echo "no" >&6; }
9247fi
9248
9249
9250  test -n "$NAWK" && break
9251done
9252
9253  else
9254    # The variable is set, but is it from the command line or the environment?
9255
9256    # Try to remove the string !NAWK! from our list.
9257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9259      # If it failed, the variable was not from the command line. Ignore it,
9260      # but warn the user (except for BASH, which is always set by the calling BASH).
9261      if test "xNAWK" != xBASH; then
9262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9263$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9264      fi
9265      # Try to locate tool using the code snippet
9266      for ac_prog in nawk gawk awk
9267do
9268  # Extract the first word of "$ac_prog", so it can be a program name with args.
9269set dummy $ac_prog; ac_word=$2
9270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9271$as_echo_n "checking for $ac_word... " >&6; }
9272if ${ac_cv_path_NAWK+:} false; then :
9273  $as_echo_n "(cached) " >&6
9274else
9275  case $NAWK in
9276  [\\/]* | ?:[\\/]*)
9277  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9278  ;;
9279  *)
9280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9281for as_dir in $PATH
9282do
9283  IFS=$as_save_IFS
9284  test -z "$as_dir" && as_dir=.
9285    for ac_exec_ext in '' $ac_executable_extensions; do
9286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9287    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9289    break 2
9290  fi
9291done
9292  done
9293IFS=$as_save_IFS
9294
9295  ;;
9296esac
9297fi
9298NAWK=$ac_cv_path_NAWK
9299if test -n "$NAWK"; then
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9301$as_echo "$NAWK" >&6; }
9302else
9303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304$as_echo "no" >&6; }
9305fi
9306
9307
9308  test -n "$NAWK" && break
9309done
9310
9311    else
9312      # If it succeeded, then it was overridden by the user. We will use it
9313      # for the tool.
9314
9315      # First remove it from the list of overridden variables, so we can test
9316      # for unknown variables in the end.
9317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9318
9319      # Check if we try to supply an empty value
9320      if test "x$NAWK" = x; then
9321        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9322$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9324$as_echo_n "checking for NAWK... " >&6; }
9325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9326$as_echo "disabled" >&6; }
9327      else
9328        # Check if the provided tool contains a complete path.
9329        tool_specified="$NAWK"
9330        tool_basename="${tool_specified##*/}"
9331        if test "x$tool_basename" = "x$tool_specified"; then
9332          # A command without a complete path is provided, search $PATH.
9333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9334$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9335          # Extract the first word of "$tool_basename", so it can be a program name with args.
9336set dummy $tool_basename; ac_word=$2
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9338$as_echo_n "checking for $ac_word... " >&6; }
9339if ${ac_cv_path_NAWK+:} false; then :
9340  $as_echo_n "(cached) " >&6
9341else
9342  case $NAWK in
9343  [\\/]* | ?:[\\/]*)
9344  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9345  ;;
9346  *)
9347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9348for as_dir in $PATH
9349do
9350  IFS=$as_save_IFS
9351  test -z "$as_dir" && as_dir=.
9352    for ac_exec_ext in '' $ac_executable_extensions; do
9353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9354    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9356    break 2
9357  fi
9358done
9359  done
9360IFS=$as_save_IFS
9361
9362  ;;
9363esac
9364fi
9365NAWK=$ac_cv_path_NAWK
9366if test -n "$NAWK"; then
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9368$as_echo "$NAWK" >&6; }
9369else
9370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
9372fi
9373
9374
9375          if test "x$NAWK" = x; then
9376            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9377          fi
9378        else
9379          # Otherwise we believe it is a complete path. Use it as it is.
9380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9381$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9383$as_echo_n "checking for NAWK... " >&6; }
9384          if test ! -x "$tool_specified"; then
9385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9386$as_echo "not found" >&6; }
9387            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9388          fi
9389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9390$as_echo "$tool_specified" >&6; }
9391        fi
9392      fi
9393    fi
9394
9395  fi
9396
9397
9398
9399  if test "x$NAWK" = x; then
9400    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9401  fi
9402
9403
9404
9405
9406
9407  # Publish this variable in the help.
9408
9409
9410  if [ -z "${PRINTF+x}" ]; then
9411    # The variable is not set by user, try to locate tool using the code snippet
9412    for ac_prog in printf
9413do
9414  # Extract the first word of "$ac_prog", so it can be a program name with args.
9415set dummy $ac_prog; ac_word=$2
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9417$as_echo_n "checking for $ac_word... " >&6; }
9418if ${ac_cv_path_PRINTF+:} false; then :
9419  $as_echo_n "(cached) " >&6
9420else
9421  case $PRINTF in
9422  [\\/]* | ?:[\\/]*)
9423  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9424  ;;
9425  *)
9426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9427for as_dir in $PATH
9428do
9429  IFS=$as_save_IFS
9430  test -z "$as_dir" && as_dir=.
9431    for ac_exec_ext in '' $ac_executable_extensions; do
9432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9433    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9435    break 2
9436  fi
9437done
9438  done
9439IFS=$as_save_IFS
9440
9441  ;;
9442esac
9443fi
9444PRINTF=$ac_cv_path_PRINTF
9445if test -n "$PRINTF"; then
9446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9447$as_echo "$PRINTF" >&6; }
9448else
9449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9450$as_echo "no" >&6; }
9451fi
9452
9453
9454  test -n "$PRINTF" && break
9455done
9456
9457  else
9458    # The variable is set, but is it from the command line or the environment?
9459
9460    # Try to remove the string !PRINTF! from our list.
9461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9463      # If it failed, the variable was not from the command line. Ignore it,
9464      # but warn the user (except for BASH, which is always set by the calling BASH).
9465      if test "xPRINTF" != xBASH; then
9466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9467$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9468      fi
9469      # Try to locate tool using the code snippet
9470      for ac_prog in printf
9471do
9472  # Extract the first word of "$ac_prog", so it can be a program name with args.
9473set dummy $ac_prog; ac_word=$2
9474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9475$as_echo_n "checking for $ac_word... " >&6; }
9476if ${ac_cv_path_PRINTF+:} false; then :
9477  $as_echo_n "(cached) " >&6
9478else
9479  case $PRINTF in
9480  [\\/]* | ?:[\\/]*)
9481  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9482  ;;
9483  *)
9484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9485for as_dir in $PATH
9486do
9487  IFS=$as_save_IFS
9488  test -z "$as_dir" && as_dir=.
9489    for ac_exec_ext in '' $ac_executable_extensions; do
9490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9491    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9493    break 2
9494  fi
9495done
9496  done
9497IFS=$as_save_IFS
9498
9499  ;;
9500esac
9501fi
9502PRINTF=$ac_cv_path_PRINTF
9503if test -n "$PRINTF"; then
9504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9505$as_echo "$PRINTF" >&6; }
9506else
9507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508$as_echo "no" >&6; }
9509fi
9510
9511
9512  test -n "$PRINTF" && break
9513done
9514
9515    else
9516      # If it succeeded, then it was overridden by the user. We will use it
9517      # for the tool.
9518
9519      # First remove it from the list of overridden variables, so we can test
9520      # for unknown variables in the end.
9521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9522
9523      # Check if we try to supply an empty value
9524      if test "x$PRINTF" = x; then
9525        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9526$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9528$as_echo_n "checking for PRINTF... " >&6; }
9529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9530$as_echo "disabled" >&6; }
9531      else
9532        # Check if the provided tool contains a complete path.
9533        tool_specified="$PRINTF"
9534        tool_basename="${tool_specified##*/}"
9535        if test "x$tool_basename" = "x$tool_specified"; then
9536          # A command without a complete path is provided, search $PATH.
9537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9538$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9539          # Extract the first word of "$tool_basename", so it can be a program name with args.
9540set dummy $tool_basename; ac_word=$2
9541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9542$as_echo_n "checking for $ac_word... " >&6; }
9543if ${ac_cv_path_PRINTF+:} false; then :
9544  $as_echo_n "(cached) " >&6
9545else
9546  case $PRINTF in
9547  [\\/]* | ?:[\\/]*)
9548  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9549  ;;
9550  *)
9551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9552for as_dir in $PATH
9553do
9554  IFS=$as_save_IFS
9555  test -z "$as_dir" && as_dir=.
9556    for ac_exec_ext in '' $ac_executable_extensions; do
9557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9558    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9560    break 2
9561  fi
9562done
9563  done
9564IFS=$as_save_IFS
9565
9566  ;;
9567esac
9568fi
9569PRINTF=$ac_cv_path_PRINTF
9570if test -n "$PRINTF"; then
9571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9572$as_echo "$PRINTF" >&6; }
9573else
9574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575$as_echo "no" >&6; }
9576fi
9577
9578
9579          if test "x$PRINTF" = x; then
9580            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9581          fi
9582        else
9583          # Otherwise we believe it is a complete path. Use it as it is.
9584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9585$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9587$as_echo_n "checking for PRINTF... " >&6; }
9588          if test ! -x "$tool_specified"; then
9589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9590$as_echo "not found" >&6; }
9591            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9592          fi
9593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9594$as_echo "$tool_specified" >&6; }
9595        fi
9596      fi
9597    fi
9598
9599  fi
9600
9601
9602
9603  if test "x$PRINTF" = x; then
9604    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9605  fi
9606
9607
9608
9609
9610
9611  # Publish this variable in the help.
9612
9613
9614  if [ -z "${RM+x}" ]; then
9615    # The variable is not set by user, try to locate tool using the code snippet
9616    for ac_prog in rm
9617do
9618  # Extract the first word of "$ac_prog", so it can be a program name with args.
9619set dummy $ac_prog; ac_word=$2
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9621$as_echo_n "checking for $ac_word... " >&6; }
9622if ${ac_cv_path_RM+:} false; then :
9623  $as_echo_n "(cached) " >&6
9624else
9625  case $RM in
9626  [\\/]* | ?:[\\/]*)
9627  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9628  ;;
9629  *)
9630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9631for as_dir in $PATH
9632do
9633  IFS=$as_save_IFS
9634  test -z "$as_dir" && as_dir=.
9635    for ac_exec_ext in '' $ac_executable_extensions; do
9636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9637    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9639    break 2
9640  fi
9641done
9642  done
9643IFS=$as_save_IFS
9644
9645  ;;
9646esac
9647fi
9648RM=$ac_cv_path_RM
9649if test -n "$RM"; then
9650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9651$as_echo "$RM" >&6; }
9652else
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9654$as_echo "no" >&6; }
9655fi
9656
9657
9658  test -n "$RM" && break
9659done
9660
9661  else
9662    # The variable is set, but is it from the command line or the environment?
9663
9664    # Try to remove the string !RM! from our list.
9665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9667      # If it failed, the variable was not from the command line. Ignore it,
9668      # but warn the user (except for BASH, which is always set by the calling BASH).
9669      if test "xRM" != xBASH; then
9670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9671$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9672      fi
9673      # Try to locate tool using the code snippet
9674      for ac_prog in rm
9675do
9676  # Extract the first word of "$ac_prog", so it can be a program name with args.
9677set dummy $ac_prog; ac_word=$2
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679$as_echo_n "checking for $ac_word... " >&6; }
9680if ${ac_cv_path_RM+:} false; then :
9681  $as_echo_n "(cached) " >&6
9682else
9683  case $RM in
9684  [\\/]* | ?:[\\/]*)
9685  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9686  ;;
9687  *)
9688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689for as_dir in $PATH
9690do
9691  IFS=$as_save_IFS
9692  test -z "$as_dir" && as_dir=.
9693    for ac_exec_ext in '' $ac_executable_extensions; do
9694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697    break 2
9698  fi
9699done
9700  done
9701IFS=$as_save_IFS
9702
9703  ;;
9704esac
9705fi
9706RM=$ac_cv_path_RM
9707if test -n "$RM"; then
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9709$as_echo "$RM" >&6; }
9710else
9711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
9713fi
9714
9715
9716  test -n "$RM" && break
9717done
9718
9719    else
9720      # If it succeeded, then it was overridden by the user. We will use it
9721      # for the tool.
9722
9723      # First remove it from the list of overridden variables, so we can test
9724      # for unknown variables in the end.
9725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9726
9727      # Check if we try to supply an empty value
9728      if test "x$RM" = x; then
9729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9730$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9732$as_echo_n "checking for RM... " >&6; }
9733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9734$as_echo "disabled" >&6; }
9735      else
9736        # Check if the provided tool contains a complete path.
9737        tool_specified="$RM"
9738        tool_basename="${tool_specified##*/}"
9739        if test "x$tool_basename" = "x$tool_specified"; then
9740          # A command without a complete path is provided, search $PATH.
9741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9742$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9743          # Extract the first word of "$tool_basename", so it can be a program name with args.
9744set dummy $tool_basename; ac_word=$2
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9746$as_echo_n "checking for $ac_word... " >&6; }
9747if ${ac_cv_path_RM+:} false; then :
9748  $as_echo_n "(cached) " >&6
9749else
9750  case $RM in
9751  [\\/]* | ?:[\\/]*)
9752  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9753  ;;
9754  *)
9755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9756for as_dir in $PATH
9757do
9758  IFS=$as_save_IFS
9759  test -z "$as_dir" && as_dir=.
9760    for ac_exec_ext in '' $ac_executable_extensions; do
9761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9762    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9764    break 2
9765  fi
9766done
9767  done
9768IFS=$as_save_IFS
9769
9770  ;;
9771esac
9772fi
9773RM=$ac_cv_path_RM
9774if test -n "$RM"; then
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9776$as_echo "$RM" >&6; }
9777else
9778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
9780fi
9781
9782
9783          if test "x$RM" = x; then
9784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9785          fi
9786        else
9787          # Otherwise we believe it is a complete path. Use it as it is.
9788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9789$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9791$as_echo_n "checking for RM... " >&6; }
9792          if test ! -x "$tool_specified"; then
9793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9794$as_echo "not found" >&6; }
9795            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9796          fi
9797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9798$as_echo "$tool_specified" >&6; }
9799        fi
9800      fi
9801    fi
9802
9803  fi
9804
9805
9806
9807  if test "x$RM" = x; then
9808    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9809  fi
9810
9811
9812
9813
9814
9815  # Publish this variable in the help.
9816
9817
9818  if [ -z "${RMDIR+x}" ]; then
9819    # The variable is not set by user, try to locate tool using the code snippet
9820    for ac_prog in rmdir
9821do
9822  # Extract the first word of "$ac_prog", so it can be a program name with args.
9823set dummy $ac_prog; ac_word=$2
9824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9825$as_echo_n "checking for $ac_word... " >&6; }
9826if ${ac_cv_path_RMDIR+:} false; then :
9827  $as_echo_n "(cached) " >&6
9828else
9829  case $RMDIR in
9830  [\\/]* | ?:[\\/]*)
9831  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9832  ;;
9833  *)
9834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9835for as_dir in $PATH
9836do
9837  IFS=$as_save_IFS
9838  test -z "$as_dir" && as_dir=.
9839    for ac_exec_ext in '' $ac_executable_extensions; do
9840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9841    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9843    break 2
9844  fi
9845done
9846  done
9847IFS=$as_save_IFS
9848
9849  ;;
9850esac
9851fi
9852RMDIR=$ac_cv_path_RMDIR
9853if test -n "$RMDIR"; then
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9855$as_echo "$RMDIR" >&6; }
9856else
9857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9858$as_echo "no" >&6; }
9859fi
9860
9861
9862  test -n "$RMDIR" && break
9863done
9864
9865  else
9866    # The variable is set, but is it from the command line or the environment?
9867
9868    # Try to remove the string !RMDIR! from our list.
9869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9871      # If it failed, the variable was not from the command line. Ignore it,
9872      # but warn the user (except for BASH, which is always set by the calling BASH).
9873      if test "xRMDIR" != xBASH; then
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9875$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9876      fi
9877      # Try to locate tool using the code snippet
9878      for ac_prog in rmdir
9879do
9880  # Extract the first word of "$ac_prog", so it can be a program name with args.
9881set dummy $ac_prog; ac_word=$2
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9883$as_echo_n "checking for $ac_word... " >&6; }
9884if ${ac_cv_path_RMDIR+:} false; then :
9885  $as_echo_n "(cached) " >&6
9886else
9887  case $RMDIR in
9888  [\\/]* | ?:[\\/]*)
9889  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9890  ;;
9891  *)
9892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9893for as_dir in $PATH
9894do
9895  IFS=$as_save_IFS
9896  test -z "$as_dir" && as_dir=.
9897    for ac_exec_ext in '' $ac_executable_extensions; do
9898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9899    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9901    break 2
9902  fi
9903done
9904  done
9905IFS=$as_save_IFS
9906
9907  ;;
9908esac
9909fi
9910RMDIR=$ac_cv_path_RMDIR
9911if test -n "$RMDIR"; then
9912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9913$as_echo "$RMDIR" >&6; }
9914else
9915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916$as_echo "no" >&6; }
9917fi
9918
9919
9920  test -n "$RMDIR" && break
9921done
9922
9923    else
9924      # If it succeeded, then it was overridden by the user. We will use it
9925      # for the tool.
9926
9927      # First remove it from the list of overridden variables, so we can test
9928      # for unknown variables in the end.
9929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9930
9931      # Check if we try to supply an empty value
9932      if test "x$RMDIR" = x; then
9933        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9934$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9936$as_echo_n "checking for RMDIR... " >&6; }
9937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9938$as_echo "disabled" >&6; }
9939      else
9940        # Check if the provided tool contains a complete path.
9941        tool_specified="$RMDIR"
9942        tool_basename="${tool_specified##*/}"
9943        if test "x$tool_basename" = "x$tool_specified"; then
9944          # A command without a complete path is provided, search $PATH.
9945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9946$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9947          # Extract the first word of "$tool_basename", so it can be a program name with args.
9948set dummy $tool_basename; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if ${ac_cv_path_RMDIR+:} false; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $RMDIR in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9966    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977RMDIR=$ac_cv_path_RMDIR
9978if test -n "$RMDIR"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9980$as_echo "$RMDIR" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987          if test "x$RMDIR" = x; then
9988            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9989          fi
9990        else
9991          # Otherwise we believe it is a complete path. Use it as it is.
9992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9993$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9994          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9995$as_echo_n "checking for RMDIR... " >&6; }
9996          if test ! -x "$tool_specified"; then
9997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9998$as_echo "not found" >&6; }
9999            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10000          fi
10001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10002$as_echo "$tool_specified" >&6; }
10003        fi
10004      fi
10005    fi
10006
10007  fi
10008
10009
10010
10011  if test "x$RMDIR" = x; then
10012    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10013  fi
10014
10015
10016
10017
10018
10019  # Publish this variable in the help.
10020
10021
10022  if [ -z "${SH+x}" ]; then
10023    # The variable is not set by user, try to locate tool using the code snippet
10024    for ac_prog in sh
10025do
10026  # Extract the first word of "$ac_prog", so it can be a program name with args.
10027set dummy $ac_prog; ac_word=$2
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10029$as_echo_n "checking for $ac_word... " >&6; }
10030if ${ac_cv_path_SH+:} false; then :
10031  $as_echo_n "(cached) " >&6
10032else
10033  case $SH in
10034  [\\/]* | ?:[\\/]*)
10035  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10036  ;;
10037  *)
10038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10039for as_dir in $PATH
10040do
10041  IFS=$as_save_IFS
10042  test -z "$as_dir" && as_dir=.
10043    for ac_exec_ext in '' $ac_executable_extensions; do
10044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10045    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10047    break 2
10048  fi
10049done
10050  done
10051IFS=$as_save_IFS
10052
10053  ;;
10054esac
10055fi
10056SH=$ac_cv_path_SH
10057if test -n "$SH"; then
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10059$as_echo "$SH" >&6; }
10060else
10061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10062$as_echo "no" >&6; }
10063fi
10064
10065
10066  test -n "$SH" && break
10067done
10068
10069  else
10070    # The variable is set, but is it from the command line or the environment?
10071
10072    # Try to remove the string !SH! from our list.
10073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10075      # If it failed, the variable was not from the command line. Ignore it,
10076      # but warn the user (except for BASH, which is always set by the calling BASH).
10077      if test "xSH" != xBASH; then
10078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10079$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10080      fi
10081      # Try to locate tool using the code snippet
10082      for ac_prog in sh
10083do
10084  # Extract the first word of "$ac_prog", so it can be a program name with args.
10085set dummy $ac_prog; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if ${ac_cv_path_SH+:} false; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  case $SH in
10092  [\\/]* | ?:[\\/]*)
10093  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10094  ;;
10095  *)
10096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097for as_dir in $PATH
10098do
10099  IFS=$as_save_IFS
10100  test -z "$as_dir" && as_dir=.
10101    for ac_exec_ext in '' $ac_executable_extensions; do
10102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105    break 2
10106  fi
10107done
10108  done
10109IFS=$as_save_IFS
10110
10111  ;;
10112esac
10113fi
10114SH=$ac_cv_path_SH
10115if test -n "$SH"; then
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10117$as_echo "$SH" >&6; }
10118else
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124  test -n "$SH" && break
10125done
10126
10127    else
10128      # If it succeeded, then it was overridden by the user. We will use it
10129      # for the tool.
10130
10131      # First remove it from the list of overridden variables, so we can test
10132      # for unknown variables in the end.
10133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10134
10135      # Check if we try to supply an empty value
10136      if test "x$SH" = x; then
10137        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10138$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10140$as_echo_n "checking for SH... " >&6; }
10141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10142$as_echo "disabled" >&6; }
10143      else
10144        # Check if the provided tool contains a complete path.
10145        tool_specified="$SH"
10146        tool_basename="${tool_specified##*/}"
10147        if test "x$tool_basename" = "x$tool_specified"; then
10148          # A command without a complete path is provided, search $PATH.
10149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10150$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10151          # Extract the first word of "$tool_basename", so it can be a program name with args.
10152set dummy $tool_basename; ac_word=$2
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10154$as_echo_n "checking for $ac_word... " >&6; }
10155if ${ac_cv_path_SH+:} false; then :
10156  $as_echo_n "(cached) " >&6
10157else
10158  case $SH in
10159  [\\/]* | ?:[\\/]*)
10160  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10161  ;;
10162  *)
10163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10164for as_dir in $PATH
10165do
10166  IFS=$as_save_IFS
10167  test -z "$as_dir" && as_dir=.
10168    for ac_exec_ext in '' $ac_executable_extensions; do
10169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10170    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10172    break 2
10173  fi
10174done
10175  done
10176IFS=$as_save_IFS
10177
10178  ;;
10179esac
10180fi
10181SH=$ac_cv_path_SH
10182if test -n "$SH"; then
10183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10184$as_echo "$SH" >&6; }
10185else
10186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187$as_echo "no" >&6; }
10188fi
10189
10190
10191          if test "x$SH" = x; then
10192            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10193          fi
10194        else
10195          # Otherwise we believe it is a complete path. Use it as it is.
10196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10197$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10198          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10199$as_echo_n "checking for SH... " >&6; }
10200          if test ! -x "$tool_specified"; then
10201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10202$as_echo "not found" >&6; }
10203            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10204          fi
10205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10206$as_echo "$tool_specified" >&6; }
10207        fi
10208      fi
10209    fi
10210
10211  fi
10212
10213
10214
10215  if test "x$SH" = x; then
10216    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10217  fi
10218
10219
10220
10221
10222
10223  # Publish this variable in the help.
10224
10225
10226  if [ -z "${SORT+x}" ]; then
10227    # The variable is not set by user, try to locate tool using the code snippet
10228    for ac_prog in sort
10229do
10230  # Extract the first word of "$ac_prog", so it can be a program name with args.
10231set dummy $ac_prog; ac_word=$2
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233$as_echo_n "checking for $ac_word... " >&6; }
10234if ${ac_cv_path_SORT+:} false; then :
10235  $as_echo_n "(cached) " >&6
10236else
10237  case $SORT in
10238  [\\/]* | ?:[\\/]*)
10239  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10240  ;;
10241  *)
10242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243for as_dir in $PATH
10244do
10245  IFS=$as_save_IFS
10246  test -z "$as_dir" && as_dir=.
10247    for ac_exec_ext in '' $ac_executable_extensions; do
10248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10249    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251    break 2
10252  fi
10253done
10254  done
10255IFS=$as_save_IFS
10256
10257  ;;
10258esac
10259fi
10260SORT=$ac_cv_path_SORT
10261if test -n "$SORT"; then
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10263$as_echo "$SORT" >&6; }
10264else
10265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
10267fi
10268
10269
10270  test -n "$SORT" && break
10271done
10272
10273  else
10274    # The variable is set, but is it from the command line or the environment?
10275
10276    # Try to remove the string !SORT! from our list.
10277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10279      # If it failed, the variable was not from the command line. Ignore it,
10280      # but warn the user (except for BASH, which is always set by the calling BASH).
10281      if test "xSORT" != xBASH; then
10282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10283$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10284      fi
10285      # Try to locate tool using the code snippet
10286      for ac_prog in sort
10287do
10288  # Extract the first word of "$ac_prog", so it can be a program name with args.
10289set dummy $ac_prog; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if ${ac_cv_path_SORT+:} false; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  case $SORT in
10296  [\\/]* | ?:[\\/]*)
10297  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10298  ;;
10299  *)
10300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301for as_dir in $PATH
10302do
10303  IFS=$as_save_IFS
10304  test -z "$as_dir" && as_dir=.
10305    for ac_exec_ext in '' $ac_executable_extensions; do
10306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309    break 2
10310  fi
10311done
10312  done
10313IFS=$as_save_IFS
10314
10315  ;;
10316esac
10317fi
10318SORT=$ac_cv_path_SORT
10319if test -n "$SORT"; then
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10321$as_echo "$SORT" >&6; }
10322else
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328  test -n "$SORT" && break
10329done
10330
10331    else
10332      # If it succeeded, then it was overridden by the user. We will use it
10333      # for the tool.
10334
10335      # First remove it from the list of overridden variables, so we can test
10336      # for unknown variables in the end.
10337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10338
10339      # Check if we try to supply an empty value
10340      if test "x$SORT" = x; then
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10342$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10344$as_echo_n "checking for SORT... " >&6; }
10345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10346$as_echo "disabled" >&6; }
10347      else
10348        # Check if the provided tool contains a complete path.
10349        tool_specified="$SORT"
10350        tool_basename="${tool_specified##*/}"
10351        if test "x$tool_basename" = "x$tool_specified"; then
10352          # A command without a complete path is provided, search $PATH.
10353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10354$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10355          # Extract the first word of "$tool_basename", so it can be a program name with args.
10356set dummy $tool_basename; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if ${ac_cv_path_SORT+:} false; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $SORT in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10374    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385SORT=$ac_cv_path_SORT
10386if test -n "$SORT"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10388$as_echo "$SORT" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395          if test "x$SORT" = x; then
10396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10397          fi
10398        else
10399          # Otherwise we believe it is a complete path. Use it as it is.
10400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10401$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10403$as_echo_n "checking for SORT... " >&6; }
10404          if test ! -x "$tool_specified"; then
10405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10406$as_echo "not found" >&6; }
10407            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10408          fi
10409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10410$as_echo "$tool_specified" >&6; }
10411        fi
10412      fi
10413    fi
10414
10415  fi
10416
10417
10418
10419  if test "x$SORT" = x; then
10420    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10421  fi
10422
10423
10424
10425
10426
10427  # Publish this variable in the help.
10428
10429
10430  if [ -z "${TAIL+x}" ]; then
10431    # The variable is not set by user, try to locate tool using the code snippet
10432    for ac_prog in tail
10433do
10434  # Extract the first word of "$ac_prog", so it can be a program name with args.
10435set dummy $ac_prog; ac_word=$2
10436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10437$as_echo_n "checking for $ac_word... " >&6; }
10438if ${ac_cv_path_TAIL+:} false; then :
10439  $as_echo_n "(cached) " >&6
10440else
10441  case $TAIL in
10442  [\\/]* | ?:[\\/]*)
10443  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10444  ;;
10445  *)
10446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10447for as_dir in $PATH
10448do
10449  IFS=$as_save_IFS
10450  test -z "$as_dir" && as_dir=.
10451    for ac_exec_ext in '' $ac_executable_extensions; do
10452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10453    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10455    break 2
10456  fi
10457done
10458  done
10459IFS=$as_save_IFS
10460
10461  ;;
10462esac
10463fi
10464TAIL=$ac_cv_path_TAIL
10465if test -n "$TAIL"; then
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10467$as_echo "$TAIL" >&6; }
10468else
10469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470$as_echo "no" >&6; }
10471fi
10472
10473
10474  test -n "$TAIL" && break
10475done
10476
10477  else
10478    # The variable is set, but is it from the command line or the environment?
10479
10480    # Try to remove the string !TAIL! from our list.
10481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10483      # If it failed, the variable was not from the command line. Ignore it,
10484      # but warn the user (except for BASH, which is always set by the calling BASH).
10485      if test "xTAIL" != xBASH; then
10486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10487$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10488      fi
10489      # Try to locate tool using the code snippet
10490      for ac_prog in tail
10491do
10492  # Extract the first word of "$ac_prog", so it can be a program name with args.
10493set dummy $ac_prog; ac_word=$2
10494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495$as_echo_n "checking for $ac_word... " >&6; }
10496if ${ac_cv_path_TAIL+:} false; then :
10497  $as_echo_n "(cached) " >&6
10498else
10499  case $TAIL in
10500  [\\/]* | ?:[\\/]*)
10501  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10502  ;;
10503  *)
10504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505for as_dir in $PATH
10506do
10507  IFS=$as_save_IFS
10508  test -z "$as_dir" && as_dir=.
10509    for ac_exec_ext in '' $ac_executable_extensions; do
10510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10511    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513    break 2
10514  fi
10515done
10516  done
10517IFS=$as_save_IFS
10518
10519  ;;
10520esac
10521fi
10522TAIL=$ac_cv_path_TAIL
10523if test -n "$TAIL"; then
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10525$as_echo "$TAIL" >&6; }
10526else
10527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528$as_echo "no" >&6; }
10529fi
10530
10531
10532  test -n "$TAIL" && break
10533done
10534
10535    else
10536      # If it succeeded, then it was overridden by the user. We will use it
10537      # for the tool.
10538
10539      # First remove it from the list of overridden variables, so we can test
10540      # for unknown variables in the end.
10541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10542
10543      # Check if we try to supply an empty value
10544      if test "x$TAIL" = x; then
10545        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10546$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10548$as_echo_n "checking for TAIL... " >&6; }
10549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10550$as_echo "disabled" >&6; }
10551      else
10552        # Check if the provided tool contains a complete path.
10553        tool_specified="$TAIL"
10554        tool_basename="${tool_specified##*/}"
10555        if test "x$tool_basename" = "x$tool_specified"; then
10556          # A command without a complete path is provided, search $PATH.
10557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10558$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10559          # Extract the first word of "$tool_basename", so it can be a program name with args.
10560set dummy $tool_basename; ac_word=$2
10561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10562$as_echo_n "checking for $ac_word... " >&6; }
10563if ${ac_cv_path_TAIL+:} false; then :
10564  $as_echo_n "(cached) " >&6
10565else
10566  case $TAIL in
10567  [\\/]* | ?:[\\/]*)
10568  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10569  ;;
10570  *)
10571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10572for as_dir in $PATH
10573do
10574  IFS=$as_save_IFS
10575  test -z "$as_dir" && as_dir=.
10576    for ac_exec_ext in '' $ac_executable_extensions; do
10577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10578    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10580    break 2
10581  fi
10582done
10583  done
10584IFS=$as_save_IFS
10585
10586  ;;
10587esac
10588fi
10589TAIL=$ac_cv_path_TAIL
10590if test -n "$TAIL"; then
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10592$as_echo "$TAIL" >&6; }
10593else
10594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595$as_echo "no" >&6; }
10596fi
10597
10598
10599          if test "x$TAIL" = x; then
10600            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10601          fi
10602        else
10603          # Otherwise we believe it is a complete path. Use it as it is.
10604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10605$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10606          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10607$as_echo_n "checking for TAIL... " >&6; }
10608          if test ! -x "$tool_specified"; then
10609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10610$as_echo "not found" >&6; }
10611            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10612          fi
10613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10614$as_echo "$tool_specified" >&6; }
10615        fi
10616      fi
10617    fi
10618
10619  fi
10620
10621
10622
10623  if test "x$TAIL" = x; then
10624    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10625  fi
10626
10627
10628
10629
10630
10631  # Publish this variable in the help.
10632
10633
10634  if [ -z "${TAR+x}" ]; then
10635    # The variable is not set by user, try to locate tool using the code snippet
10636    for ac_prog in tar
10637do
10638  # Extract the first word of "$ac_prog", so it can be a program name with args.
10639set dummy $ac_prog; ac_word=$2
10640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10641$as_echo_n "checking for $ac_word... " >&6; }
10642if ${ac_cv_path_TAR+:} false; then :
10643  $as_echo_n "(cached) " >&6
10644else
10645  case $TAR in
10646  [\\/]* | ?:[\\/]*)
10647  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10648  ;;
10649  *)
10650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10651for as_dir in $PATH
10652do
10653  IFS=$as_save_IFS
10654  test -z "$as_dir" && as_dir=.
10655    for ac_exec_ext in '' $ac_executable_extensions; do
10656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10657    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10659    break 2
10660  fi
10661done
10662  done
10663IFS=$as_save_IFS
10664
10665  ;;
10666esac
10667fi
10668TAR=$ac_cv_path_TAR
10669if test -n "$TAR"; then
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10671$as_echo "$TAR" >&6; }
10672else
10673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674$as_echo "no" >&6; }
10675fi
10676
10677
10678  test -n "$TAR" && break
10679done
10680
10681  else
10682    # The variable is set, but is it from the command line or the environment?
10683
10684    # Try to remove the string !TAR! from our list.
10685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10687      # If it failed, the variable was not from the command line. Ignore it,
10688      # but warn the user (except for BASH, which is always set by the calling BASH).
10689      if test "xTAR" != xBASH; then
10690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10691$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10692      fi
10693      # Try to locate tool using the code snippet
10694      for ac_prog in tar
10695do
10696  # Extract the first word of "$ac_prog", so it can be a program name with args.
10697set dummy $ac_prog; ac_word=$2
10698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10699$as_echo_n "checking for $ac_word... " >&6; }
10700if ${ac_cv_path_TAR+:} false; then :
10701  $as_echo_n "(cached) " >&6
10702else
10703  case $TAR in
10704  [\\/]* | ?:[\\/]*)
10705  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10706  ;;
10707  *)
10708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10709for as_dir in $PATH
10710do
10711  IFS=$as_save_IFS
10712  test -z "$as_dir" && as_dir=.
10713    for ac_exec_ext in '' $ac_executable_extensions; do
10714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10715    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10717    break 2
10718  fi
10719done
10720  done
10721IFS=$as_save_IFS
10722
10723  ;;
10724esac
10725fi
10726TAR=$ac_cv_path_TAR
10727if test -n "$TAR"; then
10728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10729$as_echo "$TAR" >&6; }
10730else
10731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732$as_echo "no" >&6; }
10733fi
10734
10735
10736  test -n "$TAR" && break
10737done
10738
10739    else
10740      # If it succeeded, then it was overridden by the user. We will use it
10741      # for the tool.
10742
10743      # First remove it from the list of overridden variables, so we can test
10744      # for unknown variables in the end.
10745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10746
10747      # Check if we try to supply an empty value
10748      if test "x$TAR" = x; then
10749        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10750$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10752$as_echo_n "checking for TAR... " >&6; }
10753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10754$as_echo "disabled" >&6; }
10755      else
10756        # Check if the provided tool contains a complete path.
10757        tool_specified="$TAR"
10758        tool_basename="${tool_specified##*/}"
10759        if test "x$tool_basename" = "x$tool_specified"; then
10760          # A command without a complete path is provided, search $PATH.
10761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10762$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10763          # Extract the first word of "$tool_basename", so it can be a program name with args.
10764set dummy $tool_basename; ac_word=$2
10765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10766$as_echo_n "checking for $ac_word... " >&6; }
10767if ${ac_cv_path_TAR+:} false; then :
10768  $as_echo_n "(cached) " >&6
10769else
10770  case $TAR in
10771  [\\/]* | ?:[\\/]*)
10772  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10773  ;;
10774  *)
10775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10776for as_dir in $PATH
10777do
10778  IFS=$as_save_IFS
10779  test -z "$as_dir" && as_dir=.
10780    for ac_exec_ext in '' $ac_executable_extensions; do
10781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10782    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10784    break 2
10785  fi
10786done
10787  done
10788IFS=$as_save_IFS
10789
10790  ;;
10791esac
10792fi
10793TAR=$ac_cv_path_TAR
10794if test -n "$TAR"; then
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10796$as_echo "$TAR" >&6; }
10797else
10798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10799$as_echo "no" >&6; }
10800fi
10801
10802
10803          if test "x$TAR" = x; then
10804            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10805          fi
10806        else
10807          # Otherwise we believe it is a complete path. Use it as it is.
10808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10809$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10810          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10811$as_echo_n "checking for TAR... " >&6; }
10812          if test ! -x "$tool_specified"; then
10813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10814$as_echo "not found" >&6; }
10815            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10816          fi
10817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10818$as_echo "$tool_specified" >&6; }
10819        fi
10820      fi
10821    fi
10822
10823  fi
10824
10825
10826
10827  if test "x$TAR" = x; then
10828    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10829  fi
10830
10831
10832
10833
10834
10835  # Publish this variable in the help.
10836
10837
10838  if [ -z "${TEE+x}" ]; then
10839    # The variable is not set by user, try to locate tool using the code snippet
10840    for ac_prog in tee
10841do
10842  # Extract the first word of "$ac_prog", so it can be a program name with args.
10843set dummy $ac_prog; ac_word=$2
10844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10845$as_echo_n "checking for $ac_word... " >&6; }
10846if ${ac_cv_path_TEE+:} false; then :
10847  $as_echo_n "(cached) " >&6
10848else
10849  case $TEE in
10850  [\\/]* | ?:[\\/]*)
10851  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10852  ;;
10853  *)
10854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10855for as_dir in $PATH
10856do
10857  IFS=$as_save_IFS
10858  test -z "$as_dir" && as_dir=.
10859    for ac_exec_ext in '' $ac_executable_extensions; do
10860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10861    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10863    break 2
10864  fi
10865done
10866  done
10867IFS=$as_save_IFS
10868
10869  ;;
10870esac
10871fi
10872TEE=$ac_cv_path_TEE
10873if test -n "$TEE"; then
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10875$as_echo "$TEE" >&6; }
10876else
10877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10878$as_echo "no" >&6; }
10879fi
10880
10881
10882  test -n "$TEE" && break
10883done
10884
10885  else
10886    # The variable is set, but is it from the command line or the environment?
10887
10888    # Try to remove the string !TEE! from our list.
10889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10891      # If it failed, the variable was not from the command line. Ignore it,
10892      # but warn the user (except for BASH, which is always set by the calling BASH).
10893      if test "xTEE" != xBASH; then
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10895$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10896      fi
10897      # Try to locate tool using the code snippet
10898      for ac_prog in tee
10899do
10900  # Extract the first word of "$ac_prog", so it can be a program name with args.
10901set dummy $ac_prog; ac_word=$2
10902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10903$as_echo_n "checking for $ac_word... " >&6; }
10904if ${ac_cv_path_TEE+:} false; then :
10905  $as_echo_n "(cached) " >&6
10906else
10907  case $TEE in
10908  [\\/]* | ?:[\\/]*)
10909  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10910  ;;
10911  *)
10912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10913for as_dir in $PATH
10914do
10915  IFS=$as_save_IFS
10916  test -z "$as_dir" && as_dir=.
10917    for ac_exec_ext in '' $ac_executable_extensions; do
10918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10919    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10921    break 2
10922  fi
10923done
10924  done
10925IFS=$as_save_IFS
10926
10927  ;;
10928esac
10929fi
10930TEE=$ac_cv_path_TEE
10931if test -n "$TEE"; then
10932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10933$as_echo "$TEE" >&6; }
10934else
10935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
10937fi
10938
10939
10940  test -n "$TEE" && break
10941done
10942
10943    else
10944      # If it succeeded, then it was overridden by the user. We will use it
10945      # for the tool.
10946
10947      # First remove it from the list of overridden variables, so we can test
10948      # for unknown variables in the end.
10949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10950
10951      # Check if we try to supply an empty value
10952      if test "x$TEE" = x; then
10953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10954$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10956$as_echo_n "checking for TEE... " >&6; }
10957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10958$as_echo "disabled" >&6; }
10959      else
10960        # Check if the provided tool contains a complete path.
10961        tool_specified="$TEE"
10962        tool_basename="${tool_specified##*/}"
10963        if test "x$tool_basename" = "x$tool_specified"; then
10964          # A command without a complete path is provided, search $PATH.
10965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10966$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10967          # Extract the first word of "$tool_basename", so it can be a program name with args.
10968set dummy $tool_basename; ac_word=$2
10969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10970$as_echo_n "checking for $ac_word... " >&6; }
10971if ${ac_cv_path_TEE+:} false; then :
10972  $as_echo_n "(cached) " >&6
10973else
10974  case $TEE in
10975  [\\/]* | ?:[\\/]*)
10976  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10977  ;;
10978  *)
10979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10980for as_dir in $PATH
10981do
10982  IFS=$as_save_IFS
10983  test -z "$as_dir" && as_dir=.
10984    for ac_exec_ext in '' $ac_executable_extensions; do
10985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10986    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10988    break 2
10989  fi
10990done
10991  done
10992IFS=$as_save_IFS
10993
10994  ;;
10995esac
10996fi
10997TEE=$ac_cv_path_TEE
10998if test -n "$TEE"; then
10999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11000$as_echo "$TEE" >&6; }
11001else
11002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11003$as_echo "no" >&6; }
11004fi
11005
11006
11007          if test "x$TEE" = x; then
11008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11009          fi
11010        else
11011          # Otherwise we believe it is a complete path. Use it as it is.
11012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11013$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11015$as_echo_n "checking for TEE... " >&6; }
11016          if test ! -x "$tool_specified"; then
11017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11018$as_echo "not found" >&6; }
11019            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11020          fi
11021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11022$as_echo "$tool_specified" >&6; }
11023        fi
11024      fi
11025    fi
11026
11027  fi
11028
11029
11030
11031  if test "x$TEE" = x; then
11032    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11033  fi
11034
11035
11036
11037
11038
11039  # Publish this variable in the help.
11040
11041
11042  if [ -z "${TOUCH+x}" ]; then
11043    # The variable is not set by user, try to locate tool using the code snippet
11044    for ac_prog in touch
11045do
11046  # Extract the first word of "$ac_prog", so it can be a program name with args.
11047set dummy $ac_prog; ac_word=$2
11048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11049$as_echo_n "checking for $ac_word... " >&6; }
11050if ${ac_cv_path_TOUCH+:} false; then :
11051  $as_echo_n "(cached) " >&6
11052else
11053  case $TOUCH in
11054  [\\/]* | ?:[\\/]*)
11055  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11056  ;;
11057  *)
11058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059for as_dir in $PATH
11060do
11061  IFS=$as_save_IFS
11062  test -z "$as_dir" && as_dir=.
11063    for ac_exec_ext in '' $ac_executable_extensions; do
11064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11065    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11067    break 2
11068  fi
11069done
11070  done
11071IFS=$as_save_IFS
11072
11073  ;;
11074esac
11075fi
11076TOUCH=$ac_cv_path_TOUCH
11077if test -n "$TOUCH"; then
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11079$as_echo "$TOUCH" >&6; }
11080else
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
11083fi
11084
11085
11086  test -n "$TOUCH" && break
11087done
11088
11089  else
11090    # The variable is set, but is it from the command line or the environment?
11091
11092    # Try to remove the string !TOUCH! from our list.
11093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11095      # If it failed, the variable was not from the command line. Ignore it,
11096      # but warn the user (except for BASH, which is always set by the calling BASH).
11097      if test "xTOUCH" != xBASH; then
11098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11099$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11100      fi
11101      # Try to locate tool using the code snippet
11102      for ac_prog in touch
11103do
11104  # Extract the first word of "$ac_prog", so it can be a program name with args.
11105set dummy $ac_prog; ac_word=$2
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107$as_echo_n "checking for $ac_word... " >&6; }
11108if ${ac_cv_path_TOUCH+:} false; then :
11109  $as_echo_n "(cached) " >&6
11110else
11111  case $TOUCH in
11112  [\\/]* | ?:[\\/]*)
11113  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11114  ;;
11115  *)
11116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117for as_dir in $PATH
11118do
11119  IFS=$as_save_IFS
11120  test -z "$as_dir" && as_dir=.
11121    for ac_exec_ext in '' $ac_executable_extensions; do
11122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125    break 2
11126  fi
11127done
11128  done
11129IFS=$as_save_IFS
11130
11131  ;;
11132esac
11133fi
11134TOUCH=$ac_cv_path_TOUCH
11135if test -n "$TOUCH"; then
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11137$as_echo "$TOUCH" >&6; }
11138else
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
11141fi
11142
11143
11144  test -n "$TOUCH" && break
11145done
11146
11147    else
11148      # If it succeeded, then it was overridden by the user. We will use it
11149      # for the tool.
11150
11151      # First remove it from the list of overridden variables, so we can test
11152      # for unknown variables in the end.
11153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11154
11155      # Check if we try to supply an empty value
11156      if test "x$TOUCH" = x; then
11157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11158$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11160$as_echo_n "checking for TOUCH... " >&6; }
11161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11162$as_echo "disabled" >&6; }
11163      else
11164        # Check if the provided tool contains a complete path.
11165        tool_specified="$TOUCH"
11166        tool_basename="${tool_specified##*/}"
11167        if test "x$tool_basename" = "x$tool_specified"; then
11168          # A command without a complete path is provided, search $PATH.
11169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11170$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11171          # Extract the first word of "$tool_basename", so it can be a program name with args.
11172set dummy $tool_basename; ac_word=$2
11173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11174$as_echo_n "checking for $ac_word... " >&6; }
11175if ${ac_cv_path_TOUCH+:} false; then :
11176  $as_echo_n "(cached) " >&6
11177else
11178  case $TOUCH in
11179  [\\/]* | ?:[\\/]*)
11180  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11181  ;;
11182  *)
11183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11184for as_dir in $PATH
11185do
11186  IFS=$as_save_IFS
11187  test -z "$as_dir" && as_dir=.
11188    for ac_exec_ext in '' $ac_executable_extensions; do
11189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11190    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11192    break 2
11193  fi
11194done
11195  done
11196IFS=$as_save_IFS
11197
11198  ;;
11199esac
11200fi
11201TOUCH=$ac_cv_path_TOUCH
11202if test -n "$TOUCH"; then
11203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11204$as_echo "$TOUCH" >&6; }
11205else
11206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11207$as_echo "no" >&6; }
11208fi
11209
11210
11211          if test "x$TOUCH" = x; then
11212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11213          fi
11214        else
11215          # Otherwise we believe it is a complete path. Use it as it is.
11216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11217$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11219$as_echo_n "checking for TOUCH... " >&6; }
11220          if test ! -x "$tool_specified"; then
11221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11222$as_echo "not found" >&6; }
11223            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11224          fi
11225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11226$as_echo "$tool_specified" >&6; }
11227        fi
11228      fi
11229    fi
11230
11231  fi
11232
11233
11234
11235  if test "x$TOUCH" = x; then
11236    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11237  fi
11238
11239
11240
11241
11242
11243  # Publish this variable in the help.
11244
11245
11246  if [ -z "${TR+x}" ]; then
11247    # The variable is not set by user, try to locate tool using the code snippet
11248    for ac_prog in tr
11249do
11250  # Extract the first word of "$ac_prog", so it can be a program name with args.
11251set dummy $ac_prog; ac_word=$2
11252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11253$as_echo_n "checking for $ac_word... " >&6; }
11254if ${ac_cv_path_TR+:} false; then :
11255  $as_echo_n "(cached) " >&6
11256else
11257  case $TR in
11258  [\\/]* | ?:[\\/]*)
11259  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11260  ;;
11261  *)
11262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11263for as_dir in $PATH
11264do
11265  IFS=$as_save_IFS
11266  test -z "$as_dir" && as_dir=.
11267    for ac_exec_ext in '' $ac_executable_extensions; do
11268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11269    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11271    break 2
11272  fi
11273done
11274  done
11275IFS=$as_save_IFS
11276
11277  ;;
11278esac
11279fi
11280TR=$ac_cv_path_TR
11281if test -n "$TR"; then
11282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11283$as_echo "$TR" >&6; }
11284else
11285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
11287fi
11288
11289
11290  test -n "$TR" && break
11291done
11292
11293  else
11294    # The variable is set, but is it from the command line or the environment?
11295
11296    # Try to remove the string !TR! from our list.
11297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11299      # If it failed, the variable was not from the command line. Ignore it,
11300      # but warn the user (except for BASH, which is always set by the calling BASH).
11301      if test "xTR" != xBASH; then
11302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11303$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11304      fi
11305      # Try to locate tool using the code snippet
11306      for ac_prog in tr
11307do
11308  # Extract the first word of "$ac_prog", so it can be a program name with args.
11309set dummy $ac_prog; ac_word=$2
11310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11311$as_echo_n "checking for $ac_word... " >&6; }
11312if ${ac_cv_path_TR+:} false; then :
11313  $as_echo_n "(cached) " >&6
11314else
11315  case $TR in
11316  [\\/]* | ?:[\\/]*)
11317  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11318  ;;
11319  *)
11320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11321for as_dir in $PATH
11322do
11323  IFS=$as_save_IFS
11324  test -z "$as_dir" && as_dir=.
11325    for ac_exec_ext in '' $ac_executable_extensions; do
11326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11327    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11329    break 2
11330  fi
11331done
11332  done
11333IFS=$as_save_IFS
11334
11335  ;;
11336esac
11337fi
11338TR=$ac_cv_path_TR
11339if test -n "$TR"; then
11340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11341$as_echo "$TR" >&6; }
11342else
11343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
11345fi
11346
11347
11348  test -n "$TR" && break
11349done
11350
11351    else
11352      # If it succeeded, then it was overridden by the user. We will use it
11353      # for the tool.
11354
11355      # First remove it from the list of overridden variables, so we can test
11356      # for unknown variables in the end.
11357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11358
11359      # Check if we try to supply an empty value
11360      if test "x$TR" = x; then
11361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11362$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11364$as_echo_n "checking for TR... " >&6; }
11365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11366$as_echo "disabled" >&6; }
11367      else
11368        # Check if the provided tool contains a complete path.
11369        tool_specified="$TR"
11370        tool_basename="${tool_specified##*/}"
11371        if test "x$tool_basename" = "x$tool_specified"; then
11372          # A command without a complete path is provided, search $PATH.
11373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11374$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11375          # Extract the first word of "$tool_basename", so it can be a program name with args.
11376set dummy $tool_basename; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_path_TR+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  case $TR in
11383  [\\/]* | ?:[\\/]*)
11384  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11385  ;;
11386  *)
11387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402  ;;
11403esac
11404fi
11405TR=$ac_cv_path_TR
11406if test -n "$TR"; then
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11408$as_echo "$TR" >&6; }
11409else
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
11412fi
11413
11414
11415          if test "x$TR" = x; then
11416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11417          fi
11418        else
11419          # Otherwise we believe it is a complete path. Use it as it is.
11420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11421$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11423$as_echo_n "checking for TR... " >&6; }
11424          if test ! -x "$tool_specified"; then
11425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11426$as_echo "not found" >&6; }
11427            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11428          fi
11429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11430$as_echo "$tool_specified" >&6; }
11431        fi
11432      fi
11433    fi
11434
11435  fi
11436
11437
11438
11439  if test "x$TR" = x; then
11440    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11441  fi
11442
11443
11444
11445
11446
11447  # Publish this variable in the help.
11448
11449
11450  if [ -z "${UNAME+x}" ]; then
11451    # The variable is not set by user, try to locate tool using the code snippet
11452    for ac_prog in uname
11453do
11454  # Extract the first word of "$ac_prog", so it can be a program name with args.
11455set dummy $ac_prog; ac_word=$2
11456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11457$as_echo_n "checking for $ac_word... " >&6; }
11458if ${ac_cv_path_UNAME+:} false; then :
11459  $as_echo_n "(cached) " >&6
11460else
11461  case $UNAME in
11462  [\\/]* | ?:[\\/]*)
11463  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11464  ;;
11465  *)
11466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11467for as_dir in $PATH
11468do
11469  IFS=$as_save_IFS
11470  test -z "$as_dir" && as_dir=.
11471    for ac_exec_ext in '' $ac_executable_extensions; do
11472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11473    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11475    break 2
11476  fi
11477done
11478  done
11479IFS=$as_save_IFS
11480
11481  ;;
11482esac
11483fi
11484UNAME=$ac_cv_path_UNAME
11485if test -n "$UNAME"; then
11486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11487$as_echo "$UNAME" >&6; }
11488else
11489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11490$as_echo "no" >&6; }
11491fi
11492
11493
11494  test -n "$UNAME" && break
11495done
11496
11497  else
11498    # The variable is set, but is it from the command line or the environment?
11499
11500    # Try to remove the string !UNAME! from our list.
11501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11503      # If it failed, the variable was not from the command line. Ignore it,
11504      # but warn the user (except for BASH, which is always set by the calling BASH).
11505      if test "xUNAME" != xBASH; then
11506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11507$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11508      fi
11509      # Try to locate tool using the code snippet
11510      for ac_prog in uname
11511do
11512  # Extract the first word of "$ac_prog", so it can be a program name with args.
11513set dummy $ac_prog; ac_word=$2
11514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11515$as_echo_n "checking for $ac_word... " >&6; }
11516if ${ac_cv_path_UNAME+:} false; then :
11517  $as_echo_n "(cached) " >&6
11518else
11519  case $UNAME in
11520  [\\/]* | ?:[\\/]*)
11521  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11522  ;;
11523  *)
11524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525for as_dir in $PATH
11526do
11527  IFS=$as_save_IFS
11528  test -z "$as_dir" && as_dir=.
11529    for ac_exec_ext in '' $ac_executable_extensions; do
11530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11531    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533    break 2
11534  fi
11535done
11536  done
11537IFS=$as_save_IFS
11538
11539  ;;
11540esac
11541fi
11542UNAME=$ac_cv_path_UNAME
11543if test -n "$UNAME"; then
11544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11545$as_echo "$UNAME" >&6; }
11546else
11547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548$as_echo "no" >&6; }
11549fi
11550
11551
11552  test -n "$UNAME" && break
11553done
11554
11555    else
11556      # If it succeeded, then it was overridden by the user. We will use it
11557      # for the tool.
11558
11559      # First remove it from the list of overridden variables, so we can test
11560      # for unknown variables in the end.
11561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11562
11563      # Check if we try to supply an empty value
11564      if test "x$UNAME" = x; then
11565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11566$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11568$as_echo_n "checking for UNAME... " >&6; }
11569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11570$as_echo "disabled" >&6; }
11571      else
11572        # Check if the provided tool contains a complete path.
11573        tool_specified="$UNAME"
11574        tool_basename="${tool_specified##*/}"
11575        if test "x$tool_basename" = "x$tool_specified"; then
11576          # A command without a complete path is provided, search $PATH.
11577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11578$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11579          # Extract the first word of "$tool_basename", so it can be a program name with args.
11580set dummy $tool_basename; ac_word=$2
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11582$as_echo_n "checking for $ac_word... " >&6; }
11583if ${ac_cv_path_UNAME+:} false; then :
11584  $as_echo_n "(cached) " >&6
11585else
11586  case $UNAME in
11587  [\\/]* | ?:[\\/]*)
11588  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11589  ;;
11590  *)
11591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11592for as_dir in $PATH
11593do
11594  IFS=$as_save_IFS
11595  test -z "$as_dir" && as_dir=.
11596    for ac_exec_ext in '' $ac_executable_extensions; do
11597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11598    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11600    break 2
11601  fi
11602done
11603  done
11604IFS=$as_save_IFS
11605
11606  ;;
11607esac
11608fi
11609UNAME=$ac_cv_path_UNAME
11610if test -n "$UNAME"; then
11611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11612$as_echo "$UNAME" >&6; }
11613else
11614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615$as_echo "no" >&6; }
11616fi
11617
11618
11619          if test "x$UNAME" = x; then
11620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11621          fi
11622        else
11623          # Otherwise we believe it is a complete path. Use it as it is.
11624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11625$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11627$as_echo_n "checking for UNAME... " >&6; }
11628          if test ! -x "$tool_specified"; then
11629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11630$as_echo "not found" >&6; }
11631            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11632          fi
11633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11634$as_echo "$tool_specified" >&6; }
11635        fi
11636      fi
11637    fi
11638
11639  fi
11640
11641
11642
11643  if test "x$UNAME" = x; then
11644    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11645  fi
11646
11647
11648
11649
11650
11651  # Publish this variable in the help.
11652
11653
11654  if [ -z "${UNIQ+x}" ]; then
11655    # The variable is not set by user, try to locate tool using the code snippet
11656    for ac_prog in uniq
11657do
11658  # Extract the first word of "$ac_prog", so it can be a program name with args.
11659set dummy $ac_prog; ac_word=$2
11660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11661$as_echo_n "checking for $ac_word... " >&6; }
11662if ${ac_cv_path_UNIQ+:} false; then :
11663  $as_echo_n "(cached) " >&6
11664else
11665  case $UNIQ in
11666  [\\/]* | ?:[\\/]*)
11667  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11668  ;;
11669  *)
11670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11671for as_dir in $PATH
11672do
11673  IFS=$as_save_IFS
11674  test -z "$as_dir" && as_dir=.
11675    for ac_exec_ext in '' $ac_executable_extensions; do
11676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11677    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11679    break 2
11680  fi
11681done
11682  done
11683IFS=$as_save_IFS
11684
11685  ;;
11686esac
11687fi
11688UNIQ=$ac_cv_path_UNIQ
11689if test -n "$UNIQ"; then
11690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11691$as_echo "$UNIQ" >&6; }
11692else
11693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11694$as_echo "no" >&6; }
11695fi
11696
11697
11698  test -n "$UNIQ" && break
11699done
11700
11701  else
11702    # The variable is set, but is it from the command line or the environment?
11703
11704    # Try to remove the string !UNIQ! from our list.
11705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11707      # If it failed, the variable was not from the command line. Ignore it,
11708      # but warn the user (except for BASH, which is always set by the calling BASH).
11709      if test "xUNIQ" != xBASH; then
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11711$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11712      fi
11713      # Try to locate tool using the code snippet
11714      for ac_prog in uniq
11715do
11716  # Extract the first word of "$ac_prog", so it can be a program name with args.
11717set dummy $ac_prog; ac_word=$2
11718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11719$as_echo_n "checking for $ac_word... " >&6; }
11720if ${ac_cv_path_UNIQ+:} false; then :
11721  $as_echo_n "(cached) " >&6
11722else
11723  case $UNIQ in
11724  [\\/]* | ?:[\\/]*)
11725  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11726  ;;
11727  *)
11728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729for as_dir in $PATH
11730do
11731  IFS=$as_save_IFS
11732  test -z "$as_dir" && as_dir=.
11733    for ac_exec_ext in '' $ac_executable_extensions; do
11734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737    break 2
11738  fi
11739done
11740  done
11741IFS=$as_save_IFS
11742
11743  ;;
11744esac
11745fi
11746UNIQ=$ac_cv_path_UNIQ
11747if test -n "$UNIQ"; then
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11749$as_echo "$UNIQ" >&6; }
11750else
11751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752$as_echo "no" >&6; }
11753fi
11754
11755
11756  test -n "$UNIQ" && break
11757done
11758
11759    else
11760      # If it succeeded, then it was overridden by the user. We will use it
11761      # for the tool.
11762
11763      # First remove it from the list of overridden variables, so we can test
11764      # for unknown variables in the end.
11765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11766
11767      # Check if we try to supply an empty value
11768      if test "x$UNIQ" = x; then
11769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11770$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11772$as_echo_n "checking for UNIQ... " >&6; }
11773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11774$as_echo "disabled" >&6; }
11775      else
11776        # Check if the provided tool contains a complete path.
11777        tool_specified="$UNIQ"
11778        tool_basename="${tool_specified##*/}"
11779        if test "x$tool_basename" = "x$tool_specified"; then
11780          # A command without a complete path is provided, search $PATH.
11781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11782$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11783          # Extract the first word of "$tool_basename", so it can be a program name with args.
11784set dummy $tool_basename; ac_word=$2
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11786$as_echo_n "checking for $ac_word... " >&6; }
11787if ${ac_cv_path_UNIQ+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  case $UNIQ in
11791  [\\/]* | ?:[\\/]*)
11792  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11793  ;;
11794  *)
11795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796for as_dir in $PATH
11797do
11798  IFS=$as_save_IFS
11799  test -z "$as_dir" && as_dir=.
11800    for ac_exec_ext in '' $ac_executable_extensions; do
11801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11802    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11804    break 2
11805  fi
11806done
11807  done
11808IFS=$as_save_IFS
11809
11810  ;;
11811esac
11812fi
11813UNIQ=$ac_cv_path_UNIQ
11814if test -n "$UNIQ"; then
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11816$as_echo "$UNIQ" >&6; }
11817else
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
11820fi
11821
11822
11823          if test "x$UNIQ" = x; then
11824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11825          fi
11826        else
11827          # Otherwise we believe it is a complete path. Use it as it is.
11828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11829$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11831$as_echo_n "checking for UNIQ... " >&6; }
11832          if test ! -x "$tool_specified"; then
11833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11834$as_echo "not found" >&6; }
11835            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11836          fi
11837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11838$as_echo "$tool_specified" >&6; }
11839        fi
11840      fi
11841    fi
11842
11843  fi
11844
11845
11846
11847  if test "x$UNIQ" = x; then
11848    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11849  fi
11850
11851
11852
11853
11854
11855  # Publish this variable in the help.
11856
11857
11858  if [ -z "${WC+x}" ]; then
11859    # The variable is not set by user, try to locate tool using the code snippet
11860    for ac_prog in wc
11861do
11862  # Extract the first word of "$ac_prog", so it can be a program name with args.
11863set dummy $ac_prog; ac_word=$2
11864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11865$as_echo_n "checking for $ac_word... " >&6; }
11866if ${ac_cv_path_WC+:} false; then :
11867  $as_echo_n "(cached) " >&6
11868else
11869  case $WC in
11870  [\\/]* | ?:[\\/]*)
11871  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11872  ;;
11873  *)
11874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11875for as_dir in $PATH
11876do
11877  IFS=$as_save_IFS
11878  test -z "$as_dir" && as_dir=.
11879    for ac_exec_ext in '' $ac_executable_extensions; do
11880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11881    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11883    break 2
11884  fi
11885done
11886  done
11887IFS=$as_save_IFS
11888
11889  ;;
11890esac
11891fi
11892WC=$ac_cv_path_WC
11893if test -n "$WC"; then
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11895$as_echo "$WC" >&6; }
11896else
11897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11898$as_echo "no" >&6; }
11899fi
11900
11901
11902  test -n "$WC" && break
11903done
11904
11905  else
11906    # The variable is set, but is it from the command line or the environment?
11907
11908    # Try to remove the string !WC! from our list.
11909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11911      # If it failed, the variable was not from the command line. Ignore it,
11912      # but warn the user (except for BASH, which is always set by the calling BASH).
11913      if test "xWC" != xBASH; then
11914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11915$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11916      fi
11917      # Try to locate tool using the code snippet
11918      for ac_prog in wc
11919do
11920  # Extract the first word of "$ac_prog", so it can be a program name with args.
11921set dummy $ac_prog; ac_word=$2
11922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11923$as_echo_n "checking for $ac_word... " >&6; }
11924if ${ac_cv_path_WC+:} false; then :
11925  $as_echo_n "(cached) " >&6
11926else
11927  case $WC in
11928  [\\/]* | ?:[\\/]*)
11929  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11930  ;;
11931  *)
11932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933for as_dir in $PATH
11934do
11935  IFS=$as_save_IFS
11936  test -z "$as_dir" && as_dir=.
11937    for ac_exec_ext in '' $ac_executable_extensions; do
11938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11939    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11941    break 2
11942  fi
11943done
11944  done
11945IFS=$as_save_IFS
11946
11947  ;;
11948esac
11949fi
11950WC=$ac_cv_path_WC
11951if test -n "$WC"; then
11952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11953$as_echo "$WC" >&6; }
11954else
11955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956$as_echo "no" >&6; }
11957fi
11958
11959
11960  test -n "$WC" && break
11961done
11962
11963    else
11964      # If it succeeded, then it was overridden by the user. We will use it
11965      # for the tool.
11966
11967      # First remove it from the list of overridden variables, so we can test
11968      # for unknown variables in the end.
11969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11970
11971      # Check if we try to supply an empty value
11972      if test "x$WC" = x; then
11973        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11974$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11976$as_echo_n "checking for WC... " >&6; }
11977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11978$as_echo "disabled" >&6; }
11979      else
11980        # Check if the provided tool contains a complete path.
11981        tool_specified="$WC"
11982        tool_basename="${tool_specified##*/}"
11983        if test "x$tool_basename" = "x$tool_specified"; then
11984          # A command without a complete path is provided, search $PATH.
11985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11986$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11987          # Extract the first word of "$tool_basename", so it can be a program name with args.
11988set dummy $tool_basename; ac_word=$2
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11990$as_echo_n "checking for $ac_word... " >&6; }
11991if ${ac_cv_path_WC+:} false; then :
11992  $as_echo_n "(cached) " >&6
11993else
11994  case $WC in
11995  [\\/]* | ?:[\\/]*)
11996  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11997  ;;
11998  *)
11999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12000for as_dir in $PATH
12001do
12002  IFS=$as_save_IFS
12003  test -z "$as_dir" && as_dir=.
12004    for ac_exec_ext in '' $ac_executable_extensions; do
12005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12006    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12008    break 2
12009  fi
12010done
12011  done
12012IFS=$as_save_IFS
12013
12014  ;;
12015esac
12016fi
12017WC=$ac_cv_path_WC
12018if test -n "$WC"; then
12019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12020$as_echo "$WC" >&6; }
12021else
12022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12023$as_echo "no" >&6; }
12024fi
12025
12026
12027          if test "x$WC" = x; then
12028            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12029          fi
12030        else
12031          # Otherwise we believe it is a complete path. Use it as it is.
12032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12033$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12034          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12035$as_echo_n "checking for WC... " >&6; }
12036          if test ! -x "$tool_specified"; then
12037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12038$as_echo "not found" >&6; }
12039            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12040          fi
12041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12042$as_echo "$tool_specified" >&6; }
12043        fi
12044      fi
12045    fi
12046
12047  fi
12048
12049
12050
12051  if test "x$WC" = x; then
12052    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12053  fi
12054
12055
12056
12057
12058
12059  # Publish this variable in the help.
12060
12061
12062  if [ -z "${WHICH+x}" ]; then
12063    # The variable is not set by user, try to locate tool using the code snippet
12064    for ac_prog in which
12065do
12066  # Extract the first word of "$ac_prog", so it can be a program name with args.
12067set dummy $ac_prog; ac_word=$2
12068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12069$as_echo_n "checking for $ac_word... " >&6; }
12070if ${ac_cv_path_WHICH+:} false; then :
12071  $as_echo_n "(cached) " >&6
12072else
12073  case $WHICH in
12074  [\\/]* | ?:[\\/]*)
12075  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12076  ;;
12077  *)
12078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12079for as_dir in $PATH
12080do
12081  IFS=$as_save_IFS
12082  test -z "$as_dir" && as_dir=.
12083    for ac_exec_ext in '' $ac_executable_extensions; do
12084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12085    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12087    break 2
12088  fi
12089done
12090  done
12091IFS=$as_save_IFS
12092
12093  ;;
12094esac
12095fi
12096WHICH=$ac_cv_path_WHICH
12097if test -n "$WHICH"; then
12098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12099$as_echo "$WHICH" >&6; }
12100else
12101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12102$as_echo "no" >&6; }
12103fi
12104
12105
12106  test -n "$WHICH" && break
12107done
12108
12109  else
12110    # The variable is set, but is it from the command line or the environment?
12111
12112    # Try to remove the string !WHICH! from our list.
12113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12115      # If it failed, the variable was not from the command line. Ignore it,
12116      # but warn the user (except for BASH, which is always set by the calling BASH).
12117      if test "xWHICH" != xBASH; then
12118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12119$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12120      fi
12121      # Try to locate tool using the code snippet
12122      for ac_prog in which
12123do
12124  # Extract the first word of "$ac_prog", so it can be a program name with args.
12125set dummy $ac_prog; ac_word=$2
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12127$as_echo_n "checking for $ac_word... " >&6; }
12128if ${ac_cv_path_WHICH+:} false; then :
12129  $as_echo_n "(cached) " >&6
12130else
12131  case $WHICH in
12132  [\\/]* | ?:[\\/]*)
12133  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12134  ;;
12135  *)
12136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12137for as_dir in $PATH
12138do
12139  IFS=$as_save_IFS
12140  test -z "$as_dir" && as_dir=.
12141    for ac_exec_ext in '' $ac_executable_extensions; do
12142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12143    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12145    break 2
12146  fi
12147done
12148  done
12149IFS=$as_save_IFS
12150
12151  ;;
12152esac
12153fi
12154WHICH=$ac_cv_path_WHICH
12155if test -n "$WHICH"; then
12156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12157$as_echo "$WHICH" >&6; }
12158else
12159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12160$as_echo "no" >&6; }
12161fi
12162
12163
12164  test -n "$WHICH" && break
12165done
12166
12167    else
12168      # If it succeeded, then it was overridden by the user. We will use it
12169      # for the tool.
12170
12171      # First remove it from the list of overridden variables, so we can test
12172      # for unknown variables in the end.
12173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12174
12175      # Check if we try to supply an empty value
12176      if test "x$WHICH" = x; then
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12178$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12180$as_echo_n "checking for WHICH... " >&6; }
12181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12182$as_echo "disabled" >&6; }
12183      else
12184        # Check if the provided tool contains a complete path.
12185        tool_specified="$WHICH"
12186        tool_basename="${tool_specified##*/}"
12187        if test "x$tool_basename" = "x$tool_specified"; then
12188          # A command without a complete path is provided, search $PATH.
12189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12190$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12191          # Extract the first word of "$tool_basename", so it can be a program name with args.
12192set dummy $tool_basename; ac_word=$2
12193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12194$as_echo_n "checking for $ac_word... " >&6; }
12195if ${ac_cv_path_WHICH+:} false; then :
12196  $as_echo_n "(cached) " >&6
12197else
12198  case $WHICH in
12199  [\\/]* | ?:[\\/]*)
12200  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12201  ;;
12202  *)
12203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12204for as_dir in $PATH
12205do
12206  IFS=$as_save_IFS
12207  test -z "$as_dir" && as_dir=.
12208    for ac_exec_ext in '' $ac_executable_extensions; do
12209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12210    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12212    break 2
12213  fi
12214done
12215  done
12216IFS=$as_save_IFS
12217
12218  ;;
12219esac
12220fi
12221WHICH=$ac_cv_path_WHICH
12222if test -n "$WHICH"; then
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12224$as_echo "$WHICH" >&6; }
12225else
12226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12227$as_echo "no" >&6; }
12228fi
12229
12230
12231          if test "x$WHICH" = x; then
12232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12233          fi
12234        else
12235          # Otherwise we believe it is a complete path. Use it as it is.
12236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12237$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12239$as_echo_n "checking for WHICH... " >&6; }
12240          if test ! -x "$tool_specified"; then
12241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12242$as_echo "not found" >&6; }
12243            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12244          fi
12245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12246$as_echo "$tool_specified" >&6; }
12247        fi
12248      fi
12249    fi
12250
12251  fi
12252
12253
12254
12255  if test "x$WHICH" = x; then
12256    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12257  fi
12258
12259
12260
12261
12262
12263  # Publish this variable in the help.
12264
12265
12266  if [ -z "${XARGS+x}" ]; then
12267    # The variable is not set by user, try to locate tool using the code snippet
12268    for ac_prog in xargs
12269do
12270  # Extract the first word of "$ac_prog", so it can be a program name with args.
12271set dummy $ac_prog; ac_word=$2
12272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12273$as_echo_n "checking for $ac_word... " >&6; }
12274if ${ac_cv_path_XARGS+:} false; then :
12275  $as_echo_n "(cached) " >&6
12276else
12277  case $XARGS in
12278  [\\/]* | ?:[\\/]*)
12279  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12280  ;;
12281  *)
12282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12283for as_dir in $PATH
12284do
12285  IFS=$as_save_IFS
12286  test -z "$as_dir" && as_dir=.
12287    for ac_exec_ext in '' $ac_executable_extensions; do
12288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12289    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12291    break 2
12292  fi
12293done
12294  done
12295IFS=$as_save_IFS
12296
12297  ;;
12298esac
12299fi
12300XARGS=$ac_cv_path_XARGS
12301if test -n "$XARGS"; then
12302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12303$as_echo "$XARGS" >&6; }
12304else
12305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12306$as_echo "no" >&6; }
12307fi
12308
12309
12310  test -n "$XARGS" && break
12311done
12312
12313  else
12314    # The variable is set, but is it from the command line or the environment?
12315
12316    # Try to remove the string !XARGS! from our list.
12317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12319      # If it failed, the variable was not from the command line. Ignore it,
12320      # but warn the user (except for BASH, which is always set by the calling BASH).
12321      if test "xXARGS" != xBASH; then
12322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12323$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12324      fi
12325      # Try to locate tool using the code snippet
12326      for ac_prog in xargs
12327do
12328  # Extract the first word of "$ac_prog", so it can be a program name with args.
12329set dummy $ac_prog; ac_word=$2
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12331$as_echo_n "checking for $ac_word... " >&6; }
12332if ${ac_cv_path_XARGS+:} false; then :
12333  $as_echo_n "(cached) " >&6
12334else
12335  case $XARGS in
12336  [\\/]* | ?:[\\/]*)
12337  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12338  ;;
12339  *)
12340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341for as_dir in $PATH
12342do
12343  IFS=$as_save_IFS
12344  test -z "$as_dir" && as_dir=.
12345    for ac_exec_ext in '' $ac_executable_extensions; do
12346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12347    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12349    break 2
12350  fi
12351done
12352  done
12353IFS=$as_save_IFS
12354
12355  ;;
12356esac
12357fi
12358XARGS=$ac_cv_path_XARGS
12359if test -n "$XARGS"; then
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12361$as_echo "$XARGS" >&6; }
12362else
12363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364$as_echo "no" >&6; }
12365fi
12366
12367
12368  test -n "$XARGS" && break
12369done
12370
12371    else
12372      # If it succeeded, then it was overridden by the user. We will use it
12373      # for the tool.
12374
12375      # First remove it from the list of overridden variables, so we can test
12376      # for unknown variables in the end.
12377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12378
12379      # Check if we try to supply an empty value
12380      if test "x$XARGS" = x; then
12381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12382$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12384$as_echo_n "checking for XARGS... " >&6; }
12385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12386$as_echo "disabled" >&6; }
12387      else
12388        # Check if the provided tool contains a complete path.
12389        tool_specified="$XARGS"
12390        tool_basename="${tool_specified##*/}"
12391        if test "x$tool_basename" = "x$tool_specified"; then
12392          # A command without a complete path is provided, search $PATH.
12393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12394$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12395          # Extract the first word of "$tool_basename", so it can be a program name with args.
12396set dummy $tool_basename; ac_word=$2
12397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12398$as_echo_n "checking for $ac_word... " >&6; }
12399if ${ac_cv_path_XARGS+:} false; then :
12400  $as_echo_n "(cached) " >&6
12401else
12402  case $XARGS in
12403  [\\/]* | ?:[\\/]*)
12404  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12405  ;;
12406  *)
12407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12408for as_dir in $PATH
12409do
12410  IFS=$as_save_IFS
12411  test -z "$as_dir" && as_dir=.
12412    for ac_exec_ext in '' $ac_executable_extensions; do
12413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12414    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12416    break 2
12417  fi
12418done
12419  done
12420IFS=$as_save_IFS
12421
12422  ;;
12423esac
12424fi
12425XARGS=$ac_cv_path_XARGS
12426if test -n "$XARGS"; then
12427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12428$as_echo "$XARGS" >&6; }
12429else
12430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12431$as_echo "no" >&6; }
12432fi
12433
12434
12435          if test "x$XARGS" = x; then
12436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12437          fi
12438        else
12439          # Otherwise we believe it is a complete path. Use it as it is.
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12441$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12443$as_echo_n "checking for XARGS... " >&6; }
12444          if test ! -x "$tool_specified"; then
12445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12446$as_echo "not found" >&6; }
12447            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12448          fi
12449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12450$as_echo "$tool_specified" >&6; }
12451        fi
12452      fi
12453    fi
12454
12455  fi
12456
12457
12458
12459  if test "x$XARGS" = x; then
12460    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12461  fi
12462
12463
12464
12465  # Then required tools that require some special treatment.
12466
12467
12468  # Publish this variable in the help.
12469
12470
12471  if [ -z "${AWK+x}" ]; then
12472    # The variable is not set by user, try to locate tool using the code snippet
12473    for ac_prog in gawk mawk nawk awk
12474do
12475  # Extract the first word of "$ac_prog", so it can be a program name with args.
12476set dummy $ac_prog; ac_word=$2
12477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12478$as_echo_n "checking for $ac_word... " >&6; }
12479if ${ac_cv_prog_AWK+:} false; then :
12480  $as_echo_n "(cached) " >&6
12481else
12482  if test -n "$AWK"; then
12483  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12484else
12485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12486for as_dir in $PATH
12487do
12488  IFS=$as_save_IFS
12489  test -z "$as_dir" && as_dir=.
12490    for ac_exec_ext in '' $ac_executable_extensions; do
12491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12492    ac_cv_prog_AWK="$ac_prog"
12493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12494    break 2
12495  fi
12496done
12497  done
12498IFS=$as_save_IFS
12499
12500fi
12501fi
12502AWK=$ac_cv_prog_AWK
12503if test -n "$AWK"; then
12504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12505$as_echo "$AWK" >&6; }
12506else
12507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12508$as_echo "no" >&6; }
12509fi
12510
12511
12512  test -n "$AWK" && break
12513done
12514
12515  else
12516    # The variable is set, but is it from the command line or the environment?
12517
12518    # Try to remove the string !AWK! from our list.
12519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12521      # If it failed, the variable was not from the command line. Ignore it,
12522      # but warn the user (except for BASH, which is always set by the calling BASH).
12523      if test "xAWK" != xBASH; then
12524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12525$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12526      fi
12527      # Try to locate tool using the code snippet
12528      for ac_prog in gawk mawk nawk awk
12529do
12530  # Extract the first word of "$ac_prog", so it can be a program name with args.
12531set dummy $ac_prog; ac_word=$2
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12533$as_echo_n "checking for $ac_word... " >&6; }
12534if ${ac_cv_prog_AWK+:} false; then :
12535  $as_echo_n "(cached) " >&6
12536else
12537  if test -n "$AWK"; then
12538  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12539else
12540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12541for as_dir in $PATH
12542do
12543  IFS=$as_save_IFS
12544  test -z "$as_dir" && as_dir=.
12545    for ac_exec_ext in '' $ac_executable_extensions; do
12546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12547    ac_cv_prog_AWK="$ac_prog"
12548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12549    break 2
12550  fi
12551done
12552  done
12553IFS=$as_save_IFS
12554
12555fi
12556fi
12557AWK=$ac_cv_prog_AWK
12558if test -n "$AWK"; then
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12560$as_echo "$AWK" >&6; }
12561else
12562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563$as_echo "no" >&6; }
12564fi
12565
12566
12567  test -n "$AWK" && break
12568done
12569
12570    else
12571      # If it succeeded, then it was overridden by the user. We will use it
12572      # for the tool.
12573
12574      # First remove it from the list of overridden variables, so we can test
12575      # for unknown variables in the end.
12576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12577
12578      # Check if we try to supply an empty value
12579      if test "x$AWK" = x; then
12580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12581$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12583$as_echo_n "checking for AWK... " >&6; }
12584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12585$as_echo "disabled" >&6; }
12586      else
12587        # Check if the provided tool contains a complete path.
12588        tool_specified="$AWK"
12589        tool_basename="${tool_specified##*/}"
12590        if test "x$tool_basename" = "x$tool_specified"; then
12591          # A command without a complete path is provided, search $PATH.
12592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12593$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12594          # Extract the first word of "$tool_basename", so it can be a program name with args.
12595set dummy $tool_basename; ac_word=$2
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12597$as_echo_n "checking for $ac_word... " >&6; }
12598if ${ac_cv_path_AWK+:} false; then :
12599  $as_echo_n "(cached) " >&6
12600else
12601  case $AWK in
12602  [\\/]* | ?:[\\/]*)
12603  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12604  ;;
12605  *)
12606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12607for as_dir in $PATH
12608do
12609  IFS=$as_save_IFS
12610  test -z "$as_dir" && as_dir=.
12611    for ac_exec_ext in '' $ac_executable_extensions; do
12612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12613    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12615    break 2
12616  fi
12617done
12618  done
12619IFS=$as_save_IFS
12620
12621  ;;
12622esac
12623fi
12624AWK=$ac_cv_path_AWK
12625if test -n "$AWK"; then
12626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12627$as_echo "$AWK" >&6; }
12628else
12629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630$as_echo "no" >&6; }
12631fi
12632
12633
12634          if test "x$AWK" = x; then
12635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12636          fi
12637        else
12638          # Otherwise we believe it is a complete path. Use it as it is.
12639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12640$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12642$as_echo_n "checking for AWK... " >&6; }
12643          if test ! -x "$tool_specified"; then
12644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12645$as_echo "not found" >&6; }
12646            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12647          fi
12648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12649$as_echo "$tool_specified" >&6; }
12650        fi
12651      fi
12652    fi
12653
12654  fi
12655
12656
12657  if test "x$AWK" = x; then
12658    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12659  fi
12660
12661
12662
12663
12664  # Publish this variable in the help.
12665
12666
12667  if [ -z "${GREP+x}" ]; then
12668    # The variable is not set by user, try to locate tool using the code snippet
12669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12670$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12671if ${ac_cv_path_GREP+:} false; then :
12672  $as_echo_n "(cached) " >&6
12673else
12674  if test -z "$GREP"; then
12675  ac_path_GREP_found=false
12676  # Loop through the user's path and test for each of PROGNAME-LIST
12677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12678for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12679do
12680  IFS=$as_save_IFS
12681  test -z "$as_dir" && as_dir=.
12682    for ac_prog in grep ggrep; do
12683    for ac_exec_ext in '' $ac_executable_extensions; do
12684      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12685      as_fn_executable_p "$ac_path_GREP" || continue
12686# Check for GNU ac_path_GREP and select it if it is found.
12687  # Check for GNU $ac_path_GREP
12688case `"$ac_path_GREP" --version 2>&1` in
12689*GNU*)
12690  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12691*)
12692  ac_count=0
12693  $as_echo_n 0123456789 >"conftest.in"
12694  while :
12695  do
12696    cat "conftest.in" "conftest.in" >"conftest.tmp"
12697    mv "conftest.tmp" "conftest.in"
12698    cp "conftest.in" "conftest.nl"
12699    $as_echo 'GREP' >> "conftest.nl"
12700    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12701    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12702    as_fn_arith $ac_count + 1 && ac_count=$as_val
12703    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12704      # Best one so far, save it but keep looking for a better one
12705      ac_cv_path_GREP="$ac_path_GREP"
12706      ac_path_GREP_max=$ac_count
12707    fi
12708    # 10*(2^10) chars as input seems more than enough
12709    test $ac_count -gt 10 && break
12710  done
12711  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12712esac
12713
12714      $ac_path_GREP_found && break 3
12715    done
12716  done
12717  done
12718IFS=$as_save_IFS
12719  if test -z "$ac_cv_path_GREP"; then
12720    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12721  fi
12722else
12723  ac_cv_path_GREP=$GREP
12724fi
12725
12726fi
12727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12728$as_echo "$ac_cv_path_GREP" >&6; }
12729 GREP="$ac_cv_path_GREP"
12730
12731
12732  else
12733    # The variable is set, but is it from the command line or the environment?
12734
12735    # Try to remove the string !GREP! from our list.
12736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12738      # If it failed, the variable was not from the command line. Ignore it,
12739      # but warn the user (except for BASH, which is always set by the calling BASH).
12740      if test "xGREP" != xBASH; then
12741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12742$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12743      fi
12744      # Try to locate tool using the code snippet
12745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12746$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12747if ${ac_cv_path_GREP+:} false; then :
12748  $as_echo_n "(cached) " >&6
12749else
12750  if test -z "$GREP"; then
12751  ac_path_GREP_found=false
12752  # Loop through the user's path and test for each of PROGNAME-LIST
12753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12754for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12755do
12756  IFS=$as_save_IFS
12757  test -z "$as_dir" && as_dir=.
12758    for ac_prog in grep ggrep; do
12759    for ac_exec_ext in '' $ac_executable_extensions; do
12760      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12761      as_fn_executable_p "$ac_path_GREP" || continue
12762# Check for GNU ac_path_GREP and select it if it is found.
12763  # Check for GNU $ac_path_GREP
12764case `"$ac_path_GREP" --version 2>&1` in
12765*GNU*)
12766  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12767*)
12768  ac_count=0
12769  $as_echo_n 0123456789 >"conftest.in"
12770  while :
12771  do
12772    cat "conftest.in" "conftest.in" >"conftest.tmp"
12773    mv "conftest.tmp" "conftest.in"
12774    cp "conftest.in" "conftest.nl"
12775    $as_echo 'GREP' >> "conftest.nl"
12776    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12777    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12778    as_fn_arith $ac_count + 1 && ac_count=$as_val
12779    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12780      # Best one so far, save it but keep looking for a better one
12781      ac_cv_path_GREP="$ac_path_GREP"
12782      ac_path_GREP_max=$ac_count
12783    fi
12784    # 10*(2^10) chars as input seems more than enough
12785    test $ac_count -gt 10 && break
12786  done
12787  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12788esac
12789
12790      $ac_path_GREP_found && break 3
12791    done
12792  done
12793  done
12794IFS=$as_save_IFS
12795  if test -z "$ac_cv_path_GREP"; then
12796    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12797  fi
12798else
12799  ac_cv_path_GREP=$GREP
12800fi
12801
12802fi
12803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12804$as_echo "$ac_cv_path_GREP" >&6; }
12805 GREP="$ac_cv_path_GREP"
12806
12807
12808    else
12809      # If it succeeded, then it was overridden by the user. We will use it
12810      # for the tool.
12811
12812      # First remove it from the list of overridden variables, so we can test
12813      # for unknown variables in the end.
12814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12815
12816      # Check if we try to supply an empty value
12817      if test "x$GREP" = x; then
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12819$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12821$as_echo_n "checking for GREP... " >&6; }
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12823$as_echo "disabled" >&6; }
12824      else
12825        # Check if the provided tool contains a complete path.
12826        tool_specified="$GREP"
12827        tool_basename="${tool_specified##*/}"
12828        if test "x$tool_basename" = "x$tool_specified"; then
12829          # A command without a complete path is provided, search $PATH.
12830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12831$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12832          # Extract the first word of "$tool_basename", so it can be a program name with args.
12833set dummy $tool_basename; ac_word=$2
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12835$as_echo_n "checking for $ac_word... " >&6; }
12836if ${ac_cv_path_GREP+:} false; then :
12837  $as_echo_n "(cached) " >&6
12838else
12839  case $GREP in
12840  [\\/]* | ?:[\\/]*)
12841  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12842  ;;
12843  *)
12844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12845for as_dir in $PATH
12846do
12847  IFS=$as_save_IFS
12848  test -z "$as_dir" && as_dir=.
12849    for ac_exec_ext in '' $ac_executable_extensions; do
12850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12851    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12853    break 2
12854  fi
12855done
12856  done
12857IFS=$as_save_IFS
12858
12859  ;;
12860esac
12861fi
12862GREP=$ac_cv_path_GREP
12863if test -n "$GREP"; then
12864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12865$as_echo "$GREP" >&6; }
12866else
12867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12868$as_echo "no" >&6; }
12869fi
12870
12871
12872          if test "x$GREP" = x; then
12873            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12874          fi
12875        else
12876          # Otherwise we believe it is a complete path. Use it as it is.
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12878$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12879          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12880$as_echo_n "checking for GREP... " >&6; }
12881          if test ! -x "$tool_specified"; then
12882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12883$as_echo "not found" >&6; }
12884            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12885          fi
12886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12887$as_echo "$tool_specified" >&6; }
12888        fi
12889      fi
12890    fi
12891
12892  fi
12893
12894
12895  if test "x$GREP" = x; then
12896    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12897  fi
12898
12899
12900
12901
12902  # Publish this variable in the help.
12903
12904
12905  if [ -z "${EGREP+x}" ]; then
12906    # The variable is not set by user, try to locate tool using the code snippet
12907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12908$as_echo_n "checking for egrep... " >&6; }
12909if ${ac_cv_path_EGREP+:} false; then :
12910  $as_echo_n "(cached) " >&6
12911else
12912  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12913   then ac_cv_path_EGREP="$GREP -E"
12914   else
12915     if test -z "$EGREP"; then
12916  ac_path_EGREP_found=false
12917  # Loop through the user's path and test for each of PROGNAME-LIST
12918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12919for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12920do
12921  IFS=$as_save_IFS
12922  test -z "$as_dir" && as_dir=.
12923    for ac_prog in egrep; do
12924    for ac_exec_ext in '' $ac_executable_extensions; do
12925      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12926      as_fn_executable_p "$ac_path_EGREP" || continue
12927# Check for GNU ac_path_EGREP and select it if it is found.
12928  # Check for GNU $ac_path_EGREP
12929case `"$ac_path_EGREP" --version 2>&1` in
12930*GNU*)
12931  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12932*)
12933  ac_count=0
12934  $as_echo_n 0123456789 >"conftest.in"
12935  while :
12936  do
12937    cat "conftest.in" "conftest.in" >"conftest.tmp"
12938    mv "conftest.tmp" "conftest.in"
12939    cp "conftest.in" "conftest.nl"
12940    $as_echo 'EGREP' >> "conftest.nl"
12941    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12942    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12943    as_fn_arith $ac_count + 1 && ac_count=$as_val
12944    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12945      # Best one so far, save it but keep looking for a better one
12946      ac_cv_path_EGREP="$ac_path_EGREP"
12947      ac_path_EGREP_max=$ac_count
12948    fi
12949    # 10*(2^10) chars as input seems more than enough
12950    test $ac_count -gt 10 && break
12951  done
12952  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12953esac
12954
12955      $ac_path_EGREP_found && break 3
12956    done
12957  done
12958  done
12959IFS=$as_save_IFS
12960  if test -z "$ac_cv_path_EGREP"; then
12961    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12962  fi
12963else
12964  ac_cv_path_EGREP=$EGREP
12965fi
12966
12967   fi
12968fi
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12970$as_echo "$ac_cv_path_EGREP" >&6; }
12971 EGREP="$ac_cv_path_EGREP"
12972
12973
12974  else
12975    # The variable is set, but is it from the command line or the environment?
12976
12977    # Try to remove the string !EGREP! from our list.
12978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12980      # If it failed, the variable was not from the command line. Ignore it,
12981      # but warn the user (except for BASH, which is always set by the calling BASH).
12982      if test "xEGREP" != xBASH; then
12983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12984$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12985      fi
12986      # Try to locate tool using the code snippet
12987      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12988$as_echo_n "checking for egrep... " >&6; }
12989if ${ac_cv_path_EGREP+:} false; then :
12990  $as_echo_n "(cached) " >&6
12991else
12992  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12993   then ac_cv_path_EGREP="$GREP -E"
12994   else
12995     if test -z "$EGREP"; then
12996  ac_path_EGREP_found=false
12997  # Loop through the user's path and test for each of PROGNAME-LIST
12998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12999for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13000do
13001  IFS=$as_save_IFS
13002  test -z "$as_dir" && as_dir=.
13003    for ac_prog in egrep; do
13004    for ac_exec_ext in '' $ac_executable_extensions; do
13005      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13006      as_fn_executable_p "$ac_path_EGREP" || continue
13007# Check for GNU ac_path_EGREP and select it if it is found.
13008  # Check for GNU $ac_path_EGREP
13009case `"$ac_path_EGREP" --version 2>&1` in
13010*GNU*)
13011  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13012*)
13013  ac_count=0
13014  $as_echo_n 0123456789 >"conftest.in"
13015  while :
13016  do
13017    cat "conftest.in" "conftest.in" >"conftest.tmp"
13018    mv "conftest.tmp" "conftest.in"
13019    cp "conftest.in" "conftest.nl"
13020    $as_echo 'EGREP' >> "conftest.nl"
13021    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13022    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13023    as_fn_arith $ac_count + 1 && ac_count=$as_val
13024    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13025      # Best one so far, save it but keep looking for a better one
13026      ac_cv_path_EGREP="$ac_path_EGREP"
13027      ac_path_EGREP_max=$ac_count
13028    fi
13029    # 10*(2^10) chars as input seems more than enough
13030    test $ac_count -gt 10 && break
13031  done
13032  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13033esac
13034
13035      $ac_path_EGREP_found && break 3
13036    done
13037  done
13038  done
13039IFS=$as_save_IFS
13040  if test -z "$ac_cv_path_EGREP"; then
13041    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13042  fi
13043else
13044  ac_cv_path_EGREP=$EGREP
13045fi
13046
13047   fi
13048fi
13049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13050$as_echo "$ac_cv_path_EGREP" >&6; }
13051 EGREP="$ac_cv_path_EGREP"
13052
13053
13054    else
13055      # If it succeeded, then it was overridden by the user. We will use it
13056      # for the tool.
13057
13058      # First remove it from the list of overridden variables, so we can test
13059      # for unknown variables in the end.
13060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13061
13062      # Check if we try to supply an empty value
13063      if test "x$EGREP" = x; then
13064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13065$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13067$as_echo_n "checking for EGREP... " >&6; }
13068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13069$as_echo "disabled" >&6; }
13070      else
13071        # Check if the provided tool contains a complete path.
13072        tool_specified="$EGREP"
13073        tool_basename="${tool_specified##*/}"
13074        if test "x$tool_basename" = "x$tool_specified"; then
13075          # A command without a complete path is provided, search $PATH.
13076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13077$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13078          # Extract the first word of "$tool_basename", so it can be a program name with args.
13079set dummy $tool_basename; ac_word=$2
13080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13081$as_echo_n "checking for $ac_word... " >&6; }
13082if ${ac_cv_path_EGREP+:} false; then :
13083  $as_echo_n "(cached) " >&6
13084else
13085  case $EGREP in
13086  [\\/]* | ?:[\\/]*)
13087  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13088  ;;
13089  *)
13090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13091for as_dir in $PATH
13092do
13093  IFS=$as_save_IFS
13094  test -z "$as_dir" && as_dir=.
13095    for ac_exec_ext in '' $ac_executable_extensions; do
13096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13097    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13099    break 2
13100  fi
13101done
13102  done
13103IFS=$as_save_IFS
13104
13105  ;;
13106esac
13107fi
13108EGREP=$ac_cv_path_EGREP
13109if test -n "$EGREP"; then
13110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13111$as_echo "$EGREP" >&6; }
13112else
13113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13114$as_echo "no" >&6; }
13115fi
13116
13117
13118          if test "x$EGREP" = x; then
13119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13120          fi
13121        else
13122          # Otherwise we believe it is a complete path. Use it as it is.
13123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13124$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13126$as_echo_n "checking for EGREP... " >&6; }
13127          if test ! -x "$tool_specified"; then
13128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13129$as_echo "not found" >&6; }
13130            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13131          fi
13132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13133$as_echo "$tool_specified" >&6; }
13134        fi
13135      fi
13136    fi
13137
13138  fi
13139
13140
13141  if test "x$EGREP" = x; then
13142    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13143  fi
13144
13145
13146
13147
13148  # Publish this variable in the help.
13149
13150
13151  if [ -z "${FGREP+x}" ]; then
13152    # The variable is not set by user, try to locate tool using the code snippet
13153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13154$as_echo_n "checking for fgrep... " >&6; }
13155if ${ac_cv_path_FGREP+:} false; then :
13156  $as_echo_n "(cached) " >&6
13157else
13158  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13159   then ac_cv_path_FGREP="$GREP -F"
13160   else
13161     if test -z "$FGREP"; then
13162  ac_path_FGREP_found=false
13163  # Loop through the user's path and test for each of PROGNAME-LIST
13164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13165for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13166do
13167  IFS=$as_save_IFS
13168  test -z "$as_dir" && as_dir=.
13169    for ac_prog in fgrep; do
13170    for ac_exec_ext in '' $ac_executable_extensions; do
13171      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13172      as_fn_executable_p "$ac_path_FGREP" || continue
13173# Check for GNU ac_path_FGREP and select it if it is found.
13174  # Check for GNU $ac_path_FGREP
13175case `"$ac_path_FGREP" --version 2>&1` in
13176*GNU*)
13177  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13178*)
13179  ac_count=0
13180  $as_echo_n 0123456789 >"conftest.in"
13181  while :
13182  do
13183    cat "conftest.in" "conftest.in" >"conftest.tmp"
13184    mv "conftest.tmp" "conftest.in"
13185    cp "conftest.in" "conftest.nl"
13186    $as_echo 'FGREP' >> "conftest.nl"
13187    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13188    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13189    as_fn_arith $ac_count + 1 && ac_count=$as_val
13190    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13191      # Best one so far, save it but keep looking for a better one
13192      ac_cv_path_FGREP="$ac_path_FGREP"
13193      ac_path_FGREP_max=$ac_count
13194    fi
13195    # 10*(2^10) chars as input seems more than enough
13196    test $ac_count -gt 10 && break
13197  done
13198  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13199esac
13200
13201      $ac_path_FGREP_found && break 3
13202    done
13203  done
13204  done
13205IFS=$as_save_IFS
13206  if test -z "$ac_cv_path_FGREP"; then
13207    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13208  fi
13209else
13210  ac_cv_path_FGREP=$FGREP
13211fi
13212
13213   fi
13214fi
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13216$as_echo "$ac_cv_path_FGREP" >&6; }
13217 FGREP="$ac_cv_path_FGREP"
13218
13219
13220  else
13221    # The variable is set, but is it from the command line or the environment?
13222
13223    # Try to remove the string !FGREP! from our list.
13224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13226      # If it failed, the variable was not from the command line. Ignore it,
13227      # but warn the user (except for BASH, which is always set by the calling BASH).
13228      if test "xFGREP" != xBASH; then
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13230$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13231      fi
13232      # Try to locate tool using the code snippet
13233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13234$as_echo_n "checking for fgrep... " >&6; }
13235if ${ac_cv_path_FGREP+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13239   then ac_cv_path_FGREP="$GREP -F"
13240   else
13241     if test -z "$FGREP"; then
13242  ac_path_FGREP_found=false
13243  # Loop through the user's path and test for each of PROGNAME-LIST
13244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13245for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13246do
13247  IFS=$as_save_IFS
13248  test -z "$as_dir" && as_dir=.
13249    for ac_prog in fgrep; do
13250    for ac_exec_ext in '' $ac_executable_extensions; do
13251      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13252      as_fn_executable_p "$ac_path_FGREP" || continue
13253# Check for GNU ac_path_FGREP and select it if it is found.
13254  # Check for GNU $ac_path_FGREP
13255case `"$ac_path_FGREP" --version 2>&1` in
13256*GNU*)
13257  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13258*)
13259  ac_count=0
13260  $as_echo_n 0123456789 >"conftest.in"
13261  while :
13262  do
13263    cat "conftest.in" "conftest.in" >"conftest.tmp"
13264    mv "conftest.tmp" "conftest.in"
13265    cp "conftest.in" "conftest.nl"
13266    $as_echo 'FGREP' >> "conftest.nl"
13267    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13268    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13269    as_fn_arith $ac_count + 1 && ac_count=$as_val
13270    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13271      # Best one so far, save it but keep looking for a better one
13272      ac_cv_path_FGREP="$ac_path_FGREP"
13273      ac_path_FGREP_max=$ac_count
13274    fi
13275    # 10*(2^10) chars as input seems more than enough
13276    test $ac_count -gt 10 && break
13277  done
13278  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13279esac
13280
13281      $ac_path_FGREP_found && break 3
13282    done
13283  done
13284  done
13285IFS=$as_save_IFS
13286  if test -z "$ac_cv_path_FGREP"; then
13287    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13288  fi
13289else
13290  ac_cv_path_FGREP=$FGREP
13291fi
13292
13293   fi
13294fi
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13296$as_echo "$ac_cv_path_FGREP" >&6; }
13297 FGREP="$ac_cv_path_FGREP"
13298
13299
13300    else
13301      # If it succeeded, then it was overridden by the user. We will use it
13302      # for the tool.
13303
13304      # First remove it from the list of overridden variables, so we can test
13305      # for unknown variables in the end.
13306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13307
13308      # Check if we try to supply an empty value
13309      if test "x$FGREP" = x; then
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13311$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13313$as_echo_n "checking for FGREP... " >&6; }
13314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13315$as_echo "disabled" >&6; }
13316      else
13317        # Check if the provided tool contains a complete path.
13318        tool_specified="$FGREP"
13319        tool_basename="${tool_specified##*/}"
13320        if test "x$tool_basename" = "x$tool_specified"; then
13321          # A command without a complete path is provided, search $PATH.
13322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13323$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13324          # Extract the first word of "$tool_basename", so it can be a program name with args.
13325set dummy $tool_basename; ac_word=$2
13326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13327$as_echo_n "checking for $ac_word... " >&6; }
13328if ${ac_cv_path_FGREP+:} false; then :
13329  $as_echo_n "(cached) " >&6
13330else
13331  case $FGREP in
13332  [\\/]* | ?:[\\/]*)
13333  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13334  ;;
13335  *)
13336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13337for as_dir in $PATH
13338do
13339  IFS=$as_save_IFS
13340  test -z "$as_dir" && as_dir=.
13341    for ac_exec_ext in '' $ac_executable_extensions; do
13342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13343    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13345    break 2
13346  fi
13347done
13348  done
13349IFS=$as_save_IFS
13350
13351  ;;
13352esac
13353fi
13354FGREP=$ac_cv_path_FGREP
13355if test -n "$FGREP"; then
13356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13357$as_echo "$FGREP" >&6; }
13358else
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13360$as_echo "no" >&6; }
13361fi
13362
13363
13364          if test "x$FGREP" = x; then
13365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13366          fi
13367        else
13368          # Otherwise we believe it is a complete path. Use it as it is.
13369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13370$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13372$as_echo_n "checking for FGREP... " >&6; }
13373          if test ! -x "$tool_specified"; then
13374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13375$as_echo "not found" >&6; }
13376            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13377          fi
13378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13379$as_echo "$tool_specified" >&6; }
13380        fi
13381      fi
13382    fi
13383
13384  fi
13385
13386
13387  if test "x$FGREP" = x; then
13388    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13389  fi
13390
13391
13392
13393
13394  # Publish this variable in the help.
13395
13396
13397  if [ -z "${SED+x}" ]; then
13398    # The variable is not set by user, try to locate tool using the code snippet
13399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13400$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13401if ${ac_cv_path_SED+:} false; then :
13402  $as_echo_n "(cached) " >&6
13403else
13404            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13405     for ac_i in 1 2 3 4 5 6 7; do
13406       ac_script="$ac_script$as_nl$ac_script"
13407     done
13408     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13409     { ac_script=; unset ac_script;}
13410     if test -z "$SED"; then
13411  ac_path_SED_found=false
13412  # Loop through the user's path and test for each of PROGNAME-LIST
13413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13414for as_dir in $PATH
13415do
13416  IFS=$as_save_IFS
13417  test -z "$as_dir" && as_dir=.
13418    for ac_prog in sed gsed; do
13419    for ac_exec_ext in '' $ac_executable_extensions; do
13420      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13421      as_fn_executable_p "$ac_path_SED" || continue
13422# Check for GNU ac_path_SED and select it if it is found.
13423  # Check for GNU $ac_path_SED
13424case `"$ac_path_SED" --version 2>&1` in
13425*GNU*)
13426  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13427*)
13428  ac_count=0
13429  $as_echo_n 0123456789 >"conftest.in"
13430  while :
13431  do
13432    cat "conftest.in" "conftest.in" >"conftest.tmp"
13433    mv "conftest.tmp" "conftest.in"
13434    cp "conftest.in" "conftest.nl"
13435    $as_echo '' >> "conftest.nl"
13436    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13437    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13438    as_fn_arith $ac_count + 1 && ac_count=$as_val
13439    if test $ac_count -gt ${ac_path_SED_max-0}; then
13440      # Best one so far, save it but keep looking for a better one
13441      ac_cv_path_SED="$ac_path_SED"
13442      ac_path_SED_max=$ac_count
13443    fi
13444    # 10*(2^10) chars as input seems more than enough
13445    test $ac_count -gt 10 && break
13446  done
13447  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13448esac
13449
13450      $ac_path_SED_found && break 3
13451    done
13452  done
13453  done
13454IFS=$as_save_IFS
13455  if test -z "$ac_cv_path_SED"; then
13456    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13457  fi
13458else
13459  ac_cv_path_SED=$SED
13460fi
13461
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13464$as_echo "$ac_cv_path_SED" >&6; }
13465 SED="$ac_cv_path_SED"
13466  rm -f conftest.sed
13467
13468  else
13469    # The variable is set, but is it from the command line or the environment?
13470
13471    # Try to remove the string !SED! from our list.
13472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13474      # If it failed, the variable was not from the command line. Ignore it,
13475      # but warn the user (except for BASH, which is always set by the calling BASH).
13476      if test "xSED" != xBASH; then
13477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13478$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13479      fi
13480      # Try to locate tool using the code snippet
13481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13482$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13483if ${ac_cv_path_SED+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13487     for ac_i in 1 2 3 4 5 6 7; do
13488       ac_script="$ac_script$as_nl$ac_script"
13489     done
13490     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13491     { ac_script=; unset ac_script;}
13492     if test -z "$SED"; then
13493  ac_path_SED_found=false
13494  # Loop through the user's path and test for each of PROGNAME-LIST
13495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13496for as_dir in $PATH
13497do
13498  IFS=$as_save_IFS
13499  test -z "$as_dir" && as_dir=.
13500    for ac_prog in sed gsed; do
13501    for ac_exec_ext in '' $ac_executable_extensions; do
13502      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13503      as_fn_executable_p "$ac_path_SED" || continue
13504# Check for GNU ac_path_SED and select it if it is found.
13505  # Check for GNU $ac_path_SED
13506case `"$ac_path_SED" --version 2>&1` in
13507*GNU*)
13508  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13509*)
13510  ac_count=0
13511  $as_echo_n 0123456789 >"conftest.in"
13512  while :
13513  do
13514    cat "conftest.in" "conftest.in" >"conftest.tmp"
13515    mv "conftest.tmp" "conftest.in"
13516    cp "conftest.in" "conftest.nl"
13517    $as_echo '' >> "conftest.nl"
13518    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13519    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13520    as_fn_arith $ac_count + 1 && ac_count=$as_val
13521    if test $ac_count -gt ${ac_path_SED_max-0}; then
13522      # Best one so far, save it but keep looking for a better one
13523      ac_cv_path_SED="$ac_path_SED"
13524      ac_path_SED_max=$ac_count
13525    fi
13526    # 10*(2^10) chars as input seems more than enough
13527    test $ac_count -gt 10 && break
13528  done
13529  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13530esac
13531
13532      $ac_path_SED_found && break 3
13533    done
13534  done
13535  done
13536IFS=$as_save_IFS
13537  if test -z "$ac_cv_path_SED"; then
13538    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13539  fi
13540else
13541  ac_cv_path_SED=$SED
13542fi
13543
13544fi
13545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13546$as_echo "$ac_cv_path_SED" >&6; }
13547 SED="$ac_cv_path_SED"
13548  rm -f conftest.sed
13549
13550    else
13551      # If it succeeded, then it was overridden by the user. We will use it
13552      # for the tool.
13553
13554      # First remove it from the list of overridden variables, so we can test
13555      # for unknown variables in the end.
13556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13557
13558      # Check if we try to supply an empty value
13559      if test "x$SED" = x; then
13560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13561$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13563$as_echo_n "checking for SED... " >&6; }
13564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13565$as_echo "disabled" >&6; }
13566      else
13567        # Check if the provided tool contains a complete path.
13568        tool_specified="$SED"
13569        tool_basename="${tool_specified##*/}"
13570        if test "x$tool_basename" = "x$tool_specified"; then
13571          # A command without a complete path is provided, search $PATH.
13572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13573$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13574          # Extract the first word of "$tool_basename", so it can be a program name with args.
13575set dummy $tool_basename; ac_word=$2
13576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13577$as_echo_n "checking for $ac_word... " >&6; }
13578if ${ac_cv_path_SED+:} false; then :
13579  $as_echo_n "(cached) " >&6
13580else
13581  case $SED in
13582  [\\/]* | ?:[\\/]*)
13583  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13584  ;;
13585  *)
13586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13587for as_dir in $PATH
13588do
13589  IFS=$as_save_IFS
13590  test -z "$as_dir" && as_dir=.
13591    for ac_exec_ext in '' $ac_executable_extensions; do
13592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13593    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13595    break 2
13596  fi
13597done
13598  done
13599IFS=$as_save_IFS
13600
13601  ;;
13602esac
13603fi
13604SED=$ac_cv_path_SED
13605if test -n "$SED"; then
13606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13607$as_echo "$SED" >&6; }
13608else
13609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13610$as_echo "no" >&6; }
13611fi
13612
13613
13614          if test "x$SED" = x; then
13615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13616          fi
13617        else
13618          # Otherwise we believe it is a complete path. Use it as it is.
13619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13620$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13622$as_echo_n "checking for SED... " >&6; }
13623          if test ! -x "$tool_specified"; then
13624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13625$as_echo "not found" >&6; }
13626            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13627          fi
13628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13629$as_echo "$tool_specified" >&6; }
13630        fi
13631      fi
13632    fi
13633
13634  fi
13635
13636
13637  if test "x$SED" = x; then
13638    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13639  fi
13640
13641
13642
13643  # Always force rm.
13644  RM="$RM -f"
13645
13646  # pwd behaves differently on various platforms and some don't support the -L flag.
13647  # Always use the bash builtin pwd to get uniform behavior.
13648  THEPWDCMD=pwd
13649
13650  # These are not required on all platforms
13651
13652
13653  # Publish this variable in the help.
13654
13655
13656  if [ -z "${CYGPATH+x}" ]; then
13657    # The variable is not set by user, try to locate tool using the code snippet
13658    for ac_prog in cygpath
13659do
13660  # Extract the first word of "$ac_prog", so it can be a program name with args.
13661set dummy $ac_prog; ac_word=$2
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13663$as_echo_n "checking for $ac_word... " >&6; }
13664if ${ac_cv_path_CYGPATH+:} false; then :
13665  $as_echo_n "(cached) " >&6
13666else
13667  case $CYGPATH in
13668  [\\/]* | ?:[\\/]*)
13669  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13670  ;;
13671  *)
13672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13673for as_dir in $PATH
13674do
13675  IFS=$as_save_IFS
13676  test -z "$as_dir" && as_dir=.
13677    for ac_exec_ext in '' $ac_executable_extensions; do
13678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13679    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13681    break 2
13682  fi
13683done
13684  done
13685IFS=$as_save_IFS
13686
13687  ;;
13688esac
13689fi
13690CYGPATH=$ac_cv_path_CYGPATH
13691if test -n "$CYGPATH"; then
13692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13693$as_echo "$CYGPATH" >&6; }
13694else
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13696$as_echo "no" >&6; }
13697fi
13698
13699
13700  test -n "$CYGPATH" && break
13701done
13702
13703  else
13704    # The variable is set, but is it from the command line or the environment?
13705
13706    # Try to remove the string !CYGPATH! from our list.
13707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13709      # If it failed, the variable was not from the command line. Ignore it,
13710      # but warn the user (except for BASH, which is always set by the calling BASH).
13711      if test "xCYGPATH" != xBASH; then
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13713$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13714      fi
13715      # Try to locate tool using the code snippet
13716      for ac_prog in cygpath
13717do
13718  # Extract the first word of "$ac_prog", so it can be a program name with args.
13719set dummy $ac_prog; ac_word=$2
13720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13721$as_echo_n "checking for $ac_word... " >&6; }
13722if ${ac_cv_path_CYGPATH+:} false; then :
13723  $as_echo_n "(cached) " >&6
13724else
13725  case $CYGPATH in
13726  [\\/]* | ?:[\\/]*)
13727  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13728  ;;
13729  *)
13730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13731for as_dir in $PATH
13732do
13733  IFS=$as_save_IFS
13734  test -z "$as_dir" && as_dir=.
13735    for ac_exec_ext in '' $ac_executable_extensions; do
13736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13737    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13739    break 2
13740  fi
13741done
13742  done
13743IFS=$as_save_IFS
13744
13745  ;;
13746esac
13747fi
13748CYGPATH=$ac_cv_path_CYGPATH
13749if test -n "$CYGPATH"; then
13750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13751$as_echo "$CYGPATH" >&6; }
13752else
13753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
13755fi
13756
13757
13758  test -n "$CYGPATH" && break
13759done
13760
13761    else
13762      # If it succeeded, then it was overridden by the user. We will use it
13763      # for the tool.
13764
13765      # First remove it from the list of overridden variables, so we can test
13766      # for unknown variables in the end.
13767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13768
13769      # Check if we try to supply an empty value
13770      if test "x$CYGPATH" = x; then
13771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13772$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13774$as_echo_n "checking for CYGPATH... " >&6; }
13775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13776$as_echo "disabled" >&6; }
13777      else
13778        # Check if the provided tool contains a complete path.
13779        tool_specified="$CYGPATH"
13780        tool_basename="${tool_specified##*/}"
13781        if test "x$tool_basename" = "x$tool_specified"; then
13782          # A command without a complete path is provided, search $PATH.
13783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13784$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13785          # Extract the first word of "$tool_basename", so it can be a program name with args.
13786set dummy $tool_basename; ac_word=$2
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13788$as_echo_n "checking for $ac_word... " >&6; }
13789if ${ac_cv_path_CYGPATH+:} false; then :
13790  $as_echo_n "(cached) " >&6
13791else
13792  case $CYGPATH in
13793  [\\/]* | ?:[\\/]*)
13794  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13795  ;;
13796  *)
13797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13798for as_dir in $PATH
13799do
13800  IFS=$as_save_IFS
13801  test -z "$as_dir" && as_dir=.
13802    for ac_exec_ext in '' $ac_executable_extensions; do
13803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13804    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13806    break 2
13807  fi
13808done
13809  done
13810IFS=$as_save_IFS
13811
13812  ;;
13813esac
13814fi
13815CYGPATH=$ac_cv_path_CYGPATH
13816if test -n "$CYGPATH"; then
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13818$as_echo "$CYGPATH" >&6; }
13819else
13820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13821$as_echo "no" >&6; }
13822fi
13823
13824
13825          if test "x$CYGPATH" = x; then
13826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13827          fi
13828        else
13829          # Otherwise we believe it is a complete path. Use it as it is.
13830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13831$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13833$as_echo_n "checking for CYGPATH... " >&6; }
13834          if test ! -x "$tool_specified"; then
13835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13836$as_echo "not found" >&6; }
13837            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13838          fi
13839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13840$as_echo "$tool_specified" >&6; }
13841        fi
13842      fi
13843    fi
13844
13845  fi
13846
13847
13848
13849
13850  # Publish this variable in the help.
13851
13852
13853  if [ -z "${READLINK+x}" ]; then
13854    # The variable is not set by user, try to locate tool using the code snippet
13855    for ac_prog in greadlink readlink
13856do
13857  # Extract the first word of "$ac_prog", so it can be a program name with args.
13858set dummy $ac_prog; ac_word=$2
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13860$as_echo_n "checking for $ac_word... " >&6; }
13861if ${ac_cv_path_READLINK+:} false; then :
13862  $as_echo_n "(cached) " >&6
13863else
13864  case $READLINK in
13865  [\\/]* | ?:[\\/]*)
13866  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13867  ;;
13868  *)
13869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13870for as_dir in $PATH
13871do
13872  IFS=$as_save_IFS
13873  test -z "$as_dir" && as_dir=.
13874    for ac_exec_ext in '' $ac_executable_extensions; do
13875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13876    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13878    break 2
13879  fi
13880done
13881  done
13882IFS=$as_save_IFS
13883
13884  ;;
13885esac
13886fi
13887READLINK=$ac_cv_path_READLINK
13888if test -n "$READLINK"; then
13889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13890$as_echo "$READLINK" >&6; }
13891else
13892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13893$as_echo "no" >&6; }
13894fi
13895
13896
13897  test -n "$READLINK" && break
13898done
13899
13900  else
13901    # The variable is set, but is it from the command line or the environment?
13902
13903    # Try to remove the string !READLINK! from our list.
13904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13906      # If it failed, the variable was not from the command line. Ignore it,
13907      # but warn the user (except for BASH, which is always set by the calling BASH).
13908      if test "xREADLINK" != xBASH; then
13909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13910$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13911      fi
13912      # Try to locate tool using the code snippet
13913      for ac_prog in greadlink readlink
13914do
13915  # Extract the first word of "$ac_prog", so it can be a program name with args.
13916set dummy $ac_prog; ac_word=$2
13917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13918$as_echo_n "checking for $ac_word... " >&6; }
13919if ${ac_cv_path_READLINK+:} false; then :
13920  $as_echo_n "(cached) " >&6
13921else
13922  case $READLINK in
13923  [\\/]* | ?:[\\/]*)
13924  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13925  ;;
13926  *)
13927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13928for as_dir in $PATH
13929do
13930  IFS=$as_save_IFS
13931  test -z "$as_dir" && as_dir=.
13932    for ac_exec_ext in '' $ac_executable_extensions; do
13933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13934    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13936    break 2
13937  fi
13938done
13939  done
13940IFS=$as_save_IFS
13941
13942  ;;
13943esac
13944fi
13945READLINK=$ac_cv_path_READLINK
13946if test -n "$READLINK"; then
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13948$as_echo "$READLINK" >&6; }
13949else
13950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13951$as_echo "no" >&6; }
13952fi
13953
13954
13955  test -n "$READLINK" && break
13956done
13957
13958    else
13959      # If it succeeded, then it was overridden by the user. We will use it
13960      # for the tool.
13961
13962      # First remove it from the list of overridden variables, so we can test
13963      # for unknown variables in the end.
13964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13965
13966      # Check if we try to supply an empty value
13967      if test "x$READLINK" = x; then
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13969$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13971$as_echo_n "checking for READLINK... " >&6; }
13972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13973$as_echo "disabled" >&6; }
13974      else
13975        # Check if the provided tool contains a complete path.
13976        tool_specified="$READLINK"
13977        tool_basename="${tool_specified##*/}"
13978        if test "x$tool_basename" = "x$tool_specified"; then
13979          # A command without a complete path is provided, search $PATH.
13980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13981$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13982          # Extract the first word of "$tool_basename", so it can be a program name with args.
13983set dummy $tool_basename; ac_word=$2
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13985$as_echo_n "checking for $ac_word... " >&6; }
13986if ${ac_cv_path_READLINK+:} false; then :
13987  $as_echo_n "(cached) " >&6
13988else
13989  case $READLINK in
13990  [\\/]* | ?:[\\/]*)
13991  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13992  ;;
13993  *)
13994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13995for as_dir in $PATH
13996do
13997  IFS=$as_save_IFS
13998  test -z "$as_dir" && as_dir=.
13999    for ac_exec_ext in '' $ac_executable_extensions; do
14000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14001    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14003    break 2
14004  fi
14005done
14006  done
14007IFS=$as_save_IFS
14008
14009  ;;
14010esac
14011fi
14012READLINK=$ac_cv_path_READLINK
14013if test -n "$READLINK"; then
14014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14015$as_echo "$READLINK" >&6; }
14016else
14017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14018$as_echo "no" >&6; }
14019fi
14020
14021
14022          if test "x$READLINK" = x; then
14023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14024          fi
14025        else
14026          # Otherwise we believe it is a complete path. Use it as it is.
14027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14028$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14030$as_echo_n "checking for READLINK... " >&6; }
14031          if test ! -x "$tool_specified"; then
14032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14033$as_echo "not found" >&6; }
14034            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14035          fi
14036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14037$as_echo "$tool_specified" >&6; }
14038        fi
14039      fi
14040    fi
14041
14042  fi
14043
14044
14045
14046
14047  # Publish this variable in the help.
14048
14049
14050  if [ -z "${DF+x}" ]; then
14051    # The variable is not set by user, try to locate tool using the code snippet
14052    for ac_prog in df
14053do
14054  # Extract the first word of "$ac_prog", so it can be a program name with args.
14055set dummy $ac_prog; ac_word=$2
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14057$as_echo_n "checking for $ac_word... " >&6; }
14058if ${ac_cv_path_DF+:} false; then :
14059  $as_echo_n "(cached) " >&6
14060else
14061  case $DF in
14062  [\\/]* | ?:[\\/]*)
14063  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14064  ;;
14065  *)
14066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14067for as_dir in $PATH
14068do
14069  IFS=$as_save_IFS
14070  test -z "$as_dir" && as_dir=.
14071    for ac_exec_ext in '' $ac_executable_extensions; do
14072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14073    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14075    break 2
14076  fi
14077done
14078  done
14079IFS=$as_save_IFS
14080
14081  ;;
14082esac
14083fi
14084DF=$ac_cv_path_DF
14085if test -n "$DF"; then
14086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14087$as_echo "$DF" >&6; }
14088else
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14090$as_echo "no" >&6; }
14091fi
14092
14093
14094  test -n "$DF" && break
14095done
14096
14097  else
14098    # The variable is set, but is it from the command line or the environment?
14099
14100    # Try to remove the string !DF! from our list.
14101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14103      # If it failed, the variable was not from the command line. Ignore it,
14104      # but warn the user (except for BASH, which is always set by the calling BASH).
14105      if test "xDF" != xBASH; then
14106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14107$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14108      fi
14109      # Try to locate tool using the code snippet
14110      for ac_prog in df
14111do
14112  # Extract the first word of "$ac_prog", so it can be a program name with args.
14113set dummy $ac_prog; ac_word=$2
14114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14115$as_echo_n "checking for $ac_word... " >&6; }
14116if ${ac_cv_path_DF+:} false; then :
14117  $as_echo_n "(cached) " >&6
14118else
14119  case $DF in
14120  [\\/]* | ?:[\\/]*)
14121  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14122  ;;
14123  *)
14124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14125for as_dir in $PATH
14126do
14127  IFS=$as_save_IFS
14128  test -z "$as_dir" && as_dir=.
14129    for ac_exec_ext in '' $ac_executable_extensions; do
14130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14131    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14133    break 2
14134  fi
14135done
14136  done
14137IFS=$as_save_IFS
14138
14139  ;;
14140esac
14141fi
14142DF=$ac_cv_path_DF
14143if test -n "$DF"; then
14144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14145$as_echo "$DF" >&6; }
14146else
14147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14148$as_echo "no" >&6; }
14149fi
14150
14151
14152  test -n "$DF" && break
14153done
14154
14155    else
14156      # If it succeeded, then it was overridden by the user. We will use it
14157      # for the tool.
14158
14159      # First remove it from the list of overridden variables, so we can test
14160      # for unknown variables in the end.
14161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14162
14163      # Check if we try to supply an empty value
14164      if test "x$DF" = x; then
14165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14166$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14168$as_echo_n "checking for DF... " >&6; }
14169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14170$as_echo "disabled" >&6; }
14171      else
14172        # Check if the provided tool contains a complete path.
14173        tool_specified="$DF"
14174        tool_basename="${tool_specified##*/}"
14175        if test "x$tool_basename" = "x$tool_specified"; then
14176          # A command without a complete path is provided, search $PATH.
14177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14178$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14179          # Extract the first word of "$tool_basename", so it can be a program name with args.
14180set dummy $tool_basename; ac_word=$2
14181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14182$as_echo_n "checking for $ac_word... " >&6; }
14183if ${ac_cv_path_DF+:} false; then :
14184  $as_echo_n "(cached) " >&6
14185else
14186  case $DF in
14187  [\\/]* | ?:[\\/]*)
14188  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14189  ;;
14190  *)
14191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14192for as_dir in $PATH
14193do
14194  IFS=$as_save_IFS
14195  test -z "$as_dir" && as_dir=.
14196    for ac_exec_ext in '' $ac_executable_extensions; do
14197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14198    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14200    break 2
14201  fi
14202done
14203  done
14204IFS=$as_save_IFS
14205
14206  ;;
14207esac
14208fi
14209DF=$ac_cv_path_DF
14210if test -n "$DF"; then
14211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14212$as_echo "$DF" >&6; }
14213else
14214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14215$as_echo "no" >&6; }
14216fi
14217
14218
14219          if test "x$DF" = x; then
14220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14221          fi
14222        else
14223          # Otherwise we believe it is a complete path. Use it as it is.
14224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14225$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14227$as_echo_n "checking for DF... " >&6; }
14228          if test ! -x "$tool_specified"; then
14229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14230$as_echo "not found" >&6; }
14231            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14232          fi
14233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14234$as_echo "$tool_specified" >&6; }
14235        fi
14236      fi
14237    fi
14238
14239  fi
14240
14241
14242
14243
14244  # Publish this variable in the help.
14245
14246
14247  if [ -z "${CPIO+x}" ]; then
14248    # The variable is not set by user, try to locate tool using the code snippet
14249    for ac_prog in cpio bsdcpio
14250do
14251  # Extract the first word of "$ac_prog", so it can be a program name with args.
14252set dummy $ac_prog; ac_word=$2
14253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14254$as_echo_n "checking for $ac_word... " >&6; }
14255if ${ac_cv_path_CPIO+:} false; then :
14256  $as_echo_n "(cached) " >&6
14257else
14258  case $CPIO in
14259  [\\/]* | ?:[\\/]*)
14260  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14261  ;;
14262  *)
14263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14264for as_dir in $PATH
14265do
14266  IFS=$as_save_IFS
14267  test -z "$as_dir" && as_dir=.
14268    for ac_exec_ext in '' $ac_executable_extensions; do
14269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14270    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14272    break 2
14273  fi
14274done
14275  done
14276IFS=$as_save_IFS
14277
14278  ;;
14279esac
14280fi
14281CPIO=$ac_cv_path_CPIO
14282if test -n "$CPIO"; then
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14284$as_echo "$CPIO" >&6; }
14285else
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14287$as_echo "no" >&6; }
14288fi
14289
14290
14291  test -n "$CPIO" && break
14292done
14293
14294  else
14295    # The variable is set, but is it from the command line or the environment?
14296
14297    # Try to remove the string !CPIO! from our list.
14298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14300      # If it failed, the variable was not from the command line. Ignore it,
14301      # but warn the user (except for BASH, which is always set by the calling BASH).
14302      if test "xCPIO" != xBASH; then
14303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14304$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14305      fi
14306      # Try to locate tool using the code snippet
14307      for ac_prog in cpio bsdcpio
14308do
14309  # Extract the first word of "$ac_prog", so it can be a program name with args.
14310set dummy $ac_prog; ac_word=$2
14311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14312$as_echo_n "checking for $ac_word... " >&6; }
14313if ${ac_cv_path_CPIO+:} false; then :
14314  $as_echo_n "(cached) " >&6
14315else
14316  case $CPIO in
14317  [\\/]* | ?:[\\/]*)
14318  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14319  ;;
14320  *)
14321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14322for as_dir in $PATH
14323do
14324  IFS=$as_save_IFS
14325  test -z "$as_dir" && as_dir=.
14326    for ac_exec_ext in '' $ac_executable_extensions; do
14327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14328    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14330    break 2
14331  fi
14332done
14333  done
14334IFS=$as_save_IFS
14335
14336  ;;
14337esac
14338fi
14339CPIO=$ac_cv_path_CPIO
14340if test -n "$CPIO"; then
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14342$as_echo "$CPIO" >&6; }
14343else
14344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14345$as_echo "no" >&6; }
14346fi
14347
14348
14349  test -n "$CPIO" && break
14350done
14351
14352    else
14353      # If it succeeded, then it was overridden by the user. We will use it
14354      # for the tool.
14355
14356      # First remove it from the list of overridden variables, so we can test
14357      # for unknown variables in the end.
14358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14359
14360      # Check if we try to supply an empty value
14361      if test "x$CPIO" = x; then
14362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14363$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14365$as_echo_n "checking for CPIO... " >&6; }
14366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14367$as_echo "disabled" >&6; }
14368      else
14369        # Check if the provided tool contains a complete path.
14370        tool_specified="$CPIO"
14371        tool_basename="${tool_specified##*/}"
14372        if test "x$tool_basename" = "x$tool_specified"; then
14373          # A command without a complete path is provided, search $PATH.
14374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14375$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14376          # Extract the first word of "$tool_basename", so it can be a program name with args.
14377set dummy $tool_basename; ac_word=$2
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14379$as_echo_n "checking for $ac_word... " >&6; }
14380if ${ac_cv_path_CPIO+:} false; then :
14381  $as_echo_n "(cached) " >&6
14382else
14383  case $CPIO in
14384  [\\/]* | ?:[\\/]*)
14385  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14386  ;;
14387  *)
14388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14389for as_dir in $PATH
14390do
14391  IFS=$as_save_IFS
14392  test -z "$as_dir" && as_dir=.
14393    for ac_exec_ext in '' $ac_executable_extensions; do
14394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14395    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14397    break 2
14398  fi
14399done
14400  done
14401IFS=$as_save_IFS
14402
14403  ;;
14404esac
14405fi
14406CPIO=$ac_cv_path_CPIO
14407if test -n "$CPIO"; then
14408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14409$as_echo "$CPIO" >&6; }
14410else
14411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14412$as_echo "no" >&6; }
14413fi
14414
14415
14416          if test "x$CPIO" = x; then
14417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14418          fi
14419        else
14420          # Otherwise we believe it is a complete path. Use it as it is.
14421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14422$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14424$as_echo_n "checking for CPIO... " >&6; }
14425          if test ! -x "$tool_specified"; then
14426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14427$as_echo "not found" >&6; }
14428            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14429          fi
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14431$as_echo "$tool_specified" >&6; }
14432        fi
14433      fi
14434    fi
14435
14436  fi
14437
14438
14439
14440
14441  # Publish this variable in the help.
14442
14443
14444  if [ -z "${NICE+x}" ]; then
14445    # The variable is not set by user, try to locate tool using the code snippet
14446    for ac_prog in nice
14447do
14448  # Extract the first word of "$ac_prog", so it can be a program name with args.
14449set dummy $ac_prog; ac_word=$2
14450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14451$as_echo_n "checking for $ac_word... " >&6; }
14452if ${ac_cv_path_NICE+:} false; then :
14453  $as_echo_n "(cached) " >&6
14454else
14455  case $NICE in
14456  [\\/]* | ?:[\\/]*)
14457  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14458  ;;
14459  *)
14460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14461for as_dir in $PATH
14462do
14463  IFS=$as_save_IFS
14464  test -z "$as_dir" && as_dir=.
14465    for ac_exec_ext in '' $ac_executable_extensions; do
14466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14467    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14469    break 2
14470  fi
14471done
14472  done
14473IFS=$as_save_IFS
14474
14475  ;;
14476esac
14477fi
14478NICE=$ac_cv_path_NICE
14479if test -n "$NICE"; then
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14481$as_echo "$NICE" >&6; }
14482else
14483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14484$as_echo "no" >&6; }
14485fi
14486
14487
14488  test -n "$NICE" && break
14489done
14490
14491  else
14492    # The variable is set, but is it from the command line or the environment?
14493
14494    # Try to remove the string !NICE! from our list.
14495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14497      # If it failed, the variable was not from the command line. Ignore it,
14498      # but warn the user (except for BASH, which is always set by the calling BASH).
14499      if test "xNICE" != xBASH; then
14500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14501$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14502      fi
14503      # Try to locate tool using the code snippet
14504      for ac_prog in nice
14505do
14506  # Extract the first word of "$ac_prog", so it can be a program name with args.
14507set dummy $ac_prog; ac_word=$2
14508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14509$as_echo_n "checking for $ac_word... " >&6; }
14510if ${ac_cv_path_NICE+:} false; then :
14511  $as_echo_n "(cached) " >&6
14512else
14513  case $NICE in
14514  [\\/]* | ?:[\\/]*)
14515  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14516  ;;
14517  *)
14518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14519for as_dir in $PATH
14520do
14521  IFS=$as_save_IFS
14522  test -z "$as_dir" && as_dir=.
14523    for ac_exec_ext in '' $ac_executable_extensions; do
14524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14525    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14527    break 2
14528  fi
14529done
14530  done
14531IFS=$as_save_IFS
14532
14533  ;;
14534esac
14535fi
14536NICE=$ac_cv_path_NICE
14537if test -n "$NICE"; then
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14539$as_echo "$NICE" >&6; }
14540else
14541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14542$as_echo "no" >&6; }
14543fi
14544
14545
14546  test -n "$NICE" && break
14547done
14548
14549    else
14550      # If it succeeded, then it was overridden by the user. We will use it
14551      # for the tool.
14552
14553      # First remove it from the list of overridden variables, so we can test
14554      # for unknown variables in the end.
14555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14556
14557      # Check if we try to supply an empty value
14558      if test "x$NICE" = x; then
14559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14560$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14562$as_echo_n "checking for NICE... " >&6; }
14563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14564$as_echo "disabled" >&6; }
14565      else
14566        # Check if the provided tool contains a complete path.
14567        tool_specified="$NICE"
14568        tool_basename="${tool_specified##*/}"
14569        if test "x$tool_basename" = "x$tool_specified"; then
14570          # A command without a complete path is provided, search $PATH.
14571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14572$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14573          # Extract the first word of "$tool_basename", so it can be a program name with args.
14574set dummy $tool_basename; ac_word=$2
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14576$as_echo_n "checking for $ac_word... " >&6; }
14577if ${ac_cv_path_NICE+:} false; then :
14578  $as_echo_n "(cached) " >&6
14579else
14580  case $NICE in
14581  [\\/]* | ?:[\\/]*)
14582  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14583  ;;
14584  *)
14585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14586for as_dir in $PATH
14587do
14588  IFS=$as_save_IFS
14589  test -z "$as_dir" && as_dir=.
14590    for ac_exec_ext in '' $ac_executable_extensions; do
14591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14592    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14594    break 2
14595  fi
14596done
14597  done
14598IFS=$as_save_IFS
14599
14600  ;;
14601esac
14602fi
14603NICE=$ac_cv_path_NICE
14604if test -n "$NICE"; then
14605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14606$as_echo "$NICE" >&6; }
14607else
14608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14609$as_echo "no" >&6; }
14610fi
14611
14612
14613          if test "x$NICE" = x; then
14614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14615          fi
14616        else
14617          # Otherwise we believe it is a complete path. Use it as it is.
14618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14619$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14621$as_echo_n "checking for NICE... " >&6; }
14622          if test ! -x "$tool_specified"; then
14623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14624$as_echo "not found" >&6; }
14625            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14626          fi
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14628$as_echo "$tool_specified" >&6; }
14629        fi
14630      fi
14631    fi
14632
14633  fi
14634
14635
14636
14637
14638# Now we can determine OpenJDK build and target platforms. This is required to
14639# have early on.
14640# Make sure we can run config.sub.
14641$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14642  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14643
14644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14645$as_echo_n "checking build system type... " >&6; }
14646if ${ac_cv_build+:} false; then :
14647  $as_echo_n "(cached) " >&6
14648else
14649  ac_build_alias=$build_alias
14650test "x$ac_build_alias" = x &&
14651  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14652test "x$ac_build_alias" = x &&
14653  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14654ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14655  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14656
14657fi
14658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14659$as_echo "$ac_cv_build" >&6; }
14660case $ac_cv_build in
14661*-*-*) ;;
14662*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14663esac
14664build=$ac_cv_build
14665ac_save_IFS=$IFS; IFS='-'
14666set x $ac_cv_build
14667shift
14668build_cpu=$1
14669build_vendor=$2
14670shift; shift
14671# Remember, the first character of IFS is used to create $*,
14672# except with old shells:
14673build_os=$*
14674IFS=$ac_save_IFS
14675case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14676
14677
14678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14679$as_echo_n "checking host system type... " >&6; }
14680if ${ac_cv_host+:} false; then :
14681  $as_echo_n "(cached) " >&6
14682else
14683  if test "x$host_alias" = x; then
14684  ac_cv_host=$ac_cv_build
14685else
14686  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14687    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14688fi
14689
14690fi
14691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14692$as_echo "$ac_cv_host" >&6; }
14693case $ac_cv_host in
14694*-*-*) ;;
14695*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14696esac
14697host=$ac_cv_host
14698ac_save_IFS=$IFS; IFS='-'
14699set x $ac_cv_host
14700shift
14701host_cpu=$1
14702host_vendor=$2
14703shift; shift
14704# Remember, the first character of IFS is used to create $*,
14705# except with old shells:
14706host_os=$*
14707IFS=$ac_save_IFS
14708case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14709
14710
14711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14712$as_echo_n "checking target system type... " >&6; }
14713if ${ac_cv_target+:} false; then :
14714  $as_echo_n "(cached) " >&6
14715else
14716  if test "x$target_alias" = x; then
14717  ac_cv_target=$ac_cv_host
14718else
14719  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14720    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14721fi
14722
14723fi
14724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14725$as_echo "$ac_cv_target" >&6; }
14726case $ac_cv_target in
14727*-*-*) ;;
14728*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14729esac
14730target=$ac_cv_target
14731ac_save_IFS=$IFS; IFS='-'
14732set x $ac_cv_target
14733shift
14734target_cpu=$1
14735target_vendor=$2
14736shift; shift
14737# Remember, the first character of IFS is used to create $*,
14738# except with old shells:
14739target_os=$*
14740IFS=$ac_save_IFS
14741case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14742
14743
14744# The aliases save the names the user supplied, while $host etc.
14745# will get canonicalized.
14746test -n "$target_alias" &&
14747  test "$program_prefix$program_suffix$program_transform_name" = \
14748    NONENONEs,x,x, &&
14749  program_prefix=${target_alias}-
14750
14751  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14752  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14753  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14754  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14755  # to use the configure naming style.
14756
14757
14758
14759
14760
14761  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14762  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14763  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14764  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14765  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14766  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14767
14768
14769
14770  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14771
14772  case "$build_os" in
14773    *linux*)
14774      VAR_OS=linux
14775      VAR_OS_TYPE=unix
14776      ;;
14777    *solaris*)
14778      VAR_OS=solaris
14779      VAR_OS_TYPE=unix
14780      ;;
14781    *darwin*)
14782      VAR_OS=macosx
14783      VAR_OS_TYPE=unix
14784      ;;
14785    *bsd*)
14786      VAR_OS=bsd
14787      VAR_OS_TYPE=unix
14788      ;;
14789    *cygwin*)
14790      VAR_OS=windows
14791      VAR_OS_ENV=windows.cygwin
14792      ;;
14793    *mingw*)
14794      VAR_OS=windows
14795      VAR_OS_ENV=windows.msys
14796      ;;
14797    *aix*)
14798      VAR_OS=aix
14799      VAR_OS_TYPE=unix
14800      ;;
14801    *)
14802      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14803      ;;
14804  esac
14805
14806
14807  # First argument is the cpu name from the trip/quad
14808  case "$build_cpu" in
14809    x86_64)
14810      VAR_CPU=x86_64
14811      VAR_CPU_ARCH=x86
14812      VAR_CPU_BITS=64
14813      VAR_CPU_ENDIAN=little
14814      ;;
14815    i?86)
14816      VAR_CPU=x86
14817      VAR_CPU_ARCH=x86
14818      VAR_CPU_BITS=32
14819      VAR_CPU_ENDIAN=little
14820      ;;
14821    arm*)
14822      VAR_CPU=arm
14823      VAR_CPU_ARCH=arm
14824      VAR_CPU_BITS=32
14825      VAR_CPU_ENDIAN=little
14826      ;;
14827    aarch64)
14828      VAR_CPU=aarch64
14829      VAR_CPU_ARCH=aarch64
14830      VAR_CPU_BITS=64
14831      VAR_CPU_ENDIAN=little
14832      ;;
14833    powerpc)
14834      VAR_CPU=ppc
14835      VAR_CPU_ARCH=ppc
14836      VAR_CPU_BITS=32
14837      VAR_CPU_ENDIAN=big
14838      ;;
14839    powerpc64)
14840      VAR_CPU=ppc64
14841      VAR_CPU_ARCH=ppc
14842      VAR_CPU_BITS=64
14843      VAR_CPU_ENDIAN=big
14844      ;;
14845    powerpc64le)
14846      VAR_CPU=ppc64le
14847      VAR_CPU_ARCH=ppc
14848      VAR_CPU_BITS=64
14849      VAR_CPU_ENDIAN=little
14850      ;;
14851    s390)
14852      VAR_CPU=s390
14853      VAR_CPU_ARCH=s390
14854      VAR_CPU_BITS=32
14855      VAR_CPU_ENDIAN=big
14856      ;;
14857    s390x)
14858      VAR_CPU=s390x
14859      VAR_CPU_ARCH=s390
14860      VAR_CPU_BITS=64
14861      VAR_CPU_ENDIAN=big
14862      ;;
14863    sparc)
14864      VAR_CPU=sparc
14865      VAR_CPU_ARCH=sparc
14866      VAR_CPU_BITS=32
14867      VAR_CPU_ENDIAN=big
14868      ;;
14869    sparcv9|sparc64)
14870      VAR_CPU=sparcv9
14871      VAR_CPU_ARCH=sparc
14872      VAR_CPU_BITS=64
14873      VAR_CPU_ENDIAN=big
14874      ;;
14875    *)
14876      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14877      ;;
14878  esac
14879
14880  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14881  OPENJDK_BUILD_OS="$VAR_OS"
14882  if test "x$VAR_OS_TYPE" != x; then
14883    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14884  else
14885    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14886  fi
14887  if test "x$VAR_OS_ENV" != x; then
14888    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14889  else
14890    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14891  fi
14892  OPENJDK_BUILD_CPU="$VAR_CPU"
14893  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14894  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14895  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14896
14897
14898
14899
14900
14901
14902
14903
14904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14905$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14907$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14908
14909  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14910
14911  case "$host_os" in
14912    *linux*)
14913      VAR_OS=linux
14914      VAR_OS_TYPE=unix
14915      ;;
14916    *solaris*)
14917      VAR_OS=solaris
14918      VAR_OS_TYPE=unix
14919      ;;
14920    *darwin*)
14921      VAR_OS=macosx
14922      VAR_OS_TYPE=unix
14923      ;;
14924    *bsd*)
14925      VAR_OS=bsd
14926      VAR_OS_TYPE=unix
14927      ;;
14928    *cygwin*)
14929      VAR_OS=windows
14930      VAR_OS_ENV=windows.cygwin
14931      ;;
14932    *mingw*)
14933      VAR_OS=windows
14934      VAR_OS_ENV=windows.msys
14935      ;;
14936    *aix*)
14937      VAR_OS=aix
14938      VAR_OS_TYPE=unix
14939      ;;
14940    *)
14941      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14942      ;;
14943  esac
14944
14945
14946  # First argument is the cpu name from the trip/quad
14947  case "$host_cpu" in
14948    x86_64)
14949      VAR_CPU=x86_64
14950      VAR_CPU_ARCH=x86
14951      VAR_CPU_BITS=64
14952      VAR_CPU_ENDIAN=little
14953      ;;
14954    i?86)
14955      VAR_CPU=x86
14956      VAR_CPU_ARCH=x86
14957      VAR_CPU_BITS=32
14958      VAR_CPU_ENDIAN=little
14959      ;;
14960    arm*)
14961      VAR_CPU=arm
14962      VAR_CPU_ARCH=arm
14963      VAR_CPU_BITS=32
14964      VAR_CPU_ENDIAN=little
14965      ;;
14966    aarch64)
14967      VAR_CPU=aarch64
14968      VAR_CPU_ARCH=aarch64
14969      VAR_CPU_BITS=64
14970      VAR_CPU_ENDIAN=little
14971      ;;
14972    powerpc)
14973      VAR_CPU=ppc
14974      VAR_CPU_ARCH=ppc
14975      VAR_CPU_BITS=32
14976      VAR_CPU_ENDIAN=big
14977      ;;
14978    powerpc64)
14979      VAR_CPU=ppc64
14980      VAR_CPU_ARCH=ppc
14981      VAR_CPU_BITS=64
14982      VAR_CPU_ENDIAN=big
14983      ;;
14984    powerpc64le)
14985      VAR_CPU=ppc64le
14986      VAR_CPU_ARCH=ppc
14987      VAR_CPU_BITS=64
14988      VAR_CPU_ENDIAN=little
14989      ;;
14990    s390)
14991      VAR_CPU=s390
14992      VAR_CPU_ARCH=s390
14993      VAR_CPU_BITS=32
14994      VAR_CPU_ENDIAN=big
14995      ;;
14996    s390x)
14997      VAR_CPU=s390x
14998      VAR_CPU_ARCH=s390
14999      VAR_CPU_BITS=64
15000      VAR_CPU_ENDIAN=big
15001      ;;
15002    sparc)
15003      VAR_CPU=sparc
15004      VAR_CPU_ARCH=sparc
15005      VAR_CPU_BITS=32
15006      VAR_CPU_ENDIAN=big
15007      ;;
15008    sparcv9|sparc64)
15009      VAR_CPU=sparcv9
15010      VAR_CPU_ARCH=sparc
15011      VAR_CPU_BITS=64
15012      VAR_CPU_ENDIAN=big
15013      ;;
15014    *)
15015      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15016      ;;
15017  esac
15018
15019  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15020  OPENJDK_TARGET_OS="$VAR_OS"
15021  if test "x$VAR_OS_TYPE" != x; then
15022    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15023  else
15024    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15025  fi
15026  if test "x$VAR_OS_ENV" != x; then
15027    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15028  else
15029    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15030  fi
15031  OPENJDK_TARGET_CPU="$VAR_CPU"
15032  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15033  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15034  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15035
15036
15037
15038
15039
15040
15041
15042
15043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15044$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15046$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15047
15048
15049
15050# Check whether --with-target-bits was given.
15051if test "${with_target_bits+set}" = set; then :
15052  withval=$with_target_bits;
15053fi
15054
15055
15056  # We have three types of compiles:
15057  # native  == normal compilation, target system == build system
15058  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15059  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15060  #
15061  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15062    # We're doing a proper cross-compilation
15063    COMPILE_TYPE="cross"
15064  else
15065    COMPILE_TYPE="native"
15066  fi
15067
15068  if test "x$with_target_bits" != x; then
15069    if test "x$COMPILE_TYPE" = "xcross"; then
15070      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15071    fi
15072
15073    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15074      # A reduced build is requested
15075      COMPILE_TYPE="reduced"
15076      OPENJDK_TARGET_CPU_BITS=32
15077      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15078        OPENJDK_TARGET_CPU=x86
15079      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15080        OPENJDK_TARGET_CPU=sparc
15081      else
15082        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15083      fi
15084    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15085      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
15086    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15087      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15088$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15089    else
15090      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15091    fi
15092  fi
15093
15094
15095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15096$as_echo_n "checking compilation type... " >&6; }
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15098$as_echo "$COMPILE_TYPE" >&6; }
15099
15100
15101  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15102    REQUIRED_OS_NAME=SunOS
15103    REQUIRED_OS_VERSION=5.10
15104  fi
15105  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15106    REQUIRED_OS_NAME=Linux
15107    REQUIRED_OS_VERSION=2.6
15108  fi
15109  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15110    REQUIRED_OS_NAME=Windows
15111    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15112      REQUIRED_OS_VERSION=5.2
15113    else
15114      REQUIRED_OS_VERSION=5.1
15115    fi
15116  fi
15117  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15118    REQUIRED_OS_NAME=Darwin
15119    REQUIRED_OS_VERSION=11.2
15120  fi
15121  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15122    REQUIRED_OS_NAME=AIX
15123    REQUIRED_OS_VERSION=7.1
15124  fi
15125
15126
15127
15128
15129
15130  # Also store the legacy naming of the cpu.
15131  # Ie i586 and amd64 instead of x86 and x86_64
15132  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15133  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15134    OPENJDK_TARGET_CPU_LEGACY="i586"
15135  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15136    # On all platforms except MacOSX replace x86_64 with amd64.
15137    OPENJDK_TARGET_CPU_LEGACY="amd64"
15138  fi
15139
15140
15141  # And the second legacy naming of the cpu.
15142  # Ie i386 and amd64 instead of x86 and x86_64.
15143  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15144  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15145    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15146  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15147    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15148  fi
15149
15150
15151  # This is the name of the cpu (but using i386 and amd64 instead of
15152  # x86 and x86_64, respectively), preceeded by a /, to be used when
15153  # locating libraries. On macosx, it's empty, though.
15154  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15155  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15156    OPENJDK_TARGET_CPU_LIBDIR=""
15157  fi
15158
15159
15160  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15161  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15162  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15163  OPENJDK_TARGET_CPU_ISADIR=""
15164  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15165    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15166      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15167    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15168      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15169    fi
15170  fi
15171
15172
15173  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15174  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15175  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15176    # On linux only, we replace x86 with i386.
15177    OPENJDK_TARGET_CPU_OSARCH="i386"
15178  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15179    # On all platforms except macosx, we replace x86_64 with amd64.
15180    OPENJDK_TARGET_CPU_OSARCH="amd64"
15181  fi
15182
15183
15184  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15185  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15186    OPENJDK_TARGET_CPU_JLI="i386"
15187  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15188    # On all platforms except macosx, we replace x86_64 with amd64.
15189    OPENJDK_TARGET_CPU_JLI="amd64"
15190  fi
15191  # Now setup the -D flags for building libjli.
15192  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15193  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15194    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15195      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15196    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15197      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15198    fi
15199  fi
15200
15201
15202  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15203      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15204  else
15205      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15206  fi
15207
15208
15209  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15210    A_LP64="LP64:="
15211    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15212    # unpack200.exe
15213    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15214      ADD_LP64="-D_LP64=1"
15215    fi
15216  fi
15217  LP64=$A_LP64
15218
15219
15220  if test "x$COMPILE_TYPE" = "xcross"; then
15221    # FIXME: ... or should this include reduced builds..?
15222    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15223  else
15224    DEFINE_CROSS_COMPILE_ARCH=""
15225  fi
15226
15227
15228  # ZERO_ARCHDEF is used to enable architecture-specific code
15229  case "${OPENJDK_TARGET_CPU}" in
15230    ppc)     ZERO_ARCHDEF=PPC32 ;;
15231    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15232    s390*)   ZERO_ARCHDEF=S390  ;;
15233    sparc*)  ZERO_ARCHDEF=SPARC ;;
15234    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15235    x86)     ZERO_ARCHDEF=IA32  ;;
15236    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15237  esac
15238
15239
15240
15241
15242# Continue setting up basic stuff. Most remaining code require fundamental tools.
15243
15244  # Save the current directory this script was started from
15245  CURDIR="$PWD"
15246
15247  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15248  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15249  # was not available at that time.
15250  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15251  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15252    ORIGINAL_PATH="$REWRITTEN_PATH"
15253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15254$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15255  fi
15256
15257  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15258    PATH_SEP=";"
15259
15260  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15261  if test $SRC_ROOT_LENGTH -gt 100; then
15262    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15263  fi
15264
15265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15267$as_echo_n "checking cygwin release... " >&6; }
15268    CYGWIN_VERSION=`$UNAME -r`
15269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15270$as_echo "$CYGWIN_VERSION" >&6; }
15271    WINDOWS_ENV_VENDOR='cygwin'
15272    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15273
15274    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15275    if test "x$CYGWIN_VERSION_OLD" != x; then
15276      { $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
15277$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;}
15278      as_fn_error $? "Cannot continue" "$LINENO" 5
15279    fi
15280    if test "x$CYGPATH" = x; then
15281      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15282    fi
15283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15284$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15285    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15286    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15287    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15288    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15290$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15291    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15292    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15293    if test "x$test_cygdrive_prefix" = x; then
15294      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15295    fi
15296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15298$as_echo_n "checking msys release... " >&6; }
15299    MSYS_VERSION=`$UNAME -r`
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15301$as_echo "$MSYS_VERSION" >&6; }
15302
15303    WINDOWS_ENV_VENDOR='msys'
15304    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15305
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15307$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15308    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15309    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15310
15311  windows_path="$MSYS_ROOT_PATH"
15312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15313    unix_path=`$CYGPATH -u "$windows_path"`
15314    MSYS_ROOT_PATH="$unix_path"
15315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15317    MSYS_ROOT_PATH="$unix_path"
15318  fi
15319
15320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15321$as_echo "$MSYS_ROOT_PATH" >&6; }
15322    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15323  else
15324    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15325  fi
15326
15327  # Test if windows or unix (cygwin/msys) find is first in path.
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15329$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15330  FIND_BINARY_OUTPUT=`find --version 2>&1`
15331  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15333$as_echo "unix style" >&6; }
15334  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15336$as_echo "Windows" >&6; }
15337    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15338$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15339    { $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
15340$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15341    as_fn_error $? "Cannot continue" "$LINENO" 5
15342  else
15343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15344$as_echo "unknown" >&6; }
15345    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15346$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15347  fi
15348
15349  else
15350    PATH_SEP=":"
15351  fi
15352
15353
15354  # We get the top-level directory from the supporting wrappers.
15355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15356$as_echo_n "checking for top-level directory... " >&6; }
15357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15358$as_echo "$TOPDIR" >&6; }
15359
15360
15361  # Save the original version of TOPDIR for string comparisons
15362  ORIGINAL_TOPDIR="$TOPDIR"
15363
15364
15365  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15366
15367  # Only process if variable expands to non-empty
15368
15369  if test "x$CURDIR" != x; then
15370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15371
15372  # Input might be given as Windows format, start by converting to
15373  # unix format.
15374  path="$CURDIR"
15375  new_path=`$CYGPATH -u "$path"`
15376
15377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15380  # "foo.exe" is OK but "foo" is an error.
15381  #
15382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15383  # It is also a way to make sure we got the proper file name for the real test later on.
15384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15385  if test "x$test_shortpath" = x; then
15386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15387$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15388    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15389  fi
15390
15391  # Call helper function which possibly converts this using DOS-style short mode.
15392  # If so, the updated path is stored in $new_path.
15393
15394  input_path="$new_path"
15395  # Check if we need to convert this using DOS-style short mode. If the path
15396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15397  # take no chances and rewrite it.
15398  # Note: m4 eats our [], so we need to use [ and ] instead.
15399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15400  if test "x$has_forbidden_chars" != x; then
15401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15405      # Going to short mode and back again did indeed matter. Since short mode is
15406      # case insensitive, let's make it lowercase to improve readability.
15407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15408      # Now convert it back to Unix-style (cygpath)
15409      input_path=`$CYGPATH -u "$shortmode_path"`
15410      new_path="$input_path"
15411    fi
15412  fi
15413
15414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15415  if test "x$test_cygdrive_prefix" = x; then
15416    # As a simple fix, exclude /usr/bin since it's not a real path.
15417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15419      # a path prefixed by /cygdrive for fixpath to work.
15420      new_path="$CYGWIN_ROOT_PATH$input_path"
15421    fi
15422  fi
15423
15424
15425  if test "x$path" != "x$new_path"; then
15426    CURDIR="$new_path"
15427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15428$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15429  fi
15430
15431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15432
15433  path="$CURDIR"
15434  has_colon=`$ECHO $path | $GREP ^.:`
15435  new_path="$path"
15436  if test "x$has_colon" = x; then
15437    # Not in mixed or Windows style, start by that.
15438    new_path=`cmd //c echo $path`
15439  fi
15440
15441
15442  input_path="$new_path"
15443  # Check if we need to convert this using DOS-style short mode. If the path
15444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15445  # take no chances and rewrite it.
15446  # Note: m4 eats our [], so we need to use [ and ] instead.
15447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15448  if test "x$has_forbidden_chars" != x; then
15449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15451  fi
15452
15453
15454  windows_path="$new_path"
15455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15456    unix_path=`$CYGPATH -u "$windows_path"`
15457    new_path="$unix_path"
15458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15460    new_path="$unix_path"
15461  fi
15462
15463  if test "x$path" != "x$new_path"; then
15464    CURDIR="$new_path"
15465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15466$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15467  fi
15468
15469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15471
15472    else
15473      # We're on a unix platform. Hooray! :)
15474      path="$CURDIR"
15475      has_space=`$ECHO "$path" | $GREP " "`
15476      if test "x$has_space" != x; then
15477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15478$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15480      fi
15481
15482      # Use eval to expand a potential ~
15483      eval path="$path"
15484      if test ! -f "$path" && test ! -d "$path"; then
15485        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15486      fi
15487
15488      if test -d "$path"; then
15489        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15490      else
15491        dir="`$DIRNAME "$path"`"
15492        base="`$BASENAME "$path"`"
15493        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15494      fi
15495    fi
15496  fi
15497
15498
15499  # Only process if variable expands to non-empty
15500
15501  if test "x$TOPDIR" != x; then
15502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15503
15504  # Input might be given as Windows format, start by converting to
15505  # unix format.
15506  path="$TOPDIR"
15507  new_path=`$CYGPATH -u "$path"`
15508
15509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15512  # "foo.exe" is OK but "foo" is an error.
15513  #
15514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15515  # It is also a way to make sure we got the proper file name for the real test later on.
15516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15517  if test "x$test_shortpath" = x; then
15518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15519$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15520    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15521  fi
15522
15523  # Call helper function which possibly converts this using DOS-style short mode.
15524  # If so, the updated path is stored in $new_path.
15525
15526  input_path="$new_path"
15527  # Check if we need to convert this using DOS-style short mode. If the path
15528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15529  # take no chances and rewrite it.
15530  # Note: m4 eats our [], so we need to use [ and ] instead.
15531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15532  if test "x$has_forbidden_chars" != x; then
15533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15537      # Going to short mode and back again did indeed matter. Since short mode is
15538      # case insensitive, let's make it lowercase to improve readability.
15539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15540      # Now convert it back to Unix-style (cygpath)
15541      input_path=`$CYGPATH -u "$shortmode_path"`
15542      new_path="$input_path"
15543    fi
15544  fi
15545
15546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15547  if test "x$test_cygdrive_prefix" = x; then
15548    # As a simple fix, exclude /usr/bin since it's not a real path.
15549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15551      # a path prefixed by /cygdrive for fixpath to work.
15552      new_path="$CYGWIN_ROOT_PATH$input_path"
15553    fi
15554  fi
15555
15556
15557  if test "x$path" != "x$new_path"; then
15558    TOPDIR="$new_path"
15559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15560$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15561  fi
15562
15563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15564
15565  path="$TOPDIR"
15566  has_colon=`$ECHO $path | $GREP ^.:`
15567  new_path="$path"
15568  if test "x$has_colon" = x; then
15569    # Not in mixed or Windows style, start by that.
15570    new_path=`cmd //c echo $path`
15571  fi
15572
15573
15574  input_path="$new_path"
15575  # Check if we need to convert this using DOS-style short mode. If the path
15576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15577  # take no chances and rewrite it.
15578  # Note: m4 eats our [], so we need to use [ and ] instead.
15579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15580  if test "x$has_forbidden_chars" != x; then
15581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15583  fi
15584
15585
15586  windows_path="$new_path"
15587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15588    unix_path=`$CYGPATH -u "$windows_path"`
15589    new_path="$unix_path"
15590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15592    new_path="$unix_path"
15593  fi
15594
15595  if test "x$path" != "x$new_path"; then
15596    TOPDIR="$new_path"
15597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15598$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15599  fi
15600
15601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15603
15604    else
15605      # We're on a unix platform. Hooray! :)
15606      path="$TOPDIR"
15607      has_space=`$ECHO "$path" | $GREP " "`
15608      if test "x$has_space" != x; then
15609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15610$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15612      fi
15613
15614      # Use eval to expand a potential ~
15615      eval path="$path"
15616      if test ! -f "$path" && test ! -d "$path"; then
15617        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15618      fi
15619
15620      if test -d "$path"; then
15621        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15622      else
15623        dir="`$DIRNAME "$path"`"
15624        base="`$BASENAME "$path"`"
15625        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15626      fi
15627    fi
15628  fi
15629
15630  # SRC_ROOT is a traditional alias for TOPDIR.
15631  SRC_ROOT=$TOPDIR
15632
15633  # Calculate a canonical version of TOPDIR for string comparisons
15634  CANONICAL_TOPDIR=$TOPDIR
15635
15636  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15637    # Follow a chain of symbolic links. Use readlink
15638    # where it exists, else fall back to horribly
15639    # complicated shell code.
15640    if test "x$READLINK_TESTED" != yes; then
15641      # On MacOSX there is a readlink tool with a different
15642      # purpose than the GNU readlink tool. Check the found readlink.
15643      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15644      if test "x$ISGNU" = x; then
15645        # A readlink that we do not know how to use.
15646        # Are there other non-GNU readlinks out there?
15647        READLINK_TESTED=yes
15648        READLINK=
15649      fi
15650    fi
15651
15652    if test "x$READLINK" != x; then
15653      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15654    else
15655      # Save the current directory for restoring afterwards
15656      STARTDIR=$PWD
15657      COUNTER=0
15658      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15659      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15660      cd $sym_link_dir
15661      # Use -P flag to resolve symlinks in directories.
15662      cd `$THEPWDCMD -P`
15663      sym_link_dir=`$THEPWDCMD -P`
15664      # Resolve file symlinks
15665      while test $COUNTER -lt 20; do
15666        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15667        if test "x$ISLINK" == x; then
15668          # This is not a symbolic link! We are done!
15669          break
15670        fi
15671        # Again resolve directory symlinks since the target of the just found
15672        # link could be in a different directory
15673        cd `$DIRNAME $ISLINK`
15674        sym_link_dir=`$THEPWDCMD -P`
15675        sym_link_file=`$BASENAME $ISLINK`
15676        let COUNTER=COUNTER+1
15677      done
15678      cd $STARTDIR
15679      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15680    fi
15681  fi
15682
15683
15684
15685  # Locate the directory of this script.
15686  AUTOCONF_DIR=$TOPDIR/common/autoconf
15687
15688  # Setup username (for use in adhoc version strings etc)
15689  # Outer [ ] to quote m4.
15690   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15691
15692
15693
15694# Check if it's a pure open build or if custom sources are to be used.
15695
15696  # Check whether --enable-openjdk-only was given.
15697if test "${enable_openjdk_only+set}" = set; then :
15698  enableval=$enable_openjdk_only;
15699else
15700  enable_openjdk_only="no"
15701fi
15702
15703
15704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15705$as_echo_n "checking for presence of closed sources... " >&6; }
15706  if test -d "$SRC_ROOT/jdk/src/closed"; then
15707    CLOSED_SOURCE_PRESENT=yes
15708  else
15709    CLOSED_SOURCE_PRESENT=no
15710  fi
15711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15712$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15713
15714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15715$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15716  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15718$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15719
15720  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15721    OPENJDK=true
15722    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15723      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15724$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15725    fi
15726  else
15727    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15728      OPENJDK=true
15729    else
15730      OPENJDK=false
15731    fi
15732  fi
15733
15734  if test "x$OPENJDK" = "xtrue"; then
15735    SET_OPENJDK="OPENJDK=true"
15736  fi
15737
15738
15739
15740  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15741  # the IncludeCustomExtension macro.
15742
15743
15744# Check whether --with-custom-make-dir was given.
15745if test "${with_custom_make_dir+set}" = set; then :
15746  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
15747$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15748fi
15749
15750
15751
15752
15753# These are needed to be able to create a configuration name (and thus the output directory)
15754
15755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15756$as_echo_n "checking which variant of the JDK to build... " >&6; }
15757
15758# Check whether --with-jdk-variant was given.
15759if test "${with_jdk_variant+set}" = set; then :
15760  withval=$with_jdk_variant;
15761fi
15762
15763
15764  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15765    JDK_VARIANT="normal"
15766  else
15767    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15768  fi
15769
15770
15771
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15773$as_echo "$JDK_VARIANT" >&6; }
15774
15775
15776
15777# Check whether --with-jvm-interpreter was given.
15778if test "${with_jvm_interpreter+set}" = set; then :
15779  withval=$with_jvm_interpreter;
15780fi
15781
15782
15783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15784$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15785  if test "x$with_jvm_interpreter" = x; then
15786    JVM_INTERPRETER="template"
15787  else
15788    JVM_INTERPRETER="$with_jvm_interpreter"
15789  fi
15790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15791$as_echo "$JVM_INTERPRETER" >&6; }
15792
15793  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15794    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15795  fi
15796
15797
15798
15799
15800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15801$as_echo_n "checking which variants of the JVM to build... " >&6; }
15802
15803# Check whether --with-jvm-variants was given.
15804if test "${with_jvm_variants+set}" = set; then :
15805  withval=$with_jvm_variants;
15806fi
15807
15808
15809  if test "x$with_jvm_variants" = x; then
15810    with_jvm_variants="server"
15811  fi
15812
15813  JVM_VARIANTS=",$with_jvm_variants,"
15814  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15815
15816  if test "x$TEST_VARIANTS" != "x,"; then
15817    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15818  fi
15819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15820$as_echo "$with_jvm_variants" >&6; }
15821
15822  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15823  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15824  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15825  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15826  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15827  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15828
15829  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15830    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15831      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15832    fi
15833  fi
15834  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15835    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15836      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15837    fi
15838  fi
15839
15840  # Replace the commas with AND for use in the build directory name.
15841  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15842  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/'`
15843  if test "x$COUNT_VARIANTS" != "x,1"; then
15844    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15845  else
15846    BUILDING_MULTIPLE_JVM_VARIANTS=no
15847  fi
15848
15849  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15850    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15851  fi
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15862    MACOSX_UNIVERSAL="true"
15863  fi
15864
15865
15866
15867
15868  DEBUG_LEVEL="release"
15869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15870$as_echo_n "checking which debug level to use... " >&6; }
15871  # Check whether --enable-debug was given.
15872if test "${enable_debug+set}" = set; then :
15873  enableval=$enable_debug;
15874        ENABLE_DEBUG="${enableval}"
15875        DEBUG_LEVEL="fastdebug"
15876
15877else
15878  ENABLE_DEBUG="no"
15879fi
15880
15881
15882
15883# Check whether --with-debug-level was given.
15884if test "${with_debug_level+set}" = set; then :
15885  withval=$with_debug_level;
15886        DEBUG_LEVEL="${withval}"
15887        if test "x$ENABLE_DEBUG" = xyes; then
15888          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15889        fi
15890
15891fi
15892
15893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15894$as_echo "$DEBUG_LEVEL" >&6; }
15895
15896  if test "x$DEBUG_LEVEL" != xrelease && \
15897      test "x$DEBUG_LEVEL" != xoptimized && \
15898      test "x$DEBUG_LEVEL" != xfastdebug && \
15899      test "x$DEBUG_LEVEL" != xslowdebug; then
15900    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
15901  fi
15902
15903
15904  case $DEBUG_LEVEL in
15905    release )
15906      VARIANT="OPT"
15907      FASTDEBUG="false"
15908      DEBUG_CLASSFILES="false"
15909      BUILD_VARIANT_RELEASE=""
15910      HOTSPOT_DEBUG_LEVEL="product"
15911      HOTSPOT_EXPORT="product"
15912      ;;
15913    fastdebug )
15914      VARIANT="DBG"
15915      FASTDEBUG="true"
15916      DEBUG_CLASSFILES="true"
15917      BUILD_VARIANT_RELEASE="-fastdebug"
15918      HOTSPOT_DEBUG_LEVEL="fastdebug"
15919      HOTSPOT_EXPORT="fastdebug"
15920      ;;
15921    slowdebug )
15922      VARIANT="DBG"
15923      FASTDEBUG="false"
15924      DEBUG_CLASSFILES="true"
15925      BUILD_VARIANT_RELEASE="-debug"
15926      HOTSPOT_DEBUG_LEVEL="debug"
15927      HOTSPOT_EXPORT="debug"
15928      ;;
15929    optimized )
15930      VARIANT="OPT"
15931      FASTDEBUG="false"
15932      DEBUG_CLASSFILES="false"
15933      BUILD_VARIANT_RELEASE="-optimized"
15934      HOTSPOT_DEBUG_LEVEL="optimized"
15935      HOTSPOT_EXPORT="optimized"
15936      ;;
15937  esac
15938
15939  # The debug level 'optimized' is a little special because it is currently only
15940  # applicable to the HotSpot build where it means to build a completely
15941  # optimized version of the VM without any debugging code (like for the
15942  # 'release' debug level which is called 'product' in the HotSpot build) but
15943  # with the exception that it can contain additional code which is otherwise
15944  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15945  # test new and/or experimental features which are not intended for customer
15946  # shipment. Because these new features need to be tested and benchmarked in
15947  # real world scenarios, we want to build the containing JDK at the 'release'
15948  # debug level.
15949  if test "x$DEBUG_LEVEL" = xoptimized; then
15950    DEBUG_LEVEL="release"
15951  fi
15952
15953  #####
15954  # Generate the legacy makefile targets for hotspot.
15955  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15956  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15957  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15958  # But until then ...
15959  HOTSPOT_TARGET=""
15960
15961  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15962    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15963  fi
15964
15965  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15966    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15967  fi
15968
15969  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15970    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15971  fi
15972
15973  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15974    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15975  fi
15976
15977  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15978    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15979  fi
15980
15981  if test "x$JVM_VARIANT_CORE" = xtrue; then
15982    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15983  fi
15984
15985  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15986
15987  # On Macosx universal binaries are produced, but they only contain
15988  # 64 bit intel. This invalidates control of which jvms are built
15989  # from configure, but only server is valid anyway. Fix this
15990  # when hotspot makefiles are rewritten.
15991  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15992    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15993  fi
15994
15995  #####
15996
15997
15998
15999
16000
16001
16002
16003
16004# With basic setup done, call the custom early hook.
16005
16006
16007# Check if we have devkits, extra paths or sysroot set.
16008
16009
16010# Check whether --with-devkit was given.
16011if test "${with_devkit+set}" = set; then :
16012  withval=$with_devkit;
16013
16014  # Only process if variable expands to non-empty
16015
16016  if test "x$with_devkit" != x; then
16017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16018
16019  # Input might be given as Windows format, start by converting to
16020  # unix format.
16021  path="$with_devkit"
16022  new_path=`$CYGPATH -u "$path"`
16023
16024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16027  # "foo.exe" is OK but "foo" is an error.
16028  #
16029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16030  # It is also a way to make sure we got the proper file name for the real test later on.
16031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16032  if test "x$test_shortpath" = x; then
16033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16034$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16035    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16036  fi
16037
16038  # Call helper function which possibly converts this using DOS-style short mode.
16039  # If so, the updated path is stored in $new_path.
16040
16041  input_path="$new_path"
16042  # Check if we need to convert this using DOS-style short mode. If the path
16043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16044  # take no chances and rewrite it.
16045  # Note: m4 eats our [], so we need to use [ and ] instead.
16046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16047  if test "x$has_forbidden_chars" != x; then
16048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16052      # Going to short mode and back again did indeed matter. Since short mode is
16053      # case insensitive, let's make it lowercase to improve readability.
16054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16055      # Now convert it back to Unix-style (cygpath)
16056      input_path=`$CYGPATH -u "$shortmode_path"`
16057      new_path="$input_path"
16058    fi
16059  fi
16060
16061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16062  if test "x$test_cygdrive_prefix" = x; then
16063    # As a simple fix, exclude /usr/bin since it's not a real path.
16064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16066      # a path prefixed by /cygdrive for fixpath to work.
16067      new_path="$CYGWIN_ROOT_PATH$input_path"
16068    fi
16069  fi
16070
16071
16072  if test "x$path" != "x$new_path"; then
16073    with_devkit="$new_path"
16074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16075$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16076  fi
16077
16078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16079
16080  path="$with_devkit"
16081  has_colon=`$ECHO $path | $GREP ^.:`
16082  new_path="$path"
16083  if test "x$has_colon" = x; then
16084    # Not in mixed or Windows style, start by that.
16085    new_path=`cmd //c echo $path`
16086  fi
16087
16088
16089  input_path="$new_path"
16090  # Check if we need to convert this using DOS-style short mode. If the path
16091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16092  # take no chances and rewrite it.
16093  # Note: m4 eats our [], so we need to use [ and ] instead.
16094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16095  if test "x$has_forbidden_chars" != x; then
16096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16098  fi
16099
16100
16101  windows_path="$new_path"
16102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16103    unix_path=`$CYGPATH -u "$windows_path"`
16104    new_path="$unix_path"
16105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16107    new_path="$unix_path"
16108  fi
16109
16110  if test "x$path" != "x$new_path"; then
16111    with_devkit="$new_path"
16112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16113$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16114  fi
16115
16116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16118
16119    else
16120      # We're on a unix platform. Hooray! :)
16121      path="$with_devkit"
16122      has_space=`$ECHO "$path" | $GREP " "`
16123      if test "x$has_space" != x; then
16124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16125$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16127      fi
16128
16129      # Use eval to expand a potential ~
16130      eval path="$path"
16131      if test ! -f "$path" && test ! -d "$path"; then
16132        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16133      fi
16134
16135      if test -d "$path"; then
16136        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16137      else
16138        dir="`$DIRNAME "$path"`"
16139        base="`$BASENAME "$path"`"
16140        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16141      fi
16142    fi
16143  fi
16144
16145        DEVKIT_ROOT="$with_devkit"
16146        # Check for a meta data info file in the root of the devkit
16147        if test -f "$DEVKIT_ROOT/devkit.info"; then
16148          . $DEVKIT_ROOT/devkit.info
16149          # This potentially sets the following:
16150          # A descriptive name of the devkit
16151
16152  if test "x$DEVKIT_NAME" = x; then
16153    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16154  fi
16155
16156          # Corresponds to --with-extra-path
16157
16158  if test "x$DEVKIT_EXTRA_PATH" = x; then
16159    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16160  fi
16161
16162          # Corresponds to --with-toolchain-path
16163
16164  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16165    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16166  fi
16167
16168          # Corresponds to --with-sysroot
16169
16170  if test "x$DEVKIT_SYSROOT" = x; then
16171    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16172  fi
16173
16174
16175          # Identifies the Visual Studio version in the devkit
16176
16177  if test "x$DEVKIT_VS_VERSION" = x; then
16178    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16179  fi
16180
16181          # The Visual Studio include environment variable
16182
16183  if test "x$DEVKIT_VS_INCLUDE" = x; then
16184    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16185  fi
16186
16187          # The Visual Studio lib environment variable
16188
16189  if test "x$DEVKIT_VS_LIB" = x; then
16190    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16191  fi
16192
16193          # Corresponds to --with-msvcr-dll
16194
16195  if test "x$DEVKIT_MSVCR_DLL" = x; then
16196    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16197  fi
16198
16199          # Corresponds to --with-msvcp-dll
16200
16201  if test "x$DEVKIT_MSVCP_DLL" = x; then
16202    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16203  fi
16204
16205        fi
16206
16207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16208$as_echo_n "checking for devkit... " >&6; }
16209        if test "x$DEVKIT_NAME" != x; then
16210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16211$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16212        else
16213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16214$as_echo "$DEVKIT_ROOT" >&6; }
16215        fi
16216
16217
16218  if test "x$DEVKIT_EXTRA_PATH" != x; then
16219    if test "x$EXTRA_PATH" = x; then
16220      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16221    else
16222      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16223    fi
16224  fi
16225
16226
16227        # Fallback default of just /bin if DEVKIT_PATH is not defined
16228        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16229          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16230        fi
16231
16232  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16233    if test "x$TOOLCHAIN_PATH" = x; then
16234      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16235    else
16236      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16237    fi
16238  fi
16239
16240
16241        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16242        # places for backwards compatiblity.
16243        if test "x$DEVKIT_SYSROOT" != x; then
16244          SYSROOT="$DEVKIT_SYSROOT"
16245        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16246          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16247        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16248          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16249        fi
16250
16251
16252fi
16253
16254
16255  # You can force the sysroot if the sysroot encoded into the compiler tools
16256  # is not correct.
16257
16258# Check whether --with-sys-root was given.
16259if test "${with_sys_root+set}" = set; then :
16260  withval=$with_sys_root; SYSROOT=$with_sys_root
16261
16262fi
16263
16264
16265
16266# Check whether --with-sysroot was given.
16267if test "${with_sysroot+set}" = set; then :
16268  withval=$with_sysroot; SYSROOT=$with_sysroot
16269
16270fi
16271
16272
16273
16274# Check whether --with-tools-dir was given.
16275if test "${with_tools_dir+set}" = set; then :
16276  withval=$with_tools_dir;
16277  if test "x$with_tools_dir" != x; then
16278    if test "x$TOOLCHAIN_PATH" = x; then
16279      TOOLCHAIN_PATH="$with_tools_dir"
16280    else
16281      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16282    fi
16283  fi
16284
16285
16286fi
16287
16288
16289
16290# Check whether --with-toolchain-path was given.
16291if test "${with_toolchain_path+set}" = set; then :
16292  withval=$with_toolchain_path;
16293  if test "x$with_toolchain_path" != x; then
16294    if test "x$TOOLCHAIN_PATH" = x; then
16295      TOOLCHAIN_PATH="$with_toolchain_path"
16296    else
16297      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16298    fi
16299  fi
16300
16301
16302fi
16303
16304
16305
16306# Check whether --with-extra-path was given.
16307if test "${with_extra_path+set}" = set; then :
16308  withval=$with_extra_path;
16309  if test "x$with_extra_path" != x; then
16310    if test "x$EXTRA_PATH" = x; then
16311      EXTRA_PATH="$with_extra_path"
16312    else
16313      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16314    fi
16315  fi
16316
16317
16318fi
16319
16320
16321  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16322    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16323    # If not, detect if Xcode is installed by running xcodebuild -version
16324    # if no Xcode installed, xcodebuild exits with 1
16325    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16326    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16327      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16328      # fall back on the stub binary in /usr/bin/xcodebuild
16329      # Extract the first word of "xcodebuild", so it can be a program name with args.
16330set dummy xcodebuild; ac_word=$2
16331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16332$as_echo_n "checking for $ac_word... " >&6; }
16333if ${ac_cv_path_XCODEBUILD+:} false; then :
16334  $as_echo_n "(cached) " >&6
16335else
16336  case $XCODEBUILD in
16337  [\\/]* | ?:[\\/]*)
16338  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16339  ;;
16340  *)
16341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16342for as_dir in $TOOLCHAIN_PATH
16343do
16344  IFS=$as_save_IFS
16345  test -z "$as_dir" && as_dir=.
16346    for ac_exec_ext in '' $ac_executable_extensions; do
16347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16348    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16350    break 2
16351  fi
16352done
16353  done
16354IFS=$as_save_IFS
16355
16356  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16357  ;;
16358esac
16359fi
16360XCODEBUILD=$ac_cv_path_XCODEBUILD
16361if test -n "$XCODEBUILD"; then
16362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16363$as_echo "$XCODEBUILD" >&6; }
16364else
16365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16366$as_echo "no" >&6; }
16367fi
16368
16369
16370    else
16371      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16372      # when only the command line tools are installed there are no SDKs, so headers
16373      # are copied into the system frameworks
16374      XCODEBUILD=
16375
16376    fi
16377
16378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16379$as_echo_n "checking for sdk name... " >&6; }
16380
16381# Check whether --with-sdk-name was given.
16382if test "${with_sdk_name+set}" = set; then :
16383  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16384
16385fi
16386
16387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16388$as_echo "$SDKNAME" >&6; }
16389
16390    # if toolchain path is specified then don't rely on system headers, they may not compile
16391    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16392    test -z "$TOOLCHAIN_PATH" && \
16393      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16394
16395    if test -z "$SYSROOT"; then
16396      if test -n "$XCODEBUILD"; then
16397        # if we don't have system headers, use default SDK name (last resort)
16398        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16399          SDKNAME=${SDKNAME:-macosx}
16400        fi
16401
16402        if test -n "$SDKNAME"; then
16403          # Call xcodebuild to determine SYSROOT
16404          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16405        fi
16406      else
16407        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16408          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
16409        fi
16410      fi
16411    else
16412      # warn user if --with-sdk-name was also set
16413      if test -n "$with_sdk_name"; then
16414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16415$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16416      fi
16417    fi
16418
16419    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16420      # If no system framework headers, then SYSROOT must be set, or we won't build
16421      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
16422    fi
16423
16424    # Perform a basic sanity test
16425    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16426      if test -z "$SYSROOT"; then
16427        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
16428      else
16429        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16430      fi
16431    fi
16432
16433    # set SDKROOT too, Xcode tools will pick it up
16434    SDKROOT=$SYSROOT
16435
16436  fi
16437
16438  # Prepend the extra path to the global path
16439
16440  if test "x$EXTRA_PATH" != x; then
16441    if test "x$PATH" = x; then
16442      PATH="$EXTRA_PATH"
16443    else
16444      PATH="$EXTRA_PATH:$PATH"
16445    fi
16446  fi
16447
16448
16449  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16450    # Add extra search paths on solaris for utilities like ar and as etc...
16451    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16452  fi
16453
16454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16455$as_echo_n "checking for sysroot... " >&6; }
16456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16457$as_echo "$SYSROOT" >&6; }
16458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16459$as_echo_n "checking for toolchain path... " >&6; }
16460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16461$as_echo "$TOOLCHAIN_PATH" >&6; }
16462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16463$as_echo_n "checking for extra path... " >&6; }
16464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16465$as_echo "$EXTRA_PATH" >&6; }
16466
16467
16468# To properly create a configuration name, we need to have the OpenJDK target
16469# and options (variants and debug level) parsed.
16470
16471
16472
16473# Check whether --with-conf-name was given.
16474if test "${with_conf_name+set}" = set; then :
16475  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16476fi
16477
16478
16479  # Test from where we are running configure, in or outside of src root.
16480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16481$as_echo_n "checking where to store configuration... " >&6; }
16482  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16483      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16484      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16485    # We are running configure from the src root.
16486    # Create a default ./build/target-variant-debuglevel output root.
16487    if test "x${CONF_NAME}" = x; then
16488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16489$as_echo "in default location" >&6; }
16490      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16491    else
16492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16493$as_echo "in build directory with custom name" >&6; }
16494    fi
16495    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16496    $MKDIR -p "$OUTPUT_ROOT"
16497    if test ! -d "$OUTPUT_ROOT"; then
16498      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16499    fi
16500  else
16501    # We are running configure from outside of the src dir.
16502    # Then use the current directory as output dir!
16503    # If configuration is situated in normal build directory, just use the build
16504    # directory name as configuration name, otherwise use the complete path.
16505    if test "x${CONF_NAME}" = x; then
16506      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16507    fi
16508    OUTPUT_ROOT="$CURDIR"
16509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16510$as_echo "in current directory" >&6; }
16511
16512    # WARNING: This might be a bad thing to do. You need to be sure you want to
16513    # have a configuration in this directory. Do some sanity checks!
16514
16515    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16516      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16517      # other files
16518      files_present=`$LS $OUTPUT_ROOT`
16519      # Configure has already touched config.log and confdefs.h in the current dir when this check
16520      # is performed.
16521      filtered_files=`$ECHO "$files_present" \
16522          | $SED -e 's/config.log//g' \
16523              -e 's/configure.log//g' \
16524              -e 's/confdefs.h//g' \
16525              -e 's/ //g' \
16526          | $TR -d '\n'`
16527      if test "x$filtered_files" != x; then
16528        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16529$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16530        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16531$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16532        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16533$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16534        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16535$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16536        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16537$as_echo "$as_me: seriously mess up just about everything." >&6;}
16538        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16539$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16540        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16541$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16542        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16543      fi
16544    fi
16545  fi
16546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16547$as_echo_n "checking what configuration name to use... " >&6; }
16548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16549$as_echo "$CONF_NAME" >&6; }
16550
16551
16552  # Only process if variable expands to non-empty
16553
16554  if test "x$OUTPUT_ROOT" != x; then
16555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16556
16557  # Input might be given as Windows format, start by converting to
16558  # unix format.
16559  path="$OUTPUT_ROOT"
16560  new_path=`$CYGPATH -u "$path"`
16561
16562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16565  # "foo.exe" is OK but "foo" is an error.
16566  #
16567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16568  # It is also a way to make sure we got the proper file name for the real test later on.
16569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16570  if test "x$test_shortpath" = x; then
16571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16572$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16573    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16574  fi
16575
16576  # Call helper function which possibly converts this using DOS-style short mode.
16577  # If so, the updated path is stored in $new_path.
16578
16579  input_path="$new_path"
16580  # Check if we need to convert this using DOS-style short mode. If the path
16581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16582  # take no chances and rewrite it.
16583  # Note: m4 eats our [], so we need to use [ and ] instead.
16584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16585  if test "x$has_forbidden_chars" != x; then
16586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16590      # Going to short mode and back again did indeed matter. Since short mode is
16591      # case insensitive, let's make it lowercase to improve readability.
16592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16593      # Now convert it back to Unix-style (cygpath)
16594      input_path=`$CYGPATH -u "$shortmode_path"`
16595      new_path="$input_path"
16596    fi
16597  fi
16598
16599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16600  if test "x$test_cygdrive_prefix" = x; then
16601    # As a simple fix, exclude /usr/bin since it's not a real path.
16602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16604      # a path prefixed by /cygdrive for fixpath to work.
16605      new_path="$CYGWIN_ROOT_PATH$input_path"
16606    fi
16607  fi
16608
16609
16610  if test "x$path" != "x$new_path"; then
16611    OUTPUT_ROOT="$new_path"
16612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16613$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16614  fi
16615
16616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16617
16618  path="$OUTPUT_ROOT"
16619  has_colon=`$ECHO $path | $GREP ^.:`
16620  new_path="$path"
16621  if test "x$has_colon" = x; then
16622    # Not in mixed or Windows style, start by that.
16623    new_path=`cmd //c echo $path`
16624  fi
16625
16626
16627  input_path="$new_path"
16628  # Check if we need to convert this using DOS-style short mode. If the path
16629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16630  # take no chances and rewrite it.
16631  # Note: m4 eats our [], so we need to use [ and ] instead.
16632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16633  if test "x$has_forbidden_chars" != x; then
16634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16636  fi
16637
16638
16639  windows_path="$new_path"
16640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16641    unix_path=`$CYGPATH -u "$windows_path"`
16642    new_path="$unix_path"
16643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16645    new_path="$unix_path"
16646  fi
16647
16648  if test "x$path" != "x$new_path"; then
16649    OUTPUT_ROOT="$new_path"
16650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16651$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16652  fi
16653
16654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16656
16657    else
16658      # We're on a unix platform. Hooray! :)
16659      path="$OUTPUT_ROOT"
16660      has_space=`$ECHO "$path" | $GREP " "`
16661      if test "x$has_space" != x; then
16662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16663$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16665      fi
16666
16667      # Use eval to expand a potential ~
16668      eval path="$path"
16669      if test ! -f "$path" && test ! -d "$path"; then
16670        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16671      fi
16672
16673      if test -d "$path"; then
16674        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16675      else
16676        dir="`$DIRNAME "$path"`"
16677        base="`$BASENAME "$path"`"
16678        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16679      fi
16680    fi
16681  fi
16682
16683
16684  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16685  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16686
16687  SPEC=$OUTPUT_ROOT/spec.gmk
16688
16689  CONF_NAME=$CONF_NAME
16690
16691  OUTPUT_ROOT=$OUTPUT_ROOT
16692
16693
16694
16695  # The spec.gmk file contains all variables for the make system.
16696  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16697
16698  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16699  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16700
16701  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16702  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16703
16704  # The compare.sh is used to compare the build output to other builds.
16705  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16706
16707  # The generated Makefile knows where the spec.gmk is and where the source is.
16708  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16709  # which will look for generated configurations
16710  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16711
16712
16713
16714# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16715
16716  for ac_prog in apt-get yum port pkgutil pkgadd
16717do
16718  # Extract the first word of "$ac_prog", so it can be a program name with args.
16719set dummy $ac_prog; ac_word=$2
16720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16721$as_echo_n "checking for $ac_word... " >&6; }
16722if ${ac_cv_prog_PKGHANDLER+:} false; then :
16723  $as_echo_n "(cached) " >&6
16724else
16725  if test -n "$PKGHANDLER"; then
16726  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16727else
16728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16729for as_dir in $PATH
16730do
16731  IFS=$as_save_IFS
16732  test -z "$as_dir" && as_dir=.
16733    for ac_exec_ext in '' $ac_executable_extensions; do
16734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16735    ac_cv_prog_PKGHANDLER="$ac_prog"
16736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16737    break 2
16738  fi
16739done
16740  done
16741IFS=$as_save_IFS
16742
16743fi
16744fi
16745PKGHANDLER=$ac_cv_prog_PKGHANDLER
16746if test -n "$PKGHANDLER"; then
16747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16748$as_echo "$PKGHANDLER" >&6; }
16749else
16750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16751$as_echo "no" >&6; }
16752fi
16753
16754
16755  test -n "$PKGHANDLER" && break
16756done
16757
16758
16759
16760# Setup tools that requires more complex handling, or that is not needed by the configure script.
16761
16762
16763
16764  # Publish this variable in the help.
16765
16766
16767  if [ -z "${MAKE+x}" ]; then
16768    # The variable is not set by user, try to locate tool using the code snippet
16769
16770    # Try our hardest to locate a correct version of GNU make
16771    for ac_prog in gmake
16772do
16773  # Extract the first word of "$ac_prog", so it can be a program name with args.
16774set dummy $ac_prog; ac_word=$2
16775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16776$as_echo_n "checking for $ac_word... " >&6; }
16777if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16778  $as_echo_n "(cached) " >&6
16779else
16780  case $CHECK_GMAKE in
16781  [\\/]* | ?:[\\/]*)
16782  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16783  ;;
16784  *)
16785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16786for as_dir in $PATH
16787do
16788  IFS=$as_save_IFS
16789  test -z "$as_dir" && as_dir=.
16790    for ac_exec_ext in '' $ac_executable_extensions; do
16791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16792    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16794    break 2
16795  fi
16796done
16797  done
16798IFS=$as_save_IFS
16799
16800  ;;
16801esac
16802fi
16803CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16804if test -n "$CHECK_GMAKE"; then
16805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16806$as_echo "$CHECK_GMAKE" >&6; }
16807else
16808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16809$as_echo "no" >&6; }
16810fi
16811
16812
16813  test -n "$CHECK_GMAKE" && break
16814done
16815
16816
16817  MAKE_CANDIDATE=""$CHECK_GMAKE""
16818  DESCRIPTION="gmake in PATH"
16819
16820  # On Cygwin, we require a newer version of make than on other platforms
16821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16822    MAKE_VERSION_EXPR="-e 4\."
16823    MAKE_REQUIRED_VERSION="4.0"
16824   else
16825    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16826    MAKE_REQUIRED_VERSION="3.81"
16827  fi
16828
16829  if test "x$MAKE_CANDIDATE" != x; then
16830    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16831$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16832    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16833    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16834    if test "x$IS_GNU_MAKE" = x; then
16835      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16836$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16837    else
16838      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16839      if test "x$IS_MODERN_MAKE" = x; then
16840        { $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
16841$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;}
16842      else
16843        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16844          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16845            MAKE_EXPECTED_ENV='cygwin'
16846          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16847            MAKE_EXPECTED_ENV='msys'
16848          else
16849            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16850          fi
16851          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16852          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16853        else
16854          # Not relevant for non-Windows
16855          IS_MAKE_CORRECT_ENV=true
16856        fi
16857        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16858          { $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
16859$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;}
16860        else
16861          FOUND_MAKE=$MAKE_CANDIDATE
16862
16863  # Only process if variable expands to non-empty
16864
16865  if test "x$FOUND_MAKE" != x; then
16866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867
16868  # First separate the path from the arguments. This will split at the first
16869  # space.
16870  complete="$FOUND_MAKE"
16871  path="${complete%% *}"
16872  tmp="$complete EOL"
16873  arguments="${tmp#* }"
16874
16875  # Input might be given as Windows format, start by converting to
16876  # unix format.
16877  new_path=`$CYGPATH -u "$path"`
16878
16879  # Now try to locate executable using which
16880  new_path=`$WHICH "$new_path" 2> /dev/null`
16881  # bat and cmd files are not always considered executable in cygwin causing which
16882  # to not find them
16883  if test "x$new_path" = x \
16884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16886    new_path=`$CYGPATH -u "$path"`
16887  fi
16888  if test "x$new_path" = x; then
16889    # Oops. Which didn't find the executable.
16890    # The splitting of arguments from the executable at a space might have been incorrect,
16891    # since paths with space are more likely in Windows. Give it another try with the whole
16892    # argument.
16893    path="$complete"
16894    arguments="EOL"
16895    new_path=`$CYGPATH -u "$path"`
16896    new_path=`$WHICH "$new_path" 2> /dev/null`
16897    # bat and cmd files are not always considered executable in cygwin causing which
16898    # to not find them
16899    if test "x$new_path" = x \
16900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16902      new_path=`$CYGPATH -u "$path"`
16903    fi
16904    if test "x$new_path" = x; then
16905      # It's still not found. Now this is an unrecoverable error.
16906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16907$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16908      has_space=`$ECHO "$complete" | $GREP " "`
16909      if test "x$has_space" != x; then
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16912      fi
16913      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16914    fi
16915  fi
16916
16917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16920  # "foo.exe" is OK but "foo" is an error.
16921  #
16922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16923  # It is also a way to make sure we got the proper file name for the real test later on.
16924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16925  if test "x$test_shortpath" = x; then
16926    # Short path failed, file does not exist as specified.
16927    # Try adding .exe or .cmd
16928    if test -f "${new_path}.exe"; then
16929      input_to_shortpath="${new_path}.exe"
16930    elif test -f "${new_path}.cmd"; then
16931      input_to_shortpath="${new_path}.cmd"
16932    else
16933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16938    fi
16939  else
16940    input_to_shortpath="$new_path"
16941  fi
16942
16943  # Call helper function which possibly converts this using DOS-style short mode.
16944  # If so, the updated path is stored in $new_path.
16945  new_path="$input_to_shortpath"
16946
16947  input_path="$input_to_shortpath"
16948  # Check if we need to convert this using DOS-style short mode. If the path
16949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16950  # take no chances and rewrite it.
16951  # Note: m4 eats our [], so we need to use [ and ] instead.
16952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16953  if test "x$has_forbidden_chars" != x; then
16954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16958      # Going to short mode and back again did indeed matter. Since short mode is
16959      # case insensitive, let's make it lowercase to improve readability.
16960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16961      # Now convert it back to Unix-style (cygpath)
16962      input_path=`$CYGPATH -u "$shortmode_path"`
16963      new_path="$input_path"
16964    fi
16965  fi
16966
16967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16968  if test "x$test_cygdrive_prefix" = x; then
16969    # As a simple fix, exclude /usr/bin since it's not a real path.
16970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16972      # a path prefixed by /cygdrive for fixpath to work.
16973      new_path="$CYGWIN_ROOT_PATH$input_path"
16974    fi
16975  fi
16976
16977  # remove trailing .exe if any
16978  new_path="${new_path/%.exe/}"
16979
16980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16981
16982  # First separate the path from the arguments. This will split at the first
16983  # space.
16984  complete="$FOUND_MAKE"
16985  path="${complete%% *}"
16986  tmp="$complete EOL"
16987  arguments="${tmp#* }"
16988
16989  # Input might be given as Windows format, start by converting to
16990  # unix format.
16991  new_path="$path"
16992
16993  windows_path="$new_path"
16994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16995    unix_path=`$CYGPATH -u "$windows_path"`
16996    new_path="$unix_path"
16997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16999    new_path="$unix_path"
17000  fi
17001
17002
17003  # Now try to locate executable using which
17004  new_path=`$WHICH "$new_path" 2> /dev/null`
17005
17006  if test "x$new_path" = x; then
17007    # Oops. Which didn't find the executable.
17008    # The splitting of arguments from the executable at a space might have been incorrect,
17009    # since paths with space are more likely in Windows. Give it another try with the whole
17010    # argument.
17011    path="$complete"
17012    arguments="EOL"
17013    new_path="$path"
17014
17015  windows_path="$new_path"
17016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17017    unix_path=`$CYGPATH -u "$windows_path"`
17018    new_path="$unix_path"
17019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17021    new_path="$unix_path"
17022  fi
17023
17024
17025    new_path=`$WHICH "$new_path" 2> /dev/null`
17026    # bat and cmd files are not always considered executable in MSYS causing which
17027    # to not find them
17028    if test "x$new_path" = x \
17029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17031      new_path="$path"
17032
17033  windows_path="$new_path"
17034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17035    unix_path=`$CYGPATH -u "$windows_path"`
17036    new_path="$unix_path"
17037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17039    new_path="$unix_path"
17040  fi
17041
17042    fi
17043
17044    if test "x$new_path" = x; then
17045      # It's still not found. Now this is an unrecoverable error.
17046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17048      has_space=`$ECHO "$complete" | $GREP " "`
17049      if test "x$has_space" != x; then
17050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17052      fi
17053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17054    fi
17055  fi
17056
17057  # Now new_path has a complete unix path to the binary
17058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17059    # Keep paths in /bin as-is, but remove trailing .exe if any
17060    new_path="${new_path/%.exe/}"
17061    # Do not save /bin paths to all_fixpath_prefixes!
17062  else
17063    # Not in mixed or Windows style, start by that.
17064    new_path=`cmd //c echo $new_path`
17065
17066  input_path="$new_path"
17067  # Check if we need to convert this using DOS-style short mode. If the path
17068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17069  # take no chances and rewrite it.
17070  # Note: m4 eats our [], so we need to use [ and ] instead.
17071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17072  if test "x$has_forbidden_chars" != x; then
17073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17075  fi
17076
17077    # Output is in $new_path
17078
17079  windows_path="$new_path"
17080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17081    unix_path=`$CYGPATH -u "$windows_path"`
17082    new_path="$unix_path"
17083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17085    new_path="$unix_path"
17086  fi
17087
17088    # remove trailing .exe if any
17089    new_path="${new_path/%.exe/}"
17090
17091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17093  fi
17094
17095    else
17096      # We're on a unix platform. Hooray! :)
17097      # First separate the path from the arguments. This will split at the first
17098      # space.
17099      complete="$FOUND_MAKE"
17100      path="${complete%% *}"
17101      tmp="$complete EOL"
17102      arguments="${tmp#* }"
17103
17104      # Cannot rely on the command "which" here since it doesn't always work.
17105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17106      if test -z "$is_absolute_path"; then
17107        # Path to executable is not absolute. Find it.
17108        IFS_save="$IFS"
17109        IFS=:
17110        for p in $PATH; do
17111          if test -f "$p/$path" && test -x "$p/$path"; then
17112            new_path="$p/$path"
17113            break
17114          fi
17115        done
17116        IFS="$IFS_save"
17117      else
17118        # This is an absolute path, we can use it without further modifications.
17119        new_path="$path"
17120      fi
17121
17122      if test "x$new_path" = x; then
17123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17124$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17125        has_space=`$ECHO "$complete" | $GREP " "`
17126        if test "x$has_space" != x; then
17127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17129        fi
17130        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17131      fi
17132    fi
17133
17134    # Now join together the path and the arguments once again
17135    if test "x$arguments" != xEOL; then
17136      new_complete="$new_path ${arguments% *}"
17137    else
17138      new_complete="$new_path"
17139    fi
17140
17141    if test "x$complete" != "x$new_complete"; then
17142      FOUND_MAKE="$new_complete"
17143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17144$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17145    fi
17146  fi
17147
17148        fi
17149      fi
17150    fi
17151  fi
17152
17153
17154    if test "x$FOUND_MAKE" = x; then
17155      for ac_prog in make
17156do
17157  # Extract the first word of "$ac_prog", so it can be a program name with args.
17158set dummy $ac_prog; ac_word=$2
17159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17160$as_echo_n "checking for $ac_word... " >&6; }
17161if ${ac_cv_path_CHECK_MAKE+:} false; then :
17162  $as_echo_n "(cached) " >&6
17163else
17164  case $CHECK_MAKE in
17165  [\\/]* | ?:[\\/]*)
17166  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17167  ;;
17168  *)
17169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17170for as_dir in $PATH
17171do
17172  IFS=$as_save_IFS
17173  test -z "$as_dir" && as_dir=.
17174    for ac_exec_ext in '' $ac_executable_extensions; do
17175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17176    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17178    break 2
17179  fi
17180done
17181  done
17182IFS=$as_save_IFS
17183
17184  ;;
17185esac
17186fi
17187CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17188if test -n "$CHECK_MAKE"; then
17189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17190$as_echo "$CHECK_MAKE" >&6; }
17191else
17192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17193$as_echo "no" >&6; }
17194fi
17195
17196
17197  test -n "$CHECK_MAKE" && break
17198done
17199
17200
17201  MAKE_CANDIDATE=""$CHECK_MAKE""
17202  DESCRIPTION="make in PATH"
17203
17204  # On Cygwin, we require a newer version of make than on other platforms
17205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17206    MAKE_VERSION_EXPR="-e 4\."
17207    MAKE_REQUIRED_VERSION="4.0"
17208   else
17209    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17210    MAKE_REQUIRED_VERSION="3.81"
17211  fi
17212
17213  if test "x$MAKE_CANDIDATE" != x; then
17214    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17215$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17216    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17217    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17218    if test "x$IS_GNU_MAKE" = x; then
17219      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17220$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17221    else
17222      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17223      if test "x$IS_MODERN_MAKE" = x; then
17224        { $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
17225$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;}
17226      else
17227        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17228          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229            MAKE_EXPECTED_ENV='cygwin'
17230          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17231            MAKE_EXPECTED_ENV='msys'
17232          else
17233            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17234          fi
17235          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17236          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17237        else
17238          # Not relevant for non-Windows
17239          IS_MAKE_CORRECT_ENV=true
17240        fi
17241        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17242          { $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
17243$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;}
17244        else
17245          FOUND_MAKE=$MAKE_CANDIDATE
17246
17247  # Only process if variable expands to non-empty
17248
17249  if test "x$FOUND_MAKE" != x; then
17250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17251
17252  # First separate the path from the arguments. This will split at the first
17253  # space.
17254  complete="$FOUND_MAKE"
17255  path="${complete%% *}"
17256  tmp="$complete EOL"
17257  arguments="${tmp#* }"
17258
17259  # Input might be given as Windows format, start by converting to
17260  # unix format.
17261  new_path=`$CYGPATH -u "$path"`
17262
17263  # Now try to locate executable using which
17264  new_path=`$WHICH "$new_path" 2> /dev/null`
17265  # bat and cmd files are not always considered executable in cygwin causing which
17266  # to not find them
17267  if test "x$new_path" = x \
17268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17270    new_path=`$CYGPATH -u "$path"`
17271  fi
17272  if test "x$new_path" = x; then
17273    # Oops. Which didn't find the executable.
17274    # The splitting of arguments from the executable at a space might have been incorrect,
17275    # since paths with space are more likely in Windows. Give it another try with the whole
17276    # argument.
17277    path="$complete"
17278    arguments="EOL"
17279    new_path=`$CYGPATH -u "$path"`
17280    new_path=`$WHICH "$new_path" 2> /dev/null`
17281    # bat and cmd files are not always considered executable in cygwin causing which
17282    # to not find them
17283    if test "x$new_path" = x \
17284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17286      new_path=`$CYGPATH -u "$path"`
17287    fi
17288    if test "x$new_path" = x; then
17289      # It's still not found. Now this is an unrecoverable error.
17290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17291$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17292      has_space=`$ECHO "$complete" | $GREP " "`
17293      if test "x$has_space" != x; then
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17296      fi
17297      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17298    fi
17299  fi
17300
17301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17304  # "foo.exe" is OK but "foo" is an error.
17305  #
17306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17307  # It is also a way to make sure we got the proper file name for the real test later on.
17308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17309  if test "x$test_shortpath" = x; then
17310    # Short path failed, file does not exist as specified.
17311    # Try adding .exe or .cmd
17312    if test -f "${new_path}.exe"; then
17313      input_to_shortpath="${new_path}.exe"
17314    elif test -f "${new_path}.cmd"; then
17315      input_to_shortpath="${new_path}.cmd"
17316    else
17317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17321      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17322    fi
17323  else
17324    input_to_shortpath="$new_path"
17325  fi
17326
17327  # Call helper function which possibly converts this using DOS-style short mode.
17328  # If so, the updated path is stored in $new_path.
17329  new_path="$input_to_shortpath"
17330
17331  input_path="$input_to_shortpath"
17332  # Check if we need to convert this using DOS-style short mode. If the path
17333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17334  # take no chances and rewrite it.
17335  # Note: m4 eats our [], so we need to use [ and ] instead.
17336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17337  if test "x$has_forbidden_chars" != x; then
17338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17342      # Going to short mode and back again did indeed matter. Since short mode is
17343      # case insensitive, let's make it lowercase to improve readability.
17344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17345      # Now convert it back to Unix-style (cygpath)
17346      input_path=`$CYGPATH -u "$shortmode_path"`
17347      new_path="$input_path"
17348    fi
17349  fi
17350
17351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17352  if test "x$test_cygdrive_prefix" = x; then
17353    # As a simple fix, exclude /usr/bin since it's not a real path.
17354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17356      # a path prefixed by /cygdrive for fixpath to work.
17357      new_path="$CYGWIN_ROOT_PATH$input_path"
17358    fi
17359  fi
17360
17361  # remove trailing .exe if any
17362  new_path="${new_path/%.exe/}"
17363
17364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365
17366  # First separate the path from the arguments. This will split at the first
17367  # space.
17368  complete="$FOUND_MAKE"
17369  path="${complete%% *}"
17370  tmp="$complete EOL"
17371  arguments="${tmp#* }"
17372
17373  # Input might be given as Windows format, start by converting to
17374  # unix format.
17375  new_path="$path"
17376
17377  windows_path="$new_path"
17378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17379    unix_path=`$CYGPATH -u "$windows_path"`
17380    new_path="$unix_path"
17381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17383    new_path="$unix_path"
17384  fi
17385
17386
17387  # Now try to locate executable using which
17388  new_path=`$WHICH "$new_path" 2> /dev/null`
17389
17390  if test "x$new_path" = x; then
17391    # Oops. Which didn't find the executable.
17392    # The splitting of arguments from the executable at a space might have been incorrect,
17393    # since paths with space are more likely in Windows. Give it another try with the whole
17394    # argument.
17395    path="$complete"
17396    arguments="EOL"
17397    new_path="$path"
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408
17409    new_path=`$WHICH "$new_path" 2> /dev/null`
17410    # bat and cmd files are not always considered executable in MSYS causing which
17411    # to not find them
17412    if test "x$new_path" = x \
17413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17415      new_path="$path"
17416
17417  windows_path="$new_path"
17418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17419    unix_path=`$CYGPATH -u "$windows_path"`
17420    new_path="$unix_path"
17421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17423    new_path="$unix_path"
17424  fi
17425
17426    fi
17427
17428    if test "x$new_path" = x; then
17429      # It's still not found. Now this is an unrecoverable error.
17430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17431$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17432      has_space=`$ECHO "$complete" | $GREP " "`
17433      if test "x$has_space" != x; then
17434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17436      fi
17437      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17438    fi
17439  fi
17440
17441  # Now new_path has a complete unix path to the binary
17442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17443    # Keep paths in /bin as-is, but remove trailing .exe if any
17444    new_path="${new_path/%.exe/}"
17445    # Do not save /bin paths to all_fixpath_prefixes!
17446  else
17447    # Not in mixed or Windows style, start by that.
17448    new_path=`cmd //c echo $new_path`
17449
17450  input_path="$new_path"
17451  # Check if we need to convert this using DOS-style short mode. If the path
17452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17453  # take no chances and rewrite it.
17454  # Note: m4 eats our [], so we need to use [ and ] instead.
17455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17456  if test "x$has_forbidden_chars" != x; then
17457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17459  fi
17460
17461    # Output is in $new_path
17462
17463  windows_path="$new_path"
17464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17465    unix_path=`$CYGPATH -u "$windows_path"`
17466    new_path="$unix_path"
17467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17469    new_path="$unix_path"
17470  fi
17471
17472    # remove trailing .exe if any
17473    new_path="${new_path/%.exe/}"
17474
17475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17477  fi
17478
17479    else
17480      # We're on a unix platform. Hooray! :)
17481      # First separate the path from the arguments. This will split at the first
17482      # space.
17483      complete="$FOUND_MAKE"
17484      path="${complete%% *}"
17485      tmp="$complete EOL"
17486      arguments="${tmp#* }"
17487
17488      # Cannot rely on the command "which" here since it doesn't always work.
17489      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17490      if test -z "$is_absolute_path"; then
17491        # Path to executable is not absolute. Find it.
17492        IFS_save="$IFS"
17493        IFS=:
17494        for p in $PATH; do
17495          if test -f "$p/$path" && test -x "$p/$path"; then
17496            new_path="$p/$path"
17497            break
17498          fi
17499        done
17500        IFS="$IFS_save"
17501      else
17502        # This is an absolute path, we can use it without further modifications.
17503        new_path="$path"
17504      fi
17505
17506      if test "x$new_path" = x; then
17507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17509        has_space=`$ECHO "$complete" | $GREP " "`
17510        if test "x$has_space" != x; then
17511          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17513        fi
17514        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17515      fi
17516    fi
17517
17518    # Now join together the path and the arguments once again
17519    if test "x$arguments" != xEOL; then
17520      new_complete="$new_path ${arguments% *}"
17521    else
17522      new_complete="$new_path"
17523    fi
17524
17525    if test "x$complete" != "x$new_complete"; then
17526      FOUND_MAKE="$new_complete"
17527      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17528$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17529    fi
17530  fi
17531
17532        fi
17533      fi
17534    fi
17535  fi
17536
17537    fi
17538
17539    if test "x$FOUND_MAKE" = x; then
17540      if test "x$TOOLCHAIN_PATH" != x; then
17541        # We have a toolchain path, check that as well before giving up.
17542        OLD_PATH=$PATH
17543        PATH=$TOOLCHAIN_PATH:$PATH
17544        for ac_prog in gmake
17545do
17546  # Extract the first word of "$ac_prog", so it can be a program name with args.
17547set dummy $ac_prog; ac_word=$2
17548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17549$as_echo_n "checking for $ac_word... " >&6; }
17550if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17551  $as_echo_n "(cached) " >&6
17552else
17553  case $CHECK_TOOLSDIR_GMAKE in
17554  [\\/]* | ?:[\\/]*)
17555  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17556  ;;
17557  *)
17558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17559for as_dir in $PATH
17560do
17561  IFS=$as_save_IFS
17562  test -z "$as_dir" && as_dir=.
17563    for ac_exec_ext in '' $ac_executable_extensions; do
17564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17565    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17567    break 2
17568  fi
17569done
17570  done
17571IFS=$as_save_IFS
17572
17573  ;;
17574esac
17575fi
17576CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17577if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17579$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17580else
17581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17582$as_echo "no" >&6; }
17583fi
17584
17585
17586  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17587done
17588
17589
17590  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17591  DESCRIPTION="gmake in tools-dir"
17592
17593  # On Cygwin, we require a newer version of make than on other platforms
17594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17595    MAKE_VERSION_EXPR="-e 4\."
17596    MAKE_REQUIRED_VERSION="4.0"
17597   else
17598    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17599    MAKE_REQUIRED_VERSION="3.81"
17600  fi
17601
17602  if test "x$MAKE_CANDIDATE" != x; then
17603    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17604$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17605    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17606    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17607    if test "x$IS_GNU_MAKE" = x; then
17608      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17609$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17610    else
17611      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17612      if test "x$IS_MODERN_MAKE" = x; then
17613        { $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
17614$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;}
17615      else
17616        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17617          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17618            MAKE_EXPECTED_ENV='cygwin'
17619          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17620            MAKE_EXPECTED_ENV='msys'
17621          else
17622            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17623          fi
17624          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17625          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17626        else
17627          # Not relevant for non-Windows
17628          IS_MAKE_CORRECT_ENV=true
17629        fi
17630        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17631          { $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
17632$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;}
17633        else
17634          FOUND_MAKE=$MAKE_CANDIDATE
17635
17636  # Only process if variable expands to non-empty
17637
17638  if test "x$FOUND_MAKE" != x; then
17639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17640
17641  # First separate the path from the arguments. This will split at the first
17642  # space.
17643  complete="$FOUND_MAKE"
17644  path="${complete%% *}"
17645  tmp="$complete EOL"
17646  arguments="${tmp#* }"
17647
17648  # Input might be given as Windows format, start by converting to
17649  # unix format.
17650  new_path=`$CYGPATH -u "$path"`
17651
17652  # Now try to locate executable using which
17653  new_path=`$WHICH "$new_path" 2> /dev/null`
17654  # bat and cmd files are not always considered executable in cygwin causing which
17655  # to not find them
17656  if test "x$new_path" = x \
17657      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17658      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17659    new_path=`$CYGPATH -u "$path"`
17660  fi
17661  if test "x$new_path" = x; then
17662    # Oops. Which didn't find the executable.
17663    # The splitting of arguments from the executable at a space might have been incorrect,
17664    # since paths with space are more likely in Windows. Give it another try with the whole
17665    # argument.
17666    path="$complete"
17667    arguments="EOL"
17668    new_path=`$CYGPATH -u "$path"`
17669    new_path=`$WHICH "$new_path" 2> /dev/null`
17670    # bat and cmd files are not always considered executable in cygwin causing which
17671    # to not find them
17672    if test "x$new_path" = x \
17673        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17674        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17675      new_path=`$CYGPATH -u "$path"`
17676    fi
17677    if test "x$new_path" = x; then
17678      # It's still not found. Now this is an unrecoverable error.
17679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17680$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17681      has_space=`$ECHO "$complete" | $GREP " "`
17682      if test "x$has_space" != x; then
17683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17685      fi
17686      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17687    fi
17688  fi
17689
17690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17693  # "foo.exe" is OK but "foo" is an error.
17694  #
17695  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17696  # It is also a way to make sure we got the proper file name for the real test later on.
17697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17698  if test "x$test_shortpath" = x; then
17699    # Short path failed, file does not exist as specified.
17700    # Try adding .exe or .cmd
17701    if test -f "${new_path}.exe"; then
17702      input_to_shortpath="${new_path}.exe"
17703    elif test -f "${new_path}.cmd"; then
17704      input_to_shortpath="${new_path}.cmd"
17705    else
17706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17707$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17710      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17711    fi
17712  else
17713    input_to_shortpath="$new_path"
17714  fi
17715
17716  # Call helper function which possibly converts this using DOS-style short mode.
17717  # If so, the updated path is stored in $new_path.
17718  new_path="$input_to_shortpath"
17719
17720  input_path="$input_to_shortpath"
17721  # Check if we need to convert this using DOS-style short mode. If the path
17722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17723  # take no chances and rewrite it.
17724  # Note: m4 eats our [], so we need to use [ and ] instead.
17725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17726  if test "x$has_forbidden_chars" != x; then
17727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17731      # Going to short mode and back again did indeed matter. Since short mode is
17732      # case insensitive, let's make it lowercase to improve readability.
17733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17734      # Now convert it back to Unix-style (cygpath)
17735      input_path=`$CYGPATH -u "$shortmode_path"`
17736      new_path="$input_path"
17737    fi
17738  fi
17739
17740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17741  if test "x$test_cygdrive_prefix" = x; then
17742    # As a simple fix, exclude /usr/bin since it's not a real path.
17743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17745      # a path prefixed by /cygdrive for fixpath to work.
17746      new_path="$CYGWIN_ROOT_PATH$input_path"
17747    fi
17748  fi
17749
17750  # remove trailing .exe if any
17751  new_path="${new_path/%.exe/}"
17752
17753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754
17755  # First separate the path from the arguments. This will split at the first
17756  # space.
17757  complete="$FOUND_MAKE"
17758  path="${complete%% *}"
17759  tmp="$complete EOL"
17760  arguments="${tmp#* }"
17761
17762  # Input might be given as Windows format, start by converting to
17763  # unix format.
17764  new_path="$path"
17765
17766  windows_path="$new_path"
17767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17768    unix_path=`$CYGPATH -u "$windows_path"`
17769    new_path="$unix_path"
17770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17772    new_path="$unix_path"
17773  fi
17774
17775
17776  # Now try to locate executable using which
17777  new_path=`$WHICH "$new_path" 2> /dev/null`
17778
17779  if test "x$new_path" = x; then
17780    # Oops. Which didn't find the executable.
17781    # The splitting of arguments from the executable at a space might have been incorrect,
17782    # since paths with space are more likely in Windows. Give it another try with the whole
17783    # argument.
17784    path="$complete"
17785    arguments="EOL"
17786    new_path="$path"
17787
17788  windows_path="$new_path"
17789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17790    unix_path=`$CYGPATH -u "$windows_path"`
17791    new_path="$unix_path"
17792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17794    new_path="$unix_path"
17795  fi
17796
17797
17798    new_path=`$WHICH "$new_path" 2> /dev/null`
17799    # bat and cmd files are not always considered executable in MSYS causing which
17800    # to not find them
17801    if test "x$new_path" = x \
17802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17804      new_path="$path"
17805
17806  windows_path="$new_path"
17807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17808    unix_path=`$CYGPATH -u "$windows_path"`
17809    new_path="$unix_path"
17810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17812    new_path="$unix_path"
17813  fi
17814
17815    fi
17816
17817    if test "x$new_path" = x; then
17818      # It's still not found. Now this is an unrecoverable error.
17819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17820$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17821      has_space=`$ECHO "$complete" | $GREP " "`
17822      if test "x$has_space" != x; then
17823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17825      fi
17826      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17827    fi
17828  fi
17829
17830  # Now new_path has a complete unix path to the binary
17831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17832    # Keep paths in /bin as-is, but remove trailing .exe if any
17833    new_path="${new_path/%.exe/}"
17834    # Do not save /bin paths to all_fixpath_prefixes!
17835  else
17836    # Not in mixed or Windows style, start by that.
17837    new_path=`cmd //c echo $new_path`
17838
17839  input_path="$new_path"
17840  # Check if we need to convert this using DOS-style short mode. If the path
17841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17842  # take no chances and rewrite it.
17843  # Note: m4 eats our [], so we need to use [ and ] instead.
17844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17845  if test "x$has_forbidden_chars" != x; then
17846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17848  fi
17849
17850    # Output is in $new_path
17851
17852  windows_path="$new_path"
17853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17854    unix_path=`$CYGPATH -u "$windows_path"`
17855    new_path="$unix_path"
17856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17858    new_path="$unix_path"
17859  fi
17860
17861    # remove trailing .exe if any
17862    new_path="${new_path/%.exe/}"
17863
17864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17866  fi
17867
17868    else
17869      # We're on a unix platform. Hooray! :)
17870      # First separate the path from the arguments. This will split at the first
17871      # space.
17872      complete="$FOUND_MAKE"
17873      path="${complete%% *}"
17874      tmp="$complete EOL"
17875      arguments="${tmp#* }"
17876
17877      # Cannot rely on the command "which" here since it doesn't always work.
17878      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17879      if test -z "$is_absolute_path"; then
17880        # Path to executable is not absolute. Find it.
17881        IFS_save="$IFS"
17882        IFS=:
17883        for p in $PATH; do
17884          if test -f "$p/$path" && test -x "$p/$path"; then
17885            new_path="$p/$path"
17886            break
17887          fi
17888        done
17889        IFS="$IFS_save"
17890      else
17891        # This is an absolute path, we can use it without further modifications.
17892        new_path="$path"
17893      fi
17894
17895      if test "x$new_path" = x; then
17896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17897$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17898        has_space=`$ECHO "$complete" | $GREP " "`
17899        if test "x$has_space" != x; then
17900          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17901$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17902        fi
17903        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17904      fi
17905    fi
17906
17907    # Now join together the path and the arguments once again
17908    if test "x$arguments" != xEOL; then
17909      new_complete="$new_path ${arguments% *}"
17910    else
17911      new_complete="$new_path"
17912    fi
17913
17914    if test "x$complete" != "x$new_complete"; then
17915      FOUND_MAKE="$new_complete"
17916      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17917$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17918    fi
17919  fi
17920
17921        fi
17922      fi
17923    fi
17924  fi
17925
17926        if test "x$FOUND_MAKE" = x; then
17927          for ac_prog in make
17928do
17929  # Extract the first word of "$ac_prog", so it can be a program name with args.
17930set dummy $ac_prog; ac_word=$2
17931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17932$as_echo_n "checking for $ac_word... " >&6; }
17933if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17934  $as_echo_n "(cached) " >&6
17935else
17936  case $CHECK_TOOLSDIR_MAKE in
17937  [\\/]* | ?:[\\/]*)
17938  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17939  ;;
17940  *)
17941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17942for as_dir in $PATH
17943do
17944  IFS=$as_save_IFS
17945  test -z "$as_dir" && as_dir=.
17946    for ac_exec_ext in '' $ac_executable_extensions; do
17947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17948    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17950    break 2
17951  fi
17952done
17953  done
17954IFS=$as_save_IFS
17955
17956  ;;
17957esac
17958fi
17959CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17960if test -n "$CHECK_TOOLSDIR_MAKE"; then
17961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17962$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17963else
17964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17965$as_echo "no" >&6; }
17966fi
17967
17968
17969  test -n "$CHECK_TOOLSDIR_MAKE" && break
17970done
17971
17972
17973  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17974  DESCRIPTION="make in tools-dir"
17975
17976  # On Cygwin, we require a newer version of make than on other platforms
17977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17978    MAKE_VERSION_EXPR="-e 4\."
17979    MAKE_REQUIRED_VERSION="4.0"
17980   else
17981    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17982    MAKE_REQUIRED_VERSION="3.81"
17983  fi
17984
17985  if test "x$MAKE_CANDIDATE" != x; then
17986    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17987$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17988    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17989    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17990    if test "x$IS_GNU_MAKE" = x; then
17991      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17992$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17993    else
17994      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17995      if test "x$IS_MODERN_MAKE" = x; then
17996        { $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
17997$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;}
17998      else
17999        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18000          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18001            MAKE_EXPECTED_ENV='cygwin'
18002          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18003            MAKE_EXPECTED_ENV='msys'
18004          else
18005            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18006          fi
18007          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18008          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18009        else
18010          # Not relevant for non-Windows
18011          IS_MAKE_CORRECT_ENV=true
18012        fi
18013        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18014          { $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
18015$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;}
18016        else
18017          FOUND_MAKE=$MAKE_CANDIDATE
18018
18019  # Only process if variable expands to non-empty
18020
18021  if test "x$FOUND_MAKE" != x; then
18022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18023
18024  # First separate the path from the arguments. This will split at the first
18025  # space.
18026  complete="$FOUND_MAKE"
18027  path="${complete%% *}"
18028  tmp="$complete EOL"
18029  arguments="${tmp#* }"
18030
18031  # Input might be given as Windows format, start by converting to
18032  # unix format.
18033  new_path=`$CYGPATH -u "$path"`
18034
18035  # Now try to locate executable using which
18036  new_path=`$WHICH "$new_path" 2> /dev/null`
18037  # bat and cmd files are not always considered executable in cygwin causing which
18038  # to not find them
18039  if test "x$new_path" = x \
18040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18042    new_path=`$CYGPATH -u "$path"`
18043  fi
18044  if test "x$new_path" = x; then
18045    # Oops. Which didn't find the executable.
18046    # The splitting of arguments from the executable at a space might have been incorrect,
18047    # since paths with space are more likely in Windows. Give it another try with the whole
18048    # argument.
18049    path="$complete"
18050    arguments="EOL"
18051    new_path=`$CYGPATH -u "$path"`
18052    new_path=`$WHICH "$new_path" 2> /dev/null`
18053    # bat and cmd files are not always considered executable in cygwin causing which
18054    # to not find them
18055    if test "x$new_path" = x \
18056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18058      new_path=`$CYGPATH -u "$path"`
18059    fi
18060    if test "x$new_path" = x; then
18061      # It's still not found. Now this is an unrecoverable error.
18062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18064      has_space=`$ECHO "$complete" | $GREP " "`
18065      if test "x$has_space" != x; then
18066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18068      fi
18069      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18070    fi
18071  fi
18072
18073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18076  # "foo.exe" is OK but "foo" is an error.
18077  #
18078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18079  # It is also a way to make sure we got the proper file name for the real test later on.
18080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18081  if test "x$test_shortpath" = x; then
18082    # Short path failed, file does not exist as specified.
18083    # Try adding .exe or .cmd
18084    if test -f "${new_path}.exe"; then
18085      input_to_shortpath="${new_path}.exe"
18086    elif test -f "${new_path}.cmd"; then
18087      input_to_shortpath="${new_path}.cmd"
18088    else
18089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18093      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18094    fi
18095  else
18096    input_to_shortpath="$new_path"
18097  fi
18098
18099  # Call helper function which possibly converts this using DOS-style short mode.
18100  # If so, the updated path is stored in $new_path.
18101  new_path="$input_to_shortpath"
18102
18103  input_path="$input_to_shortpath"
18104  # Check if we need to convert this using DOS-style short mode. If the path
18105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18106  # take no chances and rewrite it.
18107  # Note: m4 eats our [], so we need to use [ and ] instead.
18108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18109  if test "x$has_forbidden_chars" != x; then
18110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18114      # Going to short mode and back again did indeed matter. Since short mode is
18115      # case insensitive, let's make it lowercase to improve readability.
18116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18117      # Now convert it back to Unix-style (cygpath)
18118      input_path=`$CYGPATH -u "$shortmode_path"`
18119      new_path="$input_path"
18120    fi
18121  fi
18122
18123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18124  if test "x$test_cygdrive_prefix" = x; then
18125    # As a simple fix, exclude /usr/bin since it's not a real path.
18126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18128      # a path prefixed by /cygdrive for fixpath to work.
18129      new_path="$CYGWIN_ROOT_PATH$input_path"
18130    fi
18131  fi
18132
18133  # remove trailing .exe if any
18134  new_path="${new_path/%.exe/}"
18135
18136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18137
18138  # First separate the path from the arguments. This will split at the first
18139  # space.
18140  complete="$FOUND_MAKE"
18141  path="${complete%% *}"
18142  tmp="$complete EOL"
18143  arguments="${tmp#* }"
18144
18145  # Input might be given as Windows format, start by converting to
18146  # unix format.
18147  new_path="$path"
18148
18149  windows_path="$new_path"
18150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18151    unix_path=`$CYGPATH -u "$windows_path"`
18152    new_path="$unix_path"
18153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18155    new_path="$unix_path"
18156  fi
18157
18158
18159  # Now try to locate executable using which
18160  new_path=`$WHICH "$new_path" 2> /dev/null`
18161
18162  if test "x$new_path" = x; then
18163    # Oops. Which didn't find the executable.
18164    # The splitting of arguments from the executable at a space might have been incorrect,
18165    # since paths with space are more likely in Windows. Give it another try with the whole
18166    # argument.
18167    path="$complete"
18168    arguments="EOL"
18169    new_path="$path"
18170
18171  windows_path="$new_path"
18172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18173    unix_path=`$CYGPATH -u "$windows_path"`
18174    new_path="$unix_path"
18175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18177    new_path="$unix_path"
18178  fi
18179
18180
18181    new_path=`$WHICH "$new_path" 2> /dev/null`
18182    # bat and cmd files are not always considered executable in MSYS causing which
18183    # to not find them
18184    if test "x$new_path" = x \
18185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18187      new_path="$path"
18188
18189  windows_path="$new_path"
18190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18191    unix_path=`$CYGPATH -u "$windows_path"`
18192    new_path="$unix_path"
18193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18195    new_path="$unix_path"
18196  fi
18197
18198    fi
18199
18200    if test "x$new_path" = x; then
18201      # It's still not found. Now this is an unrecoverable error.
18202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18204      has_space=`$ECHO "$complete" | $GREP " "`
18205      if test "x$has_space" != x; then
18206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18208      fi
18209      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18210    fi
18211  fi
18212
18213  # Now new_path has a complete unix path to the binary
18214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18215    # Keep paths in /bin as-is, but remove trailing .exe if any
18216    new_path="${new_path/%.exe/}"
18217    # Do not save /bin paths to all_fixpath_prefixes!
18218  else
18219    # Not in mixed or Windows style, start by that.
18220    new_path=`cmd //c echo $new_path`
18221
18222  input_path="$new_path"
18223  # Check if we need to convert this using DOS-style short mode. If the path
18224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18225  # take no chances and rewrite it.
18226  # Note: m4 eats our [], so we need to use [ and ] instead.
18227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18228  if test "x$has_forbidden_chars" != x; then
18229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18231  fi
18232
18233    # Output is in $new_path
18234
18235  windows_path="$new_path"
18236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18237    unix_path=`$CYGPATH -u "$windows_path"`
18238    new_path="$unix_path"
18239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18241    new_path="$unix_path"
18242  fi
18243
18244    # remove trailing .exe if any
18245    new_path="${new_path/%.exe/}"
18246
18247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18249  fi
18250
18251    else
18252      # We're on a unix platform. Hooray! :)
18253      # First separate the path from the arguments. This will split at the first
18254      # space.
18255      complete="$FOUND_MAKE"
18256      path="${complete%% *}"
18257      tmp="$complete EOL"
18258      arguments="${tmp#* }"
18259
18260      # Cannot rely on the command "which" here since it doesn't always work.
18261      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18262      if test -z "$is_absolute_path"; then
18263        # Path to executable is not absolute. Find it.
18264        IFS_save="$IFS"
18265        IFS=:
18266        for p in $PATH; do
18267          if test -f "$p/$path" && test -x "$p/$path"; then
18268            new_path="$p/$path"
18269            break
18270          fi
18271        done
18272        IFS="$IFS_save"
18273      else
18274        # This is an absolute path, we can use it without further modifications.
18275        new_path="$path"
18276      fi
18277
18278      if test "x$new_path" = x; then
18279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18281        has_space=`$ECHO "$complete" | $GREP " "`
18282        if test "x$has_space" != x; then
18283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18285        fi
18286        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18287      fi
18288    fi
18289
18290    # Now join together the path and the arguments once again
18291    if test "x$arguments" != xEOL; then
18292      new_complete="$new_path ${arguments% *}"
18293    else
18294      new_complete="$new_path"
18295    fi
18296
18297    if test "x$complete" != "x$new_complete"; then
18298      FOUND_MAKE="$new_complete"
18299      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18300$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18301    fi
18302  fi
18303
18304        fi
18305      fi
18306    fi
18307  fi
18308
18309        fi
18310        PATH=$OLD_PATH
18311      fi
18312    fi
18313
18314    if test "x$FOUND_MAKE" = x; then
18315      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
18316    fi
18317
18318  else
18319    # The variable is set, but is it from the command line or the environment?
18320
18321    # Try to remove the string !MAKE! from our list.
18322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18324      # If it failed, the variable was not from the command line. Ignore it,
18325      # but warn the user (except for BASH, which is always set by the calling BASH).
18326      if test "xMAKE" != xBASH; then
18327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18328$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18329      fi
18330      # Try to locate tool using the code snippet
18331
18332    # Try our hardest to locate a correct version of GNU make
18333    for ac_prog in gmake
18334do
18335  # Extract the first word of "$ac_prog", so it can be a program name with args.
18336set dummy $ac_prog; ac_word=$2
18337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18338$as_echo_n "checking for $ac_word... " >&6; }
18339if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18340  $as_echo_n "(cached) " >&6
18341else
18342  case $CHECK_GMAKE in
18343  [\\/]* | ?:[\\/]*)
18344  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18345  ;;
18346  *)
18347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18348for as_dir in $PATH
18349do
18350  IFS=$as_save_IFS
18351  test -z "$as_dir" && as_dir=.
18352    for ac_exec_ext in '' $ac_executable_extensions; do
18353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18354    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18356    break 2
18357  fi
18358done
18359  done
18360IFS=$as_save_IFS
18361
18362  ;;
18363esac
18364fi
18365CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18366if test -n "$CHECK_GMAKE"; then
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18368$as_echo "$CHECK_GMAKE" >&6; }
18369else
18370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18371$as_echo "no" >&6; }
18372fi
18373
18374
18375  test -n "$CHECK_GMAKE" && break
18376done
18377
18378
18379  MAKE_CANDIDATE=""$CHECK_GMAKE""
18380  DESCRIPTION="gmake in PATH"
18381
18382  # On Cygwin, we require a newer version of make than on other platforms
18383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18384    MAKE_VERSION_EXPR="-e 4\."
18385    MAKE_REQUIRED_VERSION="4.0"
18386   else
18387    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18388    MAKE_REQUIRED_VERSION="3.81"
18389  fi
18390
18391  if test "x$MAKE_CANDIDATE" != x; then
18392    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18393$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18394    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18395    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18396    if test "x$IS_GNU_MAKE" = x; then
18397      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18398$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18399    else
18400      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18401      if test "x$IS_MODERN_MAKE" = x; then
18402        { $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
18403$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;}
18404      else
18405        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18406          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18407            MAKE_EXPECTED_ENV='cygwin'
18408          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18409            MAKE_EXPECTED_ENV='msys'
18410          else
18411            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18412          fi
18413          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18414          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18415        else
18416          # Not relevant for non-Windows
18417          IS_MAKE_CORRECT_ENV=true
18418        fi
18419        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18420          { $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
18421$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;}
18422        else
18423          FOUND_MAKE=$MAKE_CANDIDATE
18424
18425  # Only process if variable expands to non-empty
18426
18427  if test "x$FOUND_MAKE" != x; then
18428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18429
18430  # First separate the path from the arguments. This will split at the first
18431  # space.
18432  complete="$FOUND_MAKE"
18433  path="${complete%% *}"
18434  tmp="$complete EOL"
18435  arguments="${tmp#* }"
18436
18437  # Input might be given as Windows format, start by converting to
18438  # unix format.
18439  new_path=`$CYGPATH -u "$path"`
18440
18441  # Now try to locate executable using which
18442  new_path=`$WHICH "$new_path" 2> /dev/null`
18443  # bat and cmd files are not always considered executable in cygwin causing which
18444  # to not find them
18445  if test "x$new_path" = x \
18446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18448    new_path=`$CYGPATH -u "$path"`
18449  fi
18450  if test "x$new_path" = x; then
18451    # Oops. Which didn't find the executable.
18452    # The splitting of arguments from the executable at a space might have been incorrect,
18453    # since paths with space are more likely in Windows. Give it another try with the whole
18454    # argument.
18455    path="$complete"
18456    arguments="EOL"
18457    new_path=`$CYGPATH -u "$path"`
18458    new_path=`$WHICH "$new_path" 2> /dev/null`
18459    # bat and cmd files are not always considered executable in cygwin causing which
18460    # to not find them
18461    if test "x$new_path" = x \
18462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18464      new_path=`$CYGPATH -u "$path"`
18465    fi
18466    if test "x$new_path" = x; then
18467      # It's still not found. Now this is an unrecoverable error.
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18470      has_space=`$ECHO "$complete" | $GREP " "`
18471      if test "x$has_space" != x; then
18472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18474      fi
18475      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18476    fi
18477  fi
18478
18479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18482  # "foo.exe" is OK but "foo" is an error.
18483  #
18484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18485  # It is also a way to make sure we got the proper file name for the real test later on.
18486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18487  if test "x$test_shortpath" = x; then
18488    # Short path failed, file does not exist as specified.
18489    # Try adding .exe or .cmd
18490    if test -f "${new_path}.exe"; then
18491      input_to_shortpath="${new_path}.exe"
18492    elif test -f "${new_path}.cmd"; then
18493      input_to_shortpath="${new_path}.cmd"
18494    else
18495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18499      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18500    fi
18501  else
18502    input_to_shortpath="$new_path"
18503  fi
18504
18505  # Call helper function which possibly converts this using DOS-style short mode.
18506  # If so, the updated path is stored in $new_path.
18507  new_path="$input_to_shortpath"
18508
18509  input_path="$input_to_shortpath"
18510  # Check if we need to convert this using DOS-style short mode. If the path
18511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18512  # take no chances and rewrite it.
18513  # Note: m4 eats our [], so we need to use [ and ] instead.
18514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18515  if test "x$has_forbidden_chars" != x; then
18516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18520      # Going to short mode and back again did indeed matter. Since short mode is
18521      # case insensitive, let's make it lowercase to improve readability.
18522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18523      # Now convert it back to Unix-style (cygpath)
18524      input_path=`$CYGPATH -u "$shortmode_path"`
18525      new_path="$input_path"
18526    fi
18527  fi
18528
18529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18530  if test "x$test_cygdrive_prefix" = x; then
18531    # As a simple fix, exclude /usr/bin since it's not a real path.
18532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18534      # a path prefixed by /cygdrive for fixpath to work.
18535      new_path="$CYGWIN_ROOT_PATH$input_path"
18536    fi
18537  fi
18538
18539  # remove trailing .exe if any
18540  new_path="${new_path/%.exe/}"
18541
18542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18543
18544  # First separate the path from the arguments. This will split at the first
18545  # space.
18546  complete="$FOUND_MAKE"
18547  path="${complete%% *}"
18548  tmp="$complete EOL"
18549  arguments="${tmp#* }"
18550
18551  # Input might be given as Windows format, start by converting to
18552  # unix format.
18553  new_path="$path"
18554
18555  windows_path="$new_path"
18556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18557    unix_path=`$CYGPATH -u "$windows_path"`
18558    new_path="$unix_path"
18559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18561    new_path="$unix_path"
18562  fi
18563
18564
18565  # Now try to locate executable using which
18566  new_path=`$WHICH "$new_path" 2> /dev/null`
18567
18568  if test "x$new_path" = x; then
18569    # Oops. Which didn't find the executable.
18570    # The splitting of arguments from the executable at a space might have been incorrect,
18571    # since paths with space are more likely in Windows. Give it another try with the whole
18572    # argument.
18573    path="$complete"
18574    arguments="EOL"
18575    new_path="$path"
18576
18577  windows_path="$new_path"
18578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18579    unix_path=`$CYGPATH -u "$windows_path"`
18580    new_path="$unix_path"
18581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18583    new_path="$unix_path"
18584  fi
18585
18586
18587    new_path=`$WHICH "$new_path" 2> /dev/null`
18588    # bat and cmd files are not always considered executable in MSYS causing which
18589    # to not find them
18590    if test "x$new_path" = x \
18591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18593      new_path="$path"
18594
18595  windows_path="$new_path"
18596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18597    unix_path=`$CYGPATH -u "$windows_path"`
18598    new_path="$unix_path"
18599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18601    new_path="$unix_path"
18602  fi
18603
18604    fi
18605
18606    if test "x$new_path" = x; then
18607      # It's still not found. Now this is an unrecoverable error.
18608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18610      has_space=`$ECHO "$complete" | $GREP " "`
18611      if test "x$has_space" != x; then
18612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18614      fi
18615      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18616    fi
18617  fi
18618
18619  # Now new_path has a complete unix path to the binary
18620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18621    # Keep paths in /bin as-is, but remove trailing .exe if any
18622    new_path="${new_path/%.exe/}"
18623    # Do not save /bin paths to all_fixpath_prefixes!
18624  else
18625    # Not in mixed or Windows style, start by that.
18626    new_path=`cmd //c echo $new_path`
18627
18628  input_path="$new_path"
18629  # Check if we need to convert this using DOS-style short mode. If the path
18630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18631  # take no chances and rewrite it.
18632  # Note: m4 eats our [], so we need to use [ and ] instead.
18633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18634  if test "x$has_forbidden_chars" != x; then
18635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18637  fi
18638
18639    # Output is in $new_path
18640
18641  windows_path="$new_path"
18642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18643    unix_path=`$CYGPATH -u "$windows_path"`
18644    new_path="$unix_path"
18645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18647    new_path="$unix_path"
18648  fi
18649
18650    # remove trailing .exe if any
18651    new_path="${new_path/%.exe/}"
18652
18653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18655  fi
18656
18657    else
18658      # We're on a unix platform. Hooray! :)
18659      # First separate the path from the arguments. This will split at the first
18660      # space.
18661      complete="$FOUND_MAKE"
18662      path="${complete%% *}"
18663      tmp="$complete EOL"
18664      arguments="${tmp#* }"
18665
18666      # Cannot rely on the command "which" here since it doesn't always work.
18667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18668      if test -z "$is_absolute_path"; then
18669        # Path to executable is not absolute. Find it.
18670        IFS_save="$IFS"
18671        IFS=:
18672        for p in $PATH; do
18673          if test -f "$p/$path" && test -x "$p/$path"; then
18674            new_path="$p/$path"
18675            break
18676          fi
18677        done
18678        IFS="$IFS_save"
18679      else
18680        # This is an absolute path, we can use it without further modifications.
18681        new_path="$path"
18682      fi
18683
18684      if test "x$new_path" = x; then
18685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18687        has_space=`$ECHO "$complete" | $GREP " "`
18688        if test "x$has_space" != x; then
18689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18691        fi
18692        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18693      fi
18694    fi
18695
18696    # Now join together the path and the arguments once again
18697    if test "x$arguments" != xEOL; then
18698      new_complete="$new_path ${arguments% *}"
18699    else
18700      new_complete="$new_path"
18701    fi
18702
18703    if test "x$complete" != "x$new_complete"; then
18704      FOUND_MAKE="$new_complete"
18705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18706$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18707    fi
18708  fi
18709
18710        fi
18711      fi
18712    fi
18713  fi
18714
18715
18716    if test "x$FOUND_MAKE" = x; then
18717      for ac_prog in make
18718do
18719  # Extract the first word of "$ac_prog", so it can be a program name with args.
18720set dummy $ac_prog; ac_word=$2
18721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18722$as_echo_n "checking for $ac_word... " >&6; }
18723if ${ac_cv_path_CHECK_MAKE+:} false; then :
18724  $as_echo_n "(cached) " >&6
18725else
18726  case $CHECK_MAKE in
18727  [\\/]* | ?:[\\/]*)
18728  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18729  ;;
18730  *)
18731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18732for as_dir in $PATH
18733do
18734  IFS=$as_save_IFS
18735  test -z "$as_dir" && as_dir=.
18736    for ac_exec_ext in '' $ac_executable_extensions; do
18737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18738    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18740    break 2
18741  fi
18742done
18743  done
18744IFS=$as_save_IFS
18745
18746  ;;
18747esac
18748fi
18749CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18750if test -n "$CHECK_MAKE"; then
18751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18752$as_echo "$CHECK_MAKE" >&6; }
18753else
18754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18755$as_echo "no" >&6; }
18756fi
18757
18758
18759  test -n "$CHECK_MAKE" && break
18760done
18761
18762
18763  MAKE_CANDIDATE=""$CHECK_MAKE""
18764  DESCRIPTION="make in PATH"
18765
18766  # On Cygwin, we require a newer version of make than on other platforms
18767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18768    MAKE_VERSION_EXPR="-e 4\."
18769    MAKE_REQUIRED_VERSION="4.0"
18770   else
18771    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18772    MAKE_REQUIRED_VERSION="3.81"
18773  fi
18774
18775  if test "x$MAKE_CANDIDATE" != x; then
18776    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18777$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18778    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18779    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18780    if test "x$IS_GNU_MAKE" = x; then
18781      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18782$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18783    else
18784      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18785      if test "x$IS_MODERN_MAKE" = x; then
18786        { $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
18787$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;}
18788      else
18789        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18790          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791            MAKE_EXPECTED_ENV='cygwin'
18792          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18793            MAKE_EXPECTED_ENV='msys'
18794          else
18795            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18796          fi
18797          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18798          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18799        else
18800          # Not relevant for non-Windows
18801          IS_MAKE_CORRECT_ENV=true
18802        fi
18803        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18804          { $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
18805$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;}
18806        else
18807          FOUND_MAKE=$MAKE_CANDIDATE
18808
18809  # Only process if variable expands to non-empty
18810
18811  if test "x$FOUND_MAKE" != x; then
18812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18813
18814  # First separate the path from the arguments. This will split at the first
18815  # space.
18816  complete="$FOUND_MAKE"
18817  path="${complete%% *}"
18818  tmp="$complete EOL"
18819  arguments="${tmp#* }"
18820
18821  # Input might be given as Windows format, start by converting to
18822  # unix format.
18823  new_path=`$CYGPATH -u "$path"`
18824
18825  # Now try to locate executable using which
18826  new_path=`$WHICH "$new_path" 2> /dev/null`
18827  # bat and cmd files are not always considered executable in cygwin causing which
18828  # to not find them
18829  if test "x$new_path" = x \
18830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18832    new_path=`$CYGPATH -u "$path"`
18833  fi
18834  if test "x$new_path" = x; then
18835    # Oops. Which didn't find the executable.
18836    # The splitting of arguments from the executable at a space might have been incorrect,
18837    # since paths with space are more likely in Windows. Give it another try with the whole
18838    # argument.
18839    path="$complete"
18840    arguments="EOL"
18841    new_path=`$CYGPATH -u "$path"`
18842    new_path=`$WHICH "$new_path" 2> /dev/null`
18843    # bat and cmd files are not always considered executable in cygwin causing which
18844    # to not find them
18845    if test "x$new_path" = x \
18846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18848      new_path=`$CYGPATH -u "$path"`
18849    fi
18850    if test "x$new_path" = x; then
18851      # It's still not found. Now this is an unrecoverable error.
18852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18854      has_space=`$ECHO "$complete" | $GREP " "`
18855      if test "x$has_space" != x; then
18856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18858      fi
18859      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18860    fi
18861  fi
18862
18863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18866  # "foo.exe" is OK but "foo" is an error.
18867  #
18868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18869  # It is also a way to make sure we got the proper file name for the real test later on.
18870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18871  if test "x$test_shortpath" = x; then
18872    # Short path failed, file does not exist as specified.
18873    # Try adding .exe or .cmd
18874    if test -f "${new_path}.exe"; then
18875      input_to_shortpath="${new_path}.exe"
18876    elif test -f "${new_path}.cmd"; then
18877      input_to_shortpath="${new_path}.cmd"
18878    else
18879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18880$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18883      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18884    fi
18885  else
18886    input_to_shortpath="$new_path"
18887  fi
18888
18889  # Call helper function which possibly converts this using DOS-style short mode.
18890  # If so, the updated path is stored in $new_path.
18891  new_path="$input_to_shortpath"
18892
18893  input_path="$input_to_shortpath"
18894  # Check if we need to convert this using DOS-style short mode. If the path
18895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18896  # take no chances and rewrite it.
18897  # Note: m4 eats our [], so we need to use [ and ] instead.
18898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18899  if test "x$has_forbidden_chars" != x; then
18900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18904      # Going to short mode and back again did indeed matter. Since short mode is
18905      # case insensitive, let's make it lowercase to improve readability.
18906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18907      # Now convert it back to Unix-style (cygpath)
18908      input_path=`$CYGPATH -u "$shortmode_path"`
18909      new_path="$input_path"
18910    fi
18911  fi
18912
18913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18914  if test "x$test_cygdrive_prefix" = x; then
18915    # As a simple fix, exclude /usr/bin since it's not a real path.
18916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18918      # a path prefixed by /cygdrive for fixpath to work.
18919      new_path="$CYGWIN_ROOT_PATH$input_path"
18920    fi
18921  fi
18922
18923  # remove trailing .exe if any
18924  new_path="${new_path/%.exe/}"
18925
18926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18927
18928  # First separate the path from the arguments. This will split at the first
18929  # space.
18930  complete="$FOUND_MAKE"
18931  path="${complete%% *}"
18932  tmp="$complete EOL"
18933  arguments="${tmp#* }"
18934
18935  # Input might be given as Windows format, start by converting to
18936  # unix format.
18937  new_path="$path"
18938
18939  windows_path="$new_path"
18940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18941    unix_path=`$CYGPATH -u "$windows_path"`
18942    new_path="$unix_path"
18943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18945    new_path="$unix_path"
18946  fi
18947
18948
18949  # Now try to locate executable using which
18950  new_path=`$WHICH "$new_path" 2> /dev/null`
18951
18952  if test "x$new_path" = x; then
18953    # Oops. Which didn't find the executable.
18954    # The splitting of arguments from the executable at a space might have been incorrect,
18955    # since paths with space are more likely in Windows. Give it another try with the whole
18956    # argument.
18957    path="$complete"
18958    arguments="EOL"
18959    new_path="$path"
18960
18961  windows_path="$new_path"
18962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18963    unix_path=`$CYGPATH -u "$windows_path"`
18964    new_path="$unix_path"
18965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18967    new_path="$unix_path"
18968  fi
18969
18970
18971    new_path=`$WHICH "$new_path" 2> /dev/null`
18972    # bat and cmd files are not always considered executable in MSYS causing which
18973    # to not find them
18974    if test "x$new_path" = x \
18975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18977      new_path="$path"
18978
18979  windows_path="$new_path"
18980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18981    unix_path=`$CYGPATH -u "$windows_path"`
18982    new_path="$unix_path"
18983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18985    new_path="$unix_path"
18986  fi
18987
18988    fi
18989
18990    if test "x$new_path" = x; then
18991      # It's still not found. Now this is an unrecoverable error.
18992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18993$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18994      has_space=`$ECHO "$complete" | $GREP " "`
18995      if test "x$has_space" != x; then
18996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18998      fi
18999      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19000    fi
19001  fi
19002
19003  # Now new_path has a complete unix path to the binary
19004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19005    # Keep paths in /bin as-is, but remove trailing .exe if any
19006    new_path="${new_path/%.exe/}"
19007    # Do not save /bin paths to all_fixpath_prefixes!
19008  else
19009    # Not in mixed or Windows style, start by that.
19010    new_path=`cmd //c echo $new_path`
19011
19012  input_path="$new_path"
19013  # Check if we need to convert this using DOS-style short mode. If the path
19014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19015  # take no chances and rewrite it.
19016  # Note: m4 eats our [], so we need to use [ and ] instead.
19017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19018  if test "x$has_forbidden_chars" != x; then
19019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19021  fi
19022
19023    # Output is in $new_path
19024
19025  windows_path="$new_path"
19026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19027    unix_path=`$CYGPATH -u "$windows_path"`
19028    new_path="$unix_path"
19029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19031    new_path="$unix_path"
19032  fi
19033
19034    # remove trailing .exe if any
19035    new_path="${new_path/%.exe/}"
19036
19037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19039  fi
19040
19041    else
19042      # We're on a unix platform. Hooray! :)
19043      # First separate the path from the arguments. This will split at the first
19044      # space.
19045      complete="$FOUND_MAKE"
19046      path="${complete%% *}"
19047      tmp="$complete EOL"
19048      arguments="${tmp#* }"
19049
19050      # Cannot rely on the command "which" here since it doesn't always work.
19051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19052      if test -z "$is_absolute_path"; then
19053        # Path to executable is not absolute. Find it.
19054        IFS_save="$IFS"
19055        IFS=:
19056        for p in $PATH; do
19057          if test -f "$p/$path" && test -x "$p/$path"; then
19058            new_path="$p/$path"
19059            break
19060          fi
19061        done
19062        IFS="$IFS_save"
19063      else
19064        # This is an absolute path, we can use it without further modifications.
19065        new_path="$path"
19066      fi
19067
19068      if test "x$new_path" = x; then
19069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19070$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19071        has_space=`$ECHO "$complete" | $GREP " "`
19072        if test "x$has_space" != x; then
19073          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19075        fi
19076        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19077      fi
19078    fi
19079
19080    # Now join together the path and the arguments once again
19081    if test "x$arguments" != xEOL; then
19082      new_complete="$new_path ${arguments% *}"
19083    else
19084      new_complete="$new_path"
19085    fi
19086
19087    if test "x$complete" != "x$new_complete"; then
19088      FOUND_MAKE="$new_complete"
19089      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19090$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19091    fi
19092  fi
19093
19094        fi
19095      fi
19096    fi
19097  fi
19098
19099    fi
19100
19101    if test "x$FOUND_MAKE" = x; then
19102      if test "x$TOOLCHAIN_PATH" != x; then
19103        # We have a toolchain path, check that as well before giving up.
19104        OLD_PATH=$PATH
19105        PATH=$TOOLCHAIN_PATH:$PATH
19106        for ac_prog in gmake
19107do
19108  # Extract the first word of "$ac_prog", so it can be a program name with args.
19109set dummy $ac_prog; ac_word=$2
19110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19111$as_echo_n "checking for $ac_word... " >&6; }
19112if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19113  $as_echo_n "(cached) " >&6
19114else
19115  case $CHECK_TOOLSDIR_GMAKE in
19116  [\\/]* | ?:[\\/]*)
19117  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19118  ;;
19119  *)
19120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19121for as_dir in $PATH
19122do
19123  IFS=$as_save_IFS
19124  test -z "$as_dir" && as_dir=.
19125    for ac_exec_ext in '' $ac_executable_extensions; do
19126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19127    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19129    break 2
19130  fi
19131done
19132  done
19133IFS=$as_save_IFS
19134
19135  ;;
19136esac
19137fi
19138CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19139if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19141$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19142else
19143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19144$as_echo "no" >&6; }
19145fi
19146
19147
19148  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19149done
19150
19151
19152  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19153  DESCRIPTION="gmake in tools-dir"
19154
19155  # On Cygwin, we require a newer version of make than on other platforms
19156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19157    MAKE_VERSION_EXPR="-e 4\."
19158    MAKE_REQUIRED_VERSION="4.0"
19159   else
19160    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19161    MAKE_REQUIRED_VERSION="3.81"
19162  fi
19163
19164  if test "x$MAKE_CANDIDATE" != x; then
19165    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19166$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19167    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19168    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19169    if test "x$IS_GNU_MAKE" = x; then
19170      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19171$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19172    else
19173      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19174      if test "x$IS_MODERN_MAKE" = x; then
19175        { $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
19176$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;}
19177      else
19178        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19179          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19180            MAKE_EXPECTED_ENV='cygwin'
19181          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19182            MAKE_EXPECTED_ENV='msys'
19183          else
19184            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19185          fi
19186          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19187          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19188        else
19189          # Not relevant for non-Windows
19190          IS_MAKE_CORRECT_ENV=true
19191        fi
19192        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19193          { $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
19194$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;}
19195        else
19196          FOUND_MAKE=$MAKE_CANDIDATE
19197
19198  # Only process if variable expands to non-empty
19199
19200  if test "x$FOUND_MAKE" != x; then
19201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19202
19203  # First separate the path from the arguments. This will split at the first
19204  # space.
19205  complete="$FOUND_MAKE"
19206  path="${complete%% *}"
19207  tmp="$complete EOL"
19208  arguments="${tmp#* }"
19209
19210  # Input might be given as Windows format, start by converting to
19211  # unix format.
19212  new_path=`$CYGPATH -u "$path"`
19213
19214  # Now try to locate executable using which
19215  new_path=`$WHICH "$new_path" 2> /dev/null`
19216  # bat and cmd files are not always considered executable in cygwin causing which
19217  # to not find them
19218  if test "x$new_path" = x \
19219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19221    new_path=`$CYGPATH -u "$path"`
19222  fi
19223  if test "x$new_path" = x; then
19224    # Oops. Which didn't find the executable.
19225    # The splitting of arguments from the executable at a space might have been incorrect,
19226    # since paths with space are more likely in Windows. Give it another try with the whole
19227    # argument.
19228    path="$complete"
19229    arguments="EOL"
19230    new_path=`$CYGPATH -u "$path"`
19231    new_path=`$WHICH "$new_path" 2> /dev/null`
19232    # bat and cmd files are not always considered executable in cygwin causing which
19233    # to not find them
19234    if test "x$new_path" = x \
19235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19237      new_path=`$CYGPATH -u "$path"`
19238    fi
19239    if test "x$new_path" = x; then
19240      # It's still not found. Now this is an unrecoverable error.
19241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19242$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19243      has_space=`$ECHO "$complete" | $GREP " "`
19244      if test "x$has_space" != x; then
19245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19247      fi
19248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249    fi
19250  fi
19251
19252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19255  # "foo.exe" is OK but "foo" is an error.
19256  #
19257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19258  # It is also a way to make sure we got the proper file name for the real test later on.
19259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19260  if test "x$test_shortpath" = x; then
19261    # Short path failed, file does not exist as specified.
19262    # Try adding .exe or .cmd
19263    if test -f "${new_path}.exe"; then
19264      input_to_shortpath="${new_path}.exe"
19265    elif test -f "${new_path}.cmd"; then
19266      input_to_shortpath="${new_path}.cmd"
19267    else
19268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19269$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19272      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19273    fi
19274  else
19275    input_to_shortpath="$new_path"
19276  fi
19277
19278  # Call helper function which possibly converts this using DOS-style short mode.
19279  # If so, the updated path is stored in $new_path.
19280  new_path="$input_to_shortpath"
19281
19282  input_path="$input_to_shortpath"
19283  # Check if we need to convert this using DOS-style short mode. If the path
19284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19285  # take no chances and rewrite it.
19286  # Note: m4 eats our [], so we need to use [ and ] instead.
19287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19288  if test "x$has_forbidden_chars" != x; then
19289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19293      # Going to short mode and back again did indeed matter. Since short mode is
19294      # case insensitive, let's make it lowercase to improve readability.
19295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19296      # Now convert it back to Unix-style (cygpath)
19297      input_path=`$CYGPATH -u "$shortmode_path"`
19298      new_path="$input_path"
19299    fi
19300  fi
19301
19302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19303  if test "x$test_cygdrive_prefix" = x; then
19304    # As a simple fix, exclude /usr/bin since it's not a real path.
19305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19307      # a path prefixed by /cygdrive for fixpath to work.
19308      new_path="$CYGWIN_ROOT_PATH$input_path"
19309    fi
19310  fi
19311
19312  # remove trailing .exe if any
19313  new_path="${new_path/%.exe/}"
19314
19315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316
19317  # First separate the path from the arguments. This will split at the first
19318  # space.
19319  complete="$FOUND_MAKE"
19320  path="${complete%% *}"
19321  tmp="$complete EOL"
19322  arguments="${tmp#* }"
19323
19324  # Input might be given as Windows format, start by converting to
19325  # unix format.
19326  new_path="$path"
19327
19328  windows_path="$new_path"
19329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19330    unix_path=`$CYGPATH -u "$windows_path"`
19331    new_path="$unix_path"
19332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19334    new_path="$unix_path"
19335  fi
19336
19337
19338  # Now try to locate executable using which
19339  new_path=`$WHICH "$new_path" 2> /dev/null`
19340
19341  if test "x$new_path" = x; then
19342    # Oops. Which didn't find the executable.
19343    # The splitting of arguments from the executable at a space might have been incorrect,
19344    # since paths with space are more likely in Windows. Give it another try with the whole
19345    # argument.
19346    path="$complete"
19347    arguments="EOL"
19348    new_path="$path"
19349
19350  windows_path="$new_path"
19351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19352    unix_path=`$CYGPATH -u "$windows_path"`
19353    new_path="$unix_path"
19354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19356    new_path="$unix_path"
19357  fi
19358
19359
19360    new_path=`$WHICH "$new_path" 2> /dev/null`
19361    # bat and cmd files are not always considered executable in MSYS causing which
19362    # to not find them
19363    if test "x$new_path" = x \
19364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19366      new_path="$path"
19367
19368  windows_path="$new_path"
19369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19370    unix_path=`$CYGPATH -u "$windows_path"`
19371    new_path="$unix_path"
19372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19374    new_path="$unix_path"
19375  fi
19376
19377    fi
19378
19379    if test "x$new_path" = x; then
19380      # It's still not found. Now this is an unrecoverable error.
19381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19382$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19383      has_space=`$ECHO "$complete" | $GREP " "`
19384      if test "x$has_space" != x; then
19385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19387      fi
19388      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19389    fi
19390  fi
19391
19392  # Now new_path has a complete unix path to the binary
19393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19394    # Keep paths in /bin as-is, but remove trailing .exe if any
19395    new_path="${new_path/%.exe/}"
19396    # Do not save /bin paths to all_fixpath_prefixes!
19397  else
19398    # Not in mixed or Windows style, start by that.
19399    new_path=`cmd //c echo $new_path`
19400
19401  input_path="$new_path"
19402  # Check if we need to convert this using DOS-style short mode. If the path
19403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19404  # take no chances and rewrite it.
19405  # Note: m4 eats our [], so we need to use [ and ] instead.
19406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19407  if test "x$has_forbidden_chars" != x; then
19408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19410  fi
19411
19412    # Output is in $new_path
19413
19414  windows_path="$new_path"
19415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19416    unix_path=`$CYGPATH -u "$windows_path"`
19417    new_path="$unix_path"
19418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19420    new_path="$unix_path"
19421  fi
19422
19423    # remove trailing .exe if any
19424    new_path="${new_path/%.exe/}"
19425
19426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19428  fi
19429
19430    else
19431      # We're on a unix platform. Hooray! :)
19432      # First separate the path from the arguments. This will split at the first
19433      # space.
19434      complete="$FOUND_MAKE"
19435      path="${complete%% *}"
19436      tmp="$complete EOL"
19437      arguments="${tmp#* }"
19438
19439      # Cannot rely on the command "which" here since it doesn't always work.
19440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19441      if test -z "$is_absolute_path"; then
19442        # Path to executable is not absolute. Find it.
19443        IFS_save="$IFS"
19444        IFS=:
19445        for p in $PATH; do
19446          if test -f "$p/$path" && test -x "$p/$path"; then
19447            new_path="$p/$path"
19448            break
19449          fi
19450        done
19451        IFS="$IFS_save"
19452      else
19453        # This is an absolute path, we can use it without further modifications.
19454        new_path="$path"
19455      fi
19456
19457      if test "x$new_path" = x; then
19458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19459$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19460        has_space=`$ECHO "$complete" | $GREP " "`
19461        if test "x$has_space" != x; then
19462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19464        fi
19465        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19466      fi
19467    fi
19468
19469    # Now join together the path and the arguments once again
19470    if test "x$arguments" != xEOL; then
19471      new_complete="$new_path ${arguments% *}"
19472    else
19473      new_complete="$new_path"
19474    fi
19475
19476    if test "x$complete" != "x$new_complete"; then
19477      FOUND_MAKE="$new_complete"
19478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19479$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19480    fi
19481  fi
19482
19483        fi
19484      fi
19485    fi
19486  fi
19487
19488        if test "x$FOUND_MAKE" = x; then
19489          for ac_prog in make
19490do
19491  # Extract the first word of "$ac_prog", so it can be a program name with args.
19492set dummy $ac_prog; ac_word=$2
19493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19494$as_echo_n "checking for $ac_word... " >&6; }
19495if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19496  $as_echo_n "(cached) " >&6
19497else
19498  case $CHECK_TOOLSDIR_MAKE in
19499  [\\/]* | ?:[\\/]*)
19500  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19501  ;;
19502  *)
19503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19504for as_dir in $PATH
19505do
19506  IFS=$as_save_IFS
19507  test -z "$as_dir" && as_dir=.
19508    for ac_exec_ext in '' $ac_executable_extensions; do
19509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19510    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19512    break 2
19513  fi
19514done
19515  done
19516IFS=$as_save_IFS
19517
19518  ;;
19519esac
19520fi
19521CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19522if test -n "$CHECK_TOOLSDIR_MAKE"; then
19523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19524$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19525else
19526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19527$as_echo "no" >&6; }
19528fi
19529
19530
19531  test -n "$CHECK_TOOLSDIR_MAKE" && break
19532done
19533
19534
19535  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19536  DESCRIPTION="make in tools-dir"
19537
19538  # On Cygwin, we require a newer version of make than on other platforms
19539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19540    MAKE_VERSION_EXPR="-e 4\."
19541    MAKE_REQUIRED_VERSION="4.0"
19542   else
19543    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19544    MAKE_REQUIRED_VERSION="3.81"
19545  fi
19546
19547  if test "x$MAKE_CANDIDATE" != x; then
19548    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19549$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19550    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19551    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19552    if test "x$IS_GNU_MAKE" = x; then
19553      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19554$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19555    else
19556      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19557      if test "x$IS_MODERN_MAKE" = x; then
19558        { $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
19559$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;}
19560      else
19561        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19562          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19563            MAKE_EXPECTED_ENV='cygwin'
19564          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19565            MAKE_EXPECTED_ENV='msys'
19566          else
19567            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19568          fi
19569          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19570          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19571        else
19572          # Not relevant for non-Windows
19573          IS_MAKE_CORRECT_ENV=true
19574        fi
19575        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19576          { $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
19577$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;}
19578        else
19579          FOUND_MAKE=$MAKE_CANDIDATE
19580
19581  # Only process if variable expands to non-empty
19582
19583  if test "x$FOUND_MAKE" != x; then
19584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19585
19586  # First separate the path from the arguments. This will split at the first
19587  # space.
19588  complete="$FOUND_MAKE"
19589  path="${complete%% *}"
19590  tmp="$complete EOL"
19591  arguments="${tmp#* }"
19592
19593  # Input might be given as Windows format, start by converting to
19594  # unix format.
19595  new_path=`$CYGPATH -u "$path"`
19596
19597  # Now try to locate executable using which
19598  new_path=`$WHICH "$new_path" 2> /dev/null`
19599  # bat and cmd files are not always considered executable in cygwin causing which
19600  # to not find them
19601  if test "x$new_path" = x \
19602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19604    new_path=`$CYGPATH -u "$path"`
19605  fi
19606  if test "x$new_path" = x; then
19607    # Oops. Which didn't find the executable.
19608    # The splitting of arguments from the executable at a space might have been incorrect,
19609    # since paths with space are more likely in Windows. Give it another try with the whole
19610    # argument.
19611    path="$complete"
19612    arguments="EOL"
19613    new_path=`$CYGPATH -u "$path"`
19614    new_path=`$WHICH "$new_path" 2> /dev/null`
19615    # bat and cmd files are not always considered executable in cygwin causing which
19616    # to not find them
19617    if test "x$new_path" = x \
19618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19620      new_path=`$CYGPATH -u "$path"`
19621    fi
19622    if test "x$new_path" = x; then
19623      # It's still not found. Now this is an unrecoverable error.
19624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19625$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19626      has_space=`$ECHO "$complete" | $GREP " "`
19627      if test "x$has_space" != x; then
19628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19630      fi
19631      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19632    fi
19633  fi
19634
19635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19638  # "foo.exe" is OK but "foo" is an error.
19639  #
19640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19641  # It is also a way to make sure we got the proper file name for the real test later on.
19642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19643  if test "x$test_shortpath" = x; then
19644    # Short path failed, file does not exist as specified.
19645    # Try adding .exe or .cmd
19646    if test -f "${new_path}.exe"; then
19647      input_to_shortpath="${new_path}.exe"
19648    elif test -f "${new_path}.cmd"; then
19649      input_to_shortpath="${new_path}.cmd"
19650    else
19651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19652$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19656    fi
19657  else
19658    input_to_shortpath="$new_path"
19659  fi
19660
19661  # Call helper function which possibly converts this using DOS-style short mode.
19662  # If so, the updated path is stored in $new_path.
19663  new_path="$input_to_shortpath"
19664
19665  input_path="$input_to_shortpath"
19666  # Check if we need to convert this using DOS-style short mode. If the path
19667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19668  # take no chances and rewrite it.
19669  # Note: m4 eats our [], so we need to use [ and ] instead.
19670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19671  if test "x$has_forbidden_chars" != x; then
19672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19676      # Going to short mode and back again did indeed matter. Since short mode is
19677      # case insensitive, let's make it lowercase to improve readability.
19678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19679      # Now convert it back to Unix-style (cygpath)
19680      input_path=`$CYGPATH -u "$shortmode_path"`
19681      new_path="$input_path"
19682    fi
19683  fi
19684
19685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19686  if test "x$test_cygdrive_prefix" = x; then
19687    # As a simple fix, exclude /usr/bin since it's not a real path.
19688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19690      # a path prefixed by /cygdrive for fixpath to work.
19691      new_path="$CYGWIN_ROOT_PATH$input_path"
19692    fi
19693  fi
19694
19695  # remove trailing .exe if any
19696  new_path="${new_path/%.exe/}"
19697
19698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19699
19700  # First separate the path from the arguments. This will split at the first
19701  # space.
19702  complete="$FOUND_MAKE"
19703  path="${complete%% *}"
19704  tmp="$complete EOL"
19705  arguments="${tmp#* }"
19706
19707  # Input might be given as Windows format, start by converting to
19708  # unix format.
19709  new_path="$path"
19710
19711  windows_path="$new_path"
19712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19713    unix_path=`$CYGPATH -u "$windows_path"`
19714    new_path="$unix_path"
19715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19717    new_path="$unix_path"
19718  fi
19719
19720
19721  # Now try to locate executable using which
19722  new_path=`$WHICH "$new_path" 2> /dev/null`
19723
19724  if test "x$new_path" = x; then
19725    # Oops. Which didn't find the executable.
19726    # The splitting of arguments from the executable at a space might have been incorrect,
19727    # since paths with space are more likely in Windows. Give it another try with the whole
19728    # argument.
19729    path="$complete"
19730    arguments="EOL"
19731    new_path="$path"
19732
19733  windows_path="$new_path"
19734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19735    unix_path=`$CYGPATH -u "$windows_path"`
19736    new_path="$unix_path"
19737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19739    new_path="$unix_path"
19740  fi
19741
19742
19743    new_path=`$WHICH "$new_path" 2> /dev/null`
19744    # bat and cmd files are not always considered executable in MSYS causing which
19745    # to not find them
19746    if test "x$new_path" = x \
19747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19749      new_path="$path"
19750
19751  windows_path="$new_path"
19752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19753    unix_path=`$CYGPATH -u "$windows_path"`
19754    new_path="$unix_path"
19755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19757    new_path="$unix_path"
19758  fi
19759
19760    fi
19761
19762    if test "x$new_path" = x; then
19763      # It's still not found. Now this is an unrecoverable error.
19764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19766      has_space=`$ECHO "$complete" | $GREP " "`
19767      if test "x$has_space" != x; then
19768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19770      fi
19771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19772    fi
19773  fi
19774
19775  # Now new_path has a complete unix path to the binary
19776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19777    # Keep paths in /bin as-is, but remove trailing .exe if any
19778    new_path="${new_path/%.exe/}"
19779    # Do not save /bin paths to all_fixpath_prefixes!
19780  else
19781    # Not in mixed or Windows style, start by that.
19782    new_path=`cmd //c echo $new_path`
19783
19784  input_path="$new_path"
19785  # Check if we need to convert this using DOS-style short mode. If the path
19786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19787  # take no chances and rewrite it.
19788  # Note: m4 eats our [], so we need to use [ and ] instead.
19789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19790  if test "x$has_forbidden_chars" != x; then
19791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19793  fi
19794
19795    # Output is in $new_path
19796
19797  windows_path="$new_path"
19798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19799    unix_path=`$CYGPATH -u "$windows_path"`
19800    new_path="$unix_path"
19801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19803    new_path="$unix_path"
19804  fi
19805
19806    # remove trailing .exe if any
19807    new_path="${new_path/%.exe/}"
19808
19809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19811  fi
19812
19813    else
19814      # We're on a unix platform. Hooray! :)
19815      # First separate the path from the arguments. This will split at the first
19816      # space.
19817      complete="$FOUND_MAKE"
19818      path="${complete%% *}"
19819      tmp="$complete EOL"
19820      arguments="${tmp#* }"
19821
19822      # Cannot rely on the command "which" here since it doesn't always work.
19823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19824      if test -z "$is_absolute_path"; then
19825        # Path to executable is not absolute. Find it.
19826        IFS_save="$IFS"
19827        IFS=:
19828        for p in $PATH; do
19829          if test -f "$p/$path" && test -x "$p/$path"; then
19830            new_path="$p/$path"
19831            break
19832          fi
19833        done
19834        IFS="$IFS_save"
19835      else
19836        # This is an absolute path, we can use it without further modifications.
19837        new_path="$path"
19838      fi
19839
19840      if test "x$new_path" = x; then
19841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19843        has_space=`$ECHO "$complete" | $GREP " "`
19844        if test "x$has_space" != x; then
19845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19847        fi
19848        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19849      fi
19850    fi
19851
19852    # Now join together the path and the arguments once again
19853    if test "x$arguments" != xEOL; then
19854      new_complete="$new_path ${arguments% *}"
19855    else
19856      new_complete="$new_path"
19857    fi
19858
19859    if test "x$complete" != "x$new_complete"; then
19860      FOUND_MAKE="$new_complete"
19861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19862$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19863    fi
19864  fi
19865
19866        fi
19867      fi
19868    fi
19869  fi
19870
19871        fi
19872        PATH=$OLD_PATH
19873      fi
19874    fi
19875
19876    if test "x$FOUND_MAKE" = x; then
19877      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
19878    fi
19879
19880    else
19881      # If it succeeded, then it was overridden by the user. We will use it
19882      # for the tool.
19883
19884      # First remove it from the list of overridden variables, so we can test
19885      # for unknown variables in the end.
19886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19887
19888      # Check if we try to supply an empty value
19889      if test "x$MAKE" = x; then
19890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19891$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19893$as_echo_n "checking for MAKE... " >&6; }
19894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19895$as_echo "disabled" >&6; }
19896      else
19897        # Check if the provided tool contains a complete path.
19898        tool_specified="$MAKE"
19899        tool_basename="${tool_specified##*/}"
19900        if test "x$tool_basename" = "x$tool_specified"; then
19901          # A command without a complete path is provided, search $PATH.
19902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19903$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19904          # Extract the first word of "$tool_basename", so it can be a program name with args.
19905set dummy $tool_basename; ac_word=$2
19906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19907$as_echo_n "checking for $ac_word... " >&6; }
19908if ${ac_cv_path_MAKE+:} false; then :
19909  $as_echo_n "(cached) " >&6
19910else
19911  case $MAKE in
19912  [\\/]* | ?:[\\/]*)
19913  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19914  ;;
19915  *)
19916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19917for as_dir in $PATH
19918do
19919  IFS=$as_save_IFS
19920  test -z "$as_dir" && as_dir=.
19921    for ac_exec_ext in '' $ac_executable_extensions; do
19922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19923    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19925    break 2
19926  fi
19927done
19928  done
19929IFS=$as_save_IFS
19930
19931  ;;
19932esac
19933fi
19934MAKE=$ac_cv_path_MAKE
19935if test -n "$MAKE"; then
19936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19937$as_echo "$MAKE" >&6; }
19938else
19939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19940$as_echo "no" >&6; }
19941fi
19942
19943
19944          if test "x$MAKE" = x; then
19945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19946          fi
19947        else
19948          # Otherwise we believe it is a complete path. Use it as it is.
19949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19950$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19952$as_echo_n "checking for MAKE... " >&6; }
19953          if test ! -x "$tool_specified"; then
19954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19955$as_echo "not found" >&6; }
19956            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19957          fi
19958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19959$as_echo "$tool_specified" >&6; }
19960        fi
19961      fi
19962    fi
19963
19964    # If MAKE was set by user, verify the version
19965
19966  MAKE_CANDIDATE=""$MAKE""
19967  DESCRIPTION="user supplied MAKE=$MAKE"
19968
19969  # On Cygwin, we require a newer version of make than on other platforms
19970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19971    MAKE_VERSION_EXPR="-e 4\."
19972    MAKE_REQUIRED_VERSION="4.0"
19973   else
19974    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19975    MAKE_REQUIRED_VERSION="3.81"
19976  fi
19977
19978  if test "x$MAKE_CANDIDATE" != x; then
19979    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19980$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19981    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19982    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19983    if test "x$IS_GNU_MAKE" = x; then
19984      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19985$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19986    else
19987      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19988      if test "x$IS_MODERN_MAKE" = x; then
19989        { $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
19990$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;}
19991      else
19992        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19993          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19994            MAKE_EXPECTED_ENV='cygwin'
19995          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19996            MAKE_EXPECTED_ENV='msys'
19997          else
19998            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19999          fi
20000          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20001          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20002        else
20003          # Not relevant for non-Windows
20004          IS_MAKE_CORRECT_ENV=true
20005        fi
20006        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20007          { $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
20008$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;}
20009        else
20010          FOUND_MAKE=$MAKE_CANDIDATE
20011
20012  # Only process if variable expands to non-empty
20013
20014  if test "x$FOUND_MAKE" != x; then
20015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20016
20017  # First separate the path from the arguments. This will split at the first
20018  # space.
20019  complete="$FOUND_MAKE"
20020  path="${complete%% *}"
20021  tmp="$complete EOL"
20022  arguments="${tmp#* }"
20023
20024  # Input might be given as Windows format, start by converting to
20025  # unix format.
20026  new_path=`$CYGPATH -u "$path"`
20027
20028  # Now try to locate executable using which
20029  new_path=`$WHICH "$new_path" 2> /dev/null`
20030  # bat and cmd files are not always considered executable in cygwin causing which
20031  # to not find them
20032  if test "x$new_path" = x \
20033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20035    new_path=`$CYGPATH -u "$path"`
20036  fi
20037  if test "x$new_path" = x; then
20038    # Oops. Which didn't find the executable.
20039    # The splitting of arguments from the executable at a space might have been incorrect,
20040    # since paths with space are more likely in Windows. Give it another try with the whole
20041    # argument.
20042    path="$complete"
20043    arguments="EOL"
20044    new_path=`$CYGPATH -u "$path"`
20045    new_path=`$WHICH "$new_path" 2> /dev/null`
20046    # bat and cmd files are not always considered executable in cygwin causing which
20047    # to not find them
20048    if test "x$new_path" = x \
20049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20051      new_path=`$CYGPATH -u "$path"`
20052    fi
20053    if test "x$new_path" = x; then
20054      # It's still not found. Now this is an unrecoverable error.
20055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20057      has_space=`$ECHO "$complete" | $GREP " "`
20058      if test "x$has_space" != x; then
20059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20061      fi
20062      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20063    fi
20064  fi
20065
20066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20069  # "foo.exe" is OK but "foo" is an error.
20070  #
20071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20072  # It is also a way to make sure we got the proper file name for the real test later on.
20073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20074  if test "x$test_shortpath" = x; then
20075    # Short path failed, file does not exist as specified.
20076    # Try adding .exe or .cmd
20077    if test -f "${new_path}.exe"; then
20078      input_to_shortpath="${new_path}.exe"
20079    elif test -f "${new_path}.cmd"; then
20080      input_to_shortpath="${new_path}.cmd"
20081    else
20082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20086      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20087    fi
20088  else
20089    input_to_shortpath="$new_path"
20090  fi
20091
20092  # Call helper function which possibly converts this using DOS-style short mode.
20093  # If so, the updated path is stored in $new_path.
20094  new_path="$input_to_shortpath"
20095
20096  input_path="$input_to_shortpath"
20097  # Check if we need to convert this using DOS-style short mode. If the path
20098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20099  # take no chances and rewrite it.
20100  # Note: m4 eats our [], so we need to use [ and ] instead.
20101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20102  if test "x$has_forbidden_chars" != x; then
20103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20107      # Going to short mode and back again did indeed matter. Since short mode is
20108      # case insensitive, let's make it lowercase to improve readability.
20109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20110      # Now convert it back to Unix-style (cygpath)
20111      input_path=`$CYGPATH -u "$shortmode_path"`
20112      new_path="$input_path"
20113    fi
20114  fi
20115
20116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20117  if test "x$test_cygdrive_prefix" = x; then
20118    # As a simple fix, exclude /usr/bin since it's not a real path.
20119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20121      # a path prefixed by /cygdrive for fixpath to work.
20122      new_path="$CYGWIN_ROOT_PATH$input_path"
20123    fi
20124  fi
20125
20126  # remove trailing .exe if any
20127  new_path="${new_path/%.exe/}"
20128
20129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20130
20131  # First separate the path from the arguments. This will split at the first
20132  # space.
20133  complete="$FOUND_MAKE"
20134  path="${complete%% *}"
20135  tmp="$complete EOL"
20136  arguments="${tmp#* }"
20137
20138  # Input might be given as Windows format, start by converting to
20139  # unix format.
20140  new_path="$path"
20141
20142  windows_path="$new_path"
20143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20144    unix_path=`$CYGPATH -u "$windows_path"`
20145    new_path="$unix_path"
20146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20148    new_path="$unix_path"
20149  fi
20150
20151
20152  # Now try to locate executable using which
20153  new_path=`$WHICH "$new_path" 2> /dev/null`
20154
20155  if test "x$new_path" = x; then
20156    # Oops. Which didn't find the executable.
20157    # The splitting of arguments from the executable at a space might have been incorrect,
20158    # since paths with space are more likely in Windows. Give it another try with the whole
20159    # argument.
20160    path="$complete"
20161    arguments="EOL"
20162    new_path="$path"
20163
20164  windows_path="$new_path"
20165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20166    unix_path=`$CYGPATH -u "$windows_path"`
20167    new_path="$unix_path"
20168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20170    new_path="$unix_path"
20171  fi
20172
20173
20174    new_path=`$WHICH "$new_path" 2> /dev/null`
20175    # bat and cmd files are not always considered executable in MSYS causing which
20176    # to not find them
20177    if test "x$new_path" = x \
20178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20180      new_path="$path"
20181
20182  windows_path="$new_path"
20183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20184    unix_path=`$CYGPATH -u "$windows_path"`
20185    new_path="$unix_path"
20186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20188    new_path="$unix_path"
20189  fi
20190
20191    fi
20192
20193    if test "x$new_path" = x; then
20194      # It's still not found. Now this is an unrecoverable error.
20195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20197      has_space=`$ECHO "$complete" | $GREP " "`
20198      if test "x$has_space" != x; then
20199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20201      fi
20202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20203    fi
20204  fi
20205
20206  # Now new_path has a complete unix path to the binary
20207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20208    # Keep paths in /bin as-is, but remove trailing .exe if any
20209    new_path="${new_path/%.exe/}"
20210    # Do not save /bin paths to all_fixpath_prefixes!
20211  else
20212    # Not in mixed or Windows style, start by that.
20213    new_path=`cmd //c echo $new_path`
20214
20215  input_path="$new_path"
20216  # Check if we need to convert this using DOS-style short mode. If the path
20217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20218  # take no chances and rewrite it.
20219  # Note: m4 eats our [], so we need to use [ and ] instead.
20220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20221  if test "x$has_forbidden_chars" != x; then
20222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20224  fi
20225
20226    # Output is in $new_path
20227
20228  windows_path="$new_path"
20229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20230    unix_path=`$CYGPATH -u "$windows_path"`
20231    new_path="$unix_path"
20232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20234    new_path="$unix_path"
20235  fi
20236
20237    # remove trailing .exe if any
20238    new_path="${new_path/%.exe/}"
20239
20240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20242  fi
20243
20244    else
20245      # We're on a unix platform. Hooray! :)
20246      # First separate the path from the arguments. This will split at the first
20247      # space.
20248      complete="$FOUND_MAKE"
20249      path="${complete%% *}"
20250      tmp="$complete EOL"
20251      arguments="${tmp#* }"
20252
20253      # Cannot rely on the command "which" here since it doesn't always work.
20254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20255      if test -z "$is_absolute_path"; then
20256        # Path to executable is not absolute. Find it.
20257        IFS_save="$IFS"
20258        IFS=:
20259        for p in $PATH; do
20260          if test -f "$p/$path" && test -x "$p/$path"; then
20261            new_path="$p/$path"
20262            break
20263          fi
20264        done
20265        IFS="$IFS_save"
20266      else
20267        # This is an absolute path, we can use it without further modifications.
20268        new_path="$path"
20269      fi
20270
20271      if test "x$new_path" = x; then
20272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20274        has_space=`$ECHO "$complete" | $GREP " "`
20275        if test "x$has_space" != x; then
20276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20278        fi
20279        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20280      fi
20281    fi
20282
20283    # Now join together the path and the arguments once again
20284    if test "x$arguments" != xEOL; then
20285      new_complete="$new_path ${arguments% *}"
20286    else
20287      new_complete="$new_path"
20288    fi
20289
20290    if test "x$complete" != "x$new_complete"; then
20291      FOUND_MAKE="$new_complete"
20292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20293$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20294    fi
20295  fi
20296
20297        fi
20298      fi
20299    fi
20300  fi
20301
20302    if test "x$FOUND_MAKE" = x; then
20303      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20304    fi
20305
20306  fi
20307
20308
20309  MAKE=$FOUND_MAKE
20310
20311  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20312$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20313
20314
20315  # Check if make supports the output sync option and if so, setup using it.
20316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20317$as_echo_n "checking if make --output-sync is supported... " >&6; }
20318  if $MAKE --version -O > /dev/null 2>&1; then
20319    OUTPUT_SYNC_SUPPORTED=true
20320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20321$as_echo "yes" >&6; }
20322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20323$as_echo_n "checking for output-sync value... " >&6; }
20324
20325# Check whether --with-output-sync was given.
20326if test "${with_output_sync+set}" = set; then :
20327  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20328fi
20329
20330    if test "x$OUTPUT_SYNC" = "x"; then
20331      OUTPUT_SYNC=none
20332    fi
20333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20334$as_echo "$OUTPUT_SYNC" >&6; }
20335    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20336      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20337    fi
20338  else
20339    OUTPUT_SYNC_SUPPORTED=false
20340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20341$as_echo "no" >&6; }
20342  fi
20343
20344
20345
20346
20347
20348
20349  # Test if find supports -delete
20350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20351$as_echo_n "checking if find supports -delete... " >&6; }
20352  FIND_DELETE="-delete"
20353
20354  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20355
20356  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20357
20358  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20359  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20360    # No, it does not.
20361    rm $DELETEDIR/TestIfFindSupportsDelete
20362    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20363      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20364      FIND_DELETE="-print | xargs rm"
20365    else
20366      FIND_DELETE="-exec rm \{\} \+"
20367    fi
20368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20369$as_echo "no" >&6; }
20370  else
20371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20372$as_echo "yes" >&6; }
20373  fi
20374  rmdir $DELETEDIR
20375
20376
20377
20378  # These tools might not be installed by default,
20379  # need hint on how to install them.
20380
20381
20382
20383  # Publish this variable in the help.
20384
20385
20386  if [ -z "${UNZIP+x}" ]; then
20387    # The variable is not set by user, try to locate tool using the code snippet
20388    for ac_prog in unzip
20389do
20390  # Extract the first word of "$ac_prog", so it can be a program name with args.
20391set dummy $ac_prog; ac_word=$2
20392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20393$as_echo_n "checking for $ac_word... " >&6; }
20394if ${ac_cv_path_UNZIP+:} false; then :
20395  $as_echo_n "(cached) " >&6
20396else
20397  case $UNZIP in
20398  [\\/]* | ?:[\\/]*)
20399  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20400  ;;
20401  *)
20402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20403for as_dir in $PATH
20404do
20405  IFS=$as_save_IFS
20406  test -z "$as_dir" && as_dir=.
20407    for ac_exec_ext in '' $ac_executable_extensions; do
20408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20409    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20411    break 2
20412  fi
20413done
20414  done
20415IFS=$as_save_IFS
20416
20417  ;;
20418esac
20419fi
20420UNZIP=$ac_cv_path_UNZIP
20421if test -n "$UNZIP"; then
20422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20423$as_echo "$UNZIP" >&6; }
20424else
20425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20426$as_echo "no" >&6; }
20427fi
20428
20429
20430  test -n "$UNZIP" && break
20431done
20432
20433  else
20434    # The variable is set, but is it from the command line or the environment?
20435
20436    # Try to remove the string !UNZIP! from our list.
20437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20439      # If it failed, the variable was not from the command line. Ignore it,
20440      # but warn the user (except for BASH, which is always set by the calling BASH).
20441      if test "xUNZIP" != xBASH; then
20442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20443$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20444      fi
20445      # Try to locate tool using the code snippet
20446      for ac_prog in unzip
20447do
20448  # Extract the first word of "$ac_prog", so it can be a program name with args.
20449set dummy $ac_prog; ac_word=$2
20450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20451$as_echo_n "checking for $ac_word... " >&6; }
20452if ${ac_cv_path_UNZIP+:} false; then :
20453  $as_echo_n "(cached) " >&6
20454else
20455  case $UNZIP in
20456  [\\/]* | ?:[\\/]*)
20457  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20458  ;;
20459  *)
20460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20461for as_dir in $PATH
20462do
20463  IFS=$as_save_IFS
20464  test -z "$as_dir" && as_dir=.
20465    for ac_exec_ext in '' $ac_executable_extensions; do
20466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20467    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20469    break 2
20470  fi
20471done
20472  done
20473IFS=$as_save_IFS
20474
20475  ;;
20476esac
20477fi
20478UNZIP=$ac_cv_path_UNZIP
20479if test -n "$UNZIP"; then
20480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20481$as_echo "$UNZIP" >&6; }
20482else
20483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20484$as_echo "no" >&6; }
20485fi
20486
20487
20488  test -n "$UNZIP" && break
20489done
20490
20491    else
20492      # If it succeeded, then it was overridden by the user. We will use it
20493      # for the tool.
20494
20495      # First remove it from the list of overridden variables, so we can test
20496      # for unknown variables in the end.
20497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20498
20499      # Check if we try to supply an empty value
20500      if test "x$UNZIP" = x; then
20501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20502$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20504$as_echo_n "checking for UNZIP... " >&6; }
20505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20506$as_echo "disabled" >&6; }
20507      else
20508        # Check if the provided tool contains a complete path.
20509        tool_specified="$UNZIP"
20510        tool_basename="${tool_specified##*/}"
20511        if test "x$tool_basename" = "x$tool_specified"; then
20512          # A command without a complete path is provided, search $PATH.
20513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20514$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20515          # Extract the first word of "$tool_basename", so it can be a program name with args.
20516set dummy $tool_basename; ac_word=$2
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20518$as_echo_n "checking for $ac_word... " >&6; }
20519if ${ac_cv_path_UNZIP+:} false; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  case $UNZIP in
20523  [\\/]* | ?:[\\/]*)
20524  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20525  ;;
20526  *)
20527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20528for as_dir in $PATH
20529do
20530  IFS=$as_save_IFS
20531  test -z "$as_dir" && as_dir=.
20532    for ac_exec_ext in '' $ac_executable_extensions; do
20533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20534    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20536    break 2
20537  fi
20538done
20539  done
20540IFS=$as_save_IFS
20541
20542  ;;
20543esac
20544fi
20545UNZIP=$ac_cv_path_UNZIP
20546if test -n "$UNZIP"; then
20547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20548$as_echo "$UNZIP" >&6; }
20549else
20550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20551$as_echo "no" >&6; }
20552fi
20553
20554
20555          if test "x$UNZIP" = x; then
20556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20557          fi
20558        else
20559          # Otherwise we believe it is a complete path. Use it as it is.
20560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20561$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20563$as_echo_n "checking for UNZIP... " >&6; }
20564          if test ! -x "$tool_specified"; then
20565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20566$as_echo "not found" >&6; }
20567            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20568          fi
20569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20570$as_echo "$tool_specified" >&6; }
20571        fi
20572      fi
20573    fi
20574
20575  fi
20576
20577
20578
20579  if test "x$UNZIP" = x; then
20580    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20581  fi
20582
20583
20584
20585
20586
20587  # Publish this variable in the help.
20588
20589
20590  if [ -z "${ZIP+x}" ]; then
20591    # The variable is not set by user, try to locate tool using the code snippet
20592    for ac_prog in zip
20593do
20594  # Extract the first word of "$ac_prog", so it can be a program name with args.
20595set dummy $ac_prog; ac_word=$2
20596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20597$as_echo_n "checking for $ac_word... " >&6; }
20598if ${ac_cv_path_ZIP+:} false; then :
20599  $as_echo_n "(cached) " >&6
20600else
20601  case $ZIP in
20602  [\\/]* | ?:[\\/]*)
20603  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20604  ;;
20605  *)
20606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20607for as_dir in $PATH
20608do
20609  IFS=$as_save_IFS
20610  test -z "$as_dir" && as_dir=.
20611    for ac_exec_ext in '' $ac_executable_extensions; do
20612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20613    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20615    break 2
20616  fi
20617done
20618  done
20619IFS=$as_save_IFS
20620
20621  ;;
20622esac
20623fi
20624ZIP=$ac_cv_path_ZIP
20625if test -n "$ZIP"; then
20626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20627$as_echo "$ZIP" >&6; }
20628else
20629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20630$as_echo "no" >&6; }
20631fi
20632
20633
20634  test -n "$ZIP" && break
20635done
20636
20637  else
20638    # The variable is set, but is it from the command line or the environment?
20639
20640    # Try to remove the string !ZIP! from our list.
20641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20643      # If it failed, the variable was not from the command line. Ignore it,
20644      # but warn the user (except for BASH, which is always set by the calling BASH).
20645      if test "xZIP" != xBASH; then
20646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20647$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20648      fi
20649      # Try to locate tool using the code snippet
20650      for ac_prog in zip
20651do
20652  # Extract the first word of "$ac_prog", so it can be a program name with args.
20653set dummy $ac_prog; ac_word=$2
20654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20655$as_echo_n "checking for $ac_word... " >&6; }
20656if ${ac_cv_path_ZIP+:} false; then :
20657  $as_echo_n "(cached) " >&6
20658else
20659  case $ZIP in
20660  [\\/]* | ?:[\\/]*)
20661  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20662  ;;
20663  *)
20664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20665for as_dir in $PATH
20666do
20667  IFS=$as_save_IFS
20668  test -z "$as_dir" && as_dir=.
20669    for ac_exec_ext in '' $ac_executable_extensions; do
20670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20671    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20673    break 2
20674  fi
20675done
20676  done
20677IFS=$as_save_IFS
20678
20679  ;;
20680esac
20681fi
20682ZIP=$ac_cv_path_ZIP
20683if test -n "$ZIP"; then
20684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20685$as_echo "$ZIP" >&6; }
20686else
20687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20688$as_echo "no" >&6; }
20689fi
20690
20691
20692  test -n "$ZIP" && break
20693done
20694
20695    else
20696      # If it succeeded, then it was overridden by the user. We will use it
20697      # for the tool.
20698
20699      # First remove it from the list of overridden variables, so we can test
20700      # for unknown variables in the end.
20701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20702
20703      # Check if we try to supply an empty value
20704      if test "x$ZIP" = x; then
20705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20706$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20708$as_echo_n "checking for ZIP... " >&6; }
20709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20710$as_echo "disabled" >&6; }
20711      else
20712        # Check if the provided tool contains a complete path.
20713        tool_specified="$ZIP"
20714        tool_basename="${tool_specified##*/}"
20715        if test "x$tool_basename" = "x$tool_specified"; then
20716          # A command without a complete path is provided, search $PATH.
20717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20718$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20719          # Extract the first word of "$tool_basename", so it can be a program name with args.
20720set dummy $tool_basename; ac_word=$2
20721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20722$as_echo_n "checking for $ac_word... " >&6; }
20723if ${ac_cv_path_ZIP+:} false; then :
20724  $as_echo_n "(cached) " >&6
20725else
20726  case $ZIP in
20727  [\\/]* | ?:[\\/]*)
20728  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20729  ;;
20730  *)
20731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20732for as_dir in $PATH
20733do
20734  IFS=$as_save_IFS
20735  test -z "$as_dir" && as_dir=.
20736    for ac_exec_ext in '' $ac_executable_extensions; do
20737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20738    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20740    break 2
20741  fi
20742done
20743  done
20744IFS=$as_save_IFS
20745
20746  ;;
20747esac
20748fi
20749ZIP=$ac_cv_path_ZIP
20750if test -n "$ZIP"; then
20751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20752$as_echo "$ZIP" >&6; }
20753else
20754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20755$as_echo "no" >&6; }
20756fi
20757
20758
20759          if test "x$ZIP" = x; then
20760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20761          fi
20762        else
20763          # Otherwise we believe it is a complete path. Use it as it is.
20764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20765$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20767$as_echo_n "checking for ZIP... " >&6; }
20768          if test ! -x "$tool_specified"; then
20769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20770$as_echo "not found" >&6; }
20771            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20772          fi
20773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20774$as_echo "$tool_specified" >&6; }
20775        fi
20776      fi
20777    fi
20778
20779  fi
20780
20781
20782
20783  if test "x$ZIP" = x; then
20784    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20785  fi
20786
20787
20788
20789  # Non-required basic tools
20790
20791
20792
20793  # Publish this variable in the help.
20794
20795
20796  if [ -z "${LDD+x}" ]; then
20797    # The variable is not set by user, try to locate tool using the code snippet
20798    for ac_prog in ldd
20799do
20800  # Extract the first word of "$ac_prog", so it can be a program name with args.
20801set dummy $ac_prog; ac_word=$2
20802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20803$as_echo_n "checking for $ac_word... " >&6; }
20804if ${ac_cv_path_LDD+:} false; then :
20805  $as_echo_n "(cached) " >&6
20806else
20807  case $LDD in
20808  [\\/]* | ?:[\\/]*)
20809  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20810  ;;
20811  *)
20812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20813for as_dir in $PATH
20814do
20815  IFS=$as_save_IFS
20816  test -z "$as_dir" && as_dir=.
20817    for ac_exec_ext in '' $ac_executable_extensions; do
20818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20819    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20821    break 2
20822  fi
20823done
20824  done
20825IFS=$as_save_IFS
20826
20827  ;;
20828esac
20829fi
20830LDD=$ac_cv_path_LDD
20831if test -n "$LDD"; then
20832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20833$as_echo "$LDD" >&6; }
20834else
20835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20836$as_echo "no" >&6; }
20837fi
20838
20839
20840  test -n "$LDD" && break
20841done
20842
20843  else
20844    # The variable is set, but is it from the command line or the environment?
20845
20846    # Try to remove the string !LDD! from our list.
20847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20849      # If it failed, the variable was not from the command line. Ignore it,
20850      # but warn the user (except for BASH, which is always set by the calling BASH).
20851      if test "xLDD" != xBASH; then
20852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20853$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20854      fi
20855      # Try to locate tool using the code snippet
20856      for ac_prog in ldd
20857do
20858  # Extract the first word of "$ac_prog", so it can be a program name with args.
20859set dummy $ac_prog; ac_word=$2
20860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20861$as_echo_n "checking for $ac_word... " >&6; }
20862if ${ac_cv_path_LDD+:} false; then :
20863  $as_echo_n "(cached) " >&6
20864else
20865  case $LDD in
20866  [\\/]* | ?:[\\/]*)
20867  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20868  ;;
20869  *)
20870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20871for as_dir in $PATH
20872do
20873  IFS=$as_save_IFS
20874  test -z "$as_dir" && as_dir=.
20875    for ac_exec_ext in '' $ac_executable_extensions; do
20876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20877    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20879    break 2
20880  fi
20881done
20882  done
20883IFS=$as_save_IFS
20884
20885  ;;
20886esac
20887fi
20888LDD=$ac_cv_path_LDD
20889if test -n "$LDD"; then
20890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20891$as_echo "$LDD" >&6; }
20892else
20893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20894$as_echo "no" >&6; }
20895fi
20896
20897
20898  test -n "$LDD" && break
20899done
20900
20901    else
20902      # If it succeeded, then it was overridden by the user. We will use it
20903      # for the tool.
20904
20905      # First remove it from the list of overridden variables, so we can test
20906      # for unknown variables in the end.
20907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20908
20909      # Check if we try to supply an empty value
20910      if test "x$LDD" = x; then
20911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20912$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20914$as_echo_n "checking for LDD... " >&6; }
20915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20916$as_echo "disabled" >&6; }
20917      else
20918        # Check if the provided tool contains a complete path.
20919        tool_specified="$LDD"
20920        tool_basename="${tool_specified##*/}"
20921        if test "x$tool_basename" = "x$tool_specified"; then
20922          # A command without a complete path is provided, search $PATH.
20923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20924$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20925          # Extract the first word of "$tool_basename", so it can be a program name with args.
20926set dummy $tool_basename; ac_word=$2
20927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20928$as_echo_n "checking for $ac_word... " >&6; }
20929if ${ac_cv_path_LDD+:} false; then :
20930  $as_echo_n "(cached) " >&6
20931else
20932  case $LDD in
20933  [\\/]* | ?:[\\/]*)
20934  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20935  ;;
20936  *)
20937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20938for as_dir in $PATH
20939do
20940  IFS=$as_save_IFS
20941  test -z "$as_dir" && as_dir=.
20942    for ac_exec_ext in '' $ac_executable_extensions; do
20943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20944    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20946    break 2
20947  fi
20948done
20949  done
20950IFS=$as_save_IFS
20951
20952  ;;
20953esac
20954fi
20955LDD=$ac_cv_path_LDD
20956if test -n "$LDD"; then
20957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20958$as_echo "$LDD" >&6; }
20959else
20960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20961$as_echo "no" >&6; }
20962fi
20963
20964
20965          if test "x$LDD" = x; then
20966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20967          fi
20968        else
20969          # Otherwise we believe it is a complete path. Use it as it is.
20970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20971$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20973$as_echo_n "checking for LDD... " >&6; }
20974          if test ! -x "$tool_specified"; then
20975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20976$as_echo "not found" >&6; }
20977            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20978          fi
20979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20980$as_echo "$tool_specified" >&6; }
20981        fi
20982      fi
20983    fi
20984
20985  fi
20986
20987
20988  if test "x$LDD" = "x"; then
20989    # List shared lib dependencies is used for
20990    # debug output and checking for forbidden dependencies.
20991    # We can build without it.
20992    LDD="true"
20993  fi
20994
20995
20996  # Publish this variable in the help.
20997
20998
20999  if [ -z "${OTOOL+x}" ]; then
21000    # The variable is not set by user, try to locate tool using the code snippet
21001    for ac_prog in otool
21002do
21003  # Extract the first word of "$ac_prog", so it can be a program name with args.
21004set dummy $ac_prog; ac_word=$2
21005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21006$as_echo_n "checking for $ac_word... " >&6; }
21007if ${ac_cv_path_OTOOL+:} false; then :
21008  $as_echo_n "(cached) " >&6
21009else
21010  case $OTOOL in
21011  [\\/]* | ?:[\\/]*)
21012  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21013  ;;
21014  *)
21015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21016for as_dir in $PATH
21017do
21018  IFS=$as_save_IFS
21019  test -z "$as_dir" && as_dir=.
21020    for ac_exec_ext in '' $ac_executable_extensions; do
21021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21022    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21024    break 2
21025  fi
21026done
21027  done
21028IFS=$as_save_IFS
21029
21030  ;;
21031esac
21032fi
21033OTOOL=$ac_cv_path_OTOOL
21034if test -n "$OTOOL"; then
21035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21036$as_echo "$OTOOL" >&6; }
21037else
21038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21039$as_echo "no" >&6; }
21040fi
21041
21042
21043  test -n "$OTOOL" && break
21044done
21045
21046  else
21047    # The variable is set, but is it from the command line or the environment?
21048
21049    # Try to remove the string !OTOOL! from our list.
21050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21052      # If it failed, the variable was not from the command line. Ignore it,
21053      # but warn the user (except for BASH, which is always set by the calling BASH).
21054      if test "xOTOOL" != xBASH; then
21055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21056$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21057      fi
21058      # Try to locate tool using the code snippet
21059      for ac_prog in otool
21060do
21061  # Extract the first word of "$ac_prog", so it can be a program name with args.
21062set dummy $ac_prog; ac_word=$2
21063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21064$as_echo_n "checking for $ac_word... " >&6; }
21065if ${ac_cv_path_OTOOL+:} false; then :
21066  $as_echo_n "(cached) " >&6
21067else
21068  case $OTOOL in
21069  [\\/]* | ?:[\\/]*)
21070  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21071  ;;
21072  *)
21073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21074for as_dir in $PATH
21075do
21076  IFS=$as_save_IFS
21077  test -z "$as_dir" && as_dir=.
21078    for ac_exec_ext in '' $ac_executable_extensions; do
21079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21080    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21082    break 2
21083  fi
21084done
21085  done
21086IFS=$as_save_IFS
21087
21088  ;;
21089esac
21090fi
21091OTOOL=$ac_cv_path_OTOOL
21092if test -n "$OTOOL"; then
21093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21094$as_echo "$OTOOL" >&6; }
21095else
21096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21097$as_echo "no" >&6; }
21098fi
21099
21100
21101  test -n "$OTOOL" && break
21102done
21103
21104    else
21105      # If it succeeded, then it was overridden by the user. We will use it
21106      # for the tool.
21107
21108      # First remove it from the list of overridden variables, so we can test
21109      # for unknown variables in the end.
21110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21111
21112      # Check if we try to supply an empty value
21113      if test "x$OTOOL" = x; then
21114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21115$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21117$as_echo_n "checking for OTOOL... " >&6; }
21118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21119$as_echo "disabled" >&6; }
21120      else
21121        # Check if the provided tool contains a complete path.
21122        tool_specified="$OTOOL"
21123        tool_basename="${tool_specified##*/}"
21124        if test "x$tool_basename" = "x$tool_specified"; then
21125          # A command without a complete path is provided, search $PATH.
21126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21127$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21128          # Extract the first word of "$tool_basename", so it can be a program name with args.
21129set dummy $tool_basename; ac_word=$2
21130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21131$as_echo_n "checking for $ac_word... " >&6; }
21132if ${ac_cv_path_OTOOL+:} false; then :
21133  $as_echo_n "(cached) " >&6
21134else
21135  case $OTOOL in
21136  [\\/]* | ?:[\\/]*)
21137  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21138  ;;
21139  *)
21140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21141for as_dir in $PATH
21142do
21143  IFS=$as_save_IFS
21144  test -z "$as_dir" && as_dir=.
21145    for ac_exec_ext in '' $ac_executable_extensions; do
21146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21147    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21149    break 2
21150  fi
21151done
21152  done
21153IFS=$as_save_IFS
21154
21155  ;;
21156esac
21157fi
21158OTOOL=$ac_cv_path_OTOOL
21159if test -n "$OTOOL"; then
21160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21161$as_echo "$OTOOL" >&6; }
21162else
21163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21164$as_echo "no" >&6; }
21165fi
21166
21167
21168          if test "x$OTOOL" = x; then
21169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21170          fi
21171        else
21172          # Otherwise we believe it is a complete path. Use it as it is.
21173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21174$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21176$as_echo_n "checking for OTOOL... " >&6; }
21177          if test ! -x "$tool_specified"; then
21178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21179$as_echo "not found" >&6; }
21180            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21181          fi
21182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21183$as_echo "$tool_specified" >&6; }
21184        fi
21185      fi
21186    fi
21187
21188  fi
21189
21190
21191  if test "x$OTOOL" = "x"; then
21192    OTOOL="true"
21193  fi
21194
21195
21196  # Publish this variable in the help.
21197
21198
21199  if [ -z "${READELF+x}" ]; then
21200    # The variable is not set by user, try to locate tool using the code snippet
21201    for ac_prog in greadelf readelf
21202do
21203  # Extract the first word of "$ac_prog", so it can be a program name with args.
21204set dummy $ac_prog; ac_word=$2
21205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21206$as_echo_n "checking for $ac_word... " >&6; }
21207if ${ac_cv_path_READELF+:} false; then :
21208  $as_echo_n "(cached) " >&6
21209else
21210  case $READELF in
21211  [\\/]* | ?:[\\/]*)
21212  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21213  ;;
21214  *)
21215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21216for as_dir in $PATH
21217do
21218  IFS=$as_save_IFS
21219  test -z "$as_dir" && as_dir=.
21220    for ac_exec_ext in '' $ac_executable_extensions; do
21221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21222    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21224    break 2
21225  fi
21226done
21227  done
21228IFS=$as_save_IFS
21229
21230  ;;
21231esac
21232fi
21233READELF=$ac_cv_path_READELF
21234if test -n "$READELF"; then
21235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21236$as_echo "$READELF" >&6; }
21237else
21238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21239$as_echo "no" >&6; }
21240fi
21241
21242
21243  test -n "$READELF" && break
21244done
21245
21246  else
21247    # The variable is set, but is it from the command line or the environment?
21248
21249    # Try to remove the string !READELF! from our list.
21250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21252      # If it failed, the variable was not from the command line. Ignore it,
21253      # but warn the user (except for BASH, which is always set by the calling BASH).
21254      if test "xREADELF" != xBASH; then
21255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21256$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21257      fi
21258      # Try to locate tool using the code snippet
21259      for ac_prog in greadelf readelf
21260do
21261  # Extract the first word of "$ac_prog", so it can be a program name with args.
21262set dummy $ac_prog; ac_word=$2
21263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21264$as_echo_n "checking for $ac_word... " >&6; }
21265if ${ac_cv_path_READELF+:} false; then :
21266  $as_echo_n "(cached) " >&6
21267else
21268  case $READELF in
21269  [\\/]* | ?:[\\/]*)
21270  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21271  ;;
21272  *)
21273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21274for as_dir in $PATH
21275do
21276  IFS=$as_save_IFS
21277  test -z "$as_dir" && as_dir=.
21278    for ac_exec_ext in '' $ac_executable_extensions; do
21279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21280    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21282    break 2
21283  fi
21284done
21285  done
21286IFS=$as_save_IFS
21287
21288  ;;
21289esac
21290fi
21291READELF=$ac_cv_path_READELF
21292if test -n "$READELF"; then
21293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21294$as_echo "$READELF" >&6; }
21295else
21296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21297$as_echo "no" >&6; }
21298fi
21299
21300
21301  test -n "$READELF" && break
21302done
21303
21304    else
21305      # If it succeeded, then it was overridden by the user. We will use it
21306      # for the tool.
21307
21308      # First remove it from the list of overridden variables, so we can test
21309      # for unknown variables in the end.
21310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21311
21312      # Check if we try to supply an empty value
21313      if test "x$READELF" = x; then
21314        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21315$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21317$as_echo_n "checking for READELF... " >&6; }
21318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21319$as_echo "disabled" >&6; }
21320      else
21321        # Check if the provided tool contains a complete path.
21322        tool_specified="$READELF"
21323        tool_basename="${tool_specified##*/}"
21324        if test "x$tool_basename" = "x$tool_specified"; then
21325          # A command without a complete path is provided, search $PATH.
21326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21327$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21328          # Extract the first word of "$tool_basename", so it can be a program name with args.
21329set dummy $tool_basename; ac_word=$2
21330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21331$as_echo_n "checking for $ac_word... " >&6; }
21332if ${ac_cv_path_READELF+:} false; then :
21333  $as_echo_n "(cached) " >&6
21334else
21335  case $READELF in
21336  [\\/]* | ?:[\\/]*)
21337  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21338  ;;
21339  *)
21340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21341for as_dir in $PATH
21342do
21343  IFS=$as_save_IFS
21344  test -z "$as_dir" && as_dir=.
21345    for ac_exec_ext in '' $ac_executable_extensions; do
21346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21347    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21349    break 2
21350  fi
21351done
21352  done
21353IFS=$as_save_IFS
21354
21355  ;;
21356esac
21357fi
21358READELF=$ac_cv_path_READELF
21359if test -n "$READELF"; then
21360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21361$as_echo "$READELF" >&6; }
21362else
21363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21364$as_echo "no" >&6; }
21365fi
21366
21367
21368          if test "x$READELF" = x; then
21369            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21370          fi
21371        else
21372          # Otherwise we believe it is a complete path. Use it as it is.
21373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21374$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21375          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21376$as_echo_n "checking for READELF... " >&6; }
21377          if test ! -x "$tool_specified"; then
21378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21379$as_echo "not found" >&6; }
21380            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21381          fi
21382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21383$as_echo "$tool_specified" >&6; }
21384        fi
21385      fi
21386    fi
21387
21388  fi
21389
21390
21391
21392
21393  # Publish this variable in the help.
21394
21395
21396  if [ -z "${HG+x}" ]; then
21397    # The variable is not set by user, try to locate tool using the code snippet
21398    for ac_prog in hg
21399do
21400  # Extract the first word of "$ac_prog", so it can be a program name with args.
21401set dummy $ac_prog; ac_word=$2
21402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21403$as_echo_n "checking for $ac_word... " >&6; }
21404if ${ac_cv_path_HG+:} false; then :
21405  $as_echo_n "(cached) " >&6
21406else
21407  case $HG in
21408  [\\/]* | ?:[\\/]*)
21409  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21410  ;;
21411  *)
21412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21413for as_dir in $PATH
21414do
21415  IFS=$as_save_IFS
21416  test -z "$as_dir" && as_dir=.
21417    for ac_exec_ext in '' $ac_executable_extensions; do
21418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21419    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21421    break 2
21422  fi
21423done
21424  done
21425IFS=$as_save_IFS
21426
21427  ;;
21428esac
21429fi
21430HG=$ac_cv_path_HG
21431if test -n "$HG"; then
21432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21433$as_echo "$HG" >&6; }
21434else
21435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21436$as_echo "no" >&6; }
21437fi
21438
21439
21440  test -n "$HG" && break
21441done
21442
21443  else
21444    # The variable is set, but is it from the command line or the environment?
21445
21446    # Try to remove the string !HG! from our list.
21447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21449      # If it failed, the variable was not from the command line. Ignore it,
21450      # but warn the user (except for BASH, which is always set by the calling BASH).
21451      if test "xHG" != xBASH; then
21452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21453$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21454      fi
21455      # Try to locate tool using the code snippet
21456      for ac_prog in hg
21457do
21458  # Extract the first word of "$ac_prog", so it can be a program name with args.
21459set dummy $ac_prog; ac_word=$2
21460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21461$as_echo_n "checking for $ac_word... " >&6; }
21462if ${ac_cv_path_HG+:} false; then :
21463  $as_echo_n "(cached) " >&6
21464else
21465  case $HG in
21466  [\\/]* | ?:[\\/]*)
21467  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21468  ;;
21469  *)
21470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21471for as_dir in $PATH
21472do
21473  IFS=$as_save_IFS
21474  test -z "$as_dir" && as_dir=.
21475    for ac_exec_ext in '' $ac_executable_extensions; do
21476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21477    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21479    break 2
21480  fi
21481done
21482  done
21483IFS=$as_save_IFS
21484
21485  ;;
21486esac
21487fi
21488HG=$ac_cv_path_HG
21489if test -n "$HG"; then
21490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21491$as_echo "$HG" >&6; }
21492else
21493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21494$as_echo "no" >&6; }
21495fi
21496
21497
21498  test -n "$HG" && break
21499done
21500
21501    else
21502      # If it succeeded, then it was overridden by the user. We will use it
21503      # for the tool.
21504
21505      # First remove it from the list of overridden variables, so we can test
21506      # for unknown variables in the end.
21507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21508
21509      # Check if we try to supply an empty value
21510      if test "x$HG" = x; then
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21512$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21514$as_echo_n "checking for HG... " >&6; }
21515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21516$as_echo "disabled" >&6; }
21517      else
21518        # Check if the provided tool contains a complete path.
21519        tool_specified="$HG"
21520        tool_basename="${tool_specified##*/}"
21521        if test "x$tool_basename" = "x$tool_specified"; then
21522          # A command without a complete path is provided, search $PATH.
21523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21524$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21525          # Extract the first word of "$tool_basename", so it can be a program name with args.
21526set dummy $tool_basename; ac_word=$2
21527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21528$as_echo_n "checking for $ac_word... " >&6; }
21529if ${ac_cv_path_HG+:} false; then :
21530  $as_echo_n "(cached) " >&6
21531else
21532  case $HG in
21533  [\\/]* | ?:[\\/]*)
21534  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21535  ;;
21536  *)
21537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21538for as_dir in $PATH
21539do
21540  IFS=$as_save_IFS
21541  test -z "$as_dir" && as_dir=.
21542    for ac_exec_ext in '' $ac_executable_extensions; do
21543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21544    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21546    break 2
21547  fi
21548done
21549  done
21550IFS=$as_save_IFS
21551
21552  ;;
21553esac
21554fi
21555HG=$ac_cv_path_HG
21556if test -n "$HG"; then
21557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21558$as_echo "$HG" >&6; }
21559else
21560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21561$as_echo "no" >&6; }
21562fi
21563
21564
21565          if test "x$HG" = x; then
21566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21567          fi
21568        else
21569          # Otherwise we believe it is a complete path. Use it as it is.
21570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21571$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21573$as_echo_n "checking for HG... " >&6; }
21574          if test ! -x "$tool_specified"; then
21575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21576$as_echo "not found" >&6; }
21577            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21578          fi
21579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21580$as_echo "$tool_specified" >&6; }
21581        fi
21582      fi
21583    fi
21584
21585  fi
21586
21587
21588
21589
21590  # Publish this variable in the help.
21591
21592
21593  if [ -z "${STAT+x}" ]; then
21594    # The variable is not set by user, try to locate tool using the code snippet
21595    for ac_prog in stat
21596do
21597  # Extract the first word of "$ac_prog", so it can be a program name with args.
21598set dummy $ac_prog; ac_word=$2
21599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21600$as_echo_n "checking for $ac_word... " >&6; }
21601if ${ac_cv_path_STAT+:} false; then :
21602  $as_echo_n "(cached) " >&6
21603else
21604  case $STAT in
21605  [\\/]* | ?:[\\/]*)
21606  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21607  ;;
21608  *)
21609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21610for as_dir in $PATH
21611do
21612  IFS=$as_save_IFS
21613  test -z "$as_dir" && as_dir=.
21614    for ac_exec_ext in '' $ac_executable_extensions; do
21615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21616    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21618    break 2
21619  fi
21620done
21621  done
21622IFS=$as_save_IFS
21623
21624  ;;
21625esac
21626fi
21627STAT=$ac_cv_path_STAT
21628if test -n "$STAT"; then
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21630$as_echo "$STAT" >&6; }
21631else
21632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21633$as_echo "no" >&6; }
21634fi
21635
21636
21637  test -n "$STAT" && break
21638done
21639
21640  else
21641    # The variable is set, but is it from the command line or the environment?
21642
21643    # Try to remove the string !STAT! from our list.
21644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21646      # If it failed, the variable was not from the command line. Ignore it,
21647      # but warn the user (except for BASH, which is always set by the calling BASH).
21648      if test "xSTAT" != xBASH; then
21649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21650$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21651      fi
21652      # Try to locate tool using the code snippet
21653      for ac_prog in stat
21654do
21655  # Extract the first word of "$ac_prog", so it can be a program name with args.
21656set dummy $ac_prog; ac_word=$2
21657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21658$as_echo_n "checking for $ac_word... " >&6; }
21659if ${ac_cv_path_STAT+:} false; then :
21660  $as_echo_n "(cached) " >&6
21661else
21662  case $STAT in
21663  [\\/]* | ?:[\\/]*)
21664  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21665  ;;
21666  *)
21667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21668for as_dir in $PATH
21669do
21670  IFS=$as_save_IFS
21671  test -z "$as_dir" && as_dir=.
21672    for ac_exec_ext in '' $ac_executable_extensions; do
21673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21674    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21676    break 2
21677  fi
21678done
21679  done
21680IFS=$as_save_IFS
21681
21682  ;;
21683esac
21684fi
21685STAT=$ac_cv_path_STAT
21686if test -n "$STAT"; then
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21688$as_echo "$STAT" >&6; }
21689else
21690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21691$as_echo "no" >&6; }
21692fi
21693
21694
21695  test -n "$STAT" && break
21696done
21697
21698    else
21699      # If it succeeded, then it was overridden by the user. We will use it
21700      # for the tool.
21701
21702      # First remove it from the list of overridden variables, so we can test
21703      # for unknown variables in the end.
21704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21705
21706      # Check if we try to supply an empty value
21707      if test "x$STAT" = x; then
21708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21709$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21711$as_echo_n "checking for STAT... " >&6; }
21712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21713$as_echo "disabled" >&6; }
21714      else
21715        # Check if the provided tool contains a complete path.
21716        tool_specified="$STAT"
21717        tool_basename="${tool_specified##*/}"
21718        if test "x$tool_basename" = "x$tool_specified"; then
21719          # A command without a complete path is provided, search $PATH.
21720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21721$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21722          # Extract the first word of "$tool_basename", so it can be a program name with args.
21723set dummy $tool_basename; ac_word=$2
21724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21725$as_echo_n "checking for $ac_word... " >&6; }
21726if ${ac_cv_path_STAT+:} false; then :
21727  $as_echo_n "(cached) " >&6
21728else
21729  case $STAT in
21730  [\\/]* | ?:[\\/]*)
21731  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21732  ;;
21733  *)
21734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21735for as_dir in $PATH
21736do
21737  IFS=$as_save_IFS
21738  test -z "$as_dir" && as_dir=.
21739    for ac_exec_ext in '' $ac_executable_extensions; do
21740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21741    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21743    break 2
21744  fi
21745done
21746  done
21747IFS=$as_save_IFS
21748
21749  ;;
21750esac
21751fi
21752STAT=$ac_cv_path_STAT
21753if test -n "$STAT"; then
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21755$as_echo "$STAT" >&6; }
21756else
21757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21758$as_echo "no" >&6; }
21759fi
21760
21761
21762          if test "x$STAT" = x; then
21763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21764          fi
21765        else
21766          # Otherwise we believe it is a complete path. Use it as it is.
21767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21768$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21770$as_echo_n "checking for STAT... " >&6; }
21771          if test ! -x "$tool_specified"; then
21772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21773$as_echo "not found" >&6; }
21774            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21775          fi
21776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21777$as_echo "$tool_specified" >&6; }
21778        fi
21779      fi
21780    fi
21781
21782  fi
21783
21784
21785
21786
21787  # Publish this variable in the help.
21788
21789
21790  if [ -z "${TIME+x}" ]; then
21791    # The variable is not set by user, try to locate tool using the code snippet
21792    for ac_prog in time
21793do
21794  # Extract the first word of "$ac_prog", so it can be a program name with args.
21795set dummy $ac_prog; ac_word=$2
21796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21797$as_echo_n "checking for $ac_word... " >&6; }
21798if ${ac_cv_path_TIME+:} false; then :
21799  $as_echo_n "(cached) " >&6
21800else
21801  case $TIME in
21802  [\\/]* | ?:[\\/]*)
21803  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21804  ;;
21805  *)
21806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21807for as_dir in $PATH
21808do
21809  IFS=$as_save_IFS
21810  test -z "$as_dir" && as_dir=.
21811    for ac_exec_ext in '' $ac_executable_extensions; do
21812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21813    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21815    break 2
21816  fi
21817done
21818  done
21819IFS=$as_save_IFS
21820
21821  ;;
21822esac
21823fi
21824TIME=$ac_cv_path_TIME
21825if test -n "$TIME"; then
21826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21827$as_echo "$TIME" >&6; }
21828else
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21830$as_echo "no" >&6; }
21831fi
21832
21833
21834  test -n "$TIME" && break
21835done
21836
21837  else
21838    # The variable is set, but is it from the command line or the environment?
21839
21840    # Try to remove the string !TIME! from our list.
21841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21843      # If it failed, the variable was not from the command line. Ignore it,
21844      # but warn the user (except for BASH, which is always set by the calling BASH).
21845      if test "xTIME" != xBASH; then
21846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21847$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21848      fi
21849      # Try to locate tool using the code snippet
21850      for ac_prog in time
21851do
21852  # Extract the first word of "$ac_prog", so it can be a program name with args.
21853set dummy $ac_prog; ac_word=$2
21854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21855$as_echo_n "checking for $ac_word... " >&6; }
21856if ${ac_cv_path_TIME+:} false; then :
21857  $as_echo_n "(cached) " >&6
21858else
21859  case $TIME in
21860  [\\/]* | ?:[\\/]*)
21861  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21862  ;;
21863  *)
21864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21865for as_dir in $PATH
21866do
21867  IFS=$as_save_IFS
21868  test -z "$as_dir" && as_dir=.
21869    for ac_exec_ext in '' $ac_executable_extensions; do
21870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21871    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21873    break 2
21874  fi
21875done
21876  done
21877IFS=$as_save_IFS
21878
21879  ;;
21880esac
21881fi
21882TIME=$ac_cv_path_TIME
21883if test -n "$TIME"; then
21884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21885$as_echo "$TIME" >&6; }
21886else
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21888$as_echo "no" >&6; }
21889fi
21890
21891
21892  test -n "$TIME" && break
21893done
21894
21895    else
21896      # If it succeeded, then it was overridden by the user. We will use it
21897      # for the tool.
21898
21899      # First remove it from the list of overridden variables, so we can test
21900      # for unknown variables in the end.
21901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21902
21903      # Check if we try to supply an empty value
21904      if test "x$TIME" = x; then
21905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21906$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21908$as_echo_n "checking for TIME... " >&6; }
21909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21910$as_echo "disabled" >&6; }
21911      else
21912        # Check if the provided tool contains a complete path.
21913        tool_specified="$TIME"
21914        tool_basename="${tool_specified##*/}"
21915        if test "x$tool_basename" = "x$tool_specified"; then
21916          # A command without a complete path is provided, search $PATH.
21917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21918$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21919          # Extract the first word of "$tool_basename", so it can be a program name with args.
21920set dummy $tool_basename; ac_word=$2
21921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21922$as_echo_n "checking for $ac_word... " >&6; }
21923if ${ac_cv_path_TIME+:} false; then :
21924  $as_echo_n "(cached) " >&6
21925else
21926  case $TIME in
21927  [\\/]* | ?:[\\/]*)
21928  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21929  ;;
21930  *)
21931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21932for as_dir in $PATH
21933do
21934  IFS=$as_save_IFS
21935  test -z "$as_dir" && as_dir=.
21936    for ac_exec_ext in '' $ac_executable_extensions; do
21937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21938    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21940    break 2
21941  fi
21942done
21943  done
21944IFS=$as_save_IFS
21945
21946  ;;
21947esac
21948fi
21949TIME=$ac_cv_path_TIME
21950if test -n "$TIME"; then
21951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21952$as_echo "$TIME" >&6; }
21953else
21954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21955$as_echo "no" >&6; }
21956fi
21957
21958
21959          if test "x$TIME" = x; then
21960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21961          fi
21962        else
21963          # Otherwise we believe it is a complete path. Use it as it is.
21964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21965$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21967$as_echo_n "checking for TIME... " >&6; }
21968          if test ! -x "$tool_specified"; then
21969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21970$as_echo "not found" >&6; }
21971            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21972          fi
21973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21974$as_echo "$tool_specified" >&6; }
21975        fi
21976      fi
21977    fi
21978
21979  fi
21980
21981
21982
21983
21984  # Publish this variable in the help.
21985
21986
21987  if [ -z "${PATCH+x}" ]; then
21988    # The variable is not set by user, try to locate tool using the code snippet
21989    for ac_prog in gpatch patch
21990do
21991  # Extract the first word of "$ac_prog", so it can be a program name with args.
21992set dummy $ac_prog; ac_word=$2
21993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21994$as_echo_n "checking for $ac_word... " >&6; }
21995if ${ac_cv_path_PATCH+:} false; then :
21996  $as_echo_n "(cached) " >&6
21997else
21998  case $PATCH in
21999  [\\/]* | ?:[\\/]*)
22000  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22001  ;;
22002  *)
22003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22004for as_dir in $PATH
22005do
22006  IFS=$as_save_IFS
22007  test -z "$as_dir" && as_dir=.
22008    for ac_exec_ext in '' $ac_executable_extensions; do
22009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22010    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22012    break 2
22013  fi
22014done
22015  done
22016IFS=$as_save_IFS
22017
22018  ;;
22019esac
22020fi
22021PATCH=$ac_cv_path_PATCH
22022if test -n "$PATCH"; then
22023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22024$as_echo "$PATCH" >&6; }
22025else
22026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22027$as_echo "no" >&6; }
22028fi
22029
22030
22031  test -n "$PATCH" && break
22032done
22033
22034  else
22035    # The variable is set, but is it from the command line or the environment?
22036
22037    # Try to remove the string !PATCH! from our list.
22038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22040      # If it failed, the variable was not from the command line. Ignore it,
22041      # but warn the user (except for BASH, which is always set by the calling BASH).
22042      if test "xPATCH" != xBASH; then
22043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22044$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22045      fi
22046      # Try to locate tool using the code snippet
22047      for ac_prog in gpatch patch
22048do
22049  # Extract the first word of "$ac_prog", so it can be a program name with args.
22050set dummy $ac_prog; ac_word=$2
22051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22052$as_echo_n "checking for $ac_word... " >&6; }
22053if ${ac_cv_path_PATCH+:} false; then :
22054  $as_echo_n "(cached) " >&6
22055else
22056  case $PATCH in
22057  [\\/]* | ?:[\\/]*)
22058  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22059  ;;
22060  *)
22061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22062for as_dir in $PATH
22063do
22064  IFS=$as_save_IFS
22065  test -z "$as_dir" && as_dir=.
22066    for ac_exec_ext in '' $ac_executable_extensions; do
22067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22068    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22070    break 2
22071  fi
22072done
22073  done
22074IFS=$as_save_IFS
22075
22076  ;;
22077esac
22078fi
22079PATCH=$ac_cv_path_PATCH
22080if test -n "$PATCH"; then
22081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22082$as_echo "$PATCH" >&6; }
22083else
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22085$as_echo "no" >&6; }
22086fi
22087
22088
22089  test -n "$PATCH" && break
22090done
22091
22092    else
22093      # If it succeeded, then it was overridden by the user. We will use it
22094      # for the tool.
22095
22096      # First remove it from the list of overridden variables, so we can test
22097      # for unknown variables in the end.
22098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22099
22100      # Check if we try to supply an empty value
22101      if test "x$PATCH" = x; then
22102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22103$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22105$as_echo_n "checking for PATCH... " >&6; }
22106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22107$as_echo "disabled" >&6; }
22108      else
22109        # Check if the provided tool contains a complete path.
22110        tool_specified="$PATCH"
22111        tool_basename="${tool_specified##*/}"
22112        if test "x$tool_basename" = "x$tool_specified"; then
22113          # A command without a complete path is provided, search $PATH.
22114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22115$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22116          # Extract the first word of "$tool_basename", so it can be a program name with args.
22117set dummy $tool_basename; ac_word=$2
22118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22119$as_echo_n "checking for $ac_word... " >&6; }
22120if ${ac_cv_path_PATCH+:} false; then :
22121  $as_echo_n "(cached) " >&6
22122else
22123  case $PATCH in
22124  [\\/]* | ?:[\\/]*)
22125  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22126  ;;
22127  *)
22128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22129for as_dir in $PATH
22130do
22131  IFS=$as_save_IFS
22132  test -z "$as_dir" && as_dir=.
22133    for ac_exec_ext in '' $ac_executable_extensions; do
22134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22135    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22137    break 2
22138  fi
22139done
22140  done
22141IFS=$as_save_IFS
22142
22143  ;;
22144esac
22145fi
22146PATCH=$ac_cv_path_PATCH
22147if test -n "$PATCH"; then
22148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22149$as_echo "$PATCH" >&6; }
22150else
22151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22152$as_echo "no" >&6; }
22153fi
22154
22155
22156          if test "x$PATCH" = x; then
22157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22158          fi
22159        else
22160          # Otherwise we believe it is a complete path. Use it as it is.
22161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22162$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22164$as_echo_n "checking for PATCH... " >&6; }
22165          if test ! -x "$tool_specified"; then
22166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22167$as_echo "not found" >&6; }
22168            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22169          fi
22170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22171$as_echo "$tool_specified" >&6; }
22172        fi
22173      fi
22174    fi
22175
22176  fi
22177
22178
22179  # Check if it's GNU time
22180  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22181  if test "x$IS_GNU_TIME" != x; then
22182    IS_GNU_TIME=yes
22183  else
22184    IS_GNU_TIME=no
22185  fi
22186
22187
22188  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22189
22190
22191
22192  # Publish this variable in the help.
22193
22194
22195  if [ -z "${DSYMUTIL+x}" ]; then
22196    # The variable is not set by user, try to locate tool using the code snippet
22197    for ac_prog in dsymutil
22198do
22199  # Extract the first word of "$ac_prog", so it can be a program name with args.
22200set dummy $ac_prog; ac_word=$2
22201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22202$as_echo_n "checking for $ac_word... " >&6; }
22203if ${ac_cv_path_DSYMUTIL+:} false; then :
22204  $as_echo_n "(cached) " >&6
22205else
22206  case $DSYMUTIL in
22207  [\\/]* | ?:[\\/]*)
22208  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22209  ;;
22210  *)
22211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22212for as_dir in $PATH
22213do
22214  IFS=$as_save_IFS
22215  test -z "$as_dir" && as_dir=.
22216    for ac_exec_ext in '' $ac_executable_extensions; do
22217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22218    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22220    break 2
22221  fi
22222done
22223  done
22224IFS=$as_save_IFS
22225
22226  ;;
22227esac
22228fi
22229DSYMUTIL=$ac_cv_path_DSYMUTIL
22230if test -n "$DSYMUTIL"; then
22231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22232$as_echo "$DSYMUTIL" >&6; }
22233else
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22235$as_echo "no" >&6; }
22236fi
22237
22238
22239  test -n "$DSYMUTIL" && break
22240done
22241
22242  else
22243    # The variable is set, but is it from the command line or the environment?
22244
22245    # Try to remove the string !DSYMUTIL! from our list.
22246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22248      # If it failed, the variable was not from the command line. Ignore it,
22249      # but warn the user (except for BASH, which is always set by the calling BASH).
22250      if test "xDSYMUTIL" != xBASH; then
22251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22252$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22253      fi
22254      # Try to locate tool using the code snippet
22255      for ac_prog in dsymutil
22256do
22257  # Extract the first word of "$ac_prog", so it can be a program name with args.
22258set dummy $ac_prog; ac_word=$2
22259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22260$as_echo_n "checking for $ac_word... " >&6; }
22261if ${ac_cv_path_DSYMUTIL+:} false; then :
22262  $as_echo_n "(cached) " >&6
22263else
22264  case $DSYMUTIL in
22265  [\\/]* | ?:[\\/]*)
22266  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22267  ;;
22268  *)
22269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22270for as_dir in $PATH
22271do
22272  IFS=$as_save_IFS
22273  test -z "$as_dir" && as_dir=.
22274    for ac_exec_ext in '' $ac_executable_extensions; do
22275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22276    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22278    break 2
22279  fi
22280done
22281  done
22282IFS=$as_save_IFS
22283
22284  ;;
22285esac
22286fi
22287DSYMUTIL=$ac_cv_path_DSYMUTIL
22288if test -n "$DSYMUTIL"; then
22289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22290$as_echo "$DSYMUTIL" >&6; }
22291else
22292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22293$as_echo "no" >&6; }
22294fi
22295
22296
22297  test -n "$DSYMUTIL" && break
22298done
22299
22300    else
22301      # If it succeeded, then it was overridden by the user. We will use it
22302      # for the tool.
22303
22304      # First remove it from the list of overridden variables, so we can test
22305      # for unknown variables in the end.
22306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22307
22308      # Check if we try to supply an empty value
22309      if test "x$DSYMUTIL" = x; then
22310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22311$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22313$as_echo_n "checking for DSYMUTIL... " >&6; }
22314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22315$as_echo "disabled" >&6; }
22316      else
22317        # Check if the provided tool contains a complete path.
22318        tool_specified="$DSYMUTIL"
22319        tool_basename="${tool_specified##*/}"
22320        if test "x$tool_basename" = "x$tool_specified"; then
22321          # A command without a complete path is provided, search $PATH.
22322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22323$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22324          # Extract the first word of "$tool_basename", so it can be a program name with args.
22325set dummy $tool_basename; ac_word=$2
22326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22327$as_echo_n "checking for $ac_word... " >&6; }
22328if ${ac_cv_path_DSYMUTIL+:} false; then :
22329  $as_echo_n "(cached) " >&6
22330else
22331  case $DSYMUTIL in
22332  [\\/]* | ?:[\\/]*)
22333  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22334  ;;
22335  *)
22336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22337for as_dir in $PATH
22338do
22339  IFS=$as_save_IFS
22340  test -z "$as_dir" && as_dir=.
22341    for ac_exec_ext in '' $ac_executable_extensions; do
22342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22343    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22345    break 2
22346  fi
22347done
22348  done
22349IFS=$as_save_IFS
22350
22351  ;;
22352esac
22353fi
22354DSYMUTIL=$ac_cv_path_DSYMUTIL
22355if test -n "$DSYMUTIL"; then
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22357$as_echo "$DSYMUTIL" >&6; }
22358else
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22360$as_echo "no" >&6; }
22361fi
22362
22363
22364          if test "x$DSYMUTIL" = x; then
22365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22366          fi
22367        else
22368          # Otherwise we believe it is a complete path. Use it as it is.
22369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22370$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22372$as_echo_n "checking for DSYMUTIL... " >&6; }
22373          if test ! -x "$tool_specified"; then
22374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22375$as_echo "not found" >&6; }
22376            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22377          fi
22378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22379$as_echo "$tool_specified" >&6; }
22380        fi
22381      fi
22382    fi
22383
22384  fi
22385
22386
22387
22388  if test "x$DSYMUTIL" = x; then
22389    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22390  fi
22391
22392
22393
22394
22395
22396  # Publish this variable in the help.
22397
22398
22399  if [ -z "${XATTR+x}" ]; then
22400    # The variable is not set by user, try to locate tool using the code snippet
22401    for ac_prog in xattr
22402do
22403  # Extract the first word of "$ac_prog", so it can be a program name with args.
22404set dummy $ac_prog; ac_word=$2
22405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22406$as_echo_n "checking for $ac_word... " >&6; }
22407if ${ac_cv_path_XATTR+:} false; then :
22408  $as_echo_n "(cached) " >&6
22409else
22410  case $XATTR in
22411  [\\/]* | ?:[\\/]*)
22412  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22413  ;;
22414  *)
22415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22416for as_dir in $PATH
22417do
22418  IFS=$as_save_IFS
22419  test -z "$as_dir" && as_dir=.
22420    for ac_exec_ext in '' $ac_executable_extensions; do
22421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22422    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22424    break 2
22425  fi
22426done
22427  done
22428IFS=$as_save_IFS
22429
22430  ;;
22431esac
22432fi
22433XATTR=$ac_cv_path_XATTR
22434if test -n "$XATTR"; then
22435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22436$as_echo "$XATTR" >&6; }
22437else
22438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22439$as_echo "no" >&6; }
22440fi
22441
22442
22443  test -n "$XATTR" && break
22444done
22445
22446  else
22447    # The variable is set, but is it from the command line or the environment?
22448
22449    # Try to remove the string !XATTR! from our list.
22450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22452      # If it failed, the variable was not from the command line. Ignore it,
22453      # but warn the user (except for BASH, which is always set by the calling BASH).
22454      if test "xXATTR" != xBASH; then
22455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22456$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22457      fi
22458      # Try to locate tool using the code snippet
22459      for ac_prog in xattr
22460do
22461  # Extract the first word of "$ac_prog", so it can be a program name with args.
22462set dummy $ac_prog; ac_word=$2
22463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22464$as_echo_n "checking for $ac_word... " >&6; }
22465if ${ac_cv_path_XATTR+:} false; then :
22466  $as_echo_n "(cached) " >&6
22467else
22468  case $XATTR in
22469  [\\/]* | ?:[\\/]*)
22470  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22471  ;;
22472  *)
22473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22474for as_dir in $PATH
22475do
22476  IFS=$as_save_IFS
22477  test -z "$as_dir" && as_dir=.
22478    for ac_exec_ext in '' $ac_executable_extensions; do
22479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22480    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22482    break 2
22483  fi
22484done
22485  done
22486IFS=$as_save_IFS
22487
22488  ;;
22489esac
22490fi
22491XATTR=$ac_cv_path_XATTR
22492if test -n "$XATTR"; then
22493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22494$as_echo "$XATTR" >&6; }
22495else
22496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22497$as_echo "no" >&6; }
22498fi
22499
22500
22501  test -n "$XATTR" && break
22502done
22503
22504    else
22505      # If it succeeded, then it was overridden by the user. We will use it
22506      # for the tool.
22507
22508      # First remove it from the list of overridden variables, so we can test
22509      # for unknown variables in the end.
22510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22511
22512      # Check if we try to supply an empty value
22513      if test "x$XATTR" = x; then
22514        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22515$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22517$as_echo_n "checking for XATTR... " >&6; }
22518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22519$as_echo "disabled" >&6; }
22520      else
22521        # Check if the provided tool contains a complete path.
22522        tool_specified="$XATTR"
22523        tool_basename="${tool_specified##*/}"
22524        if test "x$tool_basename" = "x$tool_specified"; then
22525          # A command without a complete path is provided, search $PATH.
22526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22527$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22528          # Extract the first word of "$tool_basename", so it can be a program name with args.
22529set dummy $tool_basename; ac_word=$2
22530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22531$as_echo_n "checking for $ac_word... " >&6; }
22532if ${ac_cv_path_XATTR+:} false; then :
22533  $as_echo_n "(cached) " >&6
22534else
22535  case $XATTR in
22536  [\\/]* | ?:[\\/]*)
22537  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22538  ;;
22539  *)
22540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22541for as_dir in $PATH
22542do
22543  IFS=$as_save_IFS
22544  test -z "$as_dir" && as_dir=.
22545    for ac_exec_ext in '' $ac_executable_extensions; do
22546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22547    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22549    break 2
22550  fi
22551done
22552  done
22553IFS=$as_save_IFS
22554
22555  ;;
22556esac
22557fi
22558XATTR=$ac_cv_path_XATTR
22559if test -n "$XATTR"; then
22560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22561$as_echo "$XATTR" >&6; }
22562else
22563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22564$as_echo "no" >&6; }
22565fi
22566
22567
22568          if test "x$XATTR" = x; then
22569            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22570          fi
22571        else
22572          # Otherwise we believe it is a complete path. Use it as it is.
22573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22574$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22575          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22576$as_echo_n "checking for XATTR... " >&6; }
22577          if test ! -x "$tool_specified"; then
22578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22579$as_echo "not found" >&6; }
22580            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22581          fi
22582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22583$as_echo "$tool_specified" >&6; }
22584        fi
22585      fi
22586    fi
22587
22588  fi
22589
22590
22591
22592  if test "x$XATTR" = x; then
22593    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22594  fi
22595
22596
22597
22598
22599  # Publish this variable in the help.
22600
22601
22602  if [ -z "${CODESIGN+x}" ]; then
22603    # The variable is not set by user, try to locate tool using the code snippet
22604    for ac_prog in codesign
22605do
22606  # Extract the first word of "$ac_prog", so it can be a program name with args.
22607set dummy $ac_prog; ac_word=$2
22608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22609$as_echo_n "checking for $ac_word... " >&6; }
22610if ${ac_cv_path_CODESIGN+:} false; then :
22611  $as_echo_n "(cached) " >&6
22612else
22613  case $CODESIGN in
22614  [\\/]* | ?:[\\/]*)
22615  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22616  ;;
22617  *)
22618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22619for as_dir in $PATH
22620do
22621  IFS=$as_save_IFS
22622  test -z "$as_dir" && as_dir=.
22623    for ac_exec_ext in '' $ac_executable_extensions; do
22624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22625    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22627    break 2
22628  fi
22629done
22630  done
22631IFS=$as_save_IFS
22632
22633  ;;
22634esac
22635fi
22636CODESIGN=$ac_cv_path_CODESIGN
22637if test -n "$CODESIGN"; then
22638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22639$as_echo "$CODESIGN" >&6; }
22640else
22641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22642$as_echo "no" >&6; }
22643fi
22644
22645
22646  test -n "$CODESIGN" && break
22647done
22648
22649  else
22650    # The variable is set, but is it from the command line or the environment?
22651
22652    # Try to remove the string !CODESIGN! from our list.
22653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22655      # If it failed, the variable was not from the command line. Ignore it,
22656      # but warn the user (except for BASH, which is always set by the calling BASH).
22657      if test "xCODESIGN" != xBASH; then
22658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22659$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22660      fi
22661      # Try to locate tool using the code snippet
22662      for ac_prog in codesign
22663do
22664  # Extract the first word of "$ac_prog", so it can be a program name with args.
22665set dummy $ac_prog; ac_word=$2
22666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22667$as_echo_n "checking for $ac_word... " >&6; }
22668if ${ac_cv_path_CODESIGN+:} false; then :
22669  $as_echo_n "(cached) " >&6
22670else
22671  case $CODESIGN in
22672  [\\/]* | ?:[\\/]*)
22673  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22674  ;;
22675  *)
22676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22677for as_dir in $PATH
22678do
22679  IFS=$as_save_IFS
22680  test -z "$as_dir" && as_dir=.
22681    for ac_exec_ext in '' $ac_executable_extensions; do
22682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22683    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22685    break 2
22686  fi
22687done
22688  done
22689IFS=$as_save_IFS
22690
22691  ;;
22692esac
22693fi
22694CODESIGN=$ac_cv_path_CODESIGN
22695if test -n "$CODESIGN"; then
22696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22697$as_echo "$CODESIGN" >&6; }
22698else
22699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22700$as_echo "no" >&6; }
22701fi
22702
22703
22704  test -n "$CODESIGN" && break
22705done
22706
22707    else
22708      # If it succeeded, then it was overridden by the user. We will use it
22709      # for the tool.
22710
22711      # First remove it from the list of overridden variables, so we can test
22712      # for unknown variables in the end.
22713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22714
22715      # Check if we try to supply an empty value
22716      if test "x$CODESIGN" = x; then
22717        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22718$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22720$as_echo_n "checking for CODESIGN... " >&6; }
22721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22722$as_echo "disabled" >&6; }
22723      else
22724        # Check if the provided tool contains a complete path.
22725        tool_specified="$CODESIGN"
22726        tool_basename="${tool_specified##*/}"
22727        if test "x$tool_basename" = "x$tool_specified"; then
22728          # A command without a complete path is provided, search $PATH.
22729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22730$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22731          # Extract the first word of "$tool_basename", so it can be a program name with args.
22732set dummy $tool_basename; ac_word=$2
22733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22734$as_echo_n "checking for $ac_word... " >&6; }
22735if ${ac_cv_path_CODESIGN+:} false; then :
22736  $as_echo_n "(cached) " >&6
22737else
22738  case $CODESIGN in
22739  [\\/]* | ?:[\\/]*)
22740  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22741  ;;
22742  *)
22743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22744for as_dir in $PATH
22745do
22746  IFS=$as_save_IFS
22747  test -z "$as_dir" && as_dir=.
22748    for ac_exec_ext in '' $ac_executable_extensions; do
22749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22750    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22752    break 2
22753  fi
22754done
22755  done
22756IFS=$as_save_IFS
22757
22758  ;;
22759esac
22760fi
22761CODESIGN=$ac_cv_path_CODESIGN
22762if test -n "$CODESIGN"; then
22763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22764$as_echo "$CODESIGN" >&6; }
22765else
22766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22767$as_echo "no" >&6; }
22768fi
22769
22770
22771          if test "x$CODESIGN" = x; then
22772            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22773          fi
22774        else
22775          # Otherwise we believe it is a complete path. Use it as it is.
22776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22777$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22779$as_echo_n "checking for CODESIGN... " >&6; }
22780          if test ! -x "$tool_specified"; then
22781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22782$as_echo "not found" >&6; }
22783            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22784          fi
22785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22786$as_echo "$tool_specified" >&6; }
22787        fi
22788      fi
22789    fi
22790
22791  fi
22792
22793
22794    if test "x$CODESIGN" != "x"; then
22795      # Verify that the openjdk_codesign certificate is present
22796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22797$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22798      rm -f codesign-testfile
22799      touch codesign-testfile
22800      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22801      rm -f codesign-testfile
22802      if test "x$CODESIGN" = x; then
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22804$as_echo "no" >&6; }
22805      else
22806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22807$as_echo "yes" >&6; }
22808      fi
22809    fi
22810
22811
22812
22813  # Publish this variable in the help.
22814
22815
22816  if [ -z "${SETFILE+x}" ]; then
22817    # The variable is not set by user, try to locate tool using the code snippet
22818    for ac_prog in SetFile
22819do
22820  # Extract the first word of "$ac_prog", so it can be a program name with args.
22821set dummy $ac_prog; ac_word=$2
22822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22823$as_echo_n "checking for $ac_word... " >&6; }
22824if ${ac_cv_path_SETFILE+:} false; then :
22825  $as_echo_n "(cached) " >&6
22826else
22827  case $SETFILE in
22828  [\\/]* | ?:[\\/]*)
22829  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22830  ;;
22831  *)
22832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22833for as_dir in $PATH
22834do
22835  IFS=$as_save_IFS
22836  test -z "$as_dir" && as_dir=.
22837    for ac_exec_ext in '' $ac_executable_extensions; do
22838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22839    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22841    break 2
22842  fi
22843done
22844  done
22845IFS=$as_save_IFS
22846
22847  ;;
22848esac
22849fi
22850SETFILE=$ac_cv_path_SETFILE
22851if test -n "$SETFILE"; then
22852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22853$as_echo "$SETFILE" >&6; }
22854else
22855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22856$as_echo "no" >&6; }
22857fi
22858
22859
22860  test -n "$SETFILE" && break
22861done
22862
22863  else
22864    # The variable is set, but is it from the command line or the environment?
22865
22866    # Try to remove the string !SETFILE! from our list.
22867    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22868    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22869      # If it failed, the variable was not from the command line. Ignore it,
22870      # but warn the user (except for BASH, which is always set by the calling BASH).
22871      if test "xSETFILE" != xBASH; then
22872        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22873$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22874      fi
22875      # Try to locate tool using the code snippet
22876      for ac_prog in SetFile
22877do
22878  # Extract the first word of "$ac_prog", so it can be a program name with args.
22879set dummy $ac_prog; ac_word=$2
22880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22881$as_echo_n "checking for $ac_word... " >&6; }
22882if ${ac_cv_path_SETFILE+:} false; then :
22883  $as_echo_n "(cached) " >&6
22884else
22885  case $SETFILE in
22886  [\\/]* | ?:[\\/]*)
22887  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22888  ;;
22889  *)
22890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22891for as_dir in $PATH
22892do
22893  IFS=$as_save_IFS
22894  test -z "$as_dir" && as_dir=.
22895    for ac_exec_ext in '' $ac_executable_extensions; do
22896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22897    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22899    break 2
22900  fi
22901done
22902  done
22903IFS=$as_save_IFS
22904
22905  ;;
22906esac
22907fi
22908SETFILE=$ac_cv_path_SETFILE
22909if test -n "$SETFILE"; then
22910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22911$as_echo "$SETFILE" >&6; }
22912else
22913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22914$as_echo "no" >&6; }
22915fi
22916
22917
22918  test -n "$SETFILE" && break
22919done
22920
22921    else
22922      # If it succeeded, then it was overridden by the user. We will use it
22923      # for the tool.
22924
22925      # First remove it from the list of overridden variables, so we can test
22926      # for unknown variables in the end.
22927      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22928
22929      # Check if we try to supply an empty value
22930      if test "x$SETFILE" = x; then
22931        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22932$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22934$as_echo_n "checking for SETFILE... " >&6; }
22935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22936$as_echo "disabled" >&6; }
22937      else
22938        # Check if the provided tool contains a complete path.
22939        tool_specified="$SETFILE"
22940        tool_basename="${tool_specified##*/}"
22941        if test "x$tool_basename" = "x$tool_specified"; then
22942          # A command without a complete path is provided, search $PATH.
22943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22944$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22945          # Extract the first word of "$tool_basename", so it can be a program name with args.
22946set dummy $tool_basename; ac_word=$2
22947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22948$as_echo_n "checking for $ac_word... " >&6; }
22949if ${ac_cv_path_SETFILE+:} false; then :
22950  $as_echo_n "(cached) " >&6
22951else
22952  case $SETFILE in
22953  [\\/]* | ?:[\\/]*)
22954  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22955  ;;
22956  *)
22957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22958for as_dir in $PATH
22959do
22960  IFS=$as_save_IFS
22961  test -z "$as_dir" && as_dir=.
22962    for ac_exec_ext in '' $ac_executable_extensions; do
22963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22964    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22966    break 2
22967  fi
22968done
22969  done
22970IFS=$as_save_IFS
22971
22972  ;;
22973esac
22974fi
22975SETFILE=$ac_cv_path_SETFILE
22976if test -n "$SETFILE"; then
22977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22978$as_echo "$SETFILE" >&6; }
22979else
22980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22981$as_echo "no" >&6; }
22982fi
22983
22984
22985          if test "x$SETFILE" = x; then
22986            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22987          fi
22988        else
22989          # Otherwise we believe it is a complete path. Use it as it is.
22990          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22991$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22992          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22993$as_echo_n "checking for SETFILE... " >&6; }
22994          if test ! -x "$tool_specified"; then
22995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22996$as_echo "not found" >&6; }
22997            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22998          fi
22999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23000$as_echo "$tool_specified" >&6; }
23001        fi
23002      fi
23003    fi
23004
23005  fi
23006
23007
23008
23009  if test "x$SETFILE" = x; then
23010    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23011  fi
23012
23013
23014  fi
23015
23016
23017  # Test if bash supports pipefail.
23018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23019$as_echo_n "checking if bash supports pipefail... " >&6; }
23020  if ${BASH} -c 'set -o pipefail'; then
23021    BASH_ARGS="$BASH_ARGS -o pipefail"
23022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23023$as_echo "yes" >&6; }
23024  else
23025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23026$as_echo "no" >&6; }
23027  fi
23028
23029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23030$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23031  if ${BASH} -e -c 'true'; then
23032    BASH_ARGS="$BASH_ARGS -e"
23033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23034$as_echo "yes" >&6; }
23035  else
23036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23037$as_echo "no" >&6; }
23038  fi
23039
23040
23041
23042
23043# Check if pkg-config is available.
23044
23045
23046if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23047	if test -n "$ac_tool_prefix"; then
23048  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23049set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23051$as_echo_n "checking for $ac_word... " >&6; }
23052if ${ac_cv_path_PKG_CONFIG+:} false; then :
23053  $as_echo_n "(cached) " >&6
23054else
23055  case $PKG_CONFIG in
23056  [\\/]* | ?:[\\/]*)
23057  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23058  ;;
23059  *)
23060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23061for as_dir in $PATH
23062do
23063  IFS=$as_save_IFS
23064  test -z "$as_dir" && as_dir=.
23065    for ac_exec_ext in '' $ac_executable_extensions; do
23066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23067    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23069    break 2
23070  fi
23071done
23072  done
23073IFS=$as_save_IFS
23074
23075  ;;
23076esac
23077fi
23078PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23079if test -n "$PKG_CONFIG"; then
23080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23081$as_echo "$PKG_CONFIG" >&6; }
23082else
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23084$as_echo "no" >&6; }
23085fi
23086
23087
23088fi
23089if test -z "$ac_cv_path_PKG_CONFIG"; then
23090  ac_pt_PKG_CONFIG=$PKG_CONFIG
23091  # Extract the first word of "pkg-config", so it can be a program name with args.
23092set dummy pkg-config; ac_word=$2
23093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23094$as_echo_n "checking for $ac_word... " >&6; }
23095if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23096  $as_echo_n "(cached) " >&6
23097else
23098  case $ac_pt_PKG_CONFIG in
23099  [\\/]* | ?:[\\/]*)
23100  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23101  ;;
23102  *)
23103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23104for as_dir in $PATH
23105do
23106  IFS=$as_save_IFS
23107  test -z "$as_dir" && as_dir=.
23108    for ac_exec_ext in '' $ac_executable_extensions; do
23109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23110    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23112    break 2
23113  fi
23114done
23115  done
23116IFS=$as_save_IFS
23117
23118  ;;
23119esac
23120fi
23121ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23122if test -n "$ac_pt_PKG_CONFIG"; then
23123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23124$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23125else
23126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23127$as_echo "no" >&6; }
23128fi
23129
23130  if test "x$ac_pt_PKG_CONFIG" = x; then
23131    PKG_CONFIG=""
23132  else
23133    case $cross_compiling:$ac_tool_warned in
23134yes:)
23135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23137ac_tool_warned=yes ;;
23138esac
23139    PKG_CONFIG=$ac_pt_PKG_CONFIG
23140  fi
23141else
23142  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23143fi
23144
23145fi
23146if test -n "$PKG_CONFIG"; then
23147	_pkg_min_version=0.9.0
23148	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23149$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23150	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23151		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23152$as_echo "yes" >&6; }
23153	else
23154		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155$as_echo "no" >&6; }
23156		PKG_CONFIG=""
23157	fi
23158
23159fi
23160
23161# After basic tools have been setup, we can check build os specific details.
23162
23163  ###############################################################################
23164
23165  # Note that this is the build platform OS version!
23166
23167  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23168  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23169  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23170  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23171
23172
23173
23174
23175
23176# Misc basic settings
23177
23178
23179# Check whether --with-default-make-target was given.
23180if test "${with_default_make_target+set}" = set; then :
23181  withval=$with_default_make_target;
23182fi
23183
23184  if test "x$with_default_make_target" = "x" \
23185      || test "x$with_default_make_target" = "xyes"; then
23186    DEFAULT_MAKE_TARGET="exploded-image"
23187  elif test "x$with_default_make_target" = "xno"; then
23188    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23189  else
23190    DEFAULT_MAKE_TARGET="$with_default_make_target"
23191  fi
23192
23193
23194
23195
23196###############################################################################
23197#
23198# Determine OpenJDK variants, options and version numbers.
23199#
23200###############################################################################
23201
23202# We need build & target for this.
23203
23204  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23205  # We always build headless support.
23206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23207$as_echo_n "checking headful support... " >&6; }
23208  # Check whether --enable-headful was given.
23209if test "${enable_headful+set}" = set; then :
23210  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23211else
23212  SUPPORT_HEADFUL=yes
23213fi
23214
23215
23216  SUPPORT_HEADLESS=yes
23217  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23218
23219  if test "x$SUPPORT_HEADFUL" = xyes; then
23220    # We are building both headful and headless.
23221    headful_msg="include support for both headful and headless"
23222  fi
23223
23224  if test "x$SUPPORT_HEADFUL" = xno; then
23225    # Thus we are building headless only.
23226    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23227    headful_msg="headless only"
23228  fi
23229
23230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23231$as_echo "$headful_msg" >&6; }
23232
23233
23234
23235
23236
23237  # Choose cacerts source file
23238
23239# Check whether --with-cacerts-file was given.
23240if test "${with_cacerts_file+set}" = set; then :
23241  withval=$with_cacerts_file;
23242fi
23243
23244  if test "x$with_cacerts_file" != x; then
23245    CACERTS_FILE=$with_cacerts_file
23246  fi
23247
23248
23249  # Enable or disable unlimited crypto
23250  # Check whether --enable-unlimited-crypto was given.
23251if test "${enable_unlimited_crypto+set}" = set; then :
23252  enableval=$enable_unlimited_crypto;
23253else
23254  enable_unlimited_crypto=no
23255fi
23256
23257  if test "x$enable_unlimited_crypto" = "xyes"; then
23258    UNLIMITED_CRYPTO=true
23259  else
23260    UNLIMITED_CRYPTO=false
23261  fi
23262
23263
23264  # Should we build the serviceability agent (SA)?
23265  INCLUDE_SA=true
23266  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
23267    INCLUDE_SA=false
23268  fi
23269  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
23270    INCLUDE_SA=false
23271  fi
23272  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23273    INCLUDE_SA=false
23274  fi
23275  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23276    INCLUDE_SA=false
23277  fi
23278
23279
23280  # Compress jars
23281  COMPRESS_JARS=false
23282
23283
23284
23285  # Setup default copyright year. Mostly overridden when building close to a new year.
23286
23287# Check whether --with-copyright-year was given.
23288if test "${with_copyright_year+set}" = set; then :
23289  withval=$with_copyright_year;
23290fi
23291
23292  if test "x$with_copyright_year" = xyes; then
23293    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23294  elif test "x$with_copyright_year" != x; then
23295    COPYRIGHT_YEAR="$with_copyright_year"
23296  else
23297    COPYRIGHT_YEAR=`date +'%Y'`
23298  fi
23299
23300
23301
23302  # Control wether Hotspot runs Queens test after build.
23303  # Check whether --enable-hotspot-test-in-build was given.
23304if test "${enable_hotspot_test_in_build+set}" = set; then :
23305  enableval=$enable_hotspot_test_in_build;
23306else
23307  enable_hotspot_test_in_build=no
23308fi
23309
23310  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23311    TEST_IN_BUILD=true
23312  else
23313    TEST_IN_BUILD=false
23314  fi
23315
23316
23317
23318  # Warn user that old version arguments are deprecated.
23319
23320
23321# Check whether --with-milestone was given.
23322if test "${with_milestone+set}" = set; then :
23323  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23324$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23325fi
23326
23327
23328
23329
23330# Check whether --with-update-version was given.
23331if test "${with_update_version+set}" = set; then :
23332  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23333$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23334fi
23335
23336
23337
23338
23339# Check whether --with-user-release-suffix was given.
23340if test "${with_user_release_suffix+set}" = set; then :
23341  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
23342$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23343fi
23344
23345
23346
23347
23348# Check whether --with-build-number was given.
23349if test "${with_build_number+set}" = set; then :
23350  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23351$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23352fi
23353
23354
23355
23356  # Source the version numbers file
23357  . $AUTOCONF_DIR/version-numbers
23358
23359  # Some non-version number information is set in that file
23360
23361
23362
23363
23364
23365
23366
23367
23368  # Override version from arguments
23369
23370  # If --with-version-string is set, process it first. It is possible to
23371  # override parts with more specific flags, since these are processed later.
23372
23373# Check whether --with-version-string was given.
23374if test "${with_version_string+set}" = set; then :
23375  withval=$with_version_string;
23376fi
23377
23378  if test "x$with_version_string" = xyes; then
23379    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23380  elif test "x$with_version_string" != x; then
23381    # Additional [] needed to keep m4 from mangling shell constructs.
23382    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23383      VERSION_MAJOR=${BASH_REMATCH[1]}
23384      VERSION_MINOR=${BASH_REMATCH[3]}
23385      VERSION_SECURITY=${BASH_REMATCH[5]}
23386      VERSION_PATCH=${BASH_REMATCH[7]}
23387      VERSION_PRE=${BASH_REMATCH[9]}
23388      version_plus_separator=${BASH_REMATCH[11]}
23389      VERSION_BUILD=${BASH_REMATCH[12]}
23390      VERSION_OPT=${BASH_REMATCH[14]}
23391      # Unspecified numerical fields are interpreted as 0.
23392      if test "x$VERSION_MINOR" = x; then
23393        VERSION_MINOR=0
23394      fi
23395      if test "x$VERSION_SECURITY" = x; then
23396        VERSION_SECURITY=0
23397      fi
23398      if test "x$VERSION_PATCH" = x; then
23399        VERSION_PATCH=0
23400      fi
23401      if test "x$version_plus_separator" != x \
23402          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23403        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23404      fi
23405      # Stop the version part process from setting default values.
23406      # We still allow them to explicitely override though.
23407      NO_DEFAULT_VERSION_PARTS=true
23408    else
23409      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23410    fi
23411  fi
23412
23413
23414# Check whether --with-version-pre was given.
23415if test "${with_version_pre+set}" = set; then :
23416  withval=$with_version_pre; with_version_pre_present=true
23417else
23418  with_version_pre_present=false
23419fi
23420
23421
23422  if test "x$with_version_pre_present" = xtrue; then
23423    if test "x$with_version_pre" = xyes; then
23424      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23425    elif test "x$with_version_pre" = xno; then
23426      # Interpret --without-* as empty string instead of the literal "no"
23427      VERSION_PRE=
23428    else
23429      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23430       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23431      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23433$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23434      fi
23435    fi
23436  else
23437    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23438      # Default is to use "internal" as pre
23439      VERSION_PRE="internal"
23440    fi
23441  fi
23442
23443
23444# Check whether --with-version-opt was given.
23445if test "${with_version_opt+set}" = set; then :
23446  withval=$with_version_opt; with_version_opt_present=true
23447else
23448  with_version_opt_present=false
23449fi
23450
23451
23452  if test "x$with_version_opt_present" = xtrue; then
23453    if test "x$with_version_opt" = xyes; then
23454      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23455    elif test "x$with_version_opt" = xno; then
23456      # Interpret --without-* as empty string instead of the literal "no"
23457      VERSION_OPT=
23458    else
23459      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23460       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23461      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23463$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23464      fi
23465    fi
23466  else
23467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23468      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23469      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23470      # Outer [ ] to quote m4.
23471       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23472      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23473    fi
23474  fi
23475
23476
23477# Check whether --with-version-build was given.
23478if test "${with_version_build+set}" = set; then :
23479  withval=$with_version_build; with_version_build_present=true
23480else
23481  with_version_build_present=false
23482fi
23483
23484
23485  if test "x$with_version_build_present" = xtrue; then
23486    if test "x$with_version_build" = xyes; then
23487      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23488    elif test "x$with_version_build" = xno; then
23489      # Interpret --without-* as empty string instead of the literal "no"
23490      VERSION_BUILD=
23491    elif test "x$with_version_build" = x; then
23492      VERSION_BUILD=
23493    else
23494
23495  # Additional [] needed to keep m4 from mangling shell constructs.
23496  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23497    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23498  fi
23499  # Extract the version number without leading zeros.
23500  cleaned_value=${BASH_REMATCH[1]}
23501  if test "x$cleaned_value" = x; then
23502    # Special case for zero
23503    cleaned_value=${BASH_REMATCH[2]}
23504  fi
23505
23506  if test $cleaned_value -gt 255; then
23507    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23508  fi
23509  if test "x$cleaned_value" != "x$with_version_build"; then
23510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23511$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23512  fi
23513  VERSION_BUILD=$cleaned_value
23514
23515    fi
23516  else
23517    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23518      # Default is to not have a build number.
23519      VERSION_BUILD=""
23520      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23521      VERSION_BUILD=0
23522    fi
23523  fi
23524
23525
23526# Check whether --with-version-major was given.
23527if test "${with_version_major+set}" = set; then :
23528  withval=$with_version_major; with_version_major_present=true
23529else
23530  with_version_major_present=false
23531fi
23532
23533
23534  if test "x$with_version_major_present" = xtrue; then
23535    if test "x$with_version_major" = xyes; then
23536      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23537    else
23538
23539  # Additional [] needed to keep m4 from mangling shell constructs.
23540  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23541    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23542  fi
23543  # Extract the version number without leading zeros.
23544  cleaned_value=${BASH_REMATCH[1]}
23545  if test "x$cleaned_value" = x; then
23546    # Special case for zero
23547    cleaned_value=${BASH_REMATCH[2]}
23548  fi
23549
23550  if test $cleaned_value -gt 255; then
23551    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23552  fi
23553  if test "x$cleaned_value" != "x$with_version_major"; then
23554    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23555$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23556  fi
23557  VERSION_MAJOR=$cleaned_value
23558
23559    fi
23560  else
23561    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23562      # Default is to get value from version-numbers
23563      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23564    fi
23565  fi
23566
23567
23568# Check whether --with-version-minor was given.
23569if test "${with_version_minor+set}" = set; then :
23570  withval=$with_version_minor; with_version_minor_present=true
23571else
23572  with_version_minor_present=false
23573fi
23574
23575
23576  if test "x$with_version_minor_present" = xtrue; then
23577    if test "x$with_version_minor" = xyes; then
23578      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23579    elif test "x$with_version_minor" = xno; then
23580      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23581      VERSION_MINOR=0
23582    elif test "x$with_version_minor" = x; then
23583      VERSION_MINOR=0
23584    else
23585
23586  # Additional [] needed to keep m4 from mangling shell constructs.
23587  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23588    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23589  fi
23590  # Extract the version number without leading zeros.
23591  cleaned_value=${BASH_REMATCH[1]}
23592  if test "x$cleaned_value" = x; then
23593    # Special case for zero
23594    cleaned_value=${BASH_REMATCH[2]}
23595  fi
23596
23597  if test $cleaned_value -gt 255; then
23598    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23599  fi
23600  if test "x$cleaned_value" != "x$with_version_minor"; then
23601    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23602$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23603  fi
23604  VERSION_MINOR=$cleaned_value
23605
23606    fi
23607  else
23608    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23609      # Default is 0, if unspecified
23610      VERSION_MINOR=0
23611    fi
23612  fi
23613
23614
23615# Check whether --with-version-security was given.
23616if test "${with_version_security+set}" = set; then :
23617  withval=$with_version_security; with_version_security_present=true
23618else
23619  with_version_security_present=false
23620fi
23621
23622
23623  if test "x$with_version_security_present" = xtrue; then
23624    if test "x$with_version_security" = xyes; then
23625      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23626    elif test "x$with_version_security" = xno; then
23627      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23628      VERSION_SECURITY=0
23629    elif test "x$with_version_security" = x; then
23630      VERSION_SECURITY=0
23631    else
23632
23633  # Additional [] needed to keep m4 from mangling shell constructs.
23634  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23635    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23636  fi
23637  # Extract the version number without leading zeros.
23638  cleaned_value=${BASH_REMATCH[1]}
23639  if test "x$cleaned_value" = x; then
23640    # Special case for zero
23641    cleaned_value=${BASH_REMATCH[2]}
23642  fi
23643
23644  if test $cleaned_value -gt 255; then
23645    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23646  fi
23647  if test "x$cleaned_value" != "x$with_version_security"; then
23648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23649$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23650  fi
23651  VERSION_SECURITY=$cleaned_value
23652
23653    fi
23654  else
23655    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23656      # Default is 0, if unspecified
23657      VERSION_SECURITY=0
23658    fi
23659  fi
23660
23661
23662# Check whether --with-version-patch was given.
23663if test "${with_version_patch+set}" = set; then :
23664  withval=$with_version_patch; with_version_patch_present=true
23665else
23666  with_version_patch_present=false
23667fi
23668
23669
23670  if test "x$with_version_patch_present" = xtrue; then
23671    if test "x$with_version_patch" = xyes; then
23672      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23673    elif test "x$with_version_patch" = xno; then
23674      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23675      VERSION_PATCH=0
23676    elif test "x$with_version_patch" = x; then
23677      VERSION_PATCH=0
23678    else
23679
23680  # Additional [] needed to keep m4 from mangling shell constructs.
23681  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23682    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23683  fi
23684  # Extract the version number without leading zeros.
23685  cleaned_value=${BASH_REMATCH[1]}
23686  if test "x$cleaned_value" = x; then
23687    # Special case for zero
23688    cleaned_value=${BASH_REMATCH[2]}
23689  fi
23690
23691  if test $cleaned_value -gt 255; then
23692    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23693  fi
23694  if test "x$cleaned_value" != "x$with_version_patch"; then
23695    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23696$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23697  fi
23698  VERSION_PATCH=$cleaned_value
23699
23700    fi
23701  else
23702    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23703      # Default is 0, if unspecified
23704      VERSION_PATCH=0
23705    fi
23706  fi
23707
23708  # Calculate derived version properties
23709
23710  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23711  if test "x$VERSION_PRE" = x; then
23712    VERSION_IS_GA=true
23713  else
23714    VERSION_IS_GA=false
23715  fi
23716
23717  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23718  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23719
23720  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23721  # Strip trailing zeroes from stripped_version_number
23722  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23723  VERSION_NUMBER=$stripped_version_number
23724
23725  # The complete version string, with additional build information
23726  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23727    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23728  else
23729    # If either build or opt is set, we need a + separator
23730    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23731  fi
23732
23733  # The short version string, just VERSION_NUMBER and PRE, if present.
23734  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23735
23736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23737$as_echo_n "checking for version string... " >&6; }
23738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23739$as_echo "$VERSION_STRING" >&6; }
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755###############################################################################
23756#
23757# Setup BootJDK, used to bootstrap the build.
23758#
23759###############################################################################
23760
23761
23762  BOOT_JDK_FOUND=no
23763
23764# Check whether --with-boot-jdk was given.
23765if test "${with_boot_jdk+set}" = set; then :
23766  withval=$with_boot_jdk;
23767fi
23768
23769
23770  # We look for the Boot JDK through various means, going from more certain to
23771  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23772  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23773  # must check if this is indeed valid; otherwise we'll continue looking.
23774
23775  # Test: Is bootjdk explicitely set by command line arguments?
23776
23777  if test "x$BOOT_JDK_FOUND" = xno; then
23778    # Now execute the test
23779
23780  if test "x$with_boot_jdk" != x; then
23781    BOOT_JDK=$with_boot_jdk
23782    BOOT_JDK_FOUND=maybe
23783    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23784$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23785  fi
23786
23787
23788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23790      # Do we have a bin/java?
23791      if test ! -x "$BOOT_JDK/bin/java"; then
23792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23794        BOOT_JDK_FOUND=no
23795      else
23796        # Do we have a bin/javac?
23797        if test ! -x "$BOOT_JDK/bin/javac"; then
23798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23802          BOOT_JDK_FOUND=no
23803        else
23804          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23805          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23806
23807          # Extra M4 quote needed to protect [] in grep expression.
23808          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23809          if test "x$FOUND_CORRECT_VERSION" = x; then
23810            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23812            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23813$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23814            BOOT_JDK_FOUND=no
23815          else
23816            # We're done! :-)
23817            BOOT_JDK_FOUND=yes
23818
23819  # Only process if variable expands to non-empty
23820
23821  if test "x$BOOT_JDK" != x; then
23822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23823
23824  # Input might be given as Windows format, start by converting to
23825  # unix format.
23826  path="$BOOT_JDK"
23827  new_path=`$CYGPATH -u "$path"`
23828
23829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23832  # "foo.exe" is OK but "foo" is an error.
23833  #
23834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23835  # It is also a way to make sure we got the proper file name for the real test later on.
23836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23837  if test "x$test_shortpath" = x; then
23838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23841  fi
23842
23843  # Call helper function which possibly converts this using DOS-style short mode.
23844  # If so, the updated path is stored in $new_path.
23845
23846  input_path="$new_path"
23847  # Check if we need to convert this using DOS-style short mode. If the path
23848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23849  # take no chances and rewrite it.
23850  # Note: m4 eats our [], so we need to use [ and ] instead.
23851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23852  if test "x$has_forbidden_chars" != x; then
23853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23857      # Going to short mode and back again did indeed matter. Since short mode is
23858      # case insensitive, let's make it lowercase to improve readability.
23859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23860      # Now convert it back to Unix-style (cygpath)
23861      input_path=`$CYGPATH -u "$shortmode_path"`
23862      new_path="$input_path"
23863    fi
23864  fi
23865
23866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23867  if test "x$test_cygdrive_prefix" = x; then
23868    # As a simple fix, exclude /usr/bin since it's not a real path.
23869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23871      # a path prefixed by /cygdrive for fixpath to work.
23872      new_path="$CYGWIN_ROOT_PATH$input_path"
23873    fi
23874  fi
23875
23876
23877  if test "x$path" != "x$new_path"; then
23878    BOOT_JDK="$new_path"
23879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23881  fi
23882
23883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884
23885  path="$BOOT_JDK"
23886  has_colon=`$ECHO $path | $GREP ^.:`
23887  new_path="$path"
23888  if test "x$has_colon" = x; then
23889    # Not in mixed or Windows style, start by that.
23890    new_path=`cmd //c echo $path`
23891  fi
23892
23893
23894  input_path="$new_path"
23895  # Check if we need to convert this using DOS-style short mode. If the path
23896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23897  # take no chances and rewrite it.
23898  # Note: m4 eats our [], so we need to use [ and ] instead.
23899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23900  if test "x$has_forbidden_chars" != x; then
23901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23903  fi
23904
23905
23906  windows_path="$new_path"
23907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23908    unix_path=`$CYGPATH -u "$windows_path"`
23909    new_path="$unix_path"
23910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23912    new_path="$unix_path"
23913  fi
23914
23915  if test "x$path" != "x$new_path"; then
23916    BOOT_JDK="$new_path"
23917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23919  fi
23920
23921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23923
23924    else
23925      # We're on a unix platform. Hooray! :)
23926      path="$BOOT_JDK"
23927      has_space=`$ECHO "$path" | $GREP " "`
23928      if test "x$has_space" != x; then
23929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23932      fi
23933
23934      # Use eval to expand a potential ~
23935      eval path="$path"
23936      if test ! -f "$path" && test ! -d "$path"; then
23937        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23938      fi
23939
23940      if test -d "$path"; then
23941        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23942      else
23943        dir="`$DIRNAME "$path"`"
23944        base="`$BASENAME "$path"`"
23945        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23946      fi
23947    fi
23948  fi
23949
23950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23951$as_echo_n "checking for Boot JDK... " >&6; }
23952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23953$as_echo "$BOOT_JDK" >&6; }
23954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23955$as_echo_n "checking Boot JDK version... " >&6; }
23956            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23958$as_echo "$BOOT_JDK_VERSION" >&6; }
23959          fi # end check jdk version
23960        fi # end check javac
23961      fi # end check java
23962    fi # end check boot jdk found
23963  fi
23964
23965  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23966    # Having specified an argument which is incorrect will produce an instant failure;
23967    # we should not go on looking
23968    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23969  fi
23970
23971  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23972
23973  if test "x$BOOT_JDK_FOUND" = xno; then
23974    # Now execute the test
23975
23976  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23977    # First check at user selected default
23978
23979  if test "x$BOOT_JDK_FOUND" = xno; then
23980    # Now execute the test
23981
23982  if test -x /usr/libexec/java_home; then
23983    BOOT_JDK=`/usr/libexec/java_home `
23984    BOOT_JDK_FOUND=maybe
23985    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23986$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23987  fi
23988
23989
23990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23992      # Do we have a bin/java?
23993      if test ! -x "$BOOT_JDK/bin/java"; then
23994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23996        BOOT_JDK_FOUND=no
23997      else
23998        # Do we have a bin/javac?
23999        if test ! -x "$BOOT_JDK/bin/javac"; then
24000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24004          BOOT_JDK_FOUND=no
24005        else
24006          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24007          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24008
24009          # Extra M4 quote needed to protect [] in grep expression.
24010          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24011          if test "x$FOUND_CORRECT_VERSION" = x; then
24012            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24014            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24015$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24016            BOOT_JDK_FOUND=no
24017          else
24018            # We're done! :-)
24019            BOOT_JDK_FOUND=yes
24020
24021  # Only process if variable expands to non-empty
24022
24023  if test "x$BOOT_JDK" != x; then
24024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24025
24026  # Input might be given as Windows format, start by converting to
24027  # unix format.
24028  path="$BOOT_JDK"
24029  new_path=`$CYGPATH -u "$path"`
24030
24031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24034  # "foo.exe" is OK but "foo" is an error.
24035  #
24036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24037  # It is also a way to make sure we got the proper file name for the real test later on.
24038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24039  if test "x$test_shortpath" = x; then
24040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24042    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24043  fi
24044
24045  # Call helper function which possibly converts this using DOS-style short mode.
24046  # If so, the updated path is stored in $new_path.
24047
24048  input_path="$new_path"
24049  # Check if we need to convert this using DOS-style short mode. If the path
24050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24051  # take no chances and rewrite it.
24052  # Note: m4 eats our [], so we need to use [ and ] instead.
24053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24054  if test "x$has_forbidden_chars" != x; then
24055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24059      # Going to short mode and back again did indeed matter. Since short mode is
24060      # case insensitive, let's make it lowercase to improve readability.
24061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24062      # Now convert it back to Unix-style (cygpath)
24063      input_path=`$CYGPATH -u "$shortmode_path"`
24064      new_path="$input_path"
24065    fi
24066  fi
24067
24068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24069  if test "x$test_cygdrive_prefix" = x; then
24070    # As a simple fix, exclude /usr/bin since it's not a real path.
24071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24073      # a path prefixed by /cygdrive for fixpath to work.
24074      new_path="$CYGWIN_ROOT_PATH$input_path"
24075    fi
24076  fi
24077
24078
24079  if test "x$path" != "x$new_path"; then
24080    BOOT_JDK="$new_path"
24081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24083  fi
24084
24085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24086
24087  path="$BOOT_JDK"
24088  has_colon=`$ECHO $path | $GREP ^.:`
24089  new_path="$path"
24090  if test "x$has_colon" = x; then
24091    # Not in mixed or Windows style, start by that.
24092    new_path=`cmd //c echo $path`
24093  fi
24094
24095
24096  input_path="$new_path"
24097  # Check if we need to convert this using DOS-style short mode. If the path
24098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24099  # take no chances and rewrite it.
24100  # Note: m4 eats our [], so we need to use [ and ] instead.
24101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24102  if test "x$has_forbidden_chars" != x; then
24103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24105  fi
24106
24107
24108  windows_path="$new_path"
24109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24110    unix_path=`$CYGPATH -u "$windows_path"`
24111    new_path="$unix_path"
24112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24114    new_path="$unix_path"
24115  fi
24116
24117  if test "x$path" != "x$new_path"; then
24118    BOOT_JDK="$new_path"
24119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24121  fi
24122
24123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24125
24126    else
24127      # We're on a unix platform. Hooray! :)
24128      path="$BOOT_JDK"
24129      has_space=`$ECHO "$path" | $GREP " "`
24130      if test "x$has_space" != x; then
24131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24134      fi
24135
24136      # Use eval to expand a potential ~
24137      eval path="$path"
24138      if test ! -f "$path" && test ! -d "$path"; then
24139        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24140      fi
24141
24142      if test -d "$path"; then
24143        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24144      else
24145        dir="`$DIRNAME "$path"`"
24146        base="`$BASENAME "$path"`"
24147        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24148      fi
24149    fi
24150  fi
24151
24152            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24153$as_echo_n "checking for Boot JDK... " >&6; }
24154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24155$as_echo "$BOOT_JDK" >&6; }
24156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24157$as_echo_n "checking Boot JDK version... " >&6; }
24158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24160$as_echo "$BOOT_JDK_VERSION" >&6; }
24161          fi # end check jdk version
24162        fi # end check javac
24163      fi # end check java
24164    fi # end check boot jdk found
24165  fi
24166
24167    # If that did not work out (e.g. too old), try explicit versions instead
24168
24169  if test "x$BOOT_JDK_FOUND" = xno; then
24170    # Now execute the test
24171
24172  if test -x /usr/libexec/java_home; then
24173    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24174    BOOT_JDK_FOUND=maybe
24175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24176$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24177  fi
24178
24179
24180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24182      # Do we have a bin/java?
24183      if test ! -x "$BOOT_JDK/bin/java"; then
24184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24186        BOOT_JDK_FOUND=no
24187      else
24188        # Do we have a bin/javac?
24189        if test ! -x "$BOOT_JDK/bin/javac"; then
24190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24194          BOOT_JDK_FOUND=no
24195        else
24196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24198
24199          # Extra M4 quote needed to protect [] in grep expression.
24200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24201          if test "x$FOUND_CORRECT_VERSION" = x; then
24202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24206            BOOT_JDK_FOUND=no
24207          else
24208            # We're done! :-)
24209            BOOT_JDK_FOUND=yes
24210
24211  # Only process if variable expands to non-empty
24212
24213  if test "x$BOOT_JDK" != x; then
24214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24215
24216  # Input might be given as Windows format, start by converting to
24217  # unix format.
24218  path="$BOOT_JDK"
24219  new_path=`$CYGPATH -u "$path"`
24220
24221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24224  # "foo.exe" is OK but "foo" is an error.
24225  #
24226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24227  # It is also a way to make sure we got the proper file name for the real test later on.
24228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24229  if test "x$test_shortpath" = x; then
24230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24233  fi
24234
24235  # Call helper function which possibly converts this using DOS-style short mode.
24236  # If so, the updated path is stored in $new_path.
24237
24238  input_path="$new_path"
24239  # Check if we need to convert this using DOS-style short mode. If the path
24240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24241  # take no chances and rewrite it.
24242  # Note: m4 eats our [], so we need to use [ and ] instead.
24243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24244  if test "x$has_forbidden_chars" != x; then
24245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24249      # Going to short mode and back again did indeed matter. Since short mode is
24250      # case insensitive, let's make it lowercase to improve readability.
24251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24252      # Now convert it back to Unix-style (cygpath)
24253      input_path=`$CYGPATH -u "$shortmode_path"`
24254      new_path="$input_path"
24255    fi
24256  fi
24257
24258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24259  if test "x$test_cygdrive_prefix" = x; then
24260    # As a simple fix, exclude /usr/bin since it's not a real path.
24261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24263      # a path prefixed by /cygdrive for fixpath to work.
24264      new_path="$CYGWIN_ROOT_PATH$input_path"
24265    fi
24266  fi
24267
24268
24269  if test "x$path" != "x$new_path"; then
24270    BOOT_JDK="$new_path"
24271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24273  fi
24274
24275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24276
24277  path="$BOOT_JDK"
24278  has_colon=`$ECHO $path | $GREP ^.:`
24279  new_path="$path"
24280  if test "x$has_colon" = x; then
24281    # Not in mixed or Windows style, start by that.
24282    new_path=`cmd //c echo $path`
24283  fi
24284
24285
24286  input_path="$new_path"
24287  # Check if we need to convert this using DOS-style short mode. If the path
24288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24289  # take no chances and rewrite it.
24290  # Note: m4 eats our [], so we need to use [ and ] instead.
24291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24292  if test "x$has_forbidden_chars" != x; then
24293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24295  fi
24296
24297
24298  windows_path="$new_path"
24299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24300    unix_path=`$CYGPATH -u "$windows_path"`
24301    new_path="$unix_path"
24302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24304    new_path="$unix_path"
24305  fi
24306
24307  if test "x$path" != "x$new_path"; then
24308    BOOT_JDK="$new_path"
24309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24311  fi
24312
24313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24315
24316    else
24317      # We're on a unix platform. Hooray! :)
24318      path="$BOOT_JDK"
24319      has_space=`$ECHO "$path" | $GREP " "`
24320      if test "x$has_space" != x; then
24321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24324      fi
24325
24326      # Use eval to expand a potential ~
24327      eval path="$path"
24328      if test ! -f "$path" && test ! -d "$path"; then
24329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24330      fi
24331
24332      if test -d "$path"; then
24333        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24334      else
24335        dir="`$DIRNAME "$path"`"
24336        base="`$BASENAME "$path"`"
24337        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24338      fi
24339    fi
24340  fi
24341
24342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24343$as_echo_n "checking for Boot JDK... " >&6; }
24344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24345$as_echo "$BOOT_JDK" >&6; }
24346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24347$as_echo_n "checking Boot JDK version... " >&6; }
24348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24350$as_echo "$BOOT_JDK_VERSION" >&6; }
24351          fi # end check jdk version
24352        fi # end check javac
24353      fi # end check java
24354    fi # end check boot jdk found
24355  fi
24356
24357
24358  if test "x$BOOT_JDK_FOUND" = xno; then
24359    # Now execute the test
24360
24361  if test -x /usr/libexec/java_home; then
24362    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24363    BOOT_JDK_FOUND=maybe
24364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24365$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24366  fi
24367
24368
24369    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24370    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24371      # Do we have a bin/java?
24372      if test ! -x "$BOOT_JDK/bin/java"; then
24373        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24375        BOOT_JDK_FOUND=no
24376      else
24377        # Do we have a bin/javac?
24378        if test ! -x "$BOOT_JDK/bin/javac"; then
24379          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24381          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24382$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24383          BOOT_JDK_FOUND=no
24384        else
24385          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24386          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24387
24388          # Extra M4 quote needed to protect [] in grep expression.
24389          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24390          if test "x$FOUND_CORRECT_VERSION" = x; then
24391            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24393            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24394$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24395            BOOT_JDK_FOUND=no
24396          else
24397            # We're done! :-)
24398            BOOT_JDK_FOUND=yes
24399
24400  # Only process if variable expands to non-empty
24401
24402  if test "x$BOOT_JDK" != x; then
24403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24404
24405  # Input might be given as Windows format, start by converting to
24406  # unix format.
24407  path="$BOOT_JDK"
24408  new_path=`$CYGPATH -u "$path"`
24409
24410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24413  # "foo.exe" is OK but "foo" is an error.
24414  #
24415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24416  # It is also a way to make sure we got the proper file name for the real test later on.
24417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24418  if test "x$test_shortpath" = x; then
24419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24422  fi
24423
24424  # Call helper function which possibly converts this using DOS-style short mode.
24425  # If so, the updated path is stored in $new_path.
24426
24427  input_path="$new_path"
24428  # Check if we need to convert this using DOS-style short mode. If the path
24429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24430  # take no chances and rewrite it.
24431  # Note: m4 eats our [], so we need to use [ and ] instead.
24432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24433  if test "x$has_forbidden_chars" != x; then
24434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24438      # Going to short mode and back again did indeed matter. Since short mode is
24439      # case insensitive, let's make it lowercase to improve readability.
24440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24441      # Now convert it back to Unix-style (cygpath)
24442      input_path=`$CYGPATH -u "$shortmode_path"`
24443      new_path="$input_path"
24444    fi
24445  fi
24446
24447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24448  if test "x$test_cygdrive_prefix" = x; then
24449    # As a simple fix, exclude /usr/bin since it's not a real path.
24450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24452      # a path prefixed by /cygdrive for fixpath to work.
24453      new_path="$CYGWIN_ROOT_PATH$input_path"
24454    fi
24455  fi
24456
24457
24458  if test "x$path" != "x$new_path"; then
24459    BOOT_JDK="$new_path"
24460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24462  fi
24463
24464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24465
24466  path="$BOOT_JDK"
24467  has_colon=`$ECHO $path | $GREP ^.:`
24468  new_path="$path"
24469  if test "x$has_colon" = x; then
24470    # Not in mixed or Windows style, start by that.
24471    new_path=`cmd //c echo $path`
24472  fi
24473
24474
24475  input_path="$new_path"
24476  # Check if we need to convert this using DOS-style short mode. If the path
24477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24478  # take no chances and rewrite it.
24479  # Note: m4 eats our [], so we need to use [ and ] instead.
24480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24481  if test "x$has_forbidden_chars" != x; then
24482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24484  fi
24485
24486
24487  windows_path="$new_path"
24488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24489    unix_path=`$CYGPATH -u "$windows_path"`
24490    new_path="$unix_path"
24491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24493    new_path="$unix_path"
24494  fi
24495
24496  if test "x$path" != "x$new_path"; then
24497    BOOT_JDK="$new_path"
24498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24500  fi
24501
24502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24504
24505    else
24506      # We're on a unix platform. Hooray! :)
24507      path="$BOOT_JDK"
24508      has_space=`$ECHO "$path" | $GREP " "`
24509      if test "x$has_space" != x; then
24510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24513      fi
24514
24515      # Use eval to expand a potential ~
24516      eval path="$path"
24517      if test ! -f "$path" && test ! -d "$path"; then
24518        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24519      fi
24520
24521      if test -d "$path"; then
24522        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24523      else
24524        dir="`$DIRNAME "$path"`"
24525        base="`$BASENAME "$path"`"
24526        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24527      fi
24528    fi
24529  fi
24530
24531            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24532$as_echo_n "checking for Boot JDK... " >&6; }
24533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24534$as_echo "$BOOT_JDK" >&6; }
24535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24536$as_echo_n "checking Boot JDK version... " >&6; }
24537            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24539$as_echo "$BOOT_JDK_VERSION" >&6; }
24540          fi # end check jdk version
24541        fi # end check javac
24542      fi # end check java
24543    fi # end check boot jdk found
24544  fi
24545
24546
24547  if test "x$BOOT_JDK_FOUND" = xno; then
24548    # Now execute the test
24549
24550  if test -x /usr/libexec/java_home; then
24551    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24552    BOOT_JDK_FOUND=maybe
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24554$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24555  fi
24556
24557
24558    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24559    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24560      # Do we have a bin/java?
24561      if test ! -x "$BOOT_JDK/bin/java"; then
24562        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24564        BOOT_JDK_FOUND=no
24565      else
24566        # Do we have a bin/javac?
24567        if test ! -x "$BOOT_JDK/bin/javac"; then
24568          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24570          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24571$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24572          BOOT_JDK_FOUND=no
24573        else
24574          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24575          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24576
24577          # Extra M4 quote needed to protect [] in grep expression.
24578          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24579          if test "x$FOUND_CORRECT_VERSION" = x; then
24580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24582            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24583$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24584            BOOT_JDK_FOUND=no
24585          else
24586            # We're done! :-)
24587            BOOT_JDK_FOUND=yes
24588
24589  # Only process if variable expands to non-empty
24590
24591  if test "x$BOOT_JDK" != x; then
24592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24593
24594  # Input might be given as Windows format, start by converting to
24595  # unix format.
24596  path="$BOOT_JDK"
24597  new_path=`$CYGPATH -u "$path"`
24598
24599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24602  # "foo.exe" is OK but "foo" is an error.
24603  #
24604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24605  # It is also a way to make sure we got the proper file name for the real test later on.
24606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24607  if test "x$test_shortpath" = x; then
24608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24611  fi
24612
24613  # Call helper function which possibly converts this using DOS-style short mode.
24614  # If so, the updated path is stored in $new_path.
24615
24616  input_path="$new_path"
24617  # Check if we need to convert this using DOS-style short mode. If the path
24618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24619  # take no chances and rewrite it.
24620  # Note: m4 eats our [], so we need to use [ and ] instead.
24621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24622  if test "x$has_forbidden_chars" != x; then
24623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24627      # Going to short mode and back again did indeed matter. Since short mode is
24628      # case insensitive, let's make it lowercase to improve readability.
24629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24630      # Now convert it back to Unix-style (cygpath)
24631      input_path=`$CYGPATH -u "$shortmode_path"`
24632      new_path="$input_path"
24633    fi
24634  fi
24635
24636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24637  if test "x$test_cygdrive_prefix" = x; then
24638    # As a simple fix, exclude /usr/bin since it's not a real path.
24639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24641      # a path prefixed by /cygdrive for fixpath to work.
24642      new_path="$CYGWIN_ROOT_PATH$input_path"
24643    fi
24644  fi
24645
24646
24647  if test "x$path" != "x$new_path"; then
24648    BOOT_JDK="$new_path"
24649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24651  fi
24652
24653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24654
24655  path="$BOOT_JDK"
24656  has_colon=`$ECHO $path | $GREP ^.:`
24657  new_path="$path"
24658  if test "x$has_colon" = x; then
24659    # Not in mixed or Windows style, start by that.
24660    new_path=`cmd //c echo $path`
24661  fi
24662
24663
24664  input_path="$new_path"
24665  # Check if we need to convert this using DOS-style short mode. If the path
24666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24667  # take no chances and rewrite it.
24668  # Note: m4 eats our [], so we need to use [ and ] instead.
24669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24670  if test "x$has_forbidden_chars" != x; then
24671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24673  fi
24674
24675
24676  windows_path="$new_path"
24677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24678    unix_path=`$CYGPATH -u "$windows_path"`
24679    new_path="$unix_path"
24680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24682    new_path="$unix_path"
24683  fi
24684
24685  if test "x$path" != "x$new_path"; then
24686    BOOT_JDK="$new_path"
24687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24689  fi
24690
24691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24693
24694    else
24695      # We're on a unix platform. Hooray! :)
24696      path="$BOOT_JDK"
24697      has_space=`$ECHO "$path" | $GREP " "`
24698      if test "x$has_space" != x; then
24699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24702      fi
24703
24704      # Use eval to expand a potential ~
24705      eval path="$path"
24706      if test ! -f "$path" && test ! -d "$path"; then
24707        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24708      fi
24709
24710      if test -d "$path"; then
24711        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24712      else
24713        dir="`$DIRNAME "$path"`"
24714        base="`$BASENAME "$path"`"
24715        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24716      fi
24717    fi
24718  fi
24719
24720            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24721$as_echo_n "checking for Boot JDK... " >&6; }
24722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24723$as_echo "$BOOT_JDK" >&6; }
24724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24725$as_echo_n "checking Boot JDK version... " >&6; }
24726            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24728$as_echo "$BOOT_JDK_VERSION" >&6; }
24729          fi # end check jdk version
24730        fi # end check javac
24731      fi # end check java
24732    fi # end check boot jdk found
24733  fi
24734
24735  fi
24736
24737
24738    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24739    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24740      # Do we have a bin/java?
24741      if test ! -x "$BOOT_JDK/bin/java"; then
24742        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24744        BOOT_JDK_FOUND=no
24745      else
24746        # Do we have a bin/javac?
24747        if test ! -x "$BOOT_JDK/bin/javac"; then
24748          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24750          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24751$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24752          BOOT_JDK_FOUND=no
24753        else
24754          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24755          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24756
24757          # Extra M4 quote needed to protect [] in grep expression.
24758          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24759          if test "x$FOUND_CORRECT_VERSION" = x; then
24760            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24762            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24763$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24764            BOOT_JDK_FOUND=no
24765          else
24766            # We're done! :-)
24767            BOOT_JDK_FOUND=yes
24768
24769  # Only process if variable expands to non-empty
24770
24771  if test "x$BOOT_JDK" != x; then
24772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24773
24774  # Input might be given as Windows format, start by converting to
24775  # unix format.
24776  path="$BOOT_JDK"
24777  new_path=`$CYGPATH -u "$path"`
24778
24779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24782  # "foo.exe" is OK but "foo" is an error.
24783  #
24784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24785  # It is also a way to make sure we got the proper file name for the real test later on.
24786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24787  if test "x$test_shortpath" = x; then
24788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24790    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24791  fi
24792
24793  # Call helper function which possibly converts this using DOS-style short mode.
24794  # If so, the updated path is stored in $new_path.
24795
24796  input_path="$new_path"
24797  # Check if we need to convert this using DOS-style short mode. If the path
24798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24799  # take no chances and rewrite it.
24800  # Note: m4 eats our [], so we need to use [ and ] instead.
24801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24802  if test "x$has_forbidden_chars" != x; then
24803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24807      # Going to short mode and back again did indeed matter. Since short mode is
24808      # case insensitive, let's make it lowercase to improve readability.
24809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24810      # Now convert it back to Unix-style (cygpath)
24811      input_path=`$CYGPATH -u "$shortmode_path"`
24812      new_path="$input_path"
24813    fi
24814  fi
24815
24816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24817  if test "x$test_cygdrive_prefix" = x; then
24818    # As a simple fix, exclude /usr/bin since it's not a real path.
24819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24821      # a path prefixed by /cygdrive for fixpath to work.
24822      new_path="$CYGWIN_ROOT_PATH$input_path"
24823    fi
24824  fi
24825
24826
24827  if test "x$path" != "x$new_path"; then
24828    BOOT_JDK="$new_path"
24829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24831  fi
24832
24833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24834
24835  path="$BOOT_JDK"
24836  has_colon=`$ECHO $path | $GREP ^.:`
24837  new_path="$path"
24838  if test "x$has_colon" = x; then
24839    # Not in mixed or Windows style, start by that.
24840    new_path=`cmd //c echo $path`
24841  fi
24842
24843
24844  input_path="$new_path"
24845  # Check if we need to convert this using DOS-style short mode. If the path
24846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24847  # take no chances and rewrite it.
24848  # Note: m4 eats our [], so we need to use [ and ] instead.
24849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24850  if test "x$has_forbidden_chars" != x; then
24851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24853  fi
24854
24855
24856  windows_path="$new_path"
24857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24858    unix_path=`$CYGPATH -u "$windows_path"`
24859    new_path="$unix_path"
24860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24862    new_path="$unix_path"
24863  fi
24864
24865  if test "x$path" != "x$new_path"; then
24866    BOOT_JDK="$new_path"
24867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24869  fi
24870
24871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24873
24874    else
24875      # We're on a unix platform. Hooray! :)
24876      path="$BOOT_JDK"
24877      has_space=`$ECHO "$path" | $GREP " "`
24878      if test "x$has_space" != x; then
24879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24880$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24881        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24882      fi
24883
24884      # Use eval to expand a potential ~
24885      eval path="$path"
24886      if test ! -f "$path" && test ! -d "$path"; then
24887        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24888      fi
24889
24890      if test -d "$path"; then
24891        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24892      else
24893        dir="`$DIRNAME "$path"`"
24894        base="`$BASENAME "$path"`"
24895        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24896      fi
24897    fi
24898  fi
24899
24900            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24901$as_echo_n "checking for Boot JDK... " >&6; }
24902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24903$as_echo "$BOOT_JDK" >&6; }
24904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24905$as_echo_n "checking Boot JDK version... " >&6; }
24906            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24908$as_echo "$BOOT_JDK_VERSION" >&6; }
24909          fi # end check jdk version
24910        fi # end check javac
24911      fi # end check java
24912    fi # end check boot jdk found
24913  fi
24914
24915
24916  # Test: Is $JAVA_HOME set?
24917
24918  if test "x$BOOT_JDK_FOUND" = xno; then
24919    # Now execute the test
24920
24921  if test "x$JAVA_HOME" != x; then
24922    JAVA_HOME_PROCESSED="$JAVA_HOME"
24923
24924  # Only process if variable expands to non-empty
24925
24926  if test "x$JAVA_HOME_PROCESSED" != x; then
24927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24928
24929  # Input might be given as Windows format, start by converting to
24930  # unix format.
24931  path="$JAVA_HOME_PROCESSED"
24932  new_path=`$CYGPATH -u "$path"`
24933
24934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24937  # "foo.exe" is OK but "foo" is an error.
24938  #
24939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24940  # It is also a way to make sure we got the proper file name for the real test later on.
24941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24942  if test "x$test_shortpath" = x; then
24943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24944$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24945    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24946  fi
24947
24948  # Call helper function which possibly converts this using DOS-style short mode.
24949  # If so, the updated path is stored in $new_path.
24950
24951  input_path="$new_path"
24952  # Check if we need to convert this using DOS-style short mode. If the path
24953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954  # take no chances and rewrite it.
24955  # Note: m4 eats our [], so we need to use [ and ] instead.
24956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24957  if test "x$has_forbidden_chars" != x; then
24958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24962      # Going to short mode and back again did indeed matter. Since short mode is
24963      # case insensitive, let's make it lowercase to improve readability.
24964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24965      # Now convert it back to Unix-style (cygpath)
24966      input_path=`$CYGPATH -u "$shortmode_path"`
24967      new_path="$input_path"
24968    fi
24969  fi
24970
24971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24972  if test "x$test_cygdrive_prefix" = x; then
24973    # As a simple fix, exclude /usr/bin since it's not a real path.
24974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24976      # a path prefixed by /cygdrive for fixpath to work.
24977      new_path="$CYGWIN_ROOT_PATH$input_path"
24978    fi
24979  fi
24980
24981
24982  if test "x$path" != "x$new_path"; then
24983    JAVA_HOME_PROCESSED="$new_path"
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24985$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24986  fi
24987
24988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24989
24990  path="$JAVA_HOME_PROCESSED"
24991  has_colon=`$ECHO $path | $GREP ^.:`
24992  new_path="$path"
24993  if test "x$has_colon" = x; then
24994    # Not in mixed or Windows style, start by that.
24995    new_path=`cmd //c echo $path`
24996  fi
24997
24998
24999  input_path="$new_path"
25000  # Check if we need to convert this using DOS-style short mode. If the path
25001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25002  # take no chances and rewrite it.
25003  # Note: m4 eats our [], so we need to use [ and ] instead.
25004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25005  if test "x$has_forbidden_chars" != x; then
25006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25008  fi
25009
25010
25011  windows_path="$new_path"
25012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013    unix_path=`$CYGPATH -u "$windows_path"`
25014    new_path="$unix_path"
25015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25017    new_path="$unix_path"
25018  fi
25019
25020  if test "x$path" != "x$new_path"; then
25021    JAVA_HOME_PROCESSED="$new_path"
25022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25023$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25024  fi
25025
25026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25028
25029    else
25030      # We're on a unix platform. Hooray! :)
25031      path="$JAVA_HOME_PROCESSED"
25032      has_space=`$ECHO "$path" | $GREP " "`
25033      if test "x$has_space" != x; then
25034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25035$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25037      fi
25038
25039      # Use eval to expand a potential ~
25040      eval path="$path"
25041      if test ! -f "$path" && test ! -d "$path"; then
25042        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25043      fi
25044
25045      if test -d "$path"; then
25046        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25047      else
25048        dir="`$DIRNAME "$path"`"
25049        base="`$BASENAME "$path"`"
25050        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25051      fi
25052    fi
25053  fi
25054
25055    if test ! -d "$JAVA_HOME_PROCESSED"; then
25056      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25057$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25058    else
25059      # Aha, the user has set a JAVA_HOME
25060      # let us use that as the Boot JDK.
25061      BOOT_JDK="$JAVA_HOME_PROCESSED"
25062      BOOT_JDK_FOUND=maybe
25063      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25064$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25065    fi
25066  fi
25067
25068
25069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25071      # Do we have a bin/java?
25072      if test ! -x "$BOOT_JDK/bin/java"; then
25073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25075        BOOT_JDK_FOUND=no
25076      else
25077        # Do we have a bin/javac?
25078        if test ! -x "$BOOT_JDK/bin/javac"; then
25079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25083          BOOT_JDK_FOUND=no
25084        else
25085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25087
25088          # Extra M4 quote needed to protect [] in grep expression.
25089          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25090          if test "x$FOUND_CORRECT_VERSION" = x; then
25091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25095            BOOT_JDK_FOUND=no
25096          else
25097            # We're done! :-)
25098            BOOT_JDK_FOUND=yes
25099
25100  # Only process if variable expands to non-empty
25101
25102  if test "x$BOOT_JDK" != x; then
25103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104
25105  # Input might be given as Windows format, start by converting to
25106  # unix format.
25107  path="$BOOT_JDK"
25108  new_path=`$CYGPATH -u "$path"`
25109
25110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25113  # "foo.exe" is OK but "foo" is an error.
25114  #
25115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25116  # It is also a way to make sure we got the proper file name for the real test later on.
25117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25118  if test "x$test_shortpath" = x; then
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25122  fi
25123
25124  # Call helper function which possibly converts this using DOS-style short mode.
25125  # If so, the updated path is stored in $new_path.
25126
25127  input_path="$new_path"
25128  # Check if we need to convert this using DOS-style short mode. If the path
25129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25130  # take no chances and rewrite it.
25131  # Note: m4 eats our [], so we need to use [ and ] instead.
25132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25133  if test "x$has_forbidden_chars" != x; then
25134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25138      # Going to short mode and back again did indeed matter. Since short mode is
25139      # case insensitive, let's make it lowercase to improve readability.
25140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25141      # Now convert it back to Unix-style (cygpath)
25142      input_path=`$CYGPATH -u "$shortmode_path"`
25143      new_path="$input_path"
25144    fi
25145  fi
25146
25147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25148  if test "x$test_cygdrive_prefix" = x; then
25149    # As a simple fix, exclude /usr/bin since it's not a real path.
25150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25152      # a path prefixed by /cygdrive for fixpath to work.
25153      new_path="$CYGWIN_ROOT_PATH$input_path"
25154    fi
25155  fi
25156
25157
25158  if test "x$path" != "x$new_path"; then
25159    BOOT_JDK="$new_path"
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25162  fi
25163
25164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25165
25166  path="$BOOT_JDK"
25167  has_colon=`$ECHO $path | $GREP ^.:`
25168  new_path="$path"
25169  if test "x$has_colon" = x; then
25170    # Not in mixed or Windows style, start by that.
25171    new_path=`cmd //c echo $path`
25172  fi
25173
25174
25175  input_path="$new_path"
25176  # Check if we need to convert this using DOS-style short mode. If the path
25177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25178  # take no chances and rewrite it.
25179  # Note: m4 eats our [], so we need to use [ and ] instead.
25180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25181  if test "x$has_forbidden_chars" != x; then
25182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25184  fi
25185
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196  if test "x$path" != "x$new_path"; then
25197    BOOT_JDK="$new_path"
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25200  fi
25201
25202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25204
25205    else
25206      # We're on a unix platform. Hooray! :)
25207      path="$BOOT_JDK"
25208      has_space=`$ECHO "$path" | $GREP " "`
25209      if test "x$has_space" != x; then
25210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25213      fi
25214
25215      # Use eval to expand a potential ~
25216      eval path="$path"
25217      if test ! -f "$path" && test ! -d "$path"; then
25218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25219      fi
25220
25221      if test -d "$path"; then
25222        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25223      else
25224        dir="`$DIRNAME "$path"`"
25225        base="`$BASENAME "$path"`"
25226        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25227      fi
25228    fi
25229  fi
25230
25231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25232$as_echo_n "checking for Boot JDK... " >&6; }
25233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25234$as_echo "$BOOT_JDK" >&6; }
25235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25236$as_echo_n "checking Boot JDK version... " >&6; }
25237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25239$as_echo "$BOOT_JDK_VERSION" >&6; }
25240          fi # end check jdk version
25241        fi # end check javac
25242      fi # end check java
25243    fi # end check boot jdk found
25244  fi
25245
25246
25247  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25248
25249  if test "x$BOOT_JDK_FOUND" = xno; then
25250    # Now execute the test
25251
25252  # Extract the first word of "javac", so it can be a program name with args.
25253set dummy javac; ac_word=$2
25254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25255$as_echo_n "checking for $ac_word... " >&6; }
25256if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25257  $as_echo_n "(cached) " >&6
25258else
25259  case $JAVAC_CHECK in
25260  [\\/]* | ?:[\\/]*)
25261  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25262  ;;
25263  *)
25264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25265for as_dir in $PATH
25266do
25267  IFS=$as_save_IFS
25268  test -z "$as_dir" && as_dir=.
25269    for ac_exec_ext in '' $ac_executable_extensions; do
25270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25271    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25273    break 2
25274  fi
25275done
25276  done
25277IFS=$as_save_IFS
25278
25279  ;;
25280esac
25281fi
25282JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25283if test -n "$JAVAC_CHECK"; then
25284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25285$as_echo "$JAVAC_CHECK" >&6; }
25286else
25287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25288$as_echo "no" >&6; }
25289fi
25290
25291
25292  # Extract the first word of "java", so it can be a program name with args.
25293set dummy java; ac_word=$2
25294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25295$as_echo_n "checking for $ac_word... " >&6; }
25296if ${ac_cv_path_JAVA_CHECK+:} false; then :
25297  $as_echo_n "(cached) " >&6
25298else
25299  case $JAVA_CHECK in
25300  [\\/]* | ?:[\\/]*)
25301  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25302  ;;
25303  *)
25304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25305for as_dir in $PATH
25306do
25307  IFS=$as_save_IFS
25308  test -z "$as_dir" && as_dir=.
25309    for ac_exec_ext in '' $ac_executable_extensions; do
25310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25311    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25313    break 2
25314  fi
25315done
25316  done
25317IFS=$as_save_IFS
25318
25319  ;;
25320esac
25321fi
25322JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25323if test -n "$JAVA_CHECK"; then
25324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25325$as_echo "$JAVA_CHECK" >&6; }
25326else
25327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25328$as_echo "no" >&6; }
25329fi
25330
25331
25332  BINARY="$JAVAC_CHECK"
25333  if test "x$JAVAC_CHECK" = x; then
25334    BINARY="$JAVA_CHECK"
25335  fi
25336  if test "x$BINARY" != x; then
25337    # So there is a java(c) binary, it might be part of a JDK.
25338    # Lets find the JDK/JRE directory by following symbolic links.
25339    # Linux/GNU systems often have links from /usr/bin/java to
25340    # /etc/alternatives/java to the real JDK binary.
25341
25342  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25343    # Follow a chain of symbolic links. Use readlink
25344    # where it exists, else fall back to horribly
25345    # complicated shell code.
25346    if test "x$READLINK_TESTED" != yes; then
25347      # On MacOSX there is a readlink tool with a different
25348      # purpose than the GNU readlink tool. Check the found readlink.
25349      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25350      if test "x$ISGNU" = x; then
25351        # A readlink that we do not know how to use.
25352        # Are there other non-GNU readlinks out there?
25353        READLINK_TESTED=yes
25354        READLINK=
25355      fi
25356    fi
25357
25358    if test "x$READLINK" != x; then
25359      BINARY=`$READLINK -f $BINARY`
25360    else
25361      # Save the current directory for restoring afterwards
25362      STARTDIR=$PWD
25363      COUNTER=0
25364      sym_link_dir=`$DIRNAME $BINARY`
25365      sym_link_file=`$BASENAME $BINARY`
25366      cd $sym_link_dir
25367      # Use -P flag to resolve symlinks in directories.
25368      cd `$THEPWDCMD -P`
25369      sym_link_dir=`$THEPWDCMD -P`
25370      # Resolve file symlinks
25371      while test $COUNTER -lt 20; do
25372        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25373        if test "x$ISLINK" == x; then
25374          # This is not a symbolic link! We are done!
25375          break
25376        fi
25377        # Again resolve directory symlinks since the target of the just found
25378        # link could be in a different directory
25379        cd `$DIRNAME $ISLINK`
25380        sym_link_dir=`$THEPWDCMD -P`
25381        sym_link_file=`$BASENAME $ISLINK`
25382        let COUNTER=COUNTER+1
25383      done
25384      cd $STARTDIR
25385      BINARY=$sym_link_dir/$sym_link_file
25386    fi
25387  fi
25388
25389    BOOT_JDK=`dirname "$BINARY"`
25390    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25391    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25392      # Looks like we found ourselves an JDK
25393      BOOT_JDK_FOUND=maybe
25394      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25395$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25396    fi
25397  fi
25398
25399
25400    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25401    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25402      # Do we have a bin/java?
25403      if test ! -x "$BOOT_JDK/bin/java"; then
25404        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25406        BOOT_JDK_FOUND=no
25407      else
25408        # Do we have a bin/javac?
25409        if test ! -x "$BOOT_JDK/bin/javac"; then
25410          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25412          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25413$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25414          BOOT_JDK_FOUND=no
25415        else
25416          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25417          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25418
25419          # Extra M4 quote needed to protect [] in grep expression.
25420          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25421          if test "x$FOUND_CORRECT_VERSION" = x; then
25422            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25424            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25425$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25426            BOOT_JDK_FOUND=no
25427          else
25428            # We're done! :-)
25429            BOOT_JDK_FOUND=yes
25430
25431  # Only process if variable expands to non-empty
25432
25433  if test "x$BOOT_JDK" != x; then
25434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25435
25436  # Input might be given as Windows format, start by converting to
25437  # unix format.
25438  path="$BOOT_JDK"
25439  new_path=`$CYGPATH -u "$path"`
25440
25441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25444  # "foo.exe" is OK but "foo" is an error.
25445  #
25446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25447  # It is also a way to make sure we got the proper file name for the real test later on.
25448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25449  if test "x$test_shortpath" = x; then
25450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25453  fi
25454
25455  # Call helper function which possibly converts this using DOS-style short mode.
25456  # If so, the updated path is stored in $new_path.
25457
25458  input_path="$new_path"
25459  # Check if we need to convert this using DOS-style short mode. If the path
25460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25461  # take no chances and rewrite it.
25462  # Note: m4 eats our [], so we need to use [ and ] instead.
25463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25464  if test "x$has_forbidden_chars" != x; then
25465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25469      # Going to short mode and back again did indeed matter. Since short mode is
25470      # case insensitive, let's make it lowercase to improve readability.
25471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25472      # Now convert it back to Unix-style (cygpath)
25473      input_path=`$CYGPATH -u "$shortmode_path"`
25474      new_path="$input_path"
25475    fi
25476  fi
25477
25478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25479  if test "x$test_cygdrive_prefix" = x; then
25480    # As a simple fix, exclude /usr/bin since it's not a real path.
25481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25483      # a path prefixed by /cygdrive for fixpath to work.
25484      new_path="$CYGWIN_ROOT_PATH$input_path"
25485    fi
25486  fi
25487
25488
25489  if test "x$path" != "x$new_path"; then
25490    BOOT_JDK="$new_path"
25491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25493  fi
25494
25495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25496
25497  path="$BOOT_JDK"
25498  has_colon=`$ECHO $path | $GREP ^.:`
25499  new_path="$path"
25500  if test "x$has_colon" = x; then
25501    # Not in mixed or Windows style, start by that.
25502    new_path=`cmd //c echo $path`
25503  fi
25504
25505
25506  input_path="$new_path"
25507  # Check if we need to convert this using DOS-style short mode. If the path
25508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25509  # take no chances and rewrite it.
25510  # Note: m4 eats our [], so we need to use [ and ] instead.
25511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25512  if test "x$has_forbidden_chars" != x; then
25513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25515  fi
25516
25517
25518  windows_path="$new_path"
25519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25520    unix_path=`$CYGPATH -u "$windows_path"`
25521    new_path="$unix_path"
25522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25524    new_path="$unix_path"
25525  fi
25526
25527  if test "x$path" != "x$new_path"; then
25528    BOOT_JDK="$new_path"
25529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25531  fi
25532
25533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25535
25536    else
25537      # We're on a unix platform. Hooray! :)
25538      path="$BOOT_JDK"
25539      has_space=`$ECHO "$path" | $GREP " "`
25540      if test "x$has_space" != x; then
25541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25544      fi
25545
25546      # Use eval to expand a potential ~
25547      eval path="$path"
25548      if test ! -f "$path" && test ! -d "$path"; then
25549        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25550      fi
25551
25552      if test -d "$path"; then
25553        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25554      else
25555        dir="`$DIRNAME "$path"`"
25556        base="`$BASENAME "$path"`"
25557        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25558      fi
25559    fi
25560  fi
25561
25562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25563$as_echo_n "checking for Boot JDK... " >&6; }
25564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25565$as_echo "$BOOT_JDK" >&6; }
25566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25567$as_echo_n "checking Boot JDK version... " >&6; }
25568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25570$as_echo "$BOOT_JDK_VERSION" >&6; }
25571          fi # end check jdk version
25572        fi # end check javac
25573      fi # end check java
25574    fi # end check boot jdk found
25575  fi
25576
25577
25578  # Test: Is there a JDK installed in default, well-known locations?
25579
25580  if test "x$BOOT_JDK_FOUND" = xno; then
25581    # Now execute the test
25582
25583  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25584
25585  if test "x$BOOT_JDK_FOUND" = xno; then
25586    # Now execute the test
25587
25588  if test "x$ProgramW6432" != x; then
25589    VIRTUAL_DIR="$ProgramW6432/Java"
25590
25591  windows_path="$VIRTUAL_DIR"
25592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25593    unix_path=`$CYGPATH -u "$windows_path"`
25594    VIRTUAL_DIR="$unix_path"
25595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25597    VIRTUAL_DIR="$unix_path"
25598  fi
25599
25600
25601  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25602  BOOT_JDK_SUFFIX=""
25603  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25604  if test "x$ALL_JDKS_FOUND" != x; then
25605    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25606
25607  if test "x$BOOT_JDK_FOUND" = xno; then
25608    # Now execute the test
25609
25610        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25611        if test -d "$BOOT_JDK"; then
25612          BOOT_JDK_FOUND=maybe
25613          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25614$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25615        fi
25616
25617
25618    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25619    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25620      # Do we have a bin/java?
25621      if test ! -x "$BOOT_JDK/bin/java"; then
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25624        BOOT_JDK_FOUND=no
25625      else
25626        # Do we have a bin/javac?
25627        if test ! -x "$BOOT_JDK/bin/javac"; then
25628          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25630          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25631$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25632          BOOT_JDK_FOUND=no
25633        else
25634          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25635          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25636
25637          # Extra M4 quote needed to protect [] in grep expression.
25638          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25639          if test "x$FOUND_CORRECT_VERSION" = x; then
25640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25642            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25643$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25644            BOOT_JDK_FOUND=no
25645          else
25646            # We're done! :-)
25647            BOOT_JDK_FOUND=yes
25648
25649  # Only process if variable expands to non-empty
25650
25651  if test "x$BOOT_JDK" != x; then
25652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25653
25654  # Input might be given as Windows format, start by converting to
25655  # unix format.
25656  path="$BOOT_JDK"
25657  new_path=`$CYGPATH -u "$path"`
25658
25659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25662  # "foo.exe" is OK but "foo" is an error.
25663  #
25664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25665  # It is also a way to make sure we got the proper file name for the real test later on.
25666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25667  if test "x$test_shortpath" = x; then
25668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25670    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25671  fi
25672
25673  # Call helper function which possibly converts this using DOS-style short mode.
25674  # If so, the updated path is stored in $new_path.
25675
25676  input_path="$new_path"
25677  # Check if we need to convert this using DOS-style short mode. If the path
25678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25679  # take no chances and rewrite it.
25680  # Note: m4 eats our [], so we need to use [ and ] instead.
25681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25682  if test "x$has_forbidden_chars" != x; then
25683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25687      # Going to short mode and back again did indeed matter. Since short mode is
25688      # case insensitive, let's make it lowercase to improve readability.
25689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25690      # Now convert it back to Unix-style (cygpath)
25691      input_path=`$CYGPATH -u "$shortmode_path"`
25692      new_path="$input_path"
25693    fi
25694  fi
25695
25696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25697  if test "x$test_cygdrive_prefix" = x; then
25698    # As a simple fix, exclude /usr/bin since it's not a real path.
25699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25701      # a path prefixed by /cygdrive for fixpath to work.
25702      new_path="$CYGWIN_ROOT_PATH$input_path"
25703    fi
25704  fi
25705
25706
25707  if test "x$path" != "x$new_path"; then
25708    BOOT_JDK="$new_path"
25709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25711  fi
25712
25713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714
25715  path="$BOOT_JDK"
25716  has_colon=`$ECHO $path | $GREP ^.:`
25717  new_path="$path"
25718  if test "x$has_colon" = x; then
25719    # Not in mixed or Windows style, start by that.
25720    new_path=`cmd //c echo $path`
25721  fi
25722
25723
25724  input_path="$new_path"
25725  # Check if we need to convert this using DOS-style short mode. If the path
25726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25727  # take no chances and rewrite it.
25728  # Note: m4 eats our [], so we need to use [ and ] instead.
25729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25730  if test "x$has_forbidden_chars" != x; then
25731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25733  fi
25734
25735
25736  windows_path="$new_path"
25737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25738    unix_path=`$CYGPATH -u "$windows_path"`
25739    new_path="$unix_path"
25740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25742    new_path="$unix_path"
25743  fi
25744
25745  if test "x$path" != "x$new_path"; then
25746    BOOT_JDK="$new_path"
25747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25748$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25749  fi
25750
25751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25753
25754    else
25755      # We're on a unix platform. Hooray! :)
25756      path="$BOOT_JDK"
25757      has_space=`$ECHO "$path" | $GREP " "`
25758      if test "x$has_space" != x; then
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25762      fi
25763
25764      # Use eval to expand a potential ~
25765      eval path="$path"
25766      if test ! -f "$path" && test ! -d "$path"; then
25767        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25768      fi
25769
25770      if test -d "$path"; then
25771        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25772      else
25773        dir="`$DIRNAME "$path"`"
25774        base="`$BASENAME "$path"`"
25775        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25776      fi
25777    fi
25778  fi
25779
25780            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25781$as_echo_n "checking for Boot JDK... " >&6; }
25782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25783$as_echo "$BOOT_JDK" >&6; }
25784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25785$as_echo_n "checking Boot JDK version... " >&6; }
25786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25788$as_echo "$BOOT_JDK_VERSION" >&6; }
25789          fi # end check jdk version
25790        fi # end check javac
25791      fi # end check java
25792    fi # end check boot jdk found
25793  fi
25794
25795    done
25796  fi
25797
25798  fi
25799
25800
25801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25803      # Do we have a bin/java?
25804      if test ! -x "$BOOT_JDK/bin/java"; then
25805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25807        BOOT_JDK_FOUND=no
25808      else
25809        # Do we have a bin/javac?
25810        if test ! -x "$BOOT_JDK/bin/javac"; then
25811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25815          BOOT_JDK_FOUND=no
25816        else
25817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25819
25820          # Extra M4 quote needed to protect [] in grep expression.
25821          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25822          if test "x$FOUND_CORRECT_VERSION" = x; then
25823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25827            BOOT_JDK_FOUND=no
25828          else
25829            # We're done! :-)
25830            BOOT_JDK_FOUND=yes
25831
25832  # Only process if variable expands to non-empty
25833
25834  if test "x$BOOT_JDK" != x; then
25835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25836
25837  # Input might be given as Windows format, start by converting to
25838  # unix format.
25839  path="$BOOT_JDK"
25840  new_path=`$CYGPATH -u "$path"`
25841
25842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25845  # "foo.exe" is OK but "foo" is an error.
25846  #
25847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25848  # It is also a way to make sure we got the proper file name for the real test later on.
25849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25850  if test "x$test_shortpath" = x; then
25851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25854  fi
25855
25856  # Call helper function which possibly converts this using DOS-style short mode.
25857  # If so, the updated path is stored in $new_path.
25858
25859  input_path="$new_path"
25860  # Check if we need to convert this using DOS-style short mode. If the path
25861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25862  # take no chances and rewrite it.
25863  # Note: m4 eats our [], so we need to use [ and ] instead.
25864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25865  if test "x$has_forbidden_chars" != x; then
25866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25870      # Going to short mode and back again did indeed matter. Since short mode is
25871      # case insensitive, let's make it lowercase to improve readability.
25872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25873      # Now convert it back to Unix-style (cygpath)
25874      input_path=`$CYGPATH -u "$shortmode_path"`
25875      new_path="$input_path"
25876    fi
25877  fi
25878
25879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25880  if test "x$test_cygdrive_prefix" = x; then
25881    # As a simple fix, exclude /usr/bin since it's not a real path.
25882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25884      # a path prefixed by /cygdrive for fixpath to work.
25885      new_path="$CYGWIN_ROOT_PATH$input_path"
25886    fi
25887  fi
25888
25889
25890  if test "x$path" != "x$new_path"; then
25891    BOOT_JDK="$new_path"
25892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25894  fi
25895
25896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25897
25898  path="$BOOT_JDK"
25899  has_colon=`$ECHO $path | $GREP ^.:`
25900  new_path="$path"
25901  if test "x$has_colon" = x; then
25902    # Not in mixed or Windows style, start by that.
25903    new_path=`cmd //c echo $path`
25904  fi
25905
25906
25907  input_path="$new_path"
25908  # Check if we need to convert this using DOS-style short mode. If the path
25909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25910  # take no chances and rewrite it.
25911  # Note: m4 eats our [], so we need to use [ and ] instead.
25912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25913  if test "x$has_forbidden_chars" != x; then
25914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25916  fi
25917
25918
25919  windows_path="$new_path"
25920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25921    unix_path=`$CYGPATH -u "$windows_path"`
25922    new_path="$unix_path"
25923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25925    new_path="$unix_path"
25926  fi
25927
25928  if test "x$path" != "x$new_path"; then
25929    BOOT_JDK="$new_path"
25930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25932  fi
25933
25934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25936
25937    else
25938      # We're on a unix platform. Hooray! :)
25939      path="$BOOT_JDK"
25940      has_space=`$ECHO "$path" | $GREP " "`
25941      if test "x$has_space" != x; then
25942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25945      fi
25946
25947      # Use eval to expand a potential ~
25948      eval path="$path"
25949      if test ! -f "$path" && test ! -d "$path"; then
25950        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25951      fi
25952
25953      if test -d "$path"; then
25954        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25955      else
25956        dir="`$DIRNAME "$path"`"
25957        base="`$BASENAME "$path"`"
25958        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25959      fi
25960    fi
25961  fi
25962
25963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25964$as_echo_n "checking for Boot JDK... " >&6; }
25965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25966$as_echo "$BOOT_JDK" >&6; }
25967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25968$as_echo_n "checking Boot JDK version... " >&6; }
25969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25971$as_echo "$BOOT_JDK_VERSION" >&6; }
25972          fi # end check jdk version
25973        fi # end check javac
25974      fi # end check java
25975    fi # end check boot jdk found
25976  fi
25977
25978
25979  if test "x$BOOT_JDK_FOUND" = xno; then
25980    # Now execute the test
25981
25982  if test "x$PROGRAMW6432" != x; then
25983    VIRTUAL_DIR="$PROGRAMW6432/Java"
25984
25985  windows_path="$VIRTUAL_DIR"
25986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25987    unix_path=`$CYGPATH -u "$windows_path"`
25988    VIRTUAL_DIR="$unix_path"
25989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25991    VIRTUAL_DIR="$unix_path"
25992  fi
25993
25994
25995  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25996  BOOT_JDK_SUFFIX=""
25997  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25998  if test "x$ALL_JDKS_FOUND" != x; then
25999    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26000
26001  if test "x$BOOT_JDK_FOUND" = xno; then
26002    # Now execute the test
26003
26004        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26005        if test -d "$BOOT_JDK"; then
26006          BOOT_JDK_FOUND=maybe
26007          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26008$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26009        fi
26010
26011
26012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26014      # Do we have a bin/java?
26015      if test ! -x "$BOOT_JDK/bin/java"; then
26016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26018        BOOT_JDK_FOUND=no
26019      else
26020        # Do we have a bin/javac?
26021        if test ! -x "$BOOT_JDK/bin/javac"; then
26022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26026          BOOT_JDK_FOUND=no
26027        else
26028          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26029          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26030
26031          # Extra M4 quote needed to protect [] in grep expression.
26032          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26033          if test "x$FOUND_CORRECT_VERSION" = x; then
26034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26036            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26037$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26038            BOOT_JDK_FOUND=no
26039          else
26040            # We're done! :-)
26041            BOOT_JDK_FOUND=yes
26042
26043  # Only process if variable expands to non-empty
26044
26045  if test "x$BOOT_JDK" != x; then
26046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26047
26048  # Input might be given as Windows format, start by converting to
26049  # unix format.
26050  path="$BOOT_JDK"
26051  new_path=`$CYGPATH -u "$path"`
26052
26053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26056  # "foo.exe" is OK but "foo" is an error.
26057  #
26058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26059  # It is also a way to make sure we got the proper file name for the real test later on.
26060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26061  if test "x$test_shortpath" = x; then
26062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26065  fi
26066
26067  # Call helper function which possibly converts this using DOS-style short mode.
26068  # If so, the updated path is stored in $new_path.
26069
26070  input_path="$new_path"
26071  # Check if we need to convert this using DOS-style short mode. If the path
26072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26073  # take no chances and rewrite it.
26074  # Note: m4 eats our [], so we need to use [ and ] instead.
26075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26076  if test "x$has_forbidden_chars" != x; then
26077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26081      # Going to short mode and back again did indeed matter. Since short mode is
26082      # case insensitive, let's make it lowercase to improve readability.
26083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26084      # Now convert it back to Unix-style (cygpath)
26085      input_path=`$CYGPATH -u "$shortmode_path"`
26086      new_path="$input_path"
26087    fi
26088  fi
26089
26090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26091  if test "x$test_cygdrive_prefix" = x; then
26092    # As a simple fix, exclude /usr/bin since it's not a real path.
26093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26095      # a path prefixed by /cygdrive for fixpath to work.
26096      new_path="$CYGWIN_ROOT_PATH$input_path"
26097    fi
26098  fi
26099
26100
26101  if test "x$path" != "x$new_path"; then
26102    BOOT_JDK="$new_path"
26103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26105  fi
26106
26107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26108
26109  path="$BOOT_JDK"
26110  has_colon=`$ECHO $path | $GREP ^.:`
26111  new_path="$path"
26112  if test "x$has_colon" = x; then
26113    # Not in mixed or Windows style, start by that.
26114    new_path=`cmd //c echo $path`
26115  fi
26116
26117
26118  input_path="$new_path"
26119  # Check if we need to convert this using DOS-style short mode. If the path
26120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26121  # take no chances and rewrite it.
26122  # Note: m4 eats our [], so we need to use [ and ] instead.
26123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26124  if test "x$has_forbidden_chars" != x; then
26125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26127  fi
26128
26129
26130  windows_path="$new_path"
26131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26132    unix_path=`$CYGPATH -u "$windows_path"`
26133    new_path="$unix_path"
26134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26136    new_path="$unix_path"
26137  fi
26138
26139  if test "x$path" != "x$new_path"; then
26140    BOOT_JDK="$new_path"
26141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26143  fi
26144
26145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26147
26148    else
26149      # We're on a unix platform. Hooray! :)
26150      path="$BOOT_JDK"
26151      has_space=`$ECHO "$path" | $GREP " "`
26152      if test "x$has_space" != x; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26156      fi
26157
26158      # Use eval to expand a potential ~
26159      eval path="$path"
26160      if test ! -f "$path" && test ! -d "$path"; then
26161        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26162      fi
26163
26164      if test -d "$path"; then
26165        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26166      else
26167        dir="`$DIRNAME "$path"`"
26168        base="`$BASENAME "$path"`"
26169        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26170      fi
26171    fi
26172  fi
26173
26174            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26175$as_echo_n "checking for Boot JDK... " >&6; }
26176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26177$as_echo "$BOOT_JDK" >&6; }
26178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26179$as_echo_n "checking Boot JDK version... " >&6; }
26180            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26182$as_echo "$BOOT_JDK_VERSION" >&6; }
26183          fi # end check jdk version
26184        fi # end check javac
26185      fi # end check java
26186    fi # end check boot jdk found
26187  fi
26188
26189    done
26190  fi
26191
26192  fi
26193
26194
26195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26197      # Do we have a bin/java?
26198      if test ! -x "$BOOT_JDK/bin/java"; then
26199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26201        BOOT_JDK_FOUND=no
26202      else
26203        # Do we have a bin/javac?
26204        if test ! -x "$BOOT_JDK/bin/javac"; then
26205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26209          BOOT_JDK_FOUND=no
26210        else
26211          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26212          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26213
26214          # Extra M4 quote needed to protect [] in grep expression.
26215          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26216          if test "x$FOUND_CORRECT_VERSION" = x; then
26217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26219            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26221            BOOT_JDK_FOUND=no
26222          else
26223            # We're done! :-)
26224            BOOT_JDK_FOUND=yes
26225
26226  # Only process if variable expands to non-empty
26227
26228  if test "x$BOOT_JDK" != x; then
26229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26230
26231  # Input might be given as Windows format, start by converting to
26232  # unix format.
26233  path="$BOOT_JDK"
26234  new_path=`$CYGPATH -u "$path"`
26235
26236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26239  # "foo.exe" is OK but "foo" is an error.
26240  #
26241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26242  # It is also a way to make sure we got the proper file name for the real test later on.
26243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26244  if test "x$test_shortpath" = x; then
26245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26248  fi
26249
26250  # Call helper function which possibly converts this using DOS-style short mode.
26251  # If so, the updated path is stored in $new_path.
26252
26253  input_path="$new_path"
26254  # Check if we need to convert this using DOS-style short mode. If the path
26255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26256  # take no chances and rewrite it.
26257  # Note: m4 eats our [], so we need to use [ and ] instead.
26258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26259  if test "x$has_forbidden_chars" != x; then
26260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26264      # Going to short mode and back again did indeed matter. Since short mode is
26265      # case insensitive, let's make it lowercase to improve readability.
26266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26267      # Now convert it back to Unix-style (cygpath)
26268      input_path=`$CYGPATH -u "$shortmode_path"`
26269      new_path="$input_path"
26270    fi
26271  fi
26272
26273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26274  if test "x$test_cygdrive_prefix" = x; then
26275    # As a simple fix, exclude /usr/bin since it's not a real path.
26276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26278      # a path prefixed by /cygdrive for fixpath to work.
26279      new_path="$CYGWIN_ROOT_PATH$input_path"
26280    fi
26281  fi
26282
26283
26284  if test "x$path" != "x$new_path"; then
26285    BOOT_JDK="$new_path"
26286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26288  fi
26289
26290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26291
26292  path="$BOOT_JDK"
26293  has_colon=`$ECHO $path | $GREP ^.:`
26294  new_path="$path"
26295  if test "x$has_colon" = x; then
26296    # Not in mixed or Windows style, start by that.
26297    new_path=`cmd //c echo $path`
26298  fi
26299
26300
26301  input_path="$new_path"
26302  # Check if we need to convert this using DOS-style short mode. If the path
26303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26304  # take no chances and rewrite it.
26305  # Note: m4 eats our [], so we need to use [ and ] instead.
26306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26307  if test "x$has_forbidden_chars" != x; then
26308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26310  fi
26311
26312
26313  windows_path="$new_path"
26314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26315    unix_path=`$CYGPATH -u "$windows_path"`
26316    new_path="$unix_path"
26317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26319    new_path="$unix_path"
26320  fi
26321
26322  if test "x$path" != "x$new_path"; then
26323    BOOT_JDK="$new_path"
26324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26326  fi
26327
26328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26330
26331    else
26332      # We're on a unix platform. Hooray! :)
26333      path="$BOOT_JDK"
26334      has_space=`$ECHO "$path" | $GREP " "`
26335      if test "x$has_space" != x; then
26336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26339      fi
26340
26341      # Use eval to expand a potential ~
26342      eval path="$path"
26343      if test ! -f "$path" && test ! -d "$path"; then
26344        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26345      fi
26346
26347      if test -d "$path"; then
26348        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26349      else
26350        dir="`$DIRNAME "$path"`"
26351        base="`$BASENAME "$path"`"
26352        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26353      fi
26354    fi
26355  fi
26356
26357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26358$as_echo_n "checking for Boot JDK... " >&6; }
26359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26360$as_echo "$BOOT_JDK" >&6; }
26361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26362$as_echo_n "checking Boot JDK version... " >&6; }
26363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26365$as_echo "$BOOT_JDK_VERSION" >&6; }
26366          fi # end check jdk version
26367        fi # end check javac
26368      fi # end check java
26369    fi # end check boot jdk found
26370  fi
26371
26372
26373  if test "x$BOOT_JDK_FOUND" = xno; then
26374    # Now execute the test
26375
26376  if test "x$PROGRAMFILES" != x; then
26377    VIRTUAL_DIR="$PROGRAMFILES/Java"
26378
26379  windows_path="$VIRTUAL_DIR"
26380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26381    unix_path=`$CYGPATH -u "$windows_path"`
26382    VIRTUAL_DIR="$unix_path"
26383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26385    VIRTUAL_DIR="$unix_path"
26386  fi
26387
26388
26389  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26390  BOOT_JDK_SUFFIX=""
26391  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26392  if test "x$ALL_JDKS_FOUND" != x; then
26393    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26394
26395  if test "x$BOOT_JDK_FOUND" = xno; then
26396    # Now execute the test
26397
26398        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26399        if test -d "$BOOT_JDK"; then
26400          BOOT_JDK_FOUND=maybe
26401          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26402$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26403        fi
26404
26405
26406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26408      # Do we have a bin/java?
26409      if test ! -x "$BOOT_JDK/bin/java"; then
26410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26412        BOOT_JDK_FOUND=no
26413      else
26414        # Do we have a bin/javac?
26415        if test ! -x "$BOOT_JDK/bin/javac"; then
26416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26420          BOOT_JDK_FOUND=no
26421        else
26422          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26423          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26424
26425          # Extra M4 quote needed to protect [] in grep expression.
26426          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26427          if test "x$FOUND_CORRECT_VERSION" = x; then
26428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26430            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26431$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26432            BOOT_JDK_FOUND=no
26433          else
26434            # We're done! :-)
26435            BOOT_JDK_FOUND=yes
26436
26437  # Only process if variable expands to non-empty
26438
26439  if test "x$BOOT_JDK" != x; then
26440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26441
26442  # Input might be given as Windows format, start by converting to
26443  # unix format.
26444  path="$BOOT_JDK"
26445  new_path=`$CYGPATH -u "$path"`
26446
26447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26450  # "foo.exe" is OK but "foo" is an error.
26451  #
26452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26453  # It is also a way to make sure we got the proper file name for the real test later on.
26454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26455  if test "x$test_shortpath" = x; then
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26458    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26459  fi
26460
26461  # Call helper function which possibly converts this using DOS-style short mode.
26462  # If so, the updated path is stored in $new_path.
26463
26464  input_path="$new_path"
26465  # Check if we need to convert this using DOS-style short mode. If the path
26466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26467  # take no chances and rewrite it.
26468  # Note: m4 eats our [], so we need to use [ and ] instead.
26469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26470  if test "x$has_forbidden_chars" != x; then
26471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26475      # Going to short mode and back again did indeed matter. Since short mode is
26476      # case insensitive, let's make it lowercase to improve readability.
26477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26478      # Now convert it back to Unix-style (cygpath)
26479      input_path=`$CYGPATH -u "$shortmode_path"`
26480      new_path="$input_path"
26481    fi
26482  fi
26483
26484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26485  if test "x$test_cygdrive_prefix" = x; then
26486    # As a simple fix, exclude /usr/bin since it's not a real path.
26487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26489      # a path prefixed by /cygdrive for fixpath to work.
26490      new_path="$CYGWIN_ROOT_PATH$input_path"
26491    fi
26492  fi
26493
26494
26495  if test "x$path" != "x$new_path"; then
26496    BOOT_JDK="$new_path"
26497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26499  fi
26500
26501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502
26503  path="$BOOT_JDK"
26504  has_colon=`$ECHO $path | $GREP ^.:`
26505  new_path="$path"
26506  if test "x$has_colon" = x; then
26507    # Not in mixed or Windows style, start by that.
26508    new_path=`cmd //c echo $path`
26509  fi
26510
26511
26512  input_path="$new_path"
26513  # Check if we need to convert this using DOS-style short mode. If the path
26514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26515  # take no chances and rewrite it.
26516  # Note: m4 eats our [], so we need to use [ and ] instead.
26517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26518  if test "x$has_forbidden_chars" != x; then
26519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26521  fi
26522
26523
26524  windows_path="$new_path"
26525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26526    unix_path=`$CYGPATH -u "$windows_path"`
26527    new_path="$unix_path"
26528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26530    new_path="$unix_path"
26531  fi
26532
26533  if test "x$path" != "x$new_path"; then
26534    BOOT_JDK="$new_path"
26535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26537  fi
26538
26539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26541
26542    else
26543      # We're on a unix platform. Hooray! :)
26544      path="$BOOT_JDK"
26545      has_space=`$ECHO "$path" | $GREP " "`
26546      if test "x$has_space" != x; then
26547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26550      fi
26551
26552      # Use eval to expand a potential ~
26553      eval path="$path"
26554      if test ! -f "$path" && test ! -d "$path"; then
26555        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26556      fi
26557
26558      if test -d "$path"; then
26559        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26560      else
26561        dir="`$DIRNAME "$path"`"
26562        base="`$BASENAME "$path"`"
26563        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26564      fi
26565    fi
26566  fi
26567
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26569$as_echo_n "checking for Boot JDK... " >&6; }
26570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26571$as_echo "$BOOT_JDK" >&6; }
26572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26573$as_echo_n "checking Boot JDK version... " >&6; }
26574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26576$as_echo "$BOOT_JDK_VERSION" >&6; }
26577          fi # end check jdk version
26578        fi # end check javac
26579      fi # end check java
26580    fi # end check boot jdk found
26581  fi
26582
26583    done
26584  fi
26585
26586  fi
26587
26588
26589    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26590    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26591      # Do we have a bin/java?
26592      if test ! -x "$BOOT_JDK/bin/java"; then
26593        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26595        BOOT_JDK_FOUND=no
26596      else
26597        # Do we have a bin/javac?
26598        if test ! -x "$BOOT_JDK/bin/javac"; then
26599          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26601          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26602$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26603          BOOT_JDK_FOUND=no
26604        else
26605          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26606          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26607
26608          # Extra M4 quote needed to protect [] in grep expression.
26609          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26610          if test "x$FOUND_CORRECT_VERSION" = x; then
26611            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26613            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26614$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26615            BOOT_JDK_FOUND=no
26616          else
26617            # We're done! :-)
26618            BOOT_JDK_FOUND=yes
26619
26620  # Only process if variable expands to non-empty
26621
26622  if test "x$BOOT_JDK" != x; then
26623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26624
26625  # Input might be given as Windows format, start by converting to
26626  # unix format.
26627  path="$BOOT_JDK"
26628  new_path=`$CYGPATH -u "$path"`
26629
26630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26633  # "foo.exe" is OK but "foo" is an error.
26634  #
26635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26636  # It is also a way to make sure we got the proper file name for the real test later on.
26637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26638  if test "x$test_shortpath" = x; then
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26641    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26642  fi
26643
26644  # Call helper function which possibly converts this using DOS-style short mode.
26645  # If so, the updated path is stored in $new_path.
26646
26647  input_path="$new_path"
26648  # Check if we need to convert this using DOS-style short mode. If the path
26649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26650  # take no chances and rewrite it.
26651  # Note: m4 eats our [], so we need to use [ and ] instead.
26652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26653  if test "x$has_forbidden_chars" != x; then
26654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26658      # Going to short mode and back again did indeed matter. Since short mode is
26659      # case insensitive, let's make it lowercase to improve readability.
26660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26661      # Now convert it back to Unix-style (cygpath)
26662      input_path=`$CYGPATH -u "$shortmode_path"`
26663      new_path="$input_path"
26664    fi
26665  fi
26666
26667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26668  if test "x$test_cygdrive_prefix" = x; then
26669    # As a simple fix, exclude /usr/bin since it's not a real path.
26670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26672      # a path prefixed by /cygdrive for fixpath to work.
26673      new_path="$CYGWIN_ROOT_PATH$input_path"
26674    fi
26675  fi
26676
26677
26678  if test "x$path" != "x$new_path"; then
26679    BOOT_JDK="$new_path"
26680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26682  fi
26683
26684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26685
26686  path="$BOOT_JDK"
26687  has_colon=`$ECHO $path | $GREP ^.:`
26688  new_path="$path"
26689  if test "x$has_colon" = x; then
26690    # Not in mixed or Windows style, start by that.
26691    new_path=`cmd //c echo $path`
26692  fi
26693
26694
26695  input_path="$new_path"
26696  # Check if we need to convert this using DOS-style short mode. If the path
26697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26698  # take no chances and rewrite it.
26699  # Note: m4 eats our [], so we need to use [ and ] instead.
26700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26701  if test "x$has_forbidden_chars" != x; then
26702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26704  fi
26705
26706
26707  windows_path="$new_path"
26708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709    unix_path=`$CYGPATH -u "$windows_path"`
26710    new_path="$unix_path"
26711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26713    new_path="$unix_path"
26714  fi
26715
26716  if test "x$path" != "x$new_path"; then
26717    BOOT_JDK="$new_path"
26718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26720  fi
26721
26722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26724
26725    else
26726      # We're on a unix platform. Hooray! :)
26727      path="$BOOT_JDK"
26728      has_space=`$ECHO "$path" | $GREP " "`
26729      if test "x$has_space" != x; then
26730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26733      fi
26734
26735      # Use eval to expand a potential ~
26736      eval path="$path"
26737      if test ! -f "$path" && test ! -d "$path"; then
26738        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26739      fi
26740
26741      if test -d "$path"; then
26742        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26743      else
26744        dir="`$DIRNAME "$path"`"
26745        base="`$BASENAME "$path"`"
26746        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26747      fi
26748    fi
26749  fi
26750
26751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26752$as_echo_n "checking for Boot JDK... " >&6; }
26753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26754$as_echo "$BOOT_JDK" >&6; }
26755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26756$as_echo_n "checking Boot JDK version... " >&6; }
26757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26759$as_echo "$BOOT_JDK_VERSION" >&6; }
26760          fi # end check jdk version
26761        fi # end check javac
26762      fi # end check java
26763    fi # end check boot jdk found
26764  fi
26765
26766
26767  if test "x$BOOT_JDK_FOUND" = xno; then
26768    # Now execute the test
26769
26770  if test "x$ProgramFiles" != x; then
26771    VIRTUAL_DIR="$ProgramFiles/Java"
26772
26773  windows_path="$VIRTUAL_DIR"
26774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26775    unix_path=`$CYGPATH -u "$windows_path"`
26776    VIRTUAL_DIR="$unix_path"
26777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26779    VIRTUAL_DIR="$unix_path"
26780  fi
26781
26782
26783  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26784  BOOT_JDK_SUFFIX=""
26785  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26786  if test "x$ALL_JDKS_FOUND" != x; then
26787    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26788
26789  if test "x$BOOT_JDK_FOUND" = xno; then
26790    # Now execute the test
26791
26792        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26793        if test -d "$BOOT_JDK"; then
26794          BOOT_JDK_FOUND=maybe
26795          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26796$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26797        fi
26798
26799
26800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26802      # Do we have a bin/java?
26803      if test ! -x "$BOOT_JDK/bin/java"; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26806        BOOT_JDK_FOUND=no
26807      else
26808        # Do we have a bin/javac?
26809        if test ! -x "$BOOT_JDK/bin/javac"; then
26810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26814          BOOT_JDK_FOUND=no
26815        else
26816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26818
26819          # Extra M4 quote needed to protect [] in grep expression.
26820          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26821          if test "x$FOUND_CORRECT_VERSION" = x; then
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26826            BOOT_JDK_FOUND=no
26827          else
26828            # We're done! :-)
26829            BOOT_JDK_FOUND=yes
26830
26831  # Only process if variable expands to non-empty
26832
26833  if test "x$BOOT_JDK" != x; then
26834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835
26836  # Input might be given as Windows format, start by converting to
26837  # unix format.
26838  path="$BOOT_JDK"
26839  new_path=`$CYGPATH -u "$path"`
26840
26841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26844  # "foo.exe" is OK but "foo" is an error.
26845  #
26846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26847  # It is also a way to make sure we got the proper file name for the real test later on.
26848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26849  if test "x$test_shortpath" = x; then
26850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26853  fi
26854
26855  # Call helper function which possibly converts this using DOS-style short mode.
26856  # If so, the updated path is stored in $new_path.
26857
26858  input_path="$new_path"
26859  # Check if we need to convert this using DOS-style short mode. If the path
26860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26861  # take no chances and rewrite it.
26862  # Note: m4 eats our [], so we need to use [ and ] instead.
26863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26864  if test "x$has_forbidden_chars" != x; then
26865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26869      # Going to short mode and back again did indeed matter. Since short mode is
26870      # case insensitive, let's make it lowercase to improve readability.
26871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26872      # Now convert it back to Unix-style (cygpath)
26873      input_path=`$CYGPATH -u "$shortmode_path"`
26874      new_path="$input_path"
26875    fi
26876  fi
26877
26878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26879  if test "x$test_cygdrive_prefix" = x; then
26880    # As a simple fix, exclude /usr/bin since it's not a real path.
26881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26883      # a path prefixed by /cygdrive for fixpath to work.
26884      new_path="$CYGWIN_ROOT_PATH$input_path"
26885    fi
26886  fi
26887
26888
26889  if test "x$path" != "x$new_path"; then
26890    BOOT_JDK="$new_path"
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26893  fi
26894
26895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896
26897  path="$BOOT_JDK"
26898  has_colon=`$ECHO $path | $GREP ^.:`
26899  new_path="$path"
26900  if test "x$has_colon" = x; then
26901    # Not in mixed or Windows style, start by that.
26902    new_path=`cmd //c echo $path`
26903  fi
26904
26905
26906  input_path="$new_path"
26907  # Check if we need to convert this using DOS-style short mode. If the path
26908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26909  # take no chances and rewrite it.
26910  # Note: m4 eats our [], so we need to use [ and ] instead.
26911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26912  if test "x$has_forbidden_chars" != x; then
26913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26915  fi
26916
26917
26918  windows_path="$new_path"
26919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26920    unix_path=`$CYGPATH -u "$windows_path"`
26921    new_path="$unix_path"
26922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26924    new_path="$unix_path"
26925  fi
26926
26927  if test "x$path" != "x$new_path"; then
26928    BOOT_JDK="$new_path"
26929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26931  fi
26932
26933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26935
26936    else
26937      # We're on a unix platform. Hooray! :)
26938      path="$BOOT_JDK"
26939      has_space=`$ECHO "$path" | $GREP " "`
26940      if test "x$has_space" != x; then
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26944      fi
26945
26946      # Use eval to expand a potential ~
26947      eval path="$path"
26948      if test ! -f "$path" && test ! -d "$path"; then
26949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26950      fi
26951
26952      if test -d "$path"; then
26953        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26954      else
26955        dir="`$DIRNAME "$path"`"
26956        base="`$BASENAME "$path"`"
26957        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26958      fi
26959    fi
26960  fi
26961
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26963$as_echo_n "checking for Boot JDK... " >&6; }
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26965$as_echo "$BOOT_JDK" >&6; }
26966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26967$as_echo_n "checking Boot JDK version... " >&6; }
26968            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26970$as_echo "$BOOT_JDK_VERSION" >&6; }
26971          fi # end check jdk version
26972        fi # end check javac
26973      fi # end check java
26974    fi # end check boot jdk found
26975  fi
26976
26977    done
26978  fi
26979
26980  fi
26981
26982
26983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26985      # Do we have a bin/java?
26986      if test ! -x "$BOOT_JDK/bin/java"; then
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26989        BOOT_JDK_FOUND=no
26990      else
26991        # Do we have a bin/javac?
26992        if test ! -x "$BOOT_JDK/bin/javac"; then
26993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26997          BOOT_JDK_FOUND=no
26998        else
26999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27001
27002          # Extra M4 quote needed to protect [] in grep expression.
27003          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27004          if test "x$FOUND_CORRECT_VERSION" = x; then
27005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27009            BOOT_JDK_FOUND=no
27010          else
27011            # We're done! :-)
27012            BOOT_JDK_FOUND=yes
27013
27014  # Only process if variable expands to non-empty
27015
27016  if test "x$BOOT_JDK" != x; then
27017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27018
27019  # Input might be given as Windows format, start by converting to
27020  # unix format.
27021  path="$BOOT_JDK"
27022  new_path=`$CYGPATH -u "$path"`
27023
27024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27027  # "foo.exe" is OK but "foo" is an error.
27028  #
27029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27030  # It is also a way to make sure we got the proper file name for the real test later on.
27031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27032  if test "x$test_shortpath" = x; then
27033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27036  fi
27037
27038  # Call helper function which possibly converts this using DOS-style short mode.
27039  # If so, the updated path is stored in $new_path.
27040
27041  input_path="$new_path"
27042  # Check if we need to convert this using DOS-style short mode. If the path
27043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27044  # take no chances and rewrite it.
27045  # Note: m4 eats our [], so we need to use [ and ] instead.
27046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27047  if test "x$has_forbidden_chars" != x; then
27048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27052      # Going to short mode and back again did indeed matter. Since short mode is
27053      # case insensitive, let's make it lowercase to improve readability.
27054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27055      # Now convert it back to Unix-style (cygpath)
27056      input_path=`$CYGPATH -u "$shortmode_path"`
27057      new_path="$input_path"
27058    fi
27059  fi
27060
27061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27062  if test "x$test_cygdrive_prefix" = x; then
27063    # As a simple fix, exclude /usr/bin since it's not a real path.
27064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27066      # a path prefixed by /cygdrive for fixpath to work.
27067      new_path="$CYGWIN_ROOT_PATH$input_path"
27068    fi
27069  fi
27070
27071
27072  if test "x$path" != "x$new_path"; then
27073    BOOT_JDK="$new_path"
27074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27076  fi
27077
27078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27079
27080  path="$BOOT_JDK"
27081  has_colon=`$ECHO $path | $GREP ^.:`
27082  new_path="$path"
27083  if test "x$has_colon" = x; then
27084    # Not in mixed or Windows style, start by that.
27085    new_path=`cmd //c echo $path`
27086  fi
27087
27088
27089  input_path="$new_path"
27090  # Check if we need to convert this using DOS-style short mode. If the path
27091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27092  # take no chances and rewrite it.
27093  # Note: m4 eats our [], so we need to use [ and ] instead.
27094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27095  if test "x$has_forbidden_chars" != x; then
27096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27098  fi
27099
27100
27101  windows_path="$new_path"
27102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27103    unix_path=`$CYGPATH -u "$windows_path"`
27104    new_path="$unix_path"
27105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27107    new_path="$unix_path"
27108  fi
27109
27110  if test "x$path" != "x$new_path"; then
27111    BOOT_JDK="$new_path"
27112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27114  fi
27115
27116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27118
27119    else
27120      # We're on a unix platform. Hooray! :)
27121      path="$BOOT_JDK"
27122      has_space=`$ECHO "$path" | $GREP " "`
27123      if test "x$has_space" != x; then
27124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27127      fi
27128
27129      # Use eval to expand a potential ~
27130      eval path="$path"
27131      if test ! -f "$path" && test ! -d "$path"; then
27132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27133      fi
27134
27135      if test -d "$path"; then
27136        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27137      else
27138        dir="`$DIRNAME "$path"`"
27139        base="`$BASENAME "$path"`"
27140        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27141      fi
27142    fi
27143  fi
27144
27145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27146$as_echo_n "checking for Boot JDK... " >&6; }
27147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27148$as_echo "$BOOT_JDK" >&6; }
27149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27150$as_echo_n "checking Boot JDK version... " >&6; }
27151            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27153$as_echo "$BOOT_JDK_VERSION" >&6; }
27154          fi # end check jdk version
27155        fi # end check javac
27156      fi # end check java
27157    fi # end check boot jdk found
27158  fi
27159
27160
27161  if test "x$BOOT_JDK_FOUND" = xno; then
27162    # Now execute the test
27163
27164  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27165  BOOT_JDK_SUFFIX=""
27166  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27167  if test "x$ALL_JDKS_FOUND" != x; then
27168    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27169
27170  if test "x$BOOT_JDK_FOUND" = xno; then
27171    # Now execute the test
27172
27173        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27174        if test -d "$BOOT_JDK"; then
27175          BOOT_JDK_FOUND=maybe
27176          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27177$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27178        fi
27179
27180
27181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27183      # Do we have a bin/java?
27184      if test ! -x "$BOOT_JDK/bin/java"; then
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27187        BOOT_JDK_FOUND=no
27188      else
27189        # Do we have a bin/javac?
27190        if test ! -x "$BOOT_JDK/bin/javac"; then
27191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27195          BOOT_JDK_FOUND=no
27196        else
27197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27199
27200          # Extra M4 quote needed to protect [] in grep expression.
27201          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27202          if test "x$FOUND_CORRECT_VERSION" = x; then
27203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27207            BOOT_JDK_FOUND=no
27208          else
27209            # We're done! :-)
27210            BOOT_JDK_FOUND=yes
27211
27212  # Only process if variable expands to non-empty
27213
27214  if test "x$BOOT_JDK" != x; then
27215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27216
27217  # Input might be given as Windows format, start by converting to
27218  # unix format.
27219  path="$BOOT_JDK"
27220  new_path=`$CYGPATH -u "$path"`
27221
27222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27225  # "foo.exe" is OK but "foo" is an error.
27226  #
27227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27228  # It is also a way to make sure we got the proper file name for the real test later on.
27229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27230  if test "x$test_shortpath" = x; then
27231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27234  fi
27235
27236  # Call helper function which possibly converts this using DOS-style short mode.
27237  # If so, the updated path is stored in $new_path.
27238
27239  input_path="$new_path"
27240  # Check if we need to convert this using DOS-style short mode. If the path
27241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27242  # take no chances and rewrite it.
27243  # Note: m4 eats our [], so we need to use [ and ] instead.
27244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27245  if test "x$has_forbidden_chars" != x; then
27246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27250      # Going to short mode and back again did indeed matter. Since short mode is
27251      # case insensitive, let's make it lowercase to improve readability.
27252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27253      # Now convert it back to Unix-style (cygpath)
27254      input_path=`$CYGPATH -u "$shortmode_path"`
27255      new_path="$input_path"
27256    fi
27257  fi
27258
27259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27260  if test "x$test_cygdrive_prefix" = x; then
27261    # As a simple fix, exclude /usr/bin since it's not a real path.
27262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27264      # a path prefixed by /cygdrive for fixpath to work.
27265      new_path="$CYGWIN_ROOT_PATH$input_path"
27266    fi
27267  fi
27268
27269
27270  if test "x$path" != "x$new_path"; then
27271    BOOT_JDK="$new_path"
27272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27274  fi
27275
27276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27277
27278  path="$BOOT_JDK"
27279  has_colon=`$ECHO $path | $GREP ^.:`
27280  new_path="$path"
27281  if test "x$has_colon" = x; then
27282    # Not in mixed or Windows style, start by that.
27283    new_path=`cmd //c echo $path`
27284  fi
27285
27286
27287  input_path="$new_path"
27288  # Check if we need to convert this using DOS-style short mode. If the path
27289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27290  # take no chances and rewrite it.
27291  # Note: m4 eats our [], so we need to use [ and ] instead.
27292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27293  if test "x$has_forbidden_chars" != x; then
27294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27296  fi
27297
27298
27299  windows_path="$new_path"
27300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27301    unix_path=`$CYGPATH -u "$windows_path"`
27302    new_path="$unix_path"
27303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27305    new_path="$unix_path"
27306  fi
27307
27308  if test "x$path" != "x$new_path"; then
27309    BOOT_JDK="$new_path"
27310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27312  fi
27313
27314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27316
27317    else
27318      # We're on a unix platform. Hooray! :)
27319      path="$BOOT_JDK"
27320      has_space=`$ECHO "$path" | $GREP " "`
27321      if test "x$has_space" != x; then
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27325      fi
27326
27327      # Use eval to expand a potential ~
27328      eval path="$path"
27329      if test ! -f "$path" && test ! -d "$path"; then
27330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27331      fi
27332
27333      if test -d "$path"; then
27334        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27335      else
27336        dir="`$DIRNAME "$path"`"
27337        base="`$BASENAME "$path"`"
27338        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27339      fi
27340    fi
27341  fi
27342
27343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27344$as_echo_n "checking for Boot JDK... " >&6; }
27345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27346$as_echo "$BOOT_JDK" >&6; }
27347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27348$as_echo_n "checking Boot JDK version... " >&6; }
27349            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27351$as_echo "$BOOT_JDK_VERSION" >&6; }
27352          fi # end check jdk version
27353        fi # end check javac
27354      fi # end check java
27355    fi # end check boot jdk found
27356  fi
27357
27358    done
27359  fi
27360
27361
27362    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27363    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27364      # Do we have a bin/java?
27365      if test ! -x "$BOOT_JDK/bin/java"; then
27366        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27368        BOOT_JDK_FOUND=no
27369      else
27370        # Do we have a bin/javac?
27371        if test ! -x "$BOOT_JDK/bin/javac"; then
27372          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27374          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27375$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27376          BOOT_JDK_FOUND=no
27377        else
27378          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27379          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27380
27381          # Extra M4 quote needed to protect [] in grep expression.
27382          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27383          if test "x$FOUND_CORRECT_VERSION" = x; then
27384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27386            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27387$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27388            BOOT_JDK_FOUND=no
27389          else
27390            # We're done! :-)
27391            BOOT_JDK_FOUND=yes
27392
27393  # Only process if variable expands to non-empty
27394
27395  if test "x$BOOT_JDK" != x; then
27396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27397
27398  # Input might be given as Windows format, start by converting to
27399  # unix format.
27400  path="$BOOT_JDK"
27401  new_path=`$CYGPATH -u "$path"`
27402
27403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27406  # "foo.exe" is OK but "foo" is an error.
27407  #
27408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27409  # It is also a way to make sure we got the proper file name for the real test later on.
27410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27411  if test "x$test_shortpath" = x; then
27412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27415  fi
27416
27417  # Call helper function which possibly converts this using DOS-style short mode.
27418  # If so, the updated path is stored in $new_path.
27419
27420  input_path="$new_path"
27421  # Check if we need to convert this using DOS-style short mode. If the path
27422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27423  # take no chances and rewrite it.
27424  # Note: m4 eats our [], so we need to use [ and ] instead.
27425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27426  if test "x$has_forbidden_chars" != x; then
27427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27431      # Going to short mode and back again did indeed matter. Since short mode is
27432      # case insensitive, let's make it lowercase to improve readability.
27433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27434      # Now convert it back to Unix-style (cygpath)
27435      input_path=`$CYGPATH -u "$shortmode_path"`
27436      new_path="$input_path"
27437    fi
27438  fi
27439
27440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27441  if test "x$test_cygdrive_prefix" = x; then
27442    # As a simple fix, exclude /usr/bin since it's not a real path.
27443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27445      # a path prefixed by /cygdrive for fixpath to work.
27446      new_path="$CYGWIN_ROOT_PATH$input_path"
27447    fi
27448  fi
27449
27450
27451  if test "x$path" != "x$new_path"; then
27452    BOOT_JDK="$new_path"
27453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27455  fi
27456
27457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27458
27459  path="$BOOT_JDK"
27460  has_colon=`$ECHO $path | $GREP ^.:`
27461  new_path="$path"
27462  if test "x$has_colon" = x; then
27463    # Not in mixed or Windows style, start by that.
27464    new_path=`cmd //c echo $path`
27465  fi
27466
27467
27468  input_path="$new_path"
27469  # Check if we need to convert this using DOS-style short mode. If the path
27470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27471  # take no chances and rewrite it.
27472  # Note: m4 eats our [], so we need to use [ and ] instead.
27473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27474  if test "x$has_forbidden_chars" != x; then
27475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27477  fi
27478
27479
27480  windows_path="$new_path"
27481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27482    unix_path=`$CYGPATH -u "$windows_path"`
27483    new_path="$unix_path"
27484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27486    new_path="$unix_path"
27487  fi
27488
27489  if test "x$path" != "x$new_path"; then
27490    BOOT_JDK="$new_path"
27491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27493  fi
27494
27495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27497
27498    else
27499      # We're on a unix platform. Hooray! :)
27500      path="$BOOT_JDK"
27501      has_space=`$ECHO "$path" | $GREP " "`
27502      if test "x$has_space" != x; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27506      fi
27507
27508      # Use eval to expand a potential ~
27509      eval path="$path"
27510      if test ! -f "$path" && test ! -d "$path"; then
27511        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27512      fi
27513
27514      if test -d "$path"; then
27515        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27516      else
27517        dir="`$DIRNAME "$path"`"
27518        base="`$BASENAME "$path"`"
27519        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27520      fi
27521    fi
27522  fi
27523
27524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27525$as_echo_n "checking for Boot JDK... " >&6; }
27526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27527$as_echo "$BOOT_JDK" >&6; }
27528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27529$as_echo_n "checking Boot JDK version... " >&6; }
27530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27532$as_echo "$BOOT_JDK_VERSION" >&6; }
27533          fi # end check jdk version
27534        fi # end check javac
27535      fi # end check java
27536    fi # end check boot jdk found
27537  fi
27538
27539  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27540
27541  if test "x$BOOT_JDK_FOUND" = xno; then
27542    # Now execute the test
27543
27544  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27545  BOOT_JDK_SUFFIX="/Contents/Home"
27546  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27547  if test "x$ALL_JDKS_FOUND" != x; then
27548    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27549
27550  if test "x$BOOT_JDK_FOUND" = xno; then
27551    # Now execute the test
27552
27553        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27554        if test -d "$BOOT_JDK"; then
27555          BOOT_JDK_FOUND=maybe
27556          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27557$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27558        fi
27559
27560
27561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27563      # Do we have a bin/java?
27564      if test ! -x "$BOOT_JDK/bin/java"; then
27565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27567        BOOT_JDK_FOUND=no
27568      else
27569        # Do we have a bin/javac?
27570        if test ! -x "$BOOT_JDK/bin/javac"; then
27571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27575          BOOT_JDK_FOUND=no
27576        else
27577          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27578          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27579
27580          # Extra M4 quote needed to protect [] in grep expression.
27581          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27582          if test "x$FOUND_CORRECT_VERSION" = x; then
27583            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27585            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27586$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27587            BOOT_JDK_FOUND=no
27588          else
27589            # We're done! :-)
27590            BOOT_JDK_FOUND=yes
27591
27592  # Only process if variable expands to non-empty
27593
27594  if test "x$BOOT_JDK" != x; then
27595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27596
27597  # Input might be given as Windows format, start by converting to
27598  # unix format.
27599  path="$BOOT_JDK"
27600  new_path=`$CYGPATH -u "$path"`
27601
27602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27605  # "foo.exe" is OK but "foo" is an error.
27606  #
27607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27608  # It is also a way to make sure we got the proper file name for the real test later on.
27609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27610  if test "x$test_shortpath" = x; then
27611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27613    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27614  fi
27615
27616  # Call helper function which possibly converts this using DOS-style short mode.
27617  # If so, the updated path is stored in $new_path.
27618
27619  input_path="$new_path"
27620  # Check if we need to convert this using DOS-style short mode. If the path
27621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27622  # take no chances and rewrite it.
27623  # Note: m4 eats our [], so we need to use [ and ] instead.
27624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27625  if test "x$has_forbidden_chars" != x; then
27626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27630      # Going to short mode and back again did indeed matter. Since short mode is
27631      # case insensitive, let's make it lowercase to improve readability.
27632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27633      # Now convert it back to Unix-style (cygpath)
27634      input_path=`$CYGPATH -u "$shortmode_path"`
27635      new_path="$input_path"
27636    fi
27637  fi
27638
27639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27640  if test "x$test_cygdrive_prefix" = x; then
27641    # As a simple fix, exclude /usr/bin since it's not a real path.
27642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27644      # a path prefixed by /cygdrive for fixpath to work.
27645      new_path="$CYGWIN_ROOT_PATH$input_path"
27646    fi
27647  fi
27648
27649
27650  if test "x$path" != "x$new_path"; then
27651    BOOT_JDK="$new_path"
27652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27654  fi
27655
27656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27657
27658  path="$BOOT_JDK"
27659  has_colon=`$ECHO $path | $GREP ^.:`
27660  new_path="$path"
27661  if test "x$has_colon" = x; then
27662    # Not in mixed or Windows style, start by that.
27663    new_path=`cmd //c echo $path`
27664  fi
27665
27666
27667  input_path="$new_path"
27668  # Check if we need to convert this using DOS-style short mode. If the path
27669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27670  # take no chances and rewrite it.
27671  # Note: m4 eats our [], so we need to use [ and ] instead.
27672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27673  if test "x$has_forbidden_chars" != x; then
27674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27676  fi
27677
27678
27679  windows_path="$new_path"
27680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27681    unix_path=`$CYGPATH -u "$windows_path"`
27682    new_path="$unix_path"
27683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27685    new_path="$unix_path"
27686  fi
27687
27688  if test "x$path" != "x$new_path"; then
27689    BOOT_JDK="$new_path"
27690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27692  fi
27693
27694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27696
27697    else
27698      # We're on a unix platform. Hooray! :)
27699      path="$BOOT_JDK"
27700      has_space=`$ECHO "$path" | $GREP " "`
27701      if test "x$has_space" != x; then
27702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27705      fi
27706
27707      # Use eval to expand a potential ~
27708      eval path="$path"
27709      if test ! -f "$path" && test ! -d "$path"; then
27710        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27711      fi
27712
27713      if test -d "$path"; then
27714        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27715      else
27716        dir="`$DIRNAME "$path"`"
27717        base="`$BASENAME "$path"`"
27718        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27719      fi
27720    fi
27721  fi
27722
27723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27724$as_echo_n "checking for Boot JDK... " >&6; }
27725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27726$as_echo "$BOOT_JDK" >&6; }
27727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27728$as_echo_n "checking Boot JDK version... " >&6; }
27729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27731$as_echo "$BOOT_JDK_VERSION" >&6; }
27732          fi # end check jdk version
27733        fi # end check javac
27734      fi # end check java
27735    fi # end check boot jdk found
27736  fi
27737
27738    done
27739  fi
27740
27741
27742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27744      # Do we have a bin/java?
27745      if test ! -x "$BOOT_JDK/bin/java"; then
27746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27748        BOOT_JDK_FOUND=no
27749      else
27750        # Do we have a bin/javac?
27751        if test ! -x "$BOOT_JDK/bin/javac"; then
27752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27756          BOOT_JDK_FOUND=no
27757        else
27758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27760
27761          # Extra M4 quote needed to protect [] in grep expression.
27762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27763          if test "x$FOUND_CORRECT_VERSION" = x; then
27764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27768            BOOT_JDK_FOUND=no
27769          else
27770            # We're done! :-)
27771            BOOT_JDK_FOUND=yes
27772
27773  # Only process if variable expands to non-empty
27774
27775  if test "x$BOOT_JDK" != x; then
27776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27777
27778  # Input might be given as Windows format, start by converting to
27779  # unix format.
27780  path="$BOOT_JDK"
27781  new_path=`$CYGPATH -u "$path"`
27782
27783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27786  # "foo.exe" is OK but "foo" is an error.
27787  #
27788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27789  # It is also a way to make sure we got the proper file name for the real test later on.
27790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27791  if test "x$test_shortpath" = x; then
27792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27795  fi
27796
27797  # Call helper function which possibly converts this using DOS-style short mode.
27798  # If so, the updated path is stored in $new_path.
27799
27800  input_path="$new_path"
27801  # Check if we need to convert this using DOS-style short mode. If the path
27802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27803  # take no chances and rewrite it.
27804  # Note: m4 eats our [], so we need to use [ and ] instead.
27805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27806  if test "x$has_forbidden_chars" != x; then
27807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27811      # Going to short mode and back again did indeed matter. Since short mode is
27812      # case insensitive, let's make it lowercase to improve readability.
27813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27814      # Now convert it back to Unix-style (cygpath)
27815      input_path=`$CYGPATH -u "$shortmode_path"`
27816      new_path="$input_path"
27817    fi
27818  fi
27819
27820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27821  if test "x$test_cygdrive_prefix" = x; then
27822    # As a simple fix, exclude /usr/bin since it's not a real path.
27823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27825      # a path prefixed by /cygdrive for fixpath to work.
27826      new_path="$CYGWIN_ROOT_PATH$input_path"
27827    fi
27828  fi
27829
27830
27831  if test "x$path" != "x$new_path"; then
27832    BOOT_JDK="$new_path"
27833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27835  fi
27836
27837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27838
27839  path="$BOOT_JDK"
27840  has_colon=`$ECHO $path | $GREP ^.:`
27841  new_path="$path"
27842  if test "x$has_colon" = x; then
27843    # Not in mixed or Windows style, start by that.
27844    new_path=`cmd //c echo $path`
27845  fi
27846
27847
27848  input_path="$new_path"
27849  # Check if we need to convert this using DOS-style short mode. If the path
27850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27851  # take no chances and rewrite it.
27852  # Note: m4 eats our [], so we need to use [ and ] instead.
27853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27854  if test "x$has_forbidden_chars" != x; then
27855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27857  fi
27858
27859
27860  windows_path="$new_path"
27861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27862    unix_path=`$CYGPATH -u "$windows_path"`
27863    new_path="$unix_path"
27864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27866    new_path="$unix_path"
27867  fi
27868
27869  if test "x$path" != "x$new_path"; then
27870    BOOT_JDK="$new_path"
27871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27873  fi
27874
27875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27877
27878    else
27879      # We're on a unix platform. Hooray! :)
27880      path="$BOOT_JDK"
27881      has_space=`$ECHO "$path" | $GREP " "`
27882      if test "x$has_space" != x; then
27883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27886      fi
27887
27888      # Use eval to expand a potential ~
27889      eval path="$path"
27890      if test ! -f "$path" && test ! -d "$path"; then
27891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27892      fi
27893
27894      if test -d "$path"; then
27895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27896      else
27897        dir="`$DIRNAME "$path"`"
27898        base="`$BASENAME "$path"`"
27899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27900      fi
27901    fi
27902  fi
27903
27904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27905$as_echo_n "checking for Boot JDK... " >&6; }
27906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27907$as_echo "$BOOT_JDK" >&6; }
27908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27909$as_echo_n "checking Boot JDK version... " >&6; }
27910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27912$as_echo "$BOOT_JDK_VERSION" >&6; }
27913          fi # end check jdk version
27914        fi # end check javac
27915      fi # end check java
27916    fi # end check boot jdk found
27917  fi
27918
27919
27920  if test "x$BOOT_JDK_FOUND" = xno; then
27921    # Now execute the test
27922
27923  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27924  BOOT_JDK_SUFFIX="/Contents/Home"
27925  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27926  if test "x$ALL_JDKS_FOUND" != x; then
27927    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27928
27929  if test "x$BOOT_JDK_FOUND" = xno; then
27930    # Now execute the test
27931
27932        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27933        if test -d "$BOOT_JDK"; then
27934          BOOT_JDK_FOUND=maybe
27935          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27936$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27937        fi
27938
27939
27940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27942      # Do we have a bin/java?
27943      if test ! -x "$BOOT_JDK/bin/java"; then
27944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27946        BOOT_JDK_FOUND=no
27947      else
27948        # Do we have a bin/javac?
27949        if test ! -x "$BOOT_JDK/bin/javac"; then
27950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27954          BOOT_JDK_FOUND=no
27955        else
27956          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27957          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27958
27959          # Extra M4 quote needed to protect [] in grep expression.
27960          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27961          if test "x$FOUND_CORRECT_VERSION" = x; then
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27965$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27966            BOOT_JDK_FOUND=no
27967          else
27968            # We're done! :-)
27969            BOOT_JDK_FOUND=yes
27970
27971  # Only process if variable expands to non-empty
27972
27973  if test "x$BOOT_JDK" != x; then
27974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27975
27976  # Input might be given as Windows format, start by converting to
27977  # unix format.
27978  path="$BOOT_JDK"
27979  new_path=`$CYGPATH -u "$path"`
27980
27981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27984  # "foo.exe" is OK but "foo" is an error.
27985  #
27986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27987  # It is also a way to make sure we got the proper file name for the real test later on.
27988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27989  if test "x$test_shortpath" = x; then
27990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27992    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27993  fi
27994
27995  # Call helper function which possibly converts this using DOS-style short mode.
27996  # If so, the updated path is stored in $new_path.
27997
27998  input_path="$new_path"
27999  # Check if we need to convert this using DOS-style short mode. If the path
28000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28001  # take no chances and rewrite it.
28002  # Note: m4 eats our [], so we need to use [ and ] instead.
28003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28004  if test "x$has_forbidden_chars" != x; then
28005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28009      # Going to short mode and back again did indeed matter. Since short mode is
28010      # case insensitive, let's make it lowercase to improve readability.
28011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28012      # Now convert it back to Unix-style (cygpath)
28013      input_path=`$CYGPATH -u "$shortmode_path"`
28014      new_path="$input_path"
28015    fi
28016  fi
28017
28018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28019  if test "x$test_cygdrive_prefix" = x; then
28020    # As a simple fix, exclude /usr/bin since it's not a real path.
28021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28023      # a path prefixed by /cygdrive for fixpath to work.
28024      new_path="$CYGWIN_ROOT_PATH$input_path"
28025    fi
28026  fi
28027
28028
28029  if test "x$path" != "x$new_path"; then
28030    BOOT_JDK="$new_path"
28031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28033  fi
28034
28035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28036
28037  path="$BOOT_JDK"
28038  has_colon=`$ECHO $path | $GREP ^.:`
28039  new_path="$path"
28040  if test "x$has_colon" = x; then
28041    # Not in mixed or Windows style, start by that.
28042    new_path=`cmd //c echo $path`
28043  fi
28044
28045
28046  input_path="$new_path"
28047  # Check if we need to convert this using DOS-style short mode. If the path
28048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28049  # take no chances and rewrite it.
28050  # Note: m4 eats our [], so we need to use [ and ] instead.
28051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28052  if test "x$has_forbidden_chars" != x; then
28053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28055  fi
28056
28057
28058  windows_path="$new_path"
28059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28060    unix_path=`$CYGPATH -u "$windows_path"`
28061    new_path="$unix_path"
28062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28064    new_path="$unix_path"
28065  fi
28066
28067  if test "x$path" != "x$new_path"; then
28068    BOOT_JDK="$new_path"
28069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28071  fi
28072
28073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28075
28076    else
28077      # We're on a unix platform. Hooray! :)
28078      path="$BOOT_JDK"
28079      has_space=`$ECHO "$path" | $GREP " "`
28080      if test "x$has_space" != x; then
28081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28084      fi
28085
28086      # Use eval to expand a potential ~
28087      eval path="$path"
28088      if test ! -f "$path" && test ! -d "$path"; then
28089        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28090      fi
28091
28092      if test -d "$path"; then
28093        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28094      else
28095        dir="`$DIRNAME "$path"`"
28096        base="`$BASENAME "$path"`"
28097        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28098      fi
28099    fi
28100  fi
28101
28102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28103$as_echo_n "checking for Boot JDK... " >&6; }
28104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28105$as_echo "$BOOT_JDK" >&6; }
28106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28107$as_echo_n "checking Boot JDK version... " >&6; }
28108            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28110$as_echo "$BOOT_JDK_VERSION" >&6; }
28111          fi # end check jdk version
28112        fi # end check javac
28113      fi # end check java
28114    fi # end check boot jdk found
28115  fi
28116
28117    done
28118  fi
28119
28120
28121    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28122    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28123      # Do we have a bin/java?
28124      if test ! -x "$BOOT_JDK/bin/java"; then
28125        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28127        BOOT_JDK_FOUND=no
28128      else
28129        # Do we have a bin/javac?
28130        if test ! -x "$BOOT_JDK/bin/javac"; then
28131          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28133          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28134$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28135          BOOT_JDK_FOUND=no
28136        else
28137          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28138          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28139
28140          # Extra M4 quote needed to protect [] in grep expression.
28141          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28142          if test "x$FOUND_CORRECT_VERSION" = x; then
28143            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28145            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28146$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28147            BOOT_JDK_FOUND=no
28148          else
28149            # We're done! :-)
28150            BOOT_JDK_FOUND=yes
28151
28152  # Only process if variable expands to non-empty
28153
28154  if test "x$BOOT_JDK" != x; then
28155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28156
28157  # Input might be given as Windows format, start by converting to
28158  # unix format.
28159  path="$BOOT_JDK"
28160  new_path=`$CYGPATH -u "$path"`
28161
28162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28165  # "foo.exe" is OK but "foo" is an error.
28166  #
28167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28168  # It is also a way to make sure we got the proper file name for the real test later on.
28169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28170  if test "x$test_shortpath" = x; then
28171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28174  fi
28175
28176  # Call helper function which possibly converts this using DOS-style short mode.
28177  # If so, the updated path is stored in $new_path.
28178
28179  input_path="$new_path"
28180  # Check if we need to convert this using DOS-style short mode. If the path
28181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28182  # take no chances and rewrite it.
28183  # Note: m4 eats our [], so we need to use [ and ] instead.
28184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28185  if test "x$has_forbidden_chars" != x; then
28186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28190      # Going to short mode and back again did indeed matter. Since short mode is
28191      # case insensitive, let's make it lowercase to improve readability.
28192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28193      # Now convert it back to Unix-style (cygpath)
28194      input_path=`$CYGPATH -u "$shortmode_path"`
28195      new_path="$input_path"
28196    fi
28197  fi
28198
28199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28200  if test "x$test_cygdrive_prefix" = x; then
28201    # As a simple fix, exclude /usr/bin since it's not a real path.
28202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28204      # a path prefixed by /cygdrive for fixpath to work.
28205      new_path="$CYGWIN_ROOT_PATH$input_path"
28206    fi
28207  fi
28208
28209
28210  if test "x$path" != "x$new_path"; then
28211    BOOT_JDK="$new_path"
28212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28214  fi
28215
28216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28217
28218  path="$BOOT_JDK"
28219  has_colon=`$ECHO $path | $GREP ^.:`
28220  new_path="$path"
28221  if test "x$has_colon" = x; then
28222    # Not in mixed or Windows style, start by that.
28223    new_path=`cmd //c echo $path`
28224  fi
28225
28226
28227  input_path="$new_path"
28228  # Check if we need to convert this using DOS-style short mode. If the path
28229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28230  # take no chances and rewrite it.
28231  # Note: m4 eats our [], so we need to use [ and ] instead.
28232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28233  if test "x$has_forbidden_chars" != x; then
28234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28236  fi
28237
28238
28239  windows_path="$new_path"
28240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28241    unix_path=`$CYGPATH -u "$windows_path"`
28242    new_path="$unix_path"
28243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28245    new_path="$unix_path"
28246  fi
28247
28248  if test "x$path" != "x$new_path"; then
28249    BOOT_JDK="$new_path"
28250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28252  fi
28253
28254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28256
28257    else
28258      # We're on a unix platform. Hooray! :)
28259      path="$BOOT_JDK"
28260      has_space=`$ECHO "$path" | $GREP " "`
28261      if test "x$has_space" != x; then
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28265      fi
28266
28267      # Use eval to expand a potential ~
28268      eval path="$path"
28269      if test ! -f "$path" && test ! -d "$path"; then
28270        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28271      fi
28272
28273      if test -d "$path"; then
28274        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28275      else
28276        dir="`$DIRNAME "$path"`"
28277        base="`$BASENAME "$path"`"
28278        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28279      fi
28280    fi
28281  fi
28282
28283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28284$as_echo_n "checking for Boot JDK... " >&6; }
28285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28286$as_echo "$BOOT_JDK" >&6; }
28287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28288$as_echo_n "checking Boot JDK version... " >&6; }
28289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28291$as_echo "$BOOT_JDK_VERSION" >&6; }
28292          fi # end check jdk version
28293        fi # end check javac
28294      fi # end check java
28295    fi # end check boot jdk found
28296  fi
28297
28298  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28299
28300  if test "x$BOOT_JDK_FOUND" = xno; then
28301    # Now execute the test
28302
28303  BOOT_JDK_PREFIX="/usr/lib/jvm"
28304  BOOT_JDK_SUFFIX=""
28305  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28306  if test "x$ALL_JDKS_FOUND" != x; then
28307    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28308
28309  if test "x$BOOT_JDK_FOUND" = xno; then
28310    # Now execute the test
28311
28312        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28313        if test -d "$BOOT_JDK"; then
28314          BOOT_JDK_FOUND=maybe
28315          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28316$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28317        fi
28318
28319
28320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28322      # Do we have a bin/java?
28323      if test ! -x "$BOOT_JDK/bin/java"; then
28324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28326        BOOT_JDK_FOUND=no
28327      else
28328        # Do we have a bin/javac?
28329        if test ! -x "$BOOT_JDK/bin/javac"; then
28330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28334          BOOT_JDK_FOUND=no
28335        else
28336          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28337          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28338
28339          # Extra M4 quote needed to protect [] in grep expression.
28340          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28341          if test "x$FOUND_CORRECT_VERSION" = x; then
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28345$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28346            BOOT_JDK_FOUND=no
28347          else
28348            # We're done! :-)
28349            BOOT_JDK_FOUND=yes
28350
28351  # Only process if variable expands to non-empty
28352
28353  if test "x$BOOT_JDK" != x; then
28354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28355
28356  # Input might be given as Windows format, start by converting to
28357  # unix format.
28358  path="$BOOT_JDK"
28359  new_path=`$CYGPATH -u "$path"`
28360
28361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28364  # "foo.exe" is OK but "foo" is an error.
28365  #
28366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28367  # It is also a way to make sure we got the proper file name for the real test later on.
28368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28369  if test "x$test_shortpath" = x; then
28370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28372    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28373  fi
28374
28375  # Call helper function which possibly converts this using DOS-style short mode.
28376  # If so, the updated path is stored in $new_path.
28377
28378  input_path="$new_path"
28379  # Check if we need to convert this using DOS-style short mode. If the path
28380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28381  # take no chances and rewrite it.
28382  # Note: m4 eats our [], so we need to use [ and ] instead.
28383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28384  if test "x$has_forbidden_chars" != x; then
28385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28389      # Going to short mode and back again did indeed matter. Since short mode is
28390      # case insensitive, let's make it lowercase to improve readability.
28391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28392      # Now convert it back to Unix-style (cygpath)
28393      input_path=`$CYGPATH -u "$shortmode_path"`
28394      new_path="$input_path"
28395    fi
28396  fi
28397
28398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28399  if test "x$test_cygdrive_prefix" = x; then
28400    # As a simple fix, exclude /usr/bin since it's not a real path.
28401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28403      # a path prefixed by /cygdrive for fixpath to work.
28404      new_path="$CYGWIN_ROOT_PATH$input_path"
28405    fi
28406  fi
28407
28408
28409  if test "x$path" != "x$new_path"; then
28410    BOOT_JDK="$new_path"
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28413  fi
28414
28415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28416
28417  path="$BOOT_JDK"
28418  has_colon=`$ECHO $path | $GREP ^.:`
28419  new_path="$path"
28420  if test "x$has_colon" = x; then
28421    # Not in mixed or Windows style, start by that.
28422    new_path=`cmd //c echo $path`
28423  fi
28424
28425
28426  input_path="$new_path"
28427  # Check if we need to convert this using DOS-style short mode. If the path
28428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28429  # take no chances and rewrite it.
28430  # Note: m4 eats our [], so we need to use [ and ] instead.
28431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28432  if test "x$has_forbidden_chars" != x; then
28433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28435  fi
28436
28437
28438  windows_path="$new_path"
28439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28440    unix_path=`$CYGPATH -u "$windows_path"`
28441    new_path="$unix_path"
28442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28444    new_path="$unix_path"
28445  fi
28446
28447  if test "x$path" != "x$new_path"; then
28448    BOOT_JDK="$new_path"
28449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28450$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28451  fi
28452
28453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28455
28456    else
28457      # We're on a unix platform. Hooray! :)
28458      path="$BOOT_JDK"
28459      has_space=`$ECHO "$path" | $GREP " "`
28460      if test "x$has_space" != x; then
28461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28462$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28464      fi
28465
28466      # Use eval to expand a potential ~
28467      eval path="$path"
28468      if test ! -f "$path" && test ! -d "$path"; then
28469        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28470      fi
28471
28472      if test -d "$path"; then
28473        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28474      else
28475        dir="`$DIRNAME "$path"`"
28476        base="`$BASENAME "$path"`"
28477        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28478      fi
28479    fi
28480  fi
28481
28482            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28483$as_echo_n "checking for Boot JDK... " >&6; }
28484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28485$as_echo "$BOOT_JDK" >&6; }
28486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28487$as_echo_n "checking Boot JDK version... " >&6; }
28488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28490$as_echo "$BOOT_JDK_VERSION" >&6; }
28491          fi # end check jdk version
28492        fi # end check javac
28493      fi # end check java
28494    fi # end check boot jdk found
28495  fi
28496
28497    done
28498  fi
28499
28500
28501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28503      # Do we have a bin/java?
28504      if test ! -x "$BOOT_JDK/bin/java"; then
28505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28507        BOOT_JDK_FOUND=no
28508      else
28509        # Do we have a bin/javac?
28510        if test ! -x "$BOOT_JDK/bin/javac"; then
28511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28515          BOOT_JDK_FOUND=no
28516        else
28517          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28518          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28519
28520          # Extra M4 quote needed to protect [] in grep expression.
28521          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28522          if test "x$FOUND_CORRECT_VERSION" = x; then
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28526$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28527            BOOT_JDK_FOUND=no
28528          else
28529            # We're done! :-)
28530            BOOT_JDK_FOUND=yes
28531
28532  # Only process if variable expands to non-empty
28533
28534  if test "x$BOOT_JDK" != x; then
28535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28536
28537  # Input might be given as Windows format, start by converting to
28538  # unix format.
28539  path="$BOOT_JDK"
28540  new_path=`$CYGPATH -u "$path"`
28541
28542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28545  # "foo.exe" is OK but "foo" is an error.
28546  #
28547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28548  # It is also a way to make sure we got the proper file name for the real test later on.
28549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28550  if test "x$test_shortpath" = x; then
28551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28554  fi
28555
28556  # Call helper function which possibly converts this using DOS-style short mode.
28557  # If so, the updated path is stored in $new_path.
28558
28559  input_path="$new_path"
28560  # Check if we need to convert this using DOS-style short mode. If the path
28561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28562  # take no chances and rewrite it.
28563  # Note: m4 eats our [], so we need to use [ and ] instead.
28564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28565  if test "x$has_forbidden_chars" != x; then
28566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28570      # Going to short mode and back again did indeed matter. Since short mode is
28571      # case insensitive, let's make it lowercase to improve readability.
28572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28573      # Now convert it back to Unix-style (cygpath)
28574      input_path=`$CYGPATH -u "$shortmode_path"`
28575      new_path="$input_path"
28576    fi
28577  fi
28578
28579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28580  if test "x$test_cygdrive_prefix" = x; then
28581    # As a simple fix, exclude /usr/bin since it's not a real path.
28582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28584      # a path prefixed by /cygdrive for fixpath to work.
28585      new_path="$CYGWIN_ROOT_PATH$input_path"
28586    fi
28587  fi
28588
28589
28590  if test "x$path" != "x$new_path"; then
28591    BOOT_JDK="$new_path"
28592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28594  fi
28595
28596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28597
28598  path="$BOOT_JDK"
28599  has_colon=`$ECHO $path | $GREP ^.:`
28600  new_path="$path"
28601  if test "x$has_colon" = x; then
28602    # Not in mixed or Windows style, start by that.
28603    new_path=`cmd //c echo $path`
28604  fi
28605
28606
28607  input_path="$new_path"
28608  # Check if we need to convert this using DOS-style short mode. If the path
28609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28610  # take no chances and rewrite it.
28611  # Note: m4 eats our [], so we need to use [ and ] instead.
28612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28613  if test "x$has_forbidden_chars" != x; then
28614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28616  fi
28617
28618
28619  windows_path="$new_path"
28620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621    unix_path=`$CYGPATH -u "$windows_path"`
28622    new_path="$unix_path"
28623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28625    new_path="$unix_path"
28626  fi
28627
28628  if test "x$path" != "x$new_path"; then
28629    BOOT_JDK="$new_path"
28630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28632  fi
28633
28634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28636
28637    else
28638      # We're on a unix platform. Hooray! :)
28639      path="$BOOT_JDK"
28640      has_space=`$ECHO "$path" | $GREP " "`
28641      if test "x$has_space" != x; then
28642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28645      fi
28646
28647      # Use eval to expand a potential ~
28648      eval path="$path"
28649      if test ! -f "$path" && test ! -d "$path"; then
28650        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28651      fi
28652
28653      if test -d "$path"; then
28654        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28655      else
28656        dir="`$DIRNAME "$path"`"
28657        base="`$BASENAME "$path"`"
28658        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28659      fi
28660    fi
28661  fi
28662
28663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28664$as_echo_n "checking for Boot JDK... " >&6; }
28665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28666$as_echo "$BOOT_JDK" >&6; }
28667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28668$as_echo_n "checking Boot JDK version... " >&6; }
28669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28671$as_echo "$BOOT_JDK_VERSION" >&6; }
28672          fi # end check jdk version
28673        fi # end check javac
28674      fi # end check java
28675    fi # end check boot jdk found
28676  fi
28677
28678  fi
28679
28680
28681    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28682    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28683      # Do we have a bin/java?
28684      if test ! -x "$BOOT_JDK/bin/java"; then
28685        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28687        BOOT_JDK_FOUND=no
28688      else
28689        # Do we have a bin/javac?
28690        if test ! -x "$BOOT_JDK/bin/javac"; then
28691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28693          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28694$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28695          BOOT_JDK_FOUND=no
28696        else
28697          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28698          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28699
28700          # Extra M4 quote needed to protect [] in grep expression.
28701          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28702          if test "x$FOUND_CORRECT_VERSION" = x; then
28703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28705            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28706$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28707            BOOT_JDK_FOUND=no
28708          else
28709            # We're done! :-)
28710            BOOT_JDK_FOUND=yes
28711
28712  # Only process if variable expands to non-empty
28713
28714  if test "x$BOOT_JDK" != x; then
28715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28716
28717  # Input might be given as Windows format, start by converting to
28718  # unix format.
28719  path="$BOOT_JDK"
28720  new_path=`$CYGPATH -u "$path"`
28721
28722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28725  # "foo.exe" is OK but "foo" is an error.
28726  #
28727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28728  # It is also a way to make sure we got the proper file name for the real test later on.
28729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28730  if test "x$test_shortpath" = x; then
28731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28734  fi
28735
28736  # Call helper function which possibly converts this using DOS-style short mode.
28737  # If so, the updated path is stored in $new_path.
28738
28739  input_path="$new_path"
28740  # Check if we need to convert this using DOS-style short mode. If the path
28741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28742  # take no chances and rewrite it.
28743  # Note: m4 eats our [], so we need to use [ and ] instead.
28744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28745  if test "x$has_forbidden_chars" != x; then
28746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28750      # Going to short mode and back again did indeed matter. Since short mode is
28751      # case insensitive, let's make it lowercase to improve readability.
28752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28753      # Now convert it back to Unix-style (cygpath)
28754      input_path=`$CYGPATH -u "$shortmode_path"`
28755      new_path="$input_path"
28756    fi
28757  fi
28758
28759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28760  if test "x$test_cygdrive_prefix" = x; then
28761    # As a simple fix, exclude /usr/bin since it's not a real path.
28762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28764      # a path prefixed by /cygdrive for fixpath to work.
28765      new_path="$CYGWIN_ROOT_PATH$input_path"
28766    fi
28767  fi
28768
28769
28770  if test "x$path" != "x$new_path"; then
28771    BOOT_JDK="$new_path"
28772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28774  fi
28775
28776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28777
28778  path="$BOOT_JDK"
28779  has_colon=`$ECHO $path | $GREP ^.:`
28780  new_path="$path"
28781  if test "x$has_colon" = x; then
28782    # Not in mixed or Windows style, start by that.
28783    new_path=`cmd //c echo $path`
28784  fi
28785
28786
28787  input_path="$new_path"
28788  # Check if we need to convert this using DOS-style short mode. If the path
28789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28790  # take no chances and rewrite it.
28791  # Note: m4 eats our [], so we need to use [ and ] instead.
28792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28793  if test "x$has_forbidden_chars" != x; then
28794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28796  fi
28797
28798
28799  windows_path="$new_path"
28800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28801    unix_path=`$CYGPATH -u "$windows_path"`
28802    new_path="$unix_path"
28803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28805    new_path="$unix_path"
28806  fi
28807
28808  if test "x$path" != "x$new_path"; then
28809    BOOT_JDK="$new_path"
28810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28812  fi
28813
28814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28816
28817    else
28818      # We're on a unix platform. Hooray! :)
28819      path="$BOOT_JDK"
28820      has_space=`$ECHO "$path" | $GREP " "`
28821      if test "x$has_space" != x; then
28822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28825      fi
28826
28827      # Use eval to expand a potential ~
28828      eval path="$path"
28829      if test ! -f "$path" && test ! -d "$path"; then
28830        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28831      fi
28832
28833      if test -d "$path"; then
28834        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28835      else
28836        dir="`$DIRNAME "$path"`"
28837        base="`$BASENAME "$path"`"
28838        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28839      fi
28840    fi
28841  fi
28842
28843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28844$as_echo_n "checking for Boot JDK... " >&6; }
28845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28846$as_echo "$BOOT_JDK" >&6; }
28847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28848$as_echo_n "checking Boot JDK version... " >&6; }
28849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28851$as_echo "$BOOT_JDK_VERSION" >&6; }
28852          fi # end check jdk version
28853        fi # end check javac
28854      fi # end check java
28855    fi # end check boot jdk found
28856  fi
28857
28858
28859  # If we haven't found anything yet, we've truly lost. Give up.
28860  if test "x$BOOT_JDK_FOUND" = xno; then
28861
28862  # Print a helpful message on how to acquire the necessary build dependency.
28863  # openjdk is the help tag: freetype, cups, alsa etc
28864  MISSING_DEPENDENCY=openjdk
28865
28866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28867    cygwin_help $MISSING_DEPENDENCY
28868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28869    msys_help $MISSING_DEPENDENCY
28870  else
28871    PKGHANDLER_COMMAND=
28872
28873    case $PKGHANDLER in
28874      apt-get)
28875        apt_help     $MISSING_DEPENDENCY ;;
28876      yum)
28877        yum_help     $MISSING_DEPENDENCY ;;
28878      port)
28879        port_help    $MISSING_DEPENDENCY ;;
28880      pkgutil)
28881        pkgutil_help $MISSING_DEPENDENCY ;;
28882      pkgadd)
28883        pkgadd_help  $MISSING_DEPENDENCY ;;
28884    esac
28885
28886    if test "x$PKGHANDLER_COMMAND" != x; then
28887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28888    fi
28889  fi
28890
28891    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28892$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28893    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28894$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28895    as_fn_error $? "Cannot continue" "$LINENO" 5
28896  fi
28897
28898
28899
28900  # Setup tools from the Boot JDK.
28901
28902  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28903
28904  # Publish this variable in the help.
28905
28906
28907  if [ -z "${JAVA+x}" ]; then
28908    # The variable is not set by user, try to locate tool using the code snippet
28909
28910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28911$as_echo_n "checking for java in Boot JDK... " >&6; }
28912      JAVA=$BOOT_JDK/bin/java
28913      if test ! -x $JAVA; then
28914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28915$as_echo "not found" >&6; }
28916        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28917$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28918        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28919      fi
28920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28921$as_echo "ok" >&6; }
28922
28923
28924  else
28925    # The variable is set, but is it from the command line or the environment?
28926
28927    # Try to remove the string !JAVA! from our list.
28928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28930      # If it failed, the variable was not from the command line. Ignore it,
28931      # but warn the user (except for BASH, which is always set by the calling BASH).
28932      if test "xJAVA" != xBASH; then
28933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28934$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28935      fi
28936      # Try to locate tool using the code snippet
28937
28938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28939$as_echo_n "checking for java in Boot JDK... " >&6; }
28940      JAVA=$BOOT_JDK/bin/java
28941      if test ! -x $JAVA; then
28942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28943$as_echo "not found" >&6; }
28944        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28945$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28946        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28947      fi
28948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28949$as_echo "ok" >&6; }
28950
28951
28952    else
28953      # If it succeeded, then it was overridden by the user. We will use it
28954      # for the tool.
28955
28956      # First remove it from the list of overridden variables, so we can test
28957      # for unknown variables in the end.
28958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28959
28960      # Check if we try to supply an empty value
28961      if test "x$JAVA" = x; then
28962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28963$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28965$as_echo_n "checking for JAVA... " >&6; }
28966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28967$as_echo "disabled" >&6; }
28968      else
28969        # Check if the provided tool contains a complete path.
28970        tool_specified="$JAVA"
28971        tool_basename="${tool_specified##*/}"
28972        if test "x$tool_basename" = "x$tool_specified"; then
28973          # A command without a complete path is provided, search $PATH.
28974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28975$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28976          # Extract the first word of "$tool_basename", so it can be a program name with args.
28977set dummy $tool_basename; ac_word=$2
28978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28979$as_echo_n "checking for $ac_word... " >&6; }
28980if ${ac_cv_path_JAVA+:} false; then :
28981  $as_echo_n "(cached) " >&6
28982else
28983  case $JAVA in
28984  [\\/]* | ?:[\\/]*)
28985  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28986  ;;
28987  *)
28988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28989for as_dir in $PATH
28990do
28991  IFS=$as_save_IFS
28992  test -z "$as_dir" && as_dir=.
28993    for ac_exec_ext in '' $ac_executable_extensions; do
28994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28995    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28997    break 2
28998  fi
28999done
29000  done
29001IFS=$as_save_IFS
29002
29003  ;;
29004esac
29005fi
29006JAVA=$ac_cv_path_JAVA
29007if test -n "$JAVA"; then
29008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29009$as_echo "$JAVA" >&6; }
29010else
29011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29012$as_echo "no" >&6; }
29013fi
29014
29015
29016          if test "x$JAVA" = x; then
29017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29018          fi
29019        else
29020          # Otherwise we believe it is a complete path. Use it as it is.
29021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29022$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29024$as_echo_n "checking for JAVA... " >&6; }
29025          if test ! -x "$tool_specified"; then
29026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29027$as_echo "not found" >&6; }
29028            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29029          fi
29030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29031$as_echo "$tool_specified" >&6; }
29032        fi
29033      fi
29034    fi
29035
29036  fi
29037
29038
29039
29040  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29041
29042  # Publish this variable in the help.
29043
29044
29045  if [ -z "${JAVAC+x}" ]; then
29046    # The variable is not set by user, try to locate tool using the code snippet
29047
29048      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29049$as_echo_n "checking for javac in Boot JDK... " >&6; }
29050      JAVAC=$BOOT_JDK/bin/javac
29051      if test ! -x $JAVAC; then
29052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29053$as_echo "not found" >&6; }
29054        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29055$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29056        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29057      fi
29058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29059$as_echo "ok" >&6; }
29060
29061
29062  else
29063    # The variable is set, but is it from the command line or the environment?
29064
29065    # Try to remove the string !JAVAC! from our list.
29066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29068      # If it failed, the variable was not from the command line. Ignore it,
29069      # but warn the user (except for BASH, which is always set by the calling BASH).
29070      if test "xJAVAC" != xBASH; then
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29072$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29073      fi
29074      # Try to locate tool using the code snippet
29075
29076      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29077$as_echo_n "checking for javac in Boot JDK... " >&6; }
29078      JAVAC=$BOOT_JDK/bin/javac
29079      if test ! -x $JAVAC; then
29080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29081$as_echo "not found" >&6; }
29082        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29083$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29084        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29085      fi
29086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29087$as_echo "ok" >&6; }
29088
29089
29090    else
29091      # If it succeeded, then it was overridden by the user. We will use it
29092      # for the tool.
29093
29094      # First remove it from the list of overridden variables, so we can test
29095      # for unknown variables in the end.
29096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29097
29098      # Check if we try to supply an empty value
29099      if test "x$JAVAC" = x; then
29100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29101$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29103$as_echo_n "checking for JAVAC... " >&6; }
29104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29105$as_echo "disabled" >&6; }
29106      else
29107        # Check if the provided tool contains a complete path.
29108        tool_specified="$JAVAC"
29109        tool_basename="${tool_specified##*/}"
29110        if test "x$tool_basename" = "x$tool_specified"; then
29111          # A command without a complete path is provided, search $PATH.
29112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29113$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29114          # Extract the first word of "$tool_basename", so it can be a program name with args.
29115set dummy $tool_basename; ac_word=$2
29116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29117$as_echo_n "checking for $ac_word... " >&6; }
29118if ${ac_cv_path_JAVAC+:} false; then :
29119  $as_echo_n "(cached) " >&6
29120else
29121  case $JAVAC in
29122  [\\/]* | ?:[\\/]*)
29123  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29124  ;;
29125  *)
29126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29127for as_dir in $PATH
29128do
29129  IFS=$as_save_IFS
29130  test -z "$as_dir" && as_dir=.
29131    for ac_exec_ext in '' $ac_executable_extensions; do
29132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29133    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29135    break 2
29136  fi
29137done
29138  done
29139IFS=$as_save_IFS
29140
29141  ;;
29142esac
29143fi
29144JAVAC=$ac_cv_path_JAVAC
29145if test -n "$JAVAC"; then
29146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29147$as_echo "$JAVAC" >&6; }
29148else
29149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29150$as_echo "no" >&6; }
29151fi
29152
29153
29154          if test "x$JAVAC" = x; then
29155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29156          fi
29157        else
29158          # Otherwise we believe it is a complete path. Use it as it is.
29159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29160$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29162$as_echo_n "checking for JAVAC... " >&6; }
29163          if test ! -x "$tool_specified"; then
29164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29165$as_echo "not found" >&6; }
29166            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29167          fi
29168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29169$as_echo "$tool_specified" >&6; }
29170        fi
29171      fi
29172    fi
29173
29174  fi
29175
29176
29177
29178  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29179
29180  # Publish this variable in the help.
29181
29182
29183  if [ -z "${JAVAH+x}" ]; then
29184    # The variable is not set by user, try to locate tool using the code snippet
29185
29186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29187$as_echo_n "checking for javah in Boot JDK... " >&6; }
29188      JAVAH=$BOOT_JDK/bin/javah
29189      if test ! -x $JAVAH; then
29190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29191$as_echo "not found" >&6; }
29192        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29193$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29194        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29195      fi
29196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29197$as_echo "ok" >&6; }
29198
29199
29200  else
29201    # The variable is set, but is it from the command line or the environment?
29202
29203    # Try to remove the string !JAVAH! from our list.
29204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29206      # If it failed, the variable was not from the command line. Ignore it,
29207      # but warn the user (except for BASH, which is always set by the calling BASH).
29208      if test "xJAVAH" != xBASH; then
29209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29210$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29211      fi
29212      # Try to locate tool using the code snippet
29213
29214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29215$as_echo_n "checking for javah in Boot JDK... " >&6; }
29216      JAVAH=$BOOT_JDK/bin/javah
29217      if test ! -x $JAVAH; then
29218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29219$as_echo "not found" >&6; }
29220        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29221$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29222        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29223      fi
29224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29225$as_echo "ok" >&6; }
29226
29227
29228    else
29229      # If it succeeded, then it was overridden by the user. We will use it
29230      # for the tool.
29231
29232      # First remove it from the list of overridden variables, so we can test
29233      # for unknown variables in the end.
29234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29235
29236      # Check if we try to supply an empty value
29237      if test "x$JAVAH" = x; then
29238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29239$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29241$as_echo_n "checking for JAVAH... " >&6; }
29242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29243$as_echo "disabled" >&6; }
29244      else
29245        # Check if the provided tool contains a complete path.
29246        tool_specified="$JAVAH"
29247        tool_basename="${tool_specified##*/}"
29248        if test "x$tool_basename" = "x$tool_specified"; then
29249          # A command without a complete path is provided, search $PATH.
29250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29251$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29252          # Extract the first word of "$tool_basename", so it can be a program name with args.
29253set dummy $tool_basename; ac_word=$2
29254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29255$as_echo_n "checking for $ac_word... " >&6; }
29256if ${ac_cv_path_JAVAH+:} false; then :
29257  $as_echo_n "(cached) " >&6
29258else
29259  case $JAVAH in
29260  [\\/]* | ?:[\\/]*)
29261  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29262  ;;
29263  *)
29264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29265for as_dir in $PATH
29266do
29267  IFS=$as_save_IFS
29268  test -z "$as_dir" && as_dir=.
29269    for ac_exec_ext in '' $ac_executable_extensions; do
29270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29271    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29273    break 2
29274  fi
29275done
29276  done
29277IFS=$as_save_IFS
29278
29279  ;;
29280esac
29281fi
29282JAVAH=$ac_cv_path_JAVAH
29283if test -n "$JAVAH"; then
29284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29285$as_echo "$JAVAH" >&6; }
29286else
29287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29288$as_echo "no" >&6; }
29289fi
29290
29291
29292          if test "x$JAVAH" = x; then
29293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29294          fi
29295        else
29296          # Otherwise we believe it is a complete path. Use it as it is.
29297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29298$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29300$as_echo_n "checking for JAVAH... " >&6; }
29301          if test ! -x "$tool_specified"; then
29302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29303$as_echo "not found" >&6; }
29304            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29305          fi
29306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29307$as_echo "$tool_specified" >&6; }
29308        fi
29309      fi
29310    fi
29311
29312  fi
29313
29314
29315
29316  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29317
29318  # Publish this variable in the help.
29319
29320
29321  if [ -z "${JAR+x}" ]; then
29322    # The variable is not set by user, try to locate tool using the code snippet
29323
29324      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29325$as_echo_n "checking for jar in Boot JDK... " >&6; }
29326      JAR=$BOOT_JDK/bin/jar
29327      if test ! -x $JAR; then
29328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29329$as_echo "not found" >&6; }
29330        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29331$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29332        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29333      fi
29334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29335$as_echo "ok" >&6; }
29336
29337
29338  else
29339    # The variable is set, but is it from the command line or the environment?
29340
29341    # Try to remove the string !JAR! from our list.
29342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29344      # If it failed, the variable was not from the command line. Ignore it,
29345      # but warn the user (except for BASH, which is always set by the calling BASH).
29346      if test "xJAR" != xBASH; then
29347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29348$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29349      fi
29350      # Try to locate tool using the code snippet
29351
29352      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29353$as_echo_n "checking for jar in Boot JDK... " >&6; }
29354      JAR=$BOOT_JDK/bin/jar
29355      if test ! -x $JAR; then
29356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29357$as_echo "not found" >&6; }
29358        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29359$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29360        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29361      fi
29362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29363$as_echo "ok" >&6; }
29364
29365
29366    else
29367      # If it succeeded, then it was overridden by the user. We will use it
29368      # for the tool.
29369
29370      # First remove it from the list of overridden variables, so we can test
29371      # for unknown variables in the end.
29372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29373
29374      # Check if we try to supply an empty value
29375      if test "x$JAR" = x; then
29376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29377$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29379$as_echo_n "checking for JAR... " >&6; }
29380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29381$as_echo "disabled" >&6; }
29382      else
29383        # Check if the provided tool contains a complete path.
29384        tool_specified="$JAR"
29385        tool_basename="${tool_specified##*/}"
29386        if test "x$tool_basename" = "x$tool_specified"; then
29387          # A command without a complete path is provided, search $PATH.
29388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29389$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29390          # Extract the first word of "$tool_basename", so it can be a program name with args.
29391set dummy $tool_basename; ac_word=$2
29392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29393$as_echo_n "checking for $ac_word... " >&6; }
29394if ${ac_cv_path_JAR+:} false; then :
29395  $as_echo_n "(cached) " >&6
29396else
29397  case $JAR in
29398  [\\/]* | ?:[\\/]*)
29399  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29400  ;;
29401  *)
29402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29403for as_dir in $PATH
29404do
29405  IFS=$as_save_IFS
29406  test -z "$as_dir" && as_dir=.
29407    for ac_exec_ext in '' $ac_executable_extensions; do
29408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29409    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29411    break 2
29412  fi
29413done
29414  done
29415IFS=$as_save_IFS
29416
29417  ;;
29418esac
29419fi
29420JAR=$ac_cv_path_JAR
29421if test -n "$JAR"; then
29422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29423$as_echo "$JAR" >&6; }
29424else
29425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29426$as_echo "no" >&6; }
29427fi
29428
29429
29430          if test "x$JAR" = x; then
29431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29432          fi
29433        else
29434          # Otherwise we believe it is a complete path. Use it as it is.
29435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29436$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29438$as_echo_n "checking for JAR... " >&6; }
29439          if test ! -x "$tool_specified"; then
29440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29441$as_echo "not found" >&6; }
29442            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29443          fi
29444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29445$as_echo "$tool_specified" >&6; }
29446        fi
29447      fi
29448    fi
29449
29450  fi
29451
29452
29453
29454  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29455
29456  # Publish this variable in the help.
29457
29458
29459  if [ -z "${JARSIGNER+x}" ]; then
29460    # The variable is not set by user, try to locate tool using the code snippet
29461
29462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29463$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29464      JARSIGNER=$BOOT_JDK/bin/jarsigner
29465      if test ! -x $JARSIGNER; then
29466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29467$as_echo "not found" >&6; }
29468        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29469$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29470        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29471      fi
29472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29473$as_echo "ok" >&6; }
29474
29475
29476  else
29477    # The variable is set, but is it from the command line or the environment?
29478
29479    # Try to remove the string !JARSIGNER! from our list.
29480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29482      # If it failed, the variable was not from the command line. Ignore it,
29483      # but warn the user (except for BASH, which is always set by the calling BASH).
29484      if test "xJARSIGNER" != xBASH; then
29485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29486$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29487      fi
29488      # Try to locate tool using the code snippet
29489
29490      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29491$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29492      JARSIGNER=$BOOT_JDK/bin/jarsigner
29493      if test ! -x $JARSIGNER; then
29494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29495$as_echo "not found" >&6; }
29496        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29497$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29498        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29499      fi
29500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29501$as_echo "ok" >&6; }
29502
29503
29504    else
29505      # If it succeeded, then it was overridden by the user. We will use it
29506      # for the tool.
29507
29508      # First remove it from the list of overridden variables, so we can test
29509      # for unknown variables in the end.
29510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29511
29512      # Check if we try to supply an empty value
29513      if test "x$JARSIGNER" = x; then
29514        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29515$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29517$as_echo_n "checking for JARSIGNER... " >&6; }
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29519$as_echo "disabled" >&6; }
29520      else
29521        # Check if the provided tool contains a complete path.
29522        tool_specified="$JARSIGNER"
29523        tool_basename="${tool_specified##*/}"
29524        if test "x$tool_basename" = "x$tool_specified"; then
29525          # A command without a complete path is provided, search $PATH.
29526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29527$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29528          # Extract the first word of "$tool_basename", so it can be a program name with args.
29529set dummy $tool_basename; ac_word=$2
29530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29531$as_echo_n "checking for $ac_word... " >&6; }
29532if ${ac_cv_path_JARSIGNER+:} false; then :
29533  $as_echo_n "(cached) " >&6
29534else
29535  case $JARSIGNER in
29536  [\\/]* | ?:[\\/]*)
29537  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29538  ;;
29539  *)
29540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29541for as_dir in $PATH
29542do
29543  IFS=$as_save_IFS
29544  test -z "$as_dir" && as_dir=.
29545    for ac_exec_ext in '' $ac_executable_extensions; do
29546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29547    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29549    break 2
29550  fi
29551done
29552  done
29553IFS=$as_save_IFS
29554
29555  ;;
29556esac
29557fi
29558JARSIGNER=$ac_cv_path_JARSIGNER
29559if test -n "$JARSIGNER"; then
29560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29561$as_echo "$JARSIGNER" >&6; }
29562else
29563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29564$as_echo "no" >&6; }
29565fi
29566
29567
29568          if test "x$JARSIGNER" = x; then
29569            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29570          fi
29571        else
29572          # Otherwise we believe it is a complete path. Use it as it is.
29573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29574$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29575          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29576$as_echo_n "checking for JARSIGNER... " >&6; }
29577          if test ! -x "$tool_specified"; then
29578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29579$as_echo "not found" >&6; }
29580            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29581          fi
29582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29583$as_echo "$tool_specified" >&6; }
29584        fi
29585      fi
29586    fi
29587
29588  fi
29589
29590
29591
29592  # Finally, set some other options...
29593
29594  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29595  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29596
29597
29598
29599  # Check if the boot jdk is 32 or 64 bit
29600  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29601    BOOT_JDK_BITS="64"
29602  else
29603    BOOT_JDK_BITS="32"
29604  fi
29605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29606$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29608$as_echo "$BOOT_JDK_BITS" >&6; }
29609
29610
29611
29612###############################################################################
29613#
29614# Configure the sources to use. We can add or override individual directories.
29615#
29616###############################################################################
29617
29618
29619  # Where are the sources.
29620  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29621  CORBA_TOPDIR="$SRC_ROOT/corba"
29622  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29623  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29624  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29625  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29626  JDK_TOPDIR="$SRC_ROOT/jdk"
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636  # This feature is no longer supported.
29637
29638
29639
29640# Check whether --with-add-source-root was given.
29641if test "${with_add_source_root+set}" = set; then :
29642  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
29643$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29644fi
29645
29646
29647
29648
29649# Check whether --with-override-source-root was given.
29650if test "${with_override_source_root+set}" = set; then :
29651  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
29652$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29653fi
29654
29655
29656
29657
29658# Check whether --with-adds-and-overrides was given.
29659if test "${with_adds_and_overrides+set}" = set; then :
29660  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
29661$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29662fi
29663
29664
29665
29666
29667# Check whether --with-override-langtools was given.
29668if test "${with_override_langtools+set}" = set; then :
29669  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29670$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29671fi
29672
29673
29674
29675
29676# Check whether --with-override-corba was given.
29677if test "${with_override_corba+set}" = set; then :
29678  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29679$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29680fi
29681
29682
29683
29684
29685# Check whether --with-override-jaxp was given.
29686if test "${with_override_jaxp+set}" = set; then :
29687  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29688$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29689fi
29690
29691
29692
29693
29694# Check whether --with-override-jaxws was given.
29695if test "${with_override_jaxws+set}" = set; then :
29696  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29697$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29698fi
29699
29700
29701
29702
29703# Check whether --with-override-hotspot was given.
29704if test "${with_override_hotspot+set}" = set; then :
29705  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29706$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29707fi
29708
29709
29710
29711
29712# Check whether --with-override-nashorn was given.
29713if test "${with_override_nashorn+set}" = set; then :
29714  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29715$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29716fi
29717
29718
29719
29720
29721# Check whether --with-override-jdk was given.
29722if test "${with_override_jdk+set}" = set; then :
29723  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29724$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29725fi
29726
29727
29728
29729
29730  BUILD_OUTPUT="$OUTPUT_ROOT"
29731
29732
29733  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29734  BUILD_HOTSPOT=true
29735
29736
29737
29738# Check whether --with-import-hotspot was given.
29739if test "${with_import_hotspot+set}" = set; then :
29740  withval=$with_import_hotspot;
29741fi
29742
29743  if test "x$with_import_hotspot" != x; then
29744    CURDIR="$PWD"
29745    cd "$with_import_hotspot"
29746    HOTSPOT_DIST="`pwd`"
29747    cd "$CURDIR"
29748    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29749      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29750    fi
29751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29752$as_echo_n "checking if hotspot should be imported... " >&6; }
29753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29754$as_echo "yes from $HOTSPOT_DIST" >&6; }
29755    BUILD_HOTSPOT=false
29756  fi
29757
29758  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29759
29760
29761###############################################################################
29762#
29763# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29764# native code.
29765#
29766###############################################################################
29767
29768# See if we are doing a complete static build or not
29769
29770  # Check whether --enable-static-build was given.
29771if test "${enable_static_build+set}" = set; then :
29772  enableval=$enable_static_build;
29773fi
29774
29775  STATIC_BUILD=false
29776  if test "x$enable_static_build" = "xyes"; then
29777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29778$as_echo_n "checking if static build is enabled... " >&6; }
29779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29780$as_echo "yes" >&6; }
29781    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29782      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29783    fi
29784    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29785    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29786    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29787    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29788    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29789    STATIC_BUILD=true
29790  elif test "x$enable_static_build" = "xno"; then
29791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29792$as_echo_n "checking if static build is enabled... " >&6; }
29793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29794$as_echo "no" >&6; }
29795  elif test "x$enable_static_build" != "x"; then
29796    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29797  fi
29798
29799
29800
29801
29802# First determine the toolchain type (compiler family)
29803
29804
29805# Check whether --with-toolchain-type was given.
29806if test "${with_toolchain_type+set}" = set; then :
29807  withval=$with_toolchain_type;
29808fi
29809
29810
29811  # Use indirect variable referencing
29812  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29813  VALID_TOOLCHAINS=${!toolchain_var_name}
29814
29815  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29816    if test -n "$XCODEBUILD"; then
29817      # On Mac OS X, default toolchain to clang after Xcode 5
29818      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29819      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29820      if test $? -ne 0; then
29821        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29822      fi
29823      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29824          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29825          $CUT -f 1 -d .`
29826      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29827$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29828      if test $XCODE_MAJOR_VERSION -ge 5; then
29829          DEFAULT_TOOLCHAIN="clang"
29830      else
29831          DEFAULT_TOOLCHAIN="gcc"
29832      fi
29833    else
29834      # If Xcode is not installed, but the command line tools are
29835      # then we can't run xcodebuild. On these systems we should
29836      # default to clang
29837      DEFAULT_TOOLCHAIN="clang"
29838    fi
29839  else
29840    # First toolchain type in the list is the default
29841    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29842  fi
29843
29844  if test "x$with_toolchain_type" = xlist; then
29845    # List all toolchains
29846    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29847$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29848    for toolchain in $VALID_TOOLCHAINS; do
29849      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29850      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29851      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29852    done
29853
29854    exit 0
29855  elif test "x$with_toolchain_type" != x; then
29856    # User override; check that it is valid
29857    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29858      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29859$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29860      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29861$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29862      as_fn_error $? "Cannot continue." "$LINENO" 5
29863    fi
29864    TOOLCHAIN_TYPE=$with_toolchain_type
29865  else
29866    # No flag given, use default
29867    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29868  fi
29869
29870
29871  TOOLCHAIN_CC_BINARY_clang="clang"
29872  TOOLCHAIN_CC_BINARY_gcc="gcc"
29873  TOOLCHAIN_CC_BINARY_microsoft="cl"
29874  TOOLCHAIN_CC_BINARY_solstudio="cc"
29875  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29876
29877  TOOLCHAIN_CXX_BINARY_clang="clang++"
29878  TOOLCHAIN_CXX_BINARY_gcc="g++"
29879  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29880  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29881  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29882
29883  # Use indirect variable referencing
29884  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29885  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29886  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
29887  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
29888  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29889  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29890  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29891  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29892
29893
29894  # Define filename patterns
29895  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29896    LIBRARY_PREFIX=
29897    SHARED_LIBRARY_SUFFIX='.dll'
29898    STATIC_LIBRARY_SUFFIX='.lib'
29899    SHARED_LIBRARY='$1.dll'
29900    STATIC_LIBRARY='$1.lib'
29901    OBJ_SUFFIX='.obj'
29902    EXE_SUFFIX='.exe'
29903  else
29904    LIBRARY_PREFIX=lib
29905    SHARED_LIBRARY_SUFFIX='.so'
29906    STATIC_LIBRARY_SUFFIX='.a'
29907    SHARED_LIBRARY='lib$1.so'
29908    STATIC_LIBRARY='lib$1.a'
29909    OBJ_SUFFIX='.o'
29910    EXE_SUFFIX=''
29911    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29912      # For full static builds, we're overloading the SHARED_LIBRARY
29913      # variables in order to limit the amount of changes required.
29914      # It would be better to remove SHARED and just use LIBRARY and
29915      # LIBRARY_SUFFIX for libraries that can be built either
29916      # shared or static and use STATIC_* for libraries that are
29917      # always built statically.
29918      if test "x$STATIC_BUILD" = xtrue; then
29919        SHARED_LIBRARY='lib$1.a'
29920        SHARED_LIBRARY_SUFFIX='.a'
29921      else
29922        SHARED_LIBRARY='lib$1.dylib'
29923        SHARED_LIBRARY_SUFFIX='.dylib'
29924      fi
29925    fi
29926  fi
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29938    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29939$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29940  else
29941    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29942$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29943  fi
29944
29945
29946# User supplied flags should be used when configure detects compilers
29947
29948  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29949    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29950$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29951  fi
29952
29953  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29954    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29955$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29956  fi
29957
29958  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29959    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29960$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29961  fi
29962
29963
29964# Check whether --with-extra-cflags was given.
29965if test "${with_extra_cflags+set}" = set; then :
29966  withval=$with_extra_cflags;
29967fi
29968
29969
29970
29971# Check whether --with-extra-cxxflags was given.
29972if test "${with_extra_cxxflags+set}" = set; then :
29973  withval=$with_extra_cxxflags;
29974fi
29975
29976
29977
29978# Check whether --with-extra-ldflags was given.
29979if test "${with_extra_ldflags+set}" = set; then :
29980  withval=$with_extra_ldflags;
29981fi
29982
29983
29984  EXTRA_CFLAGS="$with_extra_cflags"
29985  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29986  EXTRA_LDFLAGS="$with_extra_ldflags"
29987
29988  # Hotspot needs these set in their legacy form
29989  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29990  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29991  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29992
29993
29994
29995
29996
29997  # The global CFLAGS and LDLAGS variables are used by configure tests and
29998  # should include the extra parameters
29999  CFLAGS="$EXTRA_CFLAGS"
30000  CXXFLAGS="$EXTRA_CXXFLAGS"
30001  LDFLAGS="$EXTRA_LDFLAGS"
30002  CPPFLAGS=""
30003
30004# The sysroot cflags are needed for configure to be able to run the compilers
30005
30006  if test "x$SYSROOT" != "x"; then
30007    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30008      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30009        # Solaris Studio does not have a concept of sysroot. Instead we must
30010        # make sure the default include and lib dirs are appended to each
30011        # compile and link command line. Must also add -I-xbuiltin to enable
30012        # inlining of system functions and intrinsics.
30013        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30014        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30015            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30016            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30017      fi
30018    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30019      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30020      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30021    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30022      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30023      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30024    fi
30025    # Propagate the sysroot args to hotspot
30026    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30027    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30028    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30029    # The global CFLAGS and LDFLAGS variables need these for configure to function
30030    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30031    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30032    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30033    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30034  fi
30035
30036  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30037    # We also need -iframework<path>/System/Library/Frameworks
30038    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30039    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30040    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30041    # set this here so it doesn't have to be peppered throughout the forest
30042    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30043    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30044  fi
30045
30046
30047
30048
30049
30050# Then detect the actual binaries needed
30051
30052  # FIXME: Is this needed?
30053  ac_ext=cpp
30054ac_cpp='$CXXCPP $CPPFLAGS'
30055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30058
30059
30060  # Store the CFLAGS etc passed to the configure script.
30061  ORG_CFLAGS="$CFLAGS"
30062  ORG_CXXFLAGS="$CXXFLAGS"
30063
30064  # autoconf magic only relies on PATH, so update it if tools dir is specified
30065  OLD_PATH="$PATH"
30066
30067  # On Windows, we need to detect the visual studio installation first.
30068  # This will change the PATH, but we need to keep that new PATH even
30069  # after toolchain detection is done, since the compiler (on x86) uses
30070  # it for DLL resolution in runtime.
30071  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30072      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30073
30074  # Store path to cygwin link.exe to help excluding it when searching for
30075  # VS linker. This must be done before changing the PATH when looking for VS.
30076  # Extract the first word of "link", so it can be a program name with args.
30077set dummy link; ac_word=$2
30078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30079$as_echo_n "checking for $ac_word... " >&6; }
30080if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30081  $as_echo_n "(cached) " >&6
30082else
30083  case $CYGWIN_LINK in
30084  [\\/]* | ?:[\\/]*)
30085  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30086  ;;
30087  *)
30088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30089for as_dir in $PATH
30090do
30091  IFS=$as_save_IFS
30092  test -z "$as_dir" && as_dir=.
30093    for ac_exec_ext in '' $ac_executable_extensions; do
30094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30095    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30097    break 2
30098  fi
30099done
30100  done
30101IFS=$as_save_IFS
30102
30103  ;;
30104esac
30105fi
30106CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30107if test -n "$CYGWIN_LINK"; then
30108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30109$as_echo "$CYGWIN_LINK" >&6; }
30110else
30111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30112$as_echo "no" >&6; }
30113fi
30114
30115
30116  if test "x$CYGWIN_LINK" != x; then
30117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30118$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30119    "$CYGWIN_LINK" --version > /dev/null
30120    if test $? -eq 0 ; then
30121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30122$as_echo "yes" >&6; }
30123    else
30124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30125$as_echo "no" >&6; }
30126      # This might be the VS linker. Don't exclude it later on.
30127      CYGWIN_LINK=""
30128    fi
30129  fi
30130
30131  # First-hand choice is to locate and run the vsvars bat file.
30132
30133
30134# Check whether --with-toolchain-version was given.
30135if test "${with_toolchain_version+set}" = set; then :
30136  withval=$with_toolchain_version;
30137fi
30138
30139
30140  if test "x$with_toolchain_version" = xlist; then
30141    # List all toolchains
30142    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30143$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30144    for version in $VALID_VS_VERSIONS; do
30145      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30146      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30147    done
30148
30149    exit 0
30150  elif test "x$DEVKIT_VS_VERSION" != x; then
30151    VS_VERSION=$DEVKIT_VS_VERSION
30152    TOOLCHAIN_VERSION=$VS_VERSION
30153    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30154    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30155    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30156    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30157    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30158    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30159
30160    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30161    # can still be exported as INCLUDE for compiler invocations without
30162    # SYSROOT_CFLAGS
30163    OLDIFS="$IFS"
30164    IFS=";"
30165    for i in $DEVKIT_VS_INCLUDE; do
30166      ipath=$i
30167
30168  unix_path="$ipath"
30169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30170    windows_path=`$CYGPATH -m "$unix_path"`
30171    ipath="$windows_path"
30172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30173    windows_path=`cmd //c echo $unix_path`
30174    ipath="$windows_path"
30175  fi
30176
30177      VS_INCLUDE="$VS_INCLUDE;$ipath"
30178    done
30179    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30180    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30181    for i in $DEVKIT_VS_LIB; do
30182      libpath=$i
30183
30184  unix_path="$libpath"
30185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30186    windows_path=`$CYGPATH -m "$unix_path"`
30187    libpath="$windows_path"
30188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30189    windows_path=`cmd //c echo $unix_path`
30190    libpath="$windows_path"
30191  fi
30192
30193      VS_LIB="$VS_LIB;$libpath"
30194    done
30195    IFS="$OLDIFS"
30196
30197    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30198$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30199
30200  elif test "x$with_toolchain_version" != x; then
30201    # User override; check that it is valid
30202    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30203      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30204$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30205      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30206$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30207      as_fn_error $? "Cannot continue." "$LINENO" 5
30208    fi
30209    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30210  else
30211    # No flag given, use default
30212    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30213  fi
30214
30215  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30216
30217  VS_VERSION="$VS_VERSION"
30218  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30219  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30220  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30221  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30222
30223  # When using --with-tools-dir, assume it points to the correct and default
30224  # version of Visual Studio or that --with-toolchain-version was also set.
30225  if test "x$with_tools_dir" != x; then
30226
30227  if test "x$VS_ENV_CMD" = x; then
30228    VS_VERSION="${VS_VERSION}"
30229    VS_BASE="$with_tools_dir/../.."
30230    METHOD="--with-tools-dir"
30231
30232    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30233      VCVARSFILE="vc/bin/vcvars32.bat"
30234    else
30235      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30236    fi
30237
30238
30239  windows_path="$VS_BASE"
30240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30241    unix_path=`$CYGPATH -u "$windows_path"`
30242    VS_BASE="$unix_path"
30243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30245    VS_BASE="$unix_path"
30246  fi
30247
30248    if test -d "$VS_BASE"; then
30249      if test -f "$VS_BASE/$VCVARSFILE"; then
30250        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30251$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30252        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30253        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30254        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30255        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30256      else
30257        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30258$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30259        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30260$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30261      fi
30262    fi
30263  fi
30264
30265
30266  if test "x$VS_ENV_CMD" = x; then
30267    VS_VERSION="${VS_VERSION}"
30268    VS_BASE="$with_tools_dir/../../.."
30269    METHOD="--with-tools-dir"
30270
30271    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30272      VCVARSFILE="vc/bin/vcvars32.bat"
30273    else
30274      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30275    fi
30276
30277
30278  windows_path="$VS_BASE"
30279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30280    unix_path=`$CYGPATH -u "$windows_path"`
30281    VS_BASE="$unix_path"
30282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30284    VS_BASE="$unix_path"
30285  fi
30286
30287    if test -d "$VS_BASE"; then
30288      if test -f "$VS_BASE/$VCVARSFILE"; then
30289        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30290$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30291        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30292        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30293        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30294        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30295      else
30296        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30297$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30298        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30299$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30300      fi
30301    fi
30302  fi
30303
30304    if test "x$VS_ENV_CMD" = x; then
30305      # Having specified an argument which is incorrect will produce an instant failure;
30306      # we should not go on looking
30307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30308$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30310$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30311      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30312$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30313      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30314    fi
30315  fi
30316
30317  VS_ENV_CMD=""
30318  VS_ENV_ARGS=""
30319
30320  if test "x$VS_COMNTOOLS" != x; then
30321
30322  if test "x$VS_ENV_CMD" = x; then
30323    VS_VERSION="${VS_VERSION}"
30324    VS_BASE="$VS_COMNTOOLS/../.."
30325    METHOD="$VS_COMNTOOLS_VAR variable"
30326
30327    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30328      VCVARSFILE="vc/bin/vcvars32.bat"
30329    else
30330      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30331    fi
30332
30333
30334  windows_path="$VS_BASE"
30335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30336    unix_path=`$CYGPATH -u "$windows_path"`
30337    VS_BASE="$unix_path"
30338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30340    VS_BASE="$unix_path"
30341  fi
30342
30343    if test -d "$VS_BASE"; then
30344      if test -f "$VS_BASE/$VCVARSFILE"; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30346$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30347        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30348        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30349        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30350        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30351      else
30352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30353$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30354        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30355$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30356      fi
30357    fi
30358  fi
30359
30360  fi
30361  if test "x$PROGRAMFILES" != x; then
30362
30363  if test "x$VS_ENV_CMD" = x; then
30364    VS_VERSION="${VS_VERSION}"
30365    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30366    METHOD="well-known name"
30367
30368    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30369      VCVARSFILE="vc/bin/vcvars32.bat"
30370    else
30371      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30372    fi
30373
30374
30375  windows_path="$VS_BASE"
30376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30377    unix_path=`$CYGPATH -u "$windows_path"`
30378    VS_BASE="$unix_path"
30379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30381    VS_BASE="$unix_path"
30382  fi
30383
30384    if test -d "$VS_BASE"; then
30385      if test -f "$VS_BASE/$VCVARSFILE"; then
30386        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30387$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30388        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30389        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30390        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30391        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30392      else
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30394$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30395        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30396$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30397      fi
30398    fi
30399  fi
30400
30401  fi
30402  # Work around the insanely named ProgramFiles(x86) env variable
30403  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30404  if test "x$PROGRAMFILES_X86" != x; then
30405
30406  if test "x$VS_ENV_CMD" = x; then
30407    VS_VERSION="${VS_VERSION}"
30408    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30409    METHOD="well-known name"
30410
30411    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30412      VCVARSFILE="vc/bin/vcvars32.bat"
30413    else
30414      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30415    fi
30416
30417
30418  windows_path="$VS_BASE"
30419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30420    unix_path=`$CYGPATH -u "$windows_path"`
30421    VS_BASE="$unix_path"
30422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30424    VS_BASE="$unix_path"
30425  fi
30426
30427    if test -d "$VS_BASE"; then
30428      if test -f "$VS_BASE/$VCVARSFILE"; then
30429        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30430$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30431        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30432        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30433        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30434        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30435      else
30436        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30437$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30438        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30439$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30440      fi
30441    fi
30442  fi
30443
30444  fi
30445
30446  if test "x$VS_ENV_CMD" = x; then
30447    VS_VERSION="${VS_VERSION}"
30448    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30449    METHOD="well-known name"
30450
30451    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30452      VCVARSFILE="vc/bin/vcvars32.bat"
30453    else
30454      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30455    fi
30456
30457
30458  windows_path="$VS_BASE"
30459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30460    unix_path=`$CYGPATH -u "$windows_path"`
30461    VS_BASE="$unix_path"
30462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30464    VS_BASE="$unix_path"
30465  fi
30466
30467    if test -d "$VS_BASE"; then
30468      if test -f "$VS_BASE/$VCVARSFILE"; then
30469        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30470$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30471        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30472        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30473        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30474        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30475      else
30476        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30477$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30479$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30480      fi
30481    fi
30482  fi
30483
30484
30485  if test "x$VS_ENV_CMD" = x; then
30486    VS_VERSION="${VS_VERSION}"
30487    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30488    METHOD="well-known name"
30489
30490    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30491      VCVARSFILE="vc/bin/vcvars32.bat"
30492    else
30493      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30494    fi
30495
30496
30497  windows_path="$VS_BASE"
30498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30499    unix_path=`$CYGPATH -u "$windows_path"`
30500    VS_BASE="$unix_path"
30501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30503    VS_BASE="$unix_path"
30504  fi
30505
30506    if test -d "$VS_BASE"; then
30507      if test -f "$VS_BASE/$VCVARSFILE"; then
30508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30509$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30510        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30511        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30512        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30513        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30514      else
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30516$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30518$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30519      fi
30520    fi
30521  fi
30522
30523
30524  if test "x$SDK_INSTALL_DIR" != x; then
30525    if test "x$ProgramW6432" != x; then
30526
30527  if test "x$VS_ENV_CMD" = x; then
30528    VS_VERSION="${VS_VERSION}"
30529    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30530    METHOD="well-known name"
30531
30532  windows_path="$WIN_SDK_BASE"
30533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30534    unix_path=`$CYGPATH -u "$windows_path"`
30535    WIN_SDK_BASE="$unix_path"
30536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30538    WIN_SDK_BASE="$unix_path"
30539  fi
30540
30541    if test -d "$WIN_SDK_BASE"; then
30542      # There have been cases of partial or broken SDK installations. A missing
30543      # lib dir is not going to work.
30544      if test ! -d "$WIN_SDK_BASE/lib"; then
30545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30546$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30548$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30549      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30550        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30551$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30552        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30553        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30554          VS_ENV_ARGS="/x86"
30555        else
30556          VS_ENV_ARGS="/x64"
30557        fi
30558        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30559        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30560        # TODO: improve detection for other versions of SDK
30561        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30562      else
30563        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30564$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30565        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30566$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30567      fi
30568    fi
30569  fi
30570
30571    fi
30572    if test "x$PROGRAMW6432" != x; then
30573
30574  if test "x$VS_ENV_CMD" = x; then
30575    VS_VERSION="${VS_VERSION}"
30576    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30577    METHOD="well-known name"
30578
30579  windows_path="$WIN_SDK_BASE"
30580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30581    unix_path=`$CYGPATH -u "$windows_path"`
30582    WIN_SDK_BASE="$unix_path"
30583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30585    WIN_SDK_BASE="$unix_path"
30586  fi
30587
30588    if test -d "$WIN_SDK_BASE"; then
30589      # There have been cases of partial or broken SDK installations. A missing
30590      # lib dir is not going to work.
30591      if test ! -d "$WIN_SDK_BASE/lib"; then
30592        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30593$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30594        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30595$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30596      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30598$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30599        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30600        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30601          VS_ENV_ARGS="/x86"
30602        else
30603          VS_ENV_ARGS="/x64"
30604        fi
30605        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30606        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30607        # TODO: improve detection for other versions of SDK
30608        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30609      else
30610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30611$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30613$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30614      fi
30615    fi
30616  fi
30617
30618    fi
30619    if test "x$PROGRAMFILES" != x; then
30620
30621  if test "x$VS_ENV_CMD" = x; then
30622    VS_VERSION="${VS_VERSION}"
30623    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30624    METHOD="well-known name"
30625
30626  windows_path="$WIN_SDK_BASE"
30627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30628    unix_path=`$CYGPATH -u "$windows_path"`
30629    WIN_SDK_BASE="$unix_path"
30630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30632    WIN_SDK_BASE="$unix_path"
30633  fi
30634
30635    if test -d "$WIN_SDK_BASE"; then
30636      # There have been cases of partial or broken SDK installations. A missing
30637      # lib dir is not going to work.
30638      if test ! -d "$WIN_SDK_BASE/lib"; then
30639        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30640$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30641        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30642$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30643      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30646        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30647        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30648          VS_ENV_ARGS="/x86"
30649        else
30650          VS_ENV_ARGS="/x64"
30651        fi
30652        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30653        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30654        # TODO: improve detection for other versions of SDK
30655        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30656      else
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30658$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30660$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30661      fi
30662    fi
30663  fi
30664
30665    fi
30666
30667  if test "x$VS_ENV_CMD" = x; then
30668    VS_VERSION="${VS_VERSION}"
30669    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30670    METHOD="well-known name"
30671
30672  windows_path="$WIN_SDK_BASE"
30673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30674    unix_path=`$CYGPATH -u "$windows_path"`
30675    WIN_SDK_BASE="$unix_path"
30676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30678    WIN_SDK_BASE="$unix_path"
30679  fi
30680
30681    if test -d "$WIN_SDK_BASE"; then
30682      # There have been cases of partial or broken SDK installations. A missing
30683      # lib dir is not going to work.
30684      if test ! -d "$WIN_SDK_BASE/lib"; then
30685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30686$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30687        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30688$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30689      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30690        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30691$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30692        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30693        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30694          VS_ENV_ARGS="/x86"
30695        else
30696          VS_ENV_ARGS="/x64"
30697        fi
30698        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30699        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30700        # TODO: improve detection for other versions of SDK
30701        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30702      else
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30706$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30707      fi
30708    fi
30709  fi
30710
30711
30712  if test "x$VS_ENV_CMD" = x; then
30713    VS_VERSION="${VS_VERSION}"
30714    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30715    METHOD="well-known name"
30716
30717  windows_path="$WIN_SDK_BASE"
30718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30719    unix_path=`$CYGPATH -u "$windows_path"`
30720    WIN_SDK_BASE="$unix_path"
30721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30723    WIN_SDK_BASE="$unix_path"
30724  fi
30725
30726    if test -d "$WIN_SDK_BASE"; then
30727      # There have been cases of partial or broken SDK installations. A missing
30728      # lib dir is not going to work.
30729      if test ! -d "$WIN_SDK_BASE/lib"; then
30730        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30731$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30732        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30733$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30734      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30735        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30736$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30737        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30738        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30739          VS_ENV_ARGS="/x86"
30740        else
30741          VS_ENV_ARGS="/x64"
30742        fi
30743        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30744        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30745        # TODO: improve detection for other versions of SDK
30746        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30747      else
30748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30749$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30750        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30751$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30752      fi
30753    fi
30754  fi
30755
30756  fi
30757
30758    if test "x$VS_ENV_CMD" != x; then
30759      TOOLCHAIN_VERSION=$VS_VERSION
30760      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30761      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30762      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30763      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30764      # The rest of the variables are already evaled while probing
30765      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30766$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30767      break
30768    fi
30769  done
30770
30771
30772  # If we have a devkit, skip all of the below.
30773  if test "x$DEVKIT_VS_VERSION" = x; then
30774    if test "x$VS_ENV_CMD" != x; then
30775      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30776
30777  # Only process if variable expands to non-empty
30778
30779  if test "x$VS_ENV_CMD" != x; then
30780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30781
30782  # First separate the path from the arguments. This will split at the first
30783  # space.
30784  complete="$VS_ENV_CMD"
30785  path="${complete%% *}"
30786  tmp="$complete EOL"
30787  arguments="${tmp#* }"
30788
30789  # Input might be given as Windows format, start by converting to
30790  # unix format.
30791  new_path=`$CYGPATH -u "$path"`
30792
30793  # Now try to locate executable using which
30794  new_path=`$WHICH "$new_path" 2> /dev/null`
30795  # bat and cmd files are not always considered executable in cygwin causing which
30796  # to not find them
30797  if test "x$new_path" = x \
30798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30800    new_path=`$CYGPATH -u "$path"`
30801  fi
30802  if test "x$new_path" = x; then
30803    # Oops. Which didn't find the executable.
30804    # The splitting of arguments from the executable at a space might have been incorrect,
30805    # since paths with space are more likely in Windows. Give it another try with the whole
30806    # argument.
30807    path="$complete"
30808    arguments="EOL"
30809    new_path=`$CYGPATH -u "$path"`
30810    new_path=`$WHICH "$new_path" 2> /dev/null`
30811    # bat and cmd files are not always considered executable in cygwin causing which
30812    # to not find them
30813    if test "x$new_path" = x \
30814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30816      new_path=`$CYGPATH -u "$path"`
30817    fi
30818    if test "x$new_path" = x; then
30819      # It's still not found. Now this is an unrecoverable error.
30820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30821$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30822      has_space=`$ECHO "$complete" | $GREP " "`
30823      if test "x$has_space" != x; then
30824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30826      fi
30827      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30828    fi
30829  fi
30830
30831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30834  # "foo.exe" is OK but "foo" is an error.
30835  #
30836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30837  # It is also a way to make sure we got the proper file name for the real test later on.
30838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30839  if test "x$test_shortpath" = x; then
30840    # Short path failed, file does not exist as specified.
30841    # Try adding .exe or .cmd
30842    if test -f "${new_path}.exe"; then
30843      input_to_shortpath="${new_path}.exe"
30844    elif test -f "${new_path}.cmd"; then
30845      input_to_shortpath="${new_path}.cmd"
30846    else
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30848$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30851      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30852    fi
30853  else
30854    input_to_shortpath="$new_path"
30855  fi
30856
30857  # Call helper function which possibly converts this using DOS-style short mode.
30858  # If so, the updated path is stored in $new_path.
30859  new_path="$input_to_shortpath"
30860
30861  input_path="$input_to_shortpath"
30862  # Check if we need to convert this using DOS-style short mode. If the path
30863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30864  # take no chances and rewrite it.
30865  # Note: m4 eats our [], so we need to use [ and ] instead.
30866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30867  if test "x$has_forbidden_chars" != x; then
30868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30872      # Going to short mode and back again did indeed matter. Since short mode is
30873      # case insensitive, let's make it lowercase to improve readability.
30874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30875      # Now convert it back to Unix-style (cygpath)
30876      input_path=`$CYGPATH -u "$shortmode_path"`
30877      new_path="$input_path"
30878    fi
30879  fi
30880
30881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30882  if test "x$test_cygdrive_prefix" = x; then
30883    # As a simple fix, exclude /usr/bin since it's not a real path.
30884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30886      # a path prefixed by /cygdrive for fixpath to work.
30887      new_path="$CYGWIN_ROOT_PATH$input_path"
30888    fi
30889  fi
30890
30891  # remove trailing .exe if any
30892  new_path="${new_path/%.exe/}"
30893
30894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30895
30896  # First separate the path from the arguments. This will split at the first
30897  # space.
30898  complete="$VS_ENV_CMD"
30899  path="${complete%% *}"
30900  tmp="$complete EOL"
30901  arguments="${tmp#* }"
30902
30903  # Input might be given as Windows format, start by converting to
30904  # unix format.
30905  new_path="$path"
30906
30907  windows_path="$new_path"
30908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30909    unix_path=`$CYGPATH -u "$windows_path"`
30910    new_path="$unix_path"
30911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30913    new_path="$unix_path"
30914  fi
30915
30916
30917  # Now try to locate executable using which
30918  new_path=`$WHICH "$new_path" 2> /dev/null`
30919
30920  if test "x$new_path" = x; then
30921    # Oops. Which didn't find the executable.
30922    # The splitting of arguments from the executable at a space might have been incorrect,
30923    # since paths with space are more likely in Windows. Give it another try with the whole
30924    # argument.
30925    path="$complete"
30926    arguments="EOL"
30927    new_path="$path"
30928
30929  windows_path="$new_path"
30930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30931    unix_path=`$CYGPATH -u "$windows_path"`
30932    new_path="$unix_path"
30933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30935    new_path="$unix_path"
30936  fi
30937
30938
30939    new_path=`$WHICH "$new_path" 2> /dev/null`
30940    # bat and cmd files are not always considered executable in MSYS causing which
30941    # to not find them
30942    if test "x$new_path" = x \
30943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30945      new_path="$path"
30946
30947  windows_path="$new_path"
30948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30949    unix_path=`$CYGPATH -u "$windows_path"`
30950    new_path="$unix_path"
30951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30953    new_path="$unix_path"
30954  fi
30955
30956    fi
30957
30958    if test "x$new_path" = x; then
30959      # It's still not found. Now this is an unrecoverable error.
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30961$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30962      has_space=`$ECHO "$complete" | $GREP " "`
30963      if test "x$has_space" != x; then
30964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30966      fi
30967      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30968    fi
30969  fi
30970
30971  # Now new_path has a complete unix path to the binary
30972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30973    # Keep paths in /bin as-is, but remove trailing .exe if any
30974    new_path="${new_path/%.exe/}"
30975    # Do not save /bin paths to all_fixpath_prefixes!
30976  else
30977    # Not in mixed or Windows style, start by that.
30978    new_path=`cmd //c echo $new_path`
30979
30980  input_path="$new_path"
30981  # Check if we need to convert this using DOS-style short mode. If the path
30982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30983  # take no chances and rewrite it.
30984  # Note: m4 eats our [], so we need to use [ and ] instead.
30985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30986  if test "x$has_forbidden_chars" != x; then
30987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30989  fi
30990
30991    # Output is in $new_path
30992
30993  windows_path="$new_path"
30994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30995    unix_path=`$CYGPATH -u "$windows_path"`
30996    new_path="$unix_path"
30997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30999    new_path="$unix_path"
31000  fi
31001
31002    # remove trailing .exe if any
31003    new_path="${new_path/%.exe/}"
31004
31005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31007  fi
31008
31009    else
31010      # We're on a unix platform. Hooray! :)
31011      # First separate the path from the arguments. This will split at the first
31012      # space.
31013      complete="$VS_ENV_CMD"
31014      path="${complete%% *}"
31015      tmp="$complete EOL"
31016      arguments="${tmp#* }"
31017
31018      # Cannot rely on the command "which" here since it doesn't always work.
31019      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31020      if test -z "$is_absolute_path"; then
31021        # Path to executable is not absolute. Find it.
31022        IFS_save="$IFS"
31023        IFS=:
31024        for p in $PATH; do
31025          if test -f "$p/$path" && test -x "$p/$path"; then
31026            new_path="$p/$path"
31027            break
31028          fi
31029        done
31030        IFS="$IFS_save"
31031      else
31032        # This is an absolute path, we can use it without further modifications.
31033        new_path="$path"
31034      fi
31035
31036      if test "x$new_path" = x; then
31037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31038$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31039        has_space=`$ECHO "$complete" | $GREP " "`
31040        if test "x$has_space" != x; then
31041          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31043        fi
31044        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31045      fi
31046    fi
31047
31048    # Now join together the path and the arguments once again
31049    if test "x$arguments" != xEOL; then
31050      new_complete="$new_path ${arguments% *}"
31051    else
31052      new_complete="$new_path"
31053    fi
31054
31055    if test "x$complete" != "x$new_complete"; then
31056      VS_ENV_CMD="$new_complete"
31057      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31058$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31059    fi
31060  fi
31061
31062
31063      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31064      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31065$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31066
31067      # We need to create a couple of temporary files.
31068      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31069      $MKDIR -p $VS_ENV_TMP_DIR
31070
31071      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31072      # Instead create a shell script which will set the relevant variables when run.
31073      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31074
31075  unix_path="$WINPATH_VS_ENV_CMD"
31076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31077    windows_path=`$CYGPATH -m "$unix_path"`
31078    WINPATH_VS_ENV_CMD="$windows_path"
31079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31080    windows_path=`cmd //c echo $unix_path`
31081    WINPATH_VS_ENV_CMD="$windows_path"
31082  fi
31083
31084      WINPATH_BASH="$BASH"
31085
31086  unix_path="$WINPATH_BASH"
31087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31088    windows_path=`$CYGPATH -m "$unix_path"`
31089    WINPATH_BASH="$windows_path"
31090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31091    windows_path=`cmd //c echo $unix_path`
31092    WINPATH_BASH="$windows_path"
31093  fi
31094
31095
31096      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31097      # script (executable by bash) that will setup the important variables.
31098      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31099      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31100      # This will end up something like:
31101      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31102      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31103      # These will end up something like:
31104      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31105      # The trailing space for everyone except PATH is no typo, but is needed due
31106      # to trailing \ in the Windows paths. These will be stripped later.
31107      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31108          >> $EXTRACT_VC_ENV_BAT_FILE
31109      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31110          >> $EXTRACT_VC_ENV_BAT_FILE
31111      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31112          >> $EXTRACT_VC_ENV_BAT_FILE
31113      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31114          >> $EXTRACT_VC_ENV_BAT_FILE
31115      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31116          >> $EXTRACT_VC_ENV_BAT_FILE
31117      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31118          >> $EXTRACT_VC_ENV_BAT_FILE
31119
31120      # Now execute the newly created bat file.
31121      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31122      # Change directory so we don't need to mess with Windows paths in redirects.
31123      cd $VS_ENV_TMP_DIR
31124      cmd /c extract-vs-env.bat | $CAT
31125      cd $CURDIR
31126
31127      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31128        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31129$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31130        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31131$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31132        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31133$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31134        as_fn_error $? "Cannot continue" "$LINENO" 5
31135      fi
31136
31137      # Now set all paths and other env variables. This will allow the rest of
31138      # the configure script to find and run the compiler in the proper way.
31139      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31140$as_echo "$as_me: Setting extracted environment variables" >&6;}
31141      . $VS_ENV_TMP_DIR/set-vs-env.sh
31142      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31143      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31144    else
31145      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31146      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31147$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31148    fi
31149  fi
31150
31151  # At this point, we should have correct variables in the environment, or we can't continue.
31152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31153$as_echo_n "checking for Visual Studio variables... " >&6; }
31154
31155  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31156      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31157    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31159$as_echo "present but broken" >&6; }
31160      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31161    else
31162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31163$as_echo "ok" >&6; }
31164      # Remove any trailing "\" ";" and " " from the variables.
31165      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31166      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31167      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31168      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31169      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31170      # Remove any paths containing # (typically F#) as that messes up make. This
31171      # is needed if visual studio was installed with F# support.
31172      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31173
31174
31175
31176
31177
31178      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31179      OLDIFS="$IFS"
31180      IFS=";"
31181      for i in $VS_INCLUDE; do
31182        ipath=$i
31183        # Only process non-empty elements
31184        if test "x$ipath" != x; then
31185          IFS="$OLDIFS"
31186          # Check that directory exists before calling fixup_path
31187          testpath=$ipath
31188
31189  windows_path="$testpath"
31190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31191    unix_path=`$CYGPATH -u "$windows_path"`
31192    testpath="$unix_path"
31193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31195    testpath="$unix_path"
31196  fi
31197
31198          if test -d "$testpath"; then
31199
31200  # Only process if variable expands to non-empty
31201
31202  if test "x$ipath" != x; then
31203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31204
31205  # Input might be given as Windows format, start by converting to
31206  # unix format.
31207  path="$ipath"
31208  new_path=`$CYGPATH -u "$path"`
31209
31210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31213  # "foo.exe" is OK but "foo" is an error.
31214  #
31215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31216  # It is also a way to make sure we got the proper file name for the real test later on.
31217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31218  if test "x$test_shortpath" = x; then
31219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31220$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31221    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31222  fi
31223
31224  # Call helper function which possibly converts this using DOS-style short mode.
31225  # If so, the updated path is stored in $new_path.
31226
31227  input_path="$new_path"
31228  # Check if we need to convert this using DOS-style short mode. If the path
31229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31230  # take no chances and rewrite it.
31231  # Note: m4 eats our [], so we need to use [ and ] instead.
31232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31233  if test "x$has_forbidden_chars" != x; then
31234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31238      # Going to short mode and back again did indeed matter. Since short mode is
31239      # case insensitive, let's make it lowercase to improve readability.
31240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31241      # Now convert it back to Unix-style (cygpath)
31242      input_path=`$CYGPATH -u "$shortmode_path"`
31243      new_path="$input_path"
31244    fi
31245  fi
31246
31247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31248  if test "x$test_cygdrive_prefix" = x; then
31249    # As a simple fix, exclude /usr/bin since it's not a real path.
31250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31252      # a path prefixed by /cygdrive for fixpath to work.
31253      new_path="$CYGWIN_ROOT_PATH$input_path"
31254    fi
31255  fi
31256
31257
31258  if test "x$path" != "x$new_path"; then
31259    ipath="$new_path"
31260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31261$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31262  fi
31263
31264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31265
31266  path="$ipath"
31267  has_colon=`$ECHO $path | $GREP ^.:`
31268  new_path="$path"
31269  if test "x$has_colon" = x; then
31270    # Not in mixed or Windows style, start by that.
31271    new_path=`cmd //c echo $path`
31272  fi
31273
31274
31275  input_path="$new_path"
31276  # Check if we need to convert this using DOS-style short mode. If the path
31277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31278  # take no chances and rewrite it.
31279  # Note: m4 eats our [], so we need to use [ and ] instead.
31280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31281  if test "x$has_forbidden_chars" != x; then
31282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31284  fi
31285
31286
31287  windows_path="$new_path"
31288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31289    unix_path=`$CYGPATH -u "$windows_path"`
31290    new_path="$unix_path"
31291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31293    new_path="$unix_path"
31294  fi
31295
31296  if test "x$path" != "x$new_path"; then
31297    ipath="$new_path"
31298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31299$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31300  fi
31301
31302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31304
31305    else
31306      # We're on a unix platform. Hooray! :)
31307      path="$ipath"
31308      has_space=`$ECHO "$path" | $GREP " "`
31309      if test "x$has_space" != x; then
31310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31311$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31313      fi
31314
31315      # Use eval to expand a potential ~
31316      eval path="$path"
31317      if test ! -f "$path" && test ! -d "$path"; then
31318        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31319      fi
31320
31321      if test -d "$path"; then
31322        ipath="`cd "$path"; $THEPWDCMD -L`"
31323      else
31324        dir="`$DIRNAME "$path"`"
31325        base="`$BASENAME "$path"`"
31326        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31327      fi
31328    fi
31329  fi
31330
31331            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31332          fi
31333          IFS=";"
31334        fi
31335      done
31336      # Convert VS_LIB into SYSROOT_LDFLAGS
31337      for i in $VS_LIB; do
31338        libpath=$i
31339        # Only process non-empty elements
31340        if test "x$libpath" != x; then
31341          IFS="$OLDIFS"
31342          # Check that directory exists before calling fixup_path
31343          testpath=$libpath
31344
31345  windows_path="$testpath"
31346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31347    unix_path=`$CYGPATH -u "$windows_path"`
31348    testpath="$unix_path"
31349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31351    testpath="$unix_path"
31352  fi
31353
31354          if test -d "$testpath"; then
31355
31356  # Only process if variable expands to non-empty
31357
31358  if test "x$libpath" != x; then
31359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31360
31361  # Input might be given as Windows format, start by converting to
31362  # unix format.
31363  path="$libpath"
31364  new_path=`$CYGPATH -u "$path"`
31365
31366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31369  # "foo.exe" is OK but "foo" is an error.
31370  #
31371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31372  # It is also a way to make sure we got the proper file name for the real test later on.
31373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31374  if test "x$test_shortpath" = x; then
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31376$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31377    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31378  fi
31379
31380  # Call helper function which possibly converts this using DOS-style short mode.
31381  # If so, the updated path is stored in $new_path.
31382
31383  input_path="$new_path"
31384  # Check if we need to convert this using DOS-style short mode. If the path
31385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31386  # take no chances and rewrite it.
31387  # Note: m4 eats our [], so we need to use [ and ] instead.
31388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31389  if test "x$has_forbidden_chars" != x; then
31390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31394      # Going to short mode and back again did indeed matter. Since short mode is
31395      # case insensitive, let's make it lowercase to improve readability.
31396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31397      # Now convert it back to Unix-style (cygpath)
31398      input_path=`$CYGPATH -u "$shortmode_path"`
31399      new_path="$input_path"
31400    fi
31401  fi
31402
31403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31404  if test "x$test_cygdrive_prefix" = x; then
31405    # As a simple fix, exclude /usr/bin since it's not a real path.
31406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31408      # a path prefixed by /cygdrive for fixpath to work.
31409      new_path="$CYGWIN_ROOT_PATH$input_path"
31410    fi
31411  fi
31412
31413
31414  if test "x$path" != "x$new_path"; then
31415    libpath="$new_path"
31416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31417$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31418  fi
31419
31420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31421
31422  path="$libpath"
31423  has_colon=`$ECHO $path | $GREP ^.:`
31424  new_path="$path"
31425  if test "x$has_colon" = x; then
31426    # Not in mixed or Windows style, start by that.
31427    new_path=`cmd //c echo $path`
31428  fi
31429
31430
31431  input_path="$new_path"
31432  # Check if we need to convert this using DOS-style short mode. If the path
31433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31434  # take no chances and rewrite it.
31435  # Note: m4 eats our [], so we need to use [ and ] instead.
31436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31437  if test "x$has_forbidden_chars" != x; then
31438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31440  fi
31441
31442
31443  windows_path="$new_path"
31444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31445    unix_path=`$CYGPATH -u "$windows_path"`
31446    new_path="$unix_path"
31447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31449    new_path="$unix_path"
31450  fi
31451
31452  if test "x$path" != "x$new_path"; then
31453    libpath="$new_path"
31454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31455$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31456  fi
31457
31458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31460
31461    else
31462      # We're on a unix platform. Hooray! :)
31463      path="$libpath"
31464      has_space=`$ECHO "$path" | $GREP " "`
31465      if test "x$has_space" != x; then
31466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31467$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31469      fi
31470
31471      # Use eval to expand a potential ~
31472      eval path="$path"
31473      if test ! -f "$path" && test ! -d "$path"; then
31474        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31475      fi
31476
31477      if test -d "$path"; then
31478        libpath="`cd "$path"; $THEPWDCMD -L`"
31479      else
31480        dir="`$DIRNAME "$path"`"
31481        base="`$BASENAME "$path"`"
31482        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31483      fi
31484    fi
31485  fi
31486
31487            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31488          fi
31489          IFS=";"
31490        fi
31491      done
31492      IFS="$OLDIFS"
31493    fi
31494  else
31495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31496$as_echo "not found" >&6; }
31497
31498    if test "x$VS_ENV_CMD" = x; then
31499      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31500$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31501      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31502$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31503    else
31504      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31505$as_echo "$as_me: Running the extraction script failed." >&6;}
31506    fi
31507    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31508$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31509    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31510$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31511    as_fn_error $? "Cannot continue" "$LINENO" 5
31512  fi
31513
31514    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31515    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31516    PATH="$VS_PATH"
31517    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31518    export INCLUDE="$VS_INCLUDE"
31519    export LIB="$VS_LIB"
31520  else
31521    if test "x$XCODE_VERSION_OUTPUT" != x; then
31522      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
31523      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
31524      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
31525    else
31526      # Currently we do not define this for other toolchains. This might change as the need arise.
31527      TOOLCHAIN_VERSION=
31528    fi
31529  fi
31530
31531
31532  # For solaris we really need solaris tools, and not the GNU equivalent.
31533  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31534  # so add that to path before starting to probe.
31535  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31536  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31537    PATH="/usr/ccs/bin:$PATH"
31538  fi
31539
31540  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31541  # override all other locations.
31542  if test "x$TOOLCHAIN_PATH" != x; then
31543    PATH=$TOOLCHAIN_PATH:$PATH
31544  fi
31545
31546
31547  #
31548  # Setup the compilers (CC and CXX)
31549  #
31550
31551  COMPILER_NAME=C
31552  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31553
31554  if test "x$CC" != x; then
31555    # User has supplied compiler name already, always let that override.
31556    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31557$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31558    if test "x`basename $CC`" = "x$CC"; then
31559      # A command without a complete path is provided, search $PATH.
31560
31561      for ac_prog in $CC
31562do
31563  # Extract the first word of "$ac_prog", so it can be a program name with args.
31564set dummy $ac_prog; ac_word=$2
31565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31566$as_echo_n "checking for $ac_word... " >&6; }
31567if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31568  $as_echo_n "(cached) " >&6
31569else
31570  case $POTENTIAL_CC in
31571  [\\/]* | ?:[\\/]*)
31572  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31573  ;;
31574  *)
31575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31576for as_dir in $PATH
31577do
31578  IFS=$as_save_IFS
31579  test -z "$as_dir" && as_dir=.
31580    for ac_exec_ext in '' $ac_executable_extensions; do
31581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31582    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31584    break 2
31585  fi
31586done
31587  done
31588IFS=$as_save_IFS
31589
31590  ;;
31591esac
31592fi
31593POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31594if test -n "$POTENTIAL_CC"; then
31595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31596$as_echo "$POTENTIAL_CC" >&6; }
31597else
31598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31599$as_echo "no" >&6; }
31600fi
31601
31602
31603  test -n "$POTENTIAL_CC" && break
31604done
31605
31606      if test "x$POTENTIAL_CC" != x; then
31607        CC=$POTENTIAL_CC
31608      else
31609        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31610      fi
31611    else
31612      # Otherwise it might already be a complete path
31613      if test ! -x "$CC"; then
31614        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31615      fi
31616    fi
31617  else
31618    # No user supplied value. Locate compiler ourselves.
31619
31620    # If we are cross compiling, assume cross compilation tools follows the
31621    # cross compilation standard where they are prefixed with the autoconf
31622    # standard name for the target. For example the binary
31623    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31624    # If we are not cross compiling, then the default compiler name will be
31625    # used.
31626
31627    CC=
31628    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31629    # before checking the rest of the PATH.
31630    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31631    # step, this should not be necessary.
31632    if test -n "$TOOLCHAIN_PATH"; then
31633      PATH_save="$PATH"
31634      PATH="$TOOLCHAIN_PATH"
31635      for ac_prog in $SEARCH_LIST
31636do
31637  # Extract the first word of "$ac_prog", so it can be a program name with args.
31638set dummy $ac_prog; ac_word=$2
31639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31640$as_echo_n "checking for $ac_word... " >&6; }
31641if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31642  $as_echo_n "(cached) " >&6
31643else
31644  case $TOOLCHAIN_PATH_CC in
31645  [\\/]* | ?:[\\/]*)
31646  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31647  ;;
31648  *)
31649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31650for as_dir in $PATH
31651do
31652  IFS=$as_save_IFS
31653  test -z "$as_dir" && as_dir=.
31654    for ac_exec_ext in '' $ac_executable_extensions; do
31655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31656    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31658    break 2
31659  fi
31660done
31661  done
31662IFS=$as_save_IFS
31663
31664  ;;
31665esac
31666fi
31667TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31668if test -n "$TOOLCHAIN_PATH_CC"; then
31669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31670$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31671else
31672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31673$as_echo "no" >&6; }
31674fi
31675
31676
31677  test -n "$TOOLCHAIN_PATH_CC" && break
31678done
31679
31680      CC=$TOOLCHAIN_PATH_CC
31681      PATH="$PATH_save"
31682    fi
31683
31684    # AC_PATH_PROGS can't be run multiple times with the same variable,
31685    # so create a new name for this run.
31686    if test "x$CC" = x; then
31687      for ac_prog in $SEARCH_LIST
31688do
31689  # Extract the first word of "$ac_prog", so it can be a program name with args.
31690set dummy $ac_prog; ac_word=$2
31691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31692$as_echo_n "checking for $ac_word... " >&6; }
31693if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31694  $as_echo_n "(cached) " >&6
31695else
31696  case $POTENTIAL_CC in
31697  [\\/]* | ?:[\\/]*)
31698  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31699  ;;
31700  *)
31701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31702for as_dir in $PATH
31703do
31704  IFS=$as_save_IFS
31705  test -z "$as_dir" && as_dir=.
31706    for ac_exec_ext in '' $ac_executable_extensions; do
31707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31708    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31710    break 2
31711  fi
31712done
31713  done
31714IFS=$as_save_IFS
31715
31716  ;;
31717esac
31718fi
31719POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31720if test -n "$POTENTIAL_CC"; then
31721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31722$as_echo "$POTENTIAL_CC" >&6; }
31723else
31724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31725$as_echo "no" >&6; }
31726fi
31727
31728
31729  test -n "$POTENTIAL_CC" && break
31730done
31731
31732      CC=$POTENTIAL_CC
31733    fi
31734
31735    if test "x$CC" = x; then
31736
31737  # Print a helpful message on how to acquire the necessary build dependency.
31738  # devkit is the help tag: freetype, cups, alsa etc
31739  MISSING_DEPENDENCY=devkit
31740
31741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31742    cygwin_help $MISSING_DEPENDENCY
31743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31744    msys_help $MISSING_DEPENDENCY
31745  else
31746    PKGHANDLER_COMMAND=
31747
31748    case $PKGHANDLER in
31749      apt-get)
31750        apt_help     $MISSING_DEPENDENCY ;;
31751      yum)
31752        yum_help     $MISSING_DEPENDENCY ;;
31753      port)
31754        port_help    $MISSING_DEPENDENCY ;;
31755      pkgutil)
31756        pkgutil_help $MISSING_DEPENDENCY ;;
31757      pkgadd)
31758        pkgadd_help  $MISSING_DEPENDENCY ;;
31759    esac
31760
31761    if test "x$PKGHANDLER_COMMAND" != x; then
31762      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31763    fi
31764  fi
31765
31766      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31767    fi
31768  fi
31769
31770  # Now we have a compiler binary in CC. Make sure it's okay.
31771
31772  # Only process if variable expands to non-empty
31773
31774  if test "x$CC" != x; then
31775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31776
31777  # First separate the path from the arguments. This will split at the first
31778  # space.
31779  complete="$CC"
31780  path="${complete%% *}"
31781  tmp="$complete EOL"
31782  arguments="${tmp#* }"
31783
31784  # Input might be given as Windows format, start by converting to
31785  # unix format.
31786  new_path=`$CYGPATH -u "$path"`
31787
31788  # Now try to locate executable using which
31789  new_path=`$WHICH "$new_path" 2> /dev/null`
31790  # bat and cmd files are not always considered executable in cygwin causing which
31791  # to not find them
31792  if test "x$new_path" = x \
31793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31795    new_path=`$CYGPATH -u "$path"`
31796  fi
31797  if test "x$new_path" = x; then
31798    # Oops. Which didn't find the executable.
31799    # The splitting of arguments from the executable at a space might have been incorrect,
31800    # since paths with space are more likely in Windows. Give it another try with the whole
31801    # argument.
31802    path="$complete"
31803    arguments="EOL"
31804    new_path=`$CYGPATH -u "$path"`
31805    new_path=`$WHICH "$new_path" 2> /dev/null`
31806    # bat and cmd files are not always considered executable in cygwin causing which
31807    # to not find them
31808    if test "x$new_path" = x \
31809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31811      new_path=`$CYGPATH -u "$path"`
31812    fi
31813    if test "x$new_path" = x; then
31814      # It's still not found. Now this is an unrecoverable error.
31815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31816$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31817      has_space=`$ECHO "$complete" | $GREP " "`
31818      if test "x$has_space" != x; then
31819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31821      fi
31822      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31823    fi
31824  fi
31825
31826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31829  # "foo.exe" is OK but "foo" is an error.
31830  #
31831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31832  # It is also a way to make sure we got the proper file name for the real test later on.
31833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31834  if test "x$test_shortpath" = x; then
31835    # Short path failed, file does not exist as specified.
31836    # Try adding .exe or .cmd
31837    if test -f "${new_path}.exe"; then
31838      input_to_shortpath="${new_path}.exe"
31839    elif test -f "${new_path}.cmd"; then
31840      input_to_shortpath="${new_path}.cmd"
31841    else
31842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31843$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31846      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31847    fi
31848  else
31849    input_to_shortpath="$new_path"
31850  fi
31851
31852  # Call helper function which possibly converts this using DOS-style short mode.
31853  # If so, the updated path is stored in $new_path.
31854  new_path="$input_to_shortpath"
31855
31856  input_path="$input_to_shortpath"
31857  # Check if we need to convert this using DOS-style short mode. If the path
31858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31859  # take no chances and rewrite it.
31860  # Note: m4 eats our [], so we need to use [ and ] instead.
31861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31862  if test "x$has_forbidden_chars" != x; then
31863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31867      # Going to short mode and back again did indeed matter. Since short mode is
31868      # case insensitive, let's make it lowercase to improve readability.
31869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31870      # Now convert it back to Unix-style (cygpath)
31871      input_path=`$CYGPATH -u "$shortmode_path"`
31872      new_path="$input_path"
31873    fi
31874  fi
31875
31876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31877  if test "x$test_cygdrive_prefix" = x; then
31878    # As a simple fix, exclude /usr/bin since it's not a real path.
31879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31881      # a path prefixed by /cygdrive for fixpath to work.
31882      new_path="$CYGWIN_ROOT_PATH$input_path"
31883    fi
31884  fi
31885
31886  # remove trailing .exe if any
31887  new_path="${new_path/%.exe/}"
31888
31889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31890
31891  # First separate the path from the arguments. This will split at the first
31892  # space.
31893  complete="$CC"
31894  path="${complete%% *}"
31895  tmp="$complete EOL"
31896  arguments="${tmp#* }"
31897
31898  # Input might be given as Windows format, start by converting to
31899  # unix format.
31900  new_path="$path"
31901
31902  windows_path="$new_path"
31903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31904    unix_path=`$CYGPATH -u "$windows_path"`
31905    new_path="$unix_path"
31906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31908    new_path="$unix_path"
31909  fi
31910
31911
31912  # Now try to locate executable using which
31913  new_path=`$WHICH "$new_path" 2> /dev/null`
31914
31915  if test "x$new_path" = x; then
31916    # Oops. Which didn't find the executable.
31917    # The splitting of arguments from the executable at a space might have been incorrect,
31918    # since paths with space are more likely in Windows. Give it another try with the whole
31919    # argument.
31920    path="$complete"
31921    arguments="EOL"
31922    new_path="$path"
31923
31924  windows_path="$new_path"
31925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31926    unix_path=`$CYGPATH -u "$windows_path"`
31927    new_path="$unix_path"
31928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31930    new_path="$unix_path"
31931  fi
31932
31933
31934    new_path=`$WHICH "$new_path" 2> /dev/null`
31935    # bat and cmd files are not always considered executable in MSYS causing which
31936    # to not find them
31937    if test "x$new_path" = x \
31938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31940      new_path="$path"
31941
31942  windows_path="$new_path"
31943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31944    unix_path=`$CYGPATH -u "$windows_path"`
31945    new_path="$unix_path"
31946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31948    new_path="$unix_path"
31949  fi
31950
31951    fi
31952
31953    if test "x$new_path" = x; then
31954      # It's still not found. Now this is an unrecoverable error.
31955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31956$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31957      has_space=`$ECHO "$complete" | $GREP " "`
31958      if test "x$has_space" != x; then
31959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31961      fi
31962      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31963    fi
31964  fi
31965
31966  # Now new_path has a complete unix path to the binary
31967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31968    # Keep paths in /bin as-is, but remove trailing .exe if any
31969    new_path="${new_path/%.exe/}"
31970    # Do not save /bin paths to all_fixpath_prefixes!
31971  else
31972    # Not in mixed or Windows style, start by that.
31973    new_path=`cmd //c echo $new_path`
31974
31975  input_path="$new_path"
31976  # Check if we need to convert this using DOS-style short mode. If the path
31977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31978  # take no chances and rewrite it.
31979  # Note: m4 eats our [], so we need to use [ and ] instead.
31980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31981  if test "x$has_forbidden_chars" != x; then
31982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31984  fi
31985
31986    # Output is in $new_path
31987
31988  windows_path="$new_path"
31989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31990    unix_path=`$CYGPATH -u "$windows_path"`
31991    new_path="$unix_path"
31992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31994    new_path="$unix_path"
31995  fi
31996
31997    # remove trailing .exe if any
31998    new_path="${new_path/%.exe/}"
31999
32000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32002  fi
32003
32004    else
32005      # We're on a unix platform. Hooray! :)
32006      # First separate the path from the arguments. This will split at the first
32007      # space.
32008      complete="$CC"
32009      path="${complete%% *}"
32010      tmp="$complete EOL"
32011      arguments="${tmp#* }"
32012
32013      # Cannot rely on the command "which" here since it doesn't always work.
32014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32015      if test -z "$is_absolute_path"; then
32016        # Path to executable is not absolute. Find it.
32017        IFS_save="$IFS"
32018        IFS=:
32019        for p in $PATH; do
32020          if test -f "$p/$path" && test -x "$p/$path"; then
32021            new_path="$p/$path"
32022            break
32023          fi
32024        done
32025        IFS="$IFS_save"
32026      else
32027        # This is an absolute path, we can use it without further modifications.
32028        new_path="$path"
32029      fi
32030
32031      if test "x$new_path" = x; then
32032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32033$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32034        has_space=`$ECHO "$complete" | $GREP " "`
32035        if test "x$has_space" != x; then
32036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32038        fi
32039        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32040      fi
32041    fi
32042
32043    # Now join together the path and the arguments once again
32044    if test "x$arguments" != xEOL; then
32045      new_complete="$new_path ${arguments% *}"
32046    else
32047      new_complete="$new_path"
32048    fi
32049
32050    if test "x$complete" != "x$new_complete"; then
32051      CC="$new_complete"
32052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32053$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32054    fi
32055  fi
32056
32057  TEST_COMPILER="$CC"
32058
32059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32060$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32061  SYMLINK_ORIGINAL="$TEST_COMPILER"
32062
32063  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32064    # Follow a chain of symbolic links. Use readlink
32065    # where it exists, else fall back to horribly
32066    # complicated shell code.
32067    if test "x$READLINK_TESTED" != yes; then
32068      # On MacOSX there is a readlink tool with a different
32069      # purpose than the GNU readlink tool. Check the found readlink.
32070      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32071      if test "x$ISGNU" = x; then
32072        # A readlink that we do not know how to use.
32073        # Are there other non-GNU readlinks out there?
32074        READLINK_TESTED=yes
32075        READLINK=
32076      fi
32077    fi
32078
32079    if test "x$READLINK" != x; then
32080      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32081    else
32082      # Save the current directory for restoring afterwards
32083      STARTDIR=$PWD
32084      COUNTER=0
32085      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32086      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32087      cd $sym_link_dir
32088      # Use -P flag to resolve symlinks in directories.
32089      cd `$THEPWDCMD -P`
32090      sym_link_dir=`$THEPWDCMD -P`
32091      # Resolve file symlinks
32092      while test $COUNTER -lt 20; do
32093        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32094        if test "x$ISLINK" == x; then
32095          # This is not a symbolic link! We are done!
32096          break
32097        fi
32098        # Again resolve directory symlinks since the target of the just found
32099        # link could be in a different directory
32100        cd `$DIRNAME $ISLINK`
32101        sym_link_dir=`$THEPWDCMD -P`
32102        sym_link_file=`$BASENAME $ISLINK`
32103        let COUNTER=COUNTER+1
32104      done
32105      cd $STARTDIR
32106      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32107    fi
32108  fi
32109
32110  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32112$as_echo "no symlink" >&6; }
32113  else
32114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32115$as_echo "$SYMLINK_ORIGINAL" >&6; }
32116
32117    # We can't handle ccache by gcc wrappers, since we need to know if we're
32118    # using ccache. Instead ccache usage must be controlled by a configure option.
32119    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32120    if test "x$COMPILER_BASENAME" = "xccache"; then
32121      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32122$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32123      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32124    fi
32125  fi
32126
32127
32128  COMPILER=$CC
32129  COMPILER_NAME=$COMPILER_NAME
32130
32131  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32132    # cc -V output typically looks like
32133    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32134    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32135    # Check that this is likely to be the Solaris Studio cc.
32136    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32137    if test $? -ne 0; then
32138      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32139      { $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
32140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32142$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32143      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32144$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32145      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32146    fi
32147    # Remove usage instructions (if present), and
32148    # collapse compiler output into a single line
32149    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32150        $SED -e 's/ *[Uu]sage:.*//'`
32151    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32152        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32153  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32154    # xlc -qversion output typically looks like
32155    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32156    #     Version: 11.01.0000.0015
32157    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32158    # Check that this is likely to be the IBM XL C compiler.
32159    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32160    if test $? -ne 0; then
32161      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32162      { $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
32163$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32164      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32165$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32167$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32168      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32169    fi
32170    # Collapse compiler output into a single line
32171    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32172    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32173        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32174  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32175    # There is no specific version flag, but all output starts with a version string.
32176    # First line typically looks something like:
32177    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32178    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32179    # Check that this is likely to be Microsoft CL.EXE.
32180    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32181    if test $? -ne 0; then
32182      { $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
32183$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32184      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32185$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32186      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32187    fi
32188    # Collapse compiler output into a single line
32189    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32190    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32191        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32192  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32193    # gcc --version output typically looks like
32194    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32195    #     Copyright (C) 2013 Free Software Foundation, Inc.
32196    #     This is free software; see the source for copying conditions.  There is NO
32197    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32198    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32199    # Check that this is likely to be GCC.
32200    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32201    if test $? -ne 0; then
32202      { $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
32203$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32204      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32205$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32206      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32207    fi
32208    # Remove Copyright and legalese from version string, and
32209    # collapse into a single line
32210    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32211        $SED -e 's/ *Copyright .*//'`
32212    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32213        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32214  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32215    # clang --version output typically looks like
32216    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32217    #    clang version 3.3 (tags/RELEASE_33/final)
32218    # or
32219    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32220    #    Target: x86_64-pc-linux-gnu
32221    #    Thread model: posix
32222    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32223    # Check that this is likely to be clang
32224    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32225    if test $? -ne 0; then
32226      { $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
32227$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32228      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32229$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32230      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32231    fi
32232    # Collapse compiler output into a single line
32233    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32234    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32235        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
32236  else
32237      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32238  fi
32239  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32240  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32241  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32242  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32243
32244  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32245$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32246
32247
32248  # Now that we have resolved CC ourself, let autoconf have its go at it
32249  ac_ext=c
32250ac_cpp='$CPP $CPPFLAGS'
32251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32253ac_compiler_gnu=$ac_cv_c_compiler_gnu
32254if test -n "$ac_tool_prefix"; then
32255  for ac_prog in $CC
32256  do
32257    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32258set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32260$as_echo_n "checking for $ac_word... " >&6; }
32261if ${ac_cv_prog_CC+:} false; then :
32262  $as_echo_n "(cached) " >&6
32263else
32264  if test -n "$CC"; then
32265  ac_cv_prog_CC="$CC" # Let the user override the test.
32266else
32267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32268for as_dir in $PATH
32269do
32270  IFS=$as_save_IFS
32271  test -z "$as_dir" && as_dir=.
32272    for ac_exec_ext in '' $ac_executable_extensions; do
32273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32274    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32276    break 2
32277  fi
32278done
32279  done
32280IFS=$as_save_IFS
32281
32282fi
32283fi
32284CC=$ac_cv_prog_CC
32285if test -n "$CC"; then
32286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32287$as_echo "$CC" >&6; }
32288else
32289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32290$as_echo "no" >&6; }
32291fi
32292
32293
32294    test -n "$CC" && break
32295  done
32296fi
32297if test -z "$CC"; then
32298  ac_ct_CC=$CC
32299  for ac_prog in $CC
32300do
32301  # Extract the first word of "$ac_prog", so it can be a program name with args.
32302set dummy $ac_prog; ac_word=$2
32303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32304$as_echo_n "checking for $ac_word... " >&6; }
32305if ${ac_cv_prog_ac_ct_CC+:} false; then :
32306  $as_echo_n "(cached) " >&6
32307else
32308  if test -n "$ac_ct_CC"; then
32309  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32310else
32311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32312for as_dir in $PATH
32313do
32314  IFS=$as_save_IFS
32315  test -z "$as_dir" && as_dir=.
32316    for ac_exec_ext in '' $ac_executable_extensions; do
32317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32318    ac_cv_prog_ac_ct_CC="$ac_prog"
32319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32320    break 2
32321  fi
32322done
32323  done
32324IFS=$as_save_IFS
32325
32326fi
32327fi
32328ac_ct_CC=$ac_cv_prog_ac_ct_CC
32329if test -n "$ac_ct_CC"; then
32330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32331$as_echo "$ac_ct_CC" >&6; }
32332else
32333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32334$as_echo "no" >&6; }
32335fi
32336
32337
32338  test -n "$ac_ct_CC" && break
32339done
32340
32341  if test "x$ac_ct_CC" = x; then
32342    CC=""
32343  else
32344    case $cross_compiling:$ac_tool_warned in
32345yes:)
32346{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32347$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32348ac_tool_warned=yes ;;
32349esac
32350    CC=$ac_ct_CC
32351  fi
32352fi
32353
32354
32355test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32357as_fn_error $? "no acceptable C compiler found in \$PATH
32358See \`config.log' for more details" "$LINENO" 5; }
32359
32360# Provide some information about the compiler.
32361$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32362set X $ac_compile
32363ac_compiler=$2
32364for ac_option in --version -v -V -qversion; do
32365  { { ac_try="$ac_compiler $ac_option >&5"
32366case "(($ac_try" in
32367  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32368  *) ac_try_echo=$ac_try;;
32369esac
32370eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32371$as_echo "$ac_try_echo"; } >&5
32372  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32373  ac_status=$?
32374  if test -s conftest.err; then
32375    sed '10a\
32376... rest of stderr output deleted ...
32377         10q' conftest.err >conftest.er1
32378    cat conftest.er1 >&5
32379  fi
32380  rm -f conftest.er1 conftest.err
32381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32382  test $ac_status = 0; }
32383done
32384
32385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32386/* end confdefs.h.  */
32387
32388int
32389main ()
32390{
32391
32392  ;
32393  return 0;
32394}
32395_ACEOF
32396ac_clean_files_save=$ac_clean_files
32397ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32398# Try to create an executable without -o first, disregard a.out.
32399# It will help us diagnose broken compilers, and finding out an intuition
32400# of exeext.
32401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32402$as_echo_n "checking whether the C compiler works... " >&6; }
32403ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32404
32405# The possible output files:
32406ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32407
32408ac_rmfiles=
32409for ac_file in $ac_files
32410do
32411  case $ac_file in
32412    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32413    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32414  esac
32415done
32416rm -f $ac_rmfiles
32417
32418if { { ac_try="$ac_link_default"
32419case "(($ac_try" in
32420  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32421  *) ac_try_echo=$ac_try;;
32422esac
32423eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32424$as_echo "$ac_try_echo"; } >&5
32425  (eval "$ac_link_default") 2>&5
32426  ac_status=$?
32427  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32428  test $ac_status = 0; }; then :
32429  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32430# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32431# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32432# so that the user can short-circuit this test for compilers unknown to
32433# Autoconf.
32434for ac_file in $ac_files ''
32435do
32436  test -f "$ac_file" || continue
32437  case $ac_file in
32438    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32439	;;
32440    [ab].out )
32441	# We found the default executable, but exeext='' is most
32442	# certainly right.
32443	break;;
32444    *.* )
32445	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32446	then :; else
32447	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32448	fi
32449	# We set ac_cv_exeext here because the later test for it is not
32450	# safe: cross compilers may not add the suffix if given an `-o'
32451	# argument, so we may need to know it at that point already.
32452	# Even if this section looks crufty: it has the advantage of
32453	# actually working.
32454	break;;
32455    * )
32456	break;;
32457  esac
32458done
32459test "$ac_cv_exeext" = no && ac_cv_exeext=
32460
32461else
32462  ac_file=''
32463fi
32464if test -z "$ac_file"; then :
32465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32466$as_echo "no" >&6; }
32467$as_echo "$as_me: failed program was:" >&5
32468sed 's/^/| /' conftest.$ac_ext >&5
32469
32470{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32472as_fn_error 77 "C compiler cannot create executables
32473See \`config.log' for more details" "$LINENO" 5; }
32474else
32475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32476$as_echo "yes" >&6; }
32477fi
32478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32479$as_echo_n "checking for C compiler default output file name... " >&6; }
32480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32481$as_echo "$ac_file" >&6; }
32482ac_exeext=$ac_cv_exeext
32483
32484rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32485ac_clean_files=$ac_clean_files_save
32486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32487$as_echo_n "checking for suffix of executables... " >&6; }
32488if { { ac_try="$ac_link"
32489case "(($ac_try" in
32490  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32491  *) ac_try_echo=$ac_try;;
32492esac
32493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32494$as_echo "$ac_try_echo"; } >&5
32495  (eval "$ac_link") 2>&5
32496  ac_status=$?
32497  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32498  test $ac_status = 0; }; then :
32499  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32500# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32501# work properly (i.e., refer to `conftest.exe'), while it won't with
32502# `rm'.
32503for ac_file in conftest.exe conftest conftest.*; do
32504  test -f "$ac_file" || continue
32505  case $ac_file in
32506    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32507    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32508	  break;;
32509    * ) break;;
32510  esac
32511done
32512else
32513  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32514$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32515as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32516See \`config.log' for more details" "$LINENO" 5; }
32517fi
32518rm -f conftest conftest$ac_cv_exeext
32519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32520$as_echo "$ac_cv_exeext" >&6; }
32521
32522rm -f conftest.$ac_ext
32523EXEEXT=$ac_cv_exeext
32524ac_exeext=$EXEEXT
32525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32526/* end confdefs.h.  */
32527#include <stdio.h>
32528int
32529main ()
32530{
32531FILE *f = fopen ("conftest.out", "w");
32532 return ferror (f) || fclose (f) != 0;
32533
32534  ;
32535  return 0;
32536}
32537_ACEOF
32538ac_clean_files="$ac_clean_files conftest.out"
32539# Check that the compiler produces executables we can run.  If not, either
32540# the compiler is broken, or we cross compile.
32541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32542$as_echo_n "checking whether we are cross compiling... " >&6; }
32543if test "$cross_compiling" != yes; then
32544  { { ac_try="$ac_link"
32545case "(($ac_try" in
32546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32547  *) ac_try_echo=$ac_try;;
32548esac
32549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32550$as_echo "$ac_try_echo"; } >&5
32551  (eval "$ac_link") 2>&5
32552  ac_status=$?
32553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32554  test $ac_status = 0; }
32555  if { ac_try='./conftest$ac_cv_exeext'
32556  { { case "(($ac_try" in
32557  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32558  *) ac_try_echo=$ac_try;;
32559esac
32560eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32561$as_echo "$ac_try_echo"; } >&5
32562  (eval "$ac_try") 2>&5
32563  ac_status=$?
32564  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32565  test $ac_status = 0; }; }; then
32566    cross_compiling=no
32567  else
32568    if test "$cross_compiling" = maybe; then
32569	cross_compiling=yes
32570    else
32571	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32573as_fn_error $? "cannot run C compiled programs.
32574If you meant to cross compile, use \`--host'.
32575See \`config.log' for more details" "$LINENO" 5; }
32576    fi
32577  fi
32578fi
32579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32580$as_echo "$cross_compiling" >&6; }
32581
32582rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32583ac_clean_files=$ac_clean_files_save
32584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32585$as_echo_n "checking for suffix of object files... " >&6; }
32586if ${ac_cv_objext+:} false; then :
32587  $as_echo_n "(cached) " >&6
32588else
32589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32590/* end confdefs.h.  */
32591
32592int
32593main ()
32594{
32595
32596  ;
32597  return 0;
32598}
32599_ACEOF
32600rm -f conftest.o conftest.obj
32601if { { ac_try="$ac_compile"
32602case "(($ac_try" in
32603  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32604  *) ac_try_echo=$ac_try;;
32605esac
32606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32607$as_echo "$ac_try_echo"; } >&5
32608  (eval "$ac_compile") 2>&5
32609  ac_status=$?
32610  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32611  test $ac_status = 0; }; then :
32612  for ac_file in conftest.o conftest.obj conftest.*; do
32613  test -f "$ac_file" || continue;
32614  case $ac_file in
32615    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32616    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32617       break;;
32618  esac
32619done
32620else
32621  $as_echo "$as_me: failed program was:" >&5
32622sed 's/^/| /' conftest.$ac_ext >&5
32623
32624{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32626as_fn_error $? "cannot compute suffix of object files: cannot compile
32627See \`config.log' for more details" "$LINENO" 5; }
32628fi
32629rm -f conftest.$ac_cv_objext conftest.$ac_ext
32630fi
32631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32632$as_echo "$ac_cv_objext" >&6; }
32633OBJEXT=$ac_cv_objext
32634ac_objext=$OBJEXT
32635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32636$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32637if ${ac_cv_c_compiler_gnu+:} false; then :
32638  $as_echo_n "(cached) " >&6
32639else
32640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32641/* end confdefs.h.  */
32642
32643int
32644main ()
32645{
32646#ifndef __GNUC__
32647       choke me
32648#endif
32649
32650  ;
32651  return 0;
32652}
32653_ACEOF
32654if ac_fn_c_try_compile "$LINENO"; then :
32655  ac_compiler_gnu=yes
32656else
32657  ac_compiler_gnu=no
32658fi
32659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32660ac_cv_c_compiler_gnu=$ac_compiler_gnu
32661
32662fi
32663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32664$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32665if test $ac_compiler_gnu = yes; then
32666  GCC=yes
32667else
32668  GCC=
32669fi
32670ac_test_CFLAGS=${CFLAGS+set}
32671ac_save_CFLAGS=$CFLAGS
32672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32673$as_echo_n "checking whether $CC accepts -g... " >&6; }
32674if ${ac_cv_prog_cc_g+:} false; then :
32675  $as_echo_n "(cached) " >&6
32676else
32677  ac_save_c_werror_flag=$ac_c_werror_flag
32678   ac_c_werror_flag=yes
32679   ac_cv_prog_cc_g=no
32680   CFLAGS="-g"
32681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32682/* end confdefs.h.  */
32683
32684int
32685main ()
32686{
32687
32688  ;
32689  return 0;
32690}
32691_ACEOF
32692if ac_fn_c_try_compile "$LINENO"; then :
32693  ac_cv_prog_cc_g=yes
32694else
32695  CFLAGS=""
32696      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32697/* end confdefs.h.  */
32698
32699int
32700main ()
32701{
32702
32703  ;
32704  return 0;
32705}
32706_ACEOF
32707if ac_fn_c_try_compile "$LINENO"; then :
32708
32709else
32710  ac_c_werror_flag=$ac_save_c_werror_flag
32711	 CFLAGS="-g"
32712	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32713/* end confdefs.h.  */
32714
32715int
32716main ()
32717{
32718
32719  ;
32720  return 0;
32721}
32722_ACEOF
32723if ac_fn_c_try_compile "$LINENO"; then :
32724  ac_cv_prog_cc_g=yes
32725fi
32726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32727fi
32728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32729fi
32730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32731   ac_c_werror_flag=$ac_save_c_werror_flag
32732fi
32733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32734$as_echo "$ac_cv_prog_cc_g" >&6; }
32735if test "$ac_test_CFLAGS" = set; then
32736  CFLAGS=$ac_save_CFLAGS
32737elif test $ac_cv_prog_cc_g = yes; then
32738  if test "$GCC" = yes; then
32739    CFLAGS="-g -O2"
32740  else
32741    CFLAGS="-g"
32742  fi
32743else
32744  if test "$GCC" = yes; then
32745    CFLAGS="-O2"
32746  else
32747    CFLAGS=
32748  fi
32749fi
32750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32751$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32752if ${ac_cv_prog_cc_c89+:} false; then :
32753  $as_echo_n "(cached) " >&6
32754else
32755  ac_cv_prog_cc_c89=no
32756ac_save_CC=$CC
32757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32758/* end confdefs.h.  */
32759#include <stdarg.h>
32760#include <stdio.h>
32761struct stat;
32762/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32763struct buf { int x; };
32764FILE * (*rcsopen) (struct buf *, struct stat *, int);
32765static char *e (p, i)
32766     char **p;
32767     int i;
32768{
32769  return p[i];
32770}
32771static char *f (char * (*g) (char **, int), char **p, ...)
32772{
32773  char *s;
32774  va_list v;
32775  va_start (v,p);
32776  s = g (p, va_arg (v,int));
32777  va_end (v);
32778  return s;
32779}
32780
32781/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32782   function prototypes and stuff, but not '\xHH' hex character constants.
32783   These don't provoke an error unfortunately, instead are silently treated
32784   as 'x'.  The following induces an error, until -std is added to get
32785   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32786   array size at least.  It's necessary to write '\x00'==0 to get something
32787   that's true only with -std.  */
32788int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32789
32790/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32791   inside strings and character constants.  */
32792#define FOO(x) 'x'
32793int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32794
32795int test (int i, double x);
32796struct s1 {int (*f) (int a);};
32797struct s2 {int (*f) (double a);};
32798int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32799int argc;
32800char **argv;
32801int
32802main ()
32803{
32804return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32805  ;
32806  return 0;
32807}
32808_ACEOF
32809for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32810	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32811do
32812  CC="$ac_save_CC $ac_arg"
32813  if ac_fn_c_try_compile "$LINENO"; then :
32814  ac_cv_prog_cc_c89=$ac_arg
32815fi
32816rm -f core conftest.err conftest.$ac_objext
32817  test "x$ac_cv_prog_cc_c89" != "xno" && break
32818done
32819rm -f conftest.$ac_ext
32820CC=$ac_save_CC
32821
32822fi
32823# AC_CACHE_VAL
32824case "x$ac_cv_prog_cc_c89" in
32825  x)
32826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32827$as_echo "none needed" >&6; } ;;
32828  xno)
32829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32830$as_echo "unsupported" >&6; } ;;
32831  *)
32832    CC="$CC $ac_cv_prog_cc_c89"
32833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32834$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32835esac
32836if test "x$ac_cv_prog_cc_c89" != xno; then :
32837
32838fi
32839
32840ac_ext=cpp
32841ac_cpp='$CXXCPP $CPPFLAGS'
32842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32845
32846
32847
32848  COMPILER_NAME=C++
32849  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32850
32851  if test "x$CXX" != x; then
32852    # User has supplied compiler name already, always let that override.
32853    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32854$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32855    if test "x`basename $CXX`" = "x$CXX"; then
32856      # A command without a complete path is provided, search $PATH.
32857
32858      for ac_prog in $CXX
32859do
32860  # Extract the first word of "$ac_prog", so it can be a program name with args.
32861set dummy $ac_prog; ac_word=$2
32862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32863$as_echo_n "checking for $ac_word... " >&6; }
32864if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32865  $as_echo_n "(cached) " >&6
32866else
32867  case $POTENTIAL_CXX in
32868  [\\/]* | ?:[\\/]*)
32869  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32870  ;;
32871  *)
32872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32873for as_dir in $PATH
32874do
32875  IFS=$as_save_IFS
32876  test -z "$as_dir" && as_dir=.
32877    for ac_exec_ext in '' $ac_executable_extensions; do
32878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32879    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32881    break 2
32882  fi
32883done
32884  done
32885IFS=$as_save_IFS
32886
32887  ;;
32888esac
32889fi
32890POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32891if test -n "$POTENTIAL_CXX"; then
32892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32893$as_echo "$POTENTIAL_CXX" >&6; }
32894else
32895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32896$as_echo "no" >&6; }
32897fi
32898
32899
32900  test -n "$POTENTIAL_CXX" && break
32901done
32902
32903      if test "x$POTENTIAL_CXX" != x; then
32904        CXX=$POTENTIAL_CXX
32905      else
32906        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32907      fi
32908    else
32909      # Otherwise it might already be a complete path
32910      if test ! -x "$CXX"; then
32911        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32912      fi
32913    fi
32914  else
32915    # No user supplied value. Locate compiler ourselves.
32916
32917    # If we are cross compiling, assume cross compilation tools follows the
32918    # cross compilation standard where they are prefixed with the autoconf
32919    # standard name for the target. For example the binary
32920    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32921    # If we are not cross compiling, then the default compiler name will be
32922    # used.
32923
32924    CXX=
32925    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32926    # before checking the rest of the PATH.
32927    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32928    # step, this should not be necessary.
32929    if test -n "$TOOLCHAIN_PATH"; then
32930      PATH_save="$PATH"
32931      PATH="$TOOLCHAIN_PATH"
32932      for ac_prog in $SEARCH_LIST
32933do
32934  # Extract the first word of "$ac_prog", so it can be a program name with args.
32935set dummy $ac_prog; ac_word=$2
32936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32937$as_echo_n "checking for $ac_word... " >&6; }
32938if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32939  $as_echo_n "(cached) " >&6
32940else
32941  case $TOOLCHAIN_PATH_CXX in
32942  [\\/]* | ?:[\\/]*)
32943  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32944  ;;
32945  *)
32946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32947for as_dir in $PATH
32948do
32949  IFS=$as_save_IFS
32950  test -z "$as_dir" && as_dir=.
32951    for ac_exec_ext in '' $ac_executable_extensions; do
32952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32953    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32955    break 2
32956  fi
32957done
32958  done
32959IFS=$as_save_IFS
32960
32961  ;;
32962esac
32963fi
32964TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32965if test -n "$TOOLCHAIN_PATH_CXX"; then
32966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32967$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32968else
32969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32970$as_echo "no" >&6; }
32971fi
32972
32973
32974  test -n "$TOOLCHAIN_PATH_CXX" && break
32975done
32976
32977      CXX=$TOOLCHAIN_PATH_CXX
32978      PATH="$PATH_save"
32979    fi
32980
32981    # AC_PATH_PROGS can't be run multiple times with the same variable,
32982    # so create a new name for this run.
32983    if test "x$CXX" = x; then
32984      for ac_prog in $SEARCH_LIST
32985do
32986  # Extract the first word of "$ac_prog", so it can be a program name with args.
32987set dummy $ac_prog; ac_word=$2
32988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32989$as_echo_n "checking for $ac_word... " >&6; }
32990if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32991  $as_echo_n "(cached) " >&6
32992else
32993  case $POTENTIAL_CXX in
32994  [\\/]* | ?:[\\/]*)
32995  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32996  ;;
32997  *)
32998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32999for as_dir in $PATH
33000do
33001  IFS=$as_save_IFS
33002  test -z "$as_dir" && as_dir=.
33003    for ac_exec_ext in '' $ac_executable_extensions; do
33004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33005    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33007    break 2
33008  fi
33009done
33010  done
33011IFS=$as_save_IFS
33012
33013  ;;
33014esac
33015fi
33016POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33017if test -n "$POTENTIAL_CXX"; then
33018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33019$as_echo "$POTENTIAL_CXX" >&6; }
33020else
33021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33022$as_echo "no" >&6; }
33023fi
33024
33025
33026  test -n "$POTENTIAL_CXX" && break
33027done
33028
33029      CXX=$POTENTIAL_CXX
33030    fi
33031
33032    if test "x$CXX" = x; then
33033
33034  # Print a helpful message on how to acquire the necessary build dependency.
33035  # devkit is the help tag: freetype, cups, alsa etc
33036  MISSING_DEPENDENCY=devkit
33037
33038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33039    cygwin_help $MISSING_DEPENDENCY
33040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33041    msys_help $MISSING_DEPENDENCY
33042  else
33043    PKGHANDLER_COMMAND=
33044
33045    case $PKGHANDLER in
33046      apt-get)
33047        apt_help     $MISSING_DEPENDENCY ;;
33048      yum)
33049        yum_help     $MISSING_DEPENDENCY ;;
33050      port)
33051        port_help    $MISSING_DEPENDENCY ;;
33052      pkgutil)
33053        pkgutil_help $MISSING_DEPENDENCY ;;
33054      pkgadd)
33055        pkgadd_help  $MISSING_DEPENDENCY ;;
33056    esac
33057
33058    if test "x$PKGHANDLER_COMMAND" != x; then
33059      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33060    fi
33061  fi
33062
33063      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33064    fi
33065  fi
33066
33067  # Now we have a compiler binary in CXX. Make sure it's okay.
33068
33069  # Only process if variable expands to non-empty
33070
33071  if test "x$CXX" != x; then
33072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33073
33074  # First separate the path from the arguments. This will split at the first
33075  # space.
33076  complete="$CXX"
33077  path="${complete%% *}"
33078  tmp="$complete EOL"
33079  arguments="${tmp#* }"
33080
33081  # Input might be given as Windows format, start by converting to
33082  # unix format.
33083  new_path=`$CYGPATH -u "$path"`
33084
33085  # Now try to locate executable using which
33086  new_path=`$WHICH "$new_path" 2> /dev/null`
33087  # bat and cmd files are not always considered executable in cygwin causing which
33088  # to not find them
33089  if test "x$new_path" = x \
33090      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33091      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33092    new_path=`$CYGPATH -u "$path"`
33093  fi
33094  if test "x$new_path" = x; then
33095    # Oops. Which didn't find the executable.
33096    # The splitting of arguments from the executable at a space might have been incorrect,
33097    # since paths with space are more likely in Windows. Give it another try with the whole
33098    # argument.
33099    path="$complete"
33100    arguments="EOL"
33101    new_path=`$CYGPATH -u "$path"`
33102    new_path=`$WHICH "$new_path" 2> /dev/null`
33103    # bat and cmd files are not always considered executable in cygwin causing which
33104    # to not find them
33105    if test "x$new_path" = x \
33106        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33107        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33108      new_path=`$CYGPATH -u "$path"`
33109    fi
33110    if test "x$new_path" = x; then
33111      # It's still not found. Now this is an unrecoverable error.
33112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33113$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33114      has_space=`$ECHO "$complete" | $GREP " "`
33115      if test "x$has_space" != x; then
33116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33118      fi
33119      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33120    fi
33121  fi
33122
33123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33126  # "foo.exe" is OK but "foo" is an error.
33127  #
33128  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33129  # It is also a way to make sure we got the proper file name for the real test later on.
33130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33131  if test "x$test_shortpath" = x; then
33132    # Short path failed, file does not exist as specified.
33133    # Try adding .exe or .cmd
33134    if test -f "${new_path}.exe"; then
33135      input_to_shortpath="${new_path}.exe"
33136    elif test -f "${new_path}.cmd"; then
33137      input_to_shortpath="${new_path}.cmd"
33138    else
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33140$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33141      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33142$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33143      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33144    fi
33145  else
33146    input_to_shortpath="$new_path"
33147  fi
33148
33149  # Call helper function which possibly converts this using DOS-style short mode.
33150  # If so, the updated path is stored in $new_path.
33151  new_path="$input_to_shortpath"
33152
33153  input_path="$input_to_shortpath"
33154  # Check if we need to convert this using DOS-style short mode. If the path
33155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33156  # take no chances and rewrite it.
33157  # Note: m4 eats our [], so we need to use [ and ] instead.
33158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33159  if test "x$has_forbidden_chars" != x; then
33160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33164      # Going to short mode and back again did indeed matter. Since short mode is
33165      # case insensitive, let's make it lowercase to improve readability.
33166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33167      # Now convert it back to Unix-style (cygpath)
33168      input_path=`$CYGPATH -u "$shortmode_path"`
33169      new_path="$input_path"
33170    fi
33171  fi
33172
33173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33174  if test "x$test_cygdrive_prefix" = x; then
33175    # As a simple fix, exclude /usr/bin since it's not a real path.
33176    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33178      # a path prefixed by /cygdrive for fixpath to work.
33179      new_path="$CYGWIN_ROOT_PATH$input_path"
33180    fi
33181  fi
33182
33183  # remove trailing .exe if any
33184  new_path="${new_path/%.exe/}"
33185
33186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33187
33188  # First separate the path from the arguments. This will split at the first
33189  # space.
33190  complete="$CXX"
33191  path="${complete%% *}"
33192  tmp="$complete EOL"
33193  arguments="${tmp#* }"
33194
33195  # Input might be given as Windows format, start by converting to
33196  # unix format.
33197  new_path="$path"
33198
33199  windows_path="$new_path"
33200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33201    unix_path=`$CYGPATH -u "$windows_path"`
33202    new_path="$unix_path"
33203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33205    new_path="$unix_path"
33206  fi
33207
33208
33209  # Now try to locate executable using which
33210  new_path=`$WHICH "$new_path" 2> /dev/null`
33211
33212  if test "x$new_path" = x; then
33213    # Oops. Which didn't find the executable.
33214    # The splitting of arguments from the executable at a space might have been incorrect,
33215    # since paths with space are more likely in Windows. Give it another try with the whole
33216    # argument.
33217    path="$complete"
33218    arguments="EOL"
33219    new_path="$path"
33220
33221  windows_path="$new_path"
33222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33223    unix_path=`$CYGPATH -u "$windows_path"`
33224    new_path="$unix_path"
33225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33227    new_path="$unix_path"
33228  fi
33229
33230
33231    new_path=`$WHICH "$new_path" 2> /dev/null`
33232    # bat and cmd files are not always considered executable in MSYS causing which
33233    # to not find them
33234    if test "x$new_path" = x \
33235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33237      new_path="$path"
33238
33239  windows_path="$new_path"
33240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33241    unix_path=`$CYGPATH -u "$windows_path"`
33242    new_path="$unix_path"
33243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33245    new_path="$unix_path"
33246  fi
33247
33248    fi
33249
33250    if test "x$new_path" = x; then
33251      # It's still not found. Now this is an unrecoverable error.
33252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33253$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33254      has_space=`$ECHO "$complete" | $GREP " "`
33255      if test "x$has_space" != x; then
33256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33258      fi
33259      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33260    fi
33261  fi
33262
33263  # Now new_path has a complete unix path to the binary
33264  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33265    # Keep paths in /bin as-is, but remove trailing .exe if any
33266    new_path="${new_path/%.exe/}"
33267    # Do not save /bin paths to all_fixpath_prefixes!
33268  else
33269    # Not in mixed or Windows style, start by that.
33270    new_path=`cmd //c echo $new_path`
33271
33272  input_path="$new_path"
33273  # Check if we need to convert this using DOS-style short mode. If the path
33274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33275  # take no chances and rewrite it.
33276  # Note: m4 eats our [], so we need to use [ and ] instead.
33277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33278  if test "x$has_forbidden_chars" != x; then
33279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33281  fi
33282
33283    # Output is in $new_path
33284
33285  windows_path="$new_path"
33286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33287    unix_path=`$CYGPATH -u "$windows_path"`
33288    new_path="$unix_path"
33289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33291    new_path="$unix_path"
33292  fi
33293
33294    # remove trailing .exe if any
33295    new_path="${new_path/%.exe/}"
33296
33297    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33298    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33299  fi
33300
33301    else
33302      # We're on a unix platform. Hooray! :)
33303      # First separate the path from the arguments. This will split at the first
33304      # space.
33305      complete="$CXX"
33306      path="${complete%% *}"
33307      tmp="$complete EOL"
33308      arguments="${tmp#* }"
33309
33310      # Cannot rely on the command "which" here since it doesn't always work.
33311      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33312      if test -z "$is_absolute_path"; then
33313        # Path to executable is not absolute. Find it.
33314        IFS_save="$IFS"
33315        IFS=:
33316        for p in $PATH; do
33317          if test -f "$p/$path" && test -x "$p/$path"; then
33318            new_path="$p/$path"
33319            break
33320          fi
33321        done
33322        IFS="$IFS_save"
33323      else
33324        # This is an absolute path, we can use it without further modifications.
33325        new_path="$path"
33326      fi
33327
33328      if test "x$new_path" = x; then
33329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33330$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33331        has_space=`$ECHO "$complete" | $GREP " "`
33332        if test "x$has_space" != x; then
33333          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33334$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33335        fi
33336        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33337      fi
33338    fi
33339
33340    # Now join together the path and the arguments once again
33341    if test "x$arguments" != xEOL; then
33342      new_complete="$new_path ${arguments% *}"
33343    else
33344      new_complete="$new_path"
33345    fi
33346
33347    if test "x$complete" != "x$new_complete"; then
33348      CXX="$new_complete"
33349      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33350$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33351    fi
33352  fi
33353
33354  TEST_COMPILER="$CXX"
33355
33356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33357$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33358  SYMLINK_ORIGINAL="$TEST_COMPILER"
33359
33360  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33361    # Follow a chain of symbolic links. Use readlink
33362    # where it exists, else fall back to horribly
33363    # complicated shell code.
33364    if test "x$READLINK_TESTED" != yes; then
33365      # On MacOSX there is a readlink tool with a different
33366      # purpose than the GNU readlink tool. Check the found readlink.
33367      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33368      if test "x$ISGNU" = x; then
33369        # A readlink that we do not know how to use.
33370        # Are there other non-GNU readlinks out there?
33371        READLINK_TESTED=yes
33372        READLINK=
33373      fi
33374    fi
33375
33376    if test "x$READLINK" != x; then
33377      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33378    else
33379      # Save the current directory for restoring afterwards
33380      STARTDIR=$PWD
33381      COUNTER=0
33382      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33383      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33384      cd $sym_link_dir
33385      # Use -P flag to resolve symlinks in directories.
33386      cd `$THEPWDCMD -P`
33387      sym_link_dir=`$THEPWDCMD -P`
33388      # Resolve file symlinks
33389      while test $COUNTER -lt 20; do
33390        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33391        if test "x$ISLINK" == x; then
33392          # This is not a symbolic link! We are done!
33393          break
33394        fi
33395        # Again resolve directory symlinks since the target of the just found
33396        # link could be in a different directory
33397        cd `$DIRNAME $ISLINK`
33398        sym_link_dir=`$THEPWDCMD -P`
33399        sym_link_file=`$BASENAME $ISLINK`
33400        let COUNTER=COUNTER+1
33401      done
33402      cd $STARTDIR
33403      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33404    fi
33405  fi
33406
33407  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33409$as_echo "no symlink" >&6; }
33410  else
33411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33412$as_echo "$SYMLINK_ORIGINAL" >&6; }
33413
33414    # We can't handle ccache by gcc wrappers, since we need to know if we're
33415    # using ccache. Instead ccache usage must be controlled by a configure option.
33416    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33417    if test "x$COMPILER_BASENAME" = "xccache"; then
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33419$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33420      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33421    fi
33422  fi
33423
33424
33425  COMPILER=$CXX
33426  COMPILER_NAME=$COMPILER_NAME
33427
33428  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33429    # cc -V output typically looks like
33430    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33431    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33432    # Check that this is likely to be the Solaris Studio cc.
33433    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33434    if test $? -ne 0; then
33435      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33436      { $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
33437$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33438      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33439$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33440      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33441$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33442      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33443    fi
33444    # Remove usage instructions (if present), and
33445    # collapse compiler output into a single line
33446    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33447        $SED -e 's/ *[Uu]sage:.*//'`
33448    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33449        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33450  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33451    # xlc -qversion output typically looks like
33452    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33453    #     Version: 11.01.0000.0015
33454    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33455    # Check that this is likely to be the IBM XL C compiler.
33456    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33457    if test $? -ne 0; then
33458      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33459      { $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
33460$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33461      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33462$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33463      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33464$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33465      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33466    fi
33467    # Collapse compiler output into a single line
33468    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33469    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33470        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33471  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33472    # There is no specific version flag, but all output starts with a version string.
33473    # First line typically looks something like:
33474    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33475    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33476    # Check that this is likely to be Microsoft CL.EXE.
33477    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33478    if test $? -ne 0; then
33479      { $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
33480$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33481      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33482$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33483      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33484    fi
33485    # Collapse compiler output into a single line
33486    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33487    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33488        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33489  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33490    # gcc --version output typically looks like
33491    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33492    #     Copyright (C) 2013 Free Software Foundation, Inc.
33493    #     This is free software; see the source for copying conditions.  There is NO
33494    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33495    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33496    # Check that this is likely to be GCC.
33497    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33498    if test $? -ne 0; then
33499      { $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
33500$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33501      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33502$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33503      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33504    fi
33505    # Remove Copyright and legalese from version string, and
33506    # collapse into a single line
33507    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33508        $SED -e 's/ *Copyright .*//'`
33509    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33510        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33511  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33512    # clang --version output typically looks like
33513    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33514    #    clang version 3.3 (tags/RELEASE_33/final)
33515    # or
33516    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33517    #    Target: x86_64-pc-linux-gnu
33518    #    Thread model: posix
33519    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33520    # Check that this is likely to be clang
33521    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33522    if test $? -ne 0; then
33523      { $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
33524$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33525      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33526$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33527      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33528    fi
33529    # Collapse compiler output into a single line
33530    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33531    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33532        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33533  else
33534      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33535  fi
33536  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33537  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33538  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33539  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33540
33541  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33542$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33543
33544
33545  # Now that we have resolved CXX ourself, let autoconf have its go at it
33546  ac_ext=cpp
33547ac_cpp='$CXXCPP $CPPFLAGS'
33548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33551if test -z "$CXX"; then
33552  if test -n "$CCC"; then
33553    CXX=$CCC
33554  else
33555    if test -n "$ac_tool_prefix"; then
33556  for ac_prog in $CXX
33557  do
33558    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33561$as_echo_n "checking for $ac_word... " >&6; }
33562if ${ac_cv_prog_CXX+:} false; then :
33563  $as_echo_n "(cached) " >&6
33564else
33565  if test -n "$CXX"; then
33566  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33567else
33568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33569for as_dir in $PATH
33570do
33571  IFS=$as_save_IFS
33572  test -z "$as_dir" && as_dir=.
33573    for ac_exec_ext in '' $ac_executable_extensions; do
33574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33575    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33577    break 2
33578  fi
33579done
33580  done
33581IFS=$as_save_IFS
33582
33583fi
33584fi
33585CXX=$ac_cv_prog_CXX
33586if test -n "$CXX"; then
33587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33588$as_echo "$CXX" >&6; }
33589else
33590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33591$as_echo "no" >&6; }
33592fi
33593
33594
33595    test -n "$CXX" && break
33596  done
33597fi
33598if test -z "$CXX"; then
33599  ac_ct_CXX=$CXX
33600  for ac_prog in $CXX
33601do
33602  # Extract the first word of "$ac_prog", so it can be a program name with args.
33603set dummy $ac_prog; ac_word=$2
33604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33605$as_echo_n "checking for $ac_word... " >&6; }
33606if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33607  $as_echo_n "(cached) " >&6
33608else
33609  if test -n "$ac_ct_CXX"; then
33610  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33611else
33612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33613for as_dir in $PATH
33614do
33615  IFS=$as_save_IFS
33616  test -z "$as_dir" && as_dir=.
33617    for ac_exec_ext in '' $ac_executable_extensions; do
33618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33619    ac_cv_prog_ac_ct_CXX="$ac_prog"
33620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33621    break 2
33622  fi
33623done
33624  done
33625IFS=$as_save_IFS
33626
33627fi
33628fi
33629ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33630if test -n "$ac_ct_CXX"; then
33631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33632$as_echo "$ac_ct_CXX" >&6; }
33633else
33634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33635$as_echo "no" >&6; }
33636fi
33637
33638
33639  test -n "$ac_ct_CXX" && break
33640done
33641
33642  if test "x$ac_ct_CXX" = x; then
33643    CXX="g++"
33644  else
33645    case $cross_compiling:$ac_tool_warned in
33646yes:)
33647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33649ac_tool_warned=yes ;;
33650esac
33651    CXX=$ac_ct_CXX
33652  fi
33653fi
33654
33655  fi
33656fi
33657# Provide some information about the compiler.
33658$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33659set X $ac_compile
33660ac_compiler=$2
33661for ac_option in --version -v -V -qversion; do
33662  { { ac_try="$ac_compiler $ac_option >&5"
33663case "(($ac_try" in
33664  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33665  *) ac_try_echo=$ac_try;;
33666esac
33667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33668$as_echo "$ac_try_echo"; } >&5
33669  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33670  ac_status=$?
33671  if test -s conftest.err; then
33672    sed '10a\
33673... rest of stderr output deleted ...
33674         10q' conftest.err >conftest.er1
33675    cat conftest.er1 >&5
33676  fi
33677  rm -f conftest.er1 conftest.err
33678  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33679  test $ac_status = 0; }
33680done
33681
33682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33683$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33684if ${ac_cv_cxx_compiler_gnu+:} false; then :
33685  $as_echo_n "(cached) " >&6
33686else
33687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33688/* end confdefs.h.  */
33689
33690int
33691main ()
33692{
33693#ifndef __GNUC__
33694       choke me
33695#endif
33696
33697  ;
33698  return 0;
33699}
33700_ACEOF
33701if ac_fn_cxx_try_compile "$LINENO"; then :
33702  ac_compiler_gnu=yes
33703else
33704  ac_compiler_gnu=no
33705fi
33706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33707ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33708
33709fi
33710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33711$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33712if test $ac_compiler_gnu = yes; then
33713  GXX=yes
33714else
33715  GXX=
33716fi
33717ac_test_CXXFLAGS=${CXXFLAGS+set}
33718ac_save_CXXFLAGS=$CXXFLAGS
33719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33720$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33721if ${ac_cv_prog_cxx_g+:} false; then :
33722  $as_echo_n "(cached) " >&6
33723else
33724  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33725   ac_cxx_werror_flag=yes
33726   ac_cv_prog_cxx_g=no
33727   CXXFLAGS="-g"
33728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33729/* end confdefs.h.  */
33730
33731int
33732main ()
33733{
33734
33735  ;
33736  return 0;
33737}
33738_ACEOF
33739if ac_fn_cxx_try_compile "$LINENO"; then :
33740  ac_cv_prog_cxx_g=yes
33741else
33742  CXXFLAGS=""
33743      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33744/* end confdefs.h.  */
33745
33746int
33747main ()
33748{
33749
33750  ;
33751  return 0;
33752}
33753_ACEOF
33754if ac_fn_cxx_try_compile "$LINENO"; then :
33755
33756else
33757  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33758	 CXXFLAGS="-g"
33759	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33760/* end confdefs.h.  */
33761
33762int
33763main ()
33764{
33765
33766  ;
33767  return 0;
33768}
33769_ACEOF
33770if ac_fn_cxx_try_compile "$LINENO"; then :
33771  ac_cv_prog_cxx_g=yes
33772fi
33773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33774fi
33775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33776fi
33777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33778   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33779fi
33780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33781$as_echo "$ac_cv_prog_cxx_g" >&6; }
33782if test "$ac_test_CXXFLAGS" = set; then
33783  CXXFLAGS=$ac_save_CXXFLAGS
33784elif test $ac_cv_prog_cxx_g = yes; then
33785  if test "$GXX" = yes; then
33786    CXXFLAGS="-g -O2"
33787  else
33788    CXXFLAGS="-g"
33789  fi
33790else
33791  if test "$GXX" = yes; then
33792    CXXFLAGS="-O2"
33793  else
33794    CXXFLAGS=
33795  fi
33796fi
33797ac_ext=cpp
33798ac_cpp='$CXXCPP $CPPFLAGS'
33799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33802
33803
33804  # This is the compiler version number on the form X.Y[.Z]
33805
33806
33807
33808
33809  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
33810    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
33811$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
33812    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
33813$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
33814  fi
33815
33816  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
33817  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
33818    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
33819$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
33820  fi
33821
33822  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
33823    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
33824$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
33825  fi
33826
33827  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
33828
33829
33830  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873    # Execute function body
33874
33875  # Need to assign to a variable since m4 is blocked from modifying parts in [].
33876  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
33877
33878  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
33879    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
33880  fi
33881
33882  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
33883    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
33884  fi
33885
33886  # Version comparison method inspired by http://stackoverflow.com/a/24067243
33887  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
33888
33889  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
33890    :
33891
33892  else
33893    :
33894
33895          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
33896$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
33897
33898
33899  fi
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912  fi
33913
33914  #
33915  # Setup the preprocessor (CPP and CXXCPP)
33916  #
33917  ac_ext=c
33918ac_cpp='$CPP $CPPFLAGS'
33919ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33920ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33921ac_compiler_gnu=$ac_cv_c_compiler_gnu
33922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33923$as_echo_n "checking how to run the C preprocessor... " >&6; }
33924# On Suns, sometimes $CPP names a directory.
33925if test -n "$CPP" && test -d "$CPP"; then
33926  CPP=
33927fi
33928if test -z "$CPP"; then
33929  if ${ac_cv_prog_CPP+:} false; then :
33930  $as_echo_n "(cached) " >&6
33931else
33932      # Double quotes because CPP needs to be expanded
33933    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33934    do
33935      ac_preproc_ok=false
33936for ac_c_preproc_warn_flag in '' yes
33937do
33938  # Use a header file that comes with gcc, so configuring glibc
33939  # with a fresh cross-compiler works.
33940  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33941  # <limits.h> exists even on freestanding compilers.
33942  # On the NeXT, cc -E runs the code through the compiler's parser,
33943  # not just through cpp. "Syntax error" is here to catch this case.
33944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33945/* end confdefs.h.  */
33946#ifdef __STDC__
33947# include <limits.h>
33948#else
33949# include <assert.h>
33950#endif
33951		     Syntax error
33952_ACEOF
33953if ac_fn_c_try_cpp "$LINENO"; then :
33954
33955else
33956  # Broken: fails on valid input.
33957continue
33958fi
33959rm -f conftest.err conftest.i conftest.$ac_ext
33960
33961  # OK, works on sane cases.  Now check whether nonexistent headers
33962  # can be detected and how.
33963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33964/* end confdefs.h.  */
33965#include <ac_nonexistent.h>
33966_ACEOF
33967if ac_fn_c_try_cpp "$LINENO"; then :
33968  # Broken: success on invalid input.
33969continue
33970else
33971  # Passes both tests.
33972ac_preproc_ok=:
33973break
33974fi
33975rm -f conftest.err conftest.i conftest.$ac_ext
33976
33977done
33978# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33979rm -f conftest.i conftest.err conftest.$ac_ext
33980if $ac_preproc_ok; then :
33981  break
33982fi
33983
33984    done
33985    ac_cv_prog_CPP=$CPP
33986
33987fi
33988  CPP=$ac_cv_prog_CPP
33989else
33990  ac_cv_prog_CPP=$CPP
33991fi
33992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33993$as_echo "$CPP" >&6; }
33994ac_preproc_ok=false
33995for ac_c_preproc_warn_flag in '' yes
33996do
33997  # Use a header file that comes with gcc, so configuring glibc
33998  # with a fresh cross-compiler works.
33999  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34000  # <limits.h> exists even on freestanding compilers.
34001  # On the NeXT, cc -E runs the code through the compiler's parser,
34002  # not just through cpp. "Syntax error" is here to catch this case.
34003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34004/* end confdefs.h.  */
34005#ifdef __STDC__
34006# include <limits.h>
34007#else
34008# include <assert.h>
34009#endif
34010		     Syntax error
34011_ACEOF
34012if ac_fn_c_try_cpp "$LINENO"; then :
34013
34014else
34015  # Broken: fails on valid input.
34016continue
34017fi
34018rm -f conftest.err conftest.i conftest.$ac_ext
34019
34020  # OK, works on sane cases.  Now check whether nonexistent headers
34021  # can be detected and how.
34022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34023/* end confdefs.h.  */
34024#include <ac_nonexistent.h>
34025_ACEOF
34026if ac_fn_c_try_cpp "$LINENO"; then :
34027  # Broken: success on invalid input.
34028continue
34029else
34030  # Passes both tests.
34031ac_preproc_ok=:
34032break
34033fi
34034rm -f conftest.err conftest.i conftest.$ac_ext
34035
34036done
34037# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34038rm -f conftest.i conftest.err conftest.$ac_ext
34039if $ac_preproc_ok; then :
34040
34041else
34042  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34044as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34045See \`config.log' for more details" "$LINENO" 5; }
34046fi
34047
34048ac_ext=cpp
34049ac_cpp='$CXXCPP $CPPFLAGS'
34050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34053
34054
34055  # Only process if variable expands to non-empty
34056
34057  if test "x$CPP" != x; then
34058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34059
34060  # First separate the path from the arguments. This will split at the first
34061  # space.
34062  complete="$CPP"
34063  path="${complete%% *}"
34064  tmp="$complete EOL"
34065  arguments="${tmp#* }"
34066
34067  # Input might be given as Windows format, start by converting to
34068  # unix format.
34069  new_path=`$CYGPATH -u "$path"`
34070
34071  # Now try to locate executable using which
34072  new_path=`$WHICH "$new_path" 2> /dev/null`
34073  # bat and cmd files are not always considered executable in cygwin causing which
34074  # to not find them
34075  if test "x$new_path" = x \
34076      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34077      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34078    new_path=`$CYGPATH -u "$path"`
34079  fi
34080  if test "x$new_path" = x; then
34081    # Oops. Which didn't find the executable.
34082    # The splitting of arguments from the executable at a space might have been incorrect,
34083    # since paths with space are more likely in Windows. Give it another try with the whole
34084    # argument.
34085    path="$complete"
34086    arguments="EOL"
34087    new_path=`$CYGPATH -u "$path"`
34088    new_path=`$WHICH "$new_path" 2> /dev/null`
34089    # bat and cmd files are not always considered executable in cygwin causing which
34090    # to not find them
34091    if test "x$new_path" = x \
34092        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34093        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34094      new_path=`$CYGPATH -u "$path"`
34095    fi
34096    if test "x$new_path" = x; then
34097      # It's still not found. Now this is an unrecoverable error.
34098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34099$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34100      has_space=`$ECHO "$complete" | $GREP " "`
34101      if test "x$has_space" != x; then
34102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34104      fi
34105      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34106    fi
34107  fi
34108
34109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34112  # "foo.exe" is OK but "foo" is an error.
34113  #
34114  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34115  # It is also a way to make sure we got the proper file name for the real test later on.
34116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34117  if test "x$test_shortpath" = x; then
34118    # Short path failed, file does not exist as specified.
34119    # Try adding .exe or .cmd
34120    if test -f "${new_path}.exe"; then
34121      input_to_shortpath="${new_path}.exe"
34122    elif test -f "${new_path}.cmd"; then
34123      input_to_shortpath="${new_path}.cmd"
34124    else
34125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34126$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34129      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34130    fi
34131  else
34132    input_to_shortpath="$new_path"
34133  fi
34134
34135  # Call helper function which possibly converts this using DOS-style short mode.
34136  # If so, the updated path is stored in $new_path.
34137  new_path="$input_to_shortpath"
34138
34139  input_path="$input_to_shortpath"
34140  # Check if we need to convert this using DOS-style short mode. If the path
34141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34142  # take no chances and rewrite it.
34143  # Note: m4 eats our [], so we need to use [ and ] instead.
34144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34145  if test "x$has_forbidden_chars" != x; then
34146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34150      # Going to short mode and back again did indeed matter. Since short mode is
34151      # case insensitive, let's make it lowercase to improve readability.
34152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34153      # Now convert it back to Unix-style (cygpath)
34154      input_path=`$CYGPATH -u "$shortmode_path"`
34155      new_path="$input_path"
34156    fi
34157  fi
34158
34159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34160  if test "x$test_cygdrive_prefix" = x; then
34161    # As a simple fix, exclude /usr/bin since it's not a real path.
34162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34164      # a path prefixed by /cygdrive for fixpath to work.
34165      new_path="$CYGWIN_ROOT_PATH$input_path"
34166    fi
34167  fi
34168
34169  # remove trailing .exe if any
34170  new_path="${new_path/%.exe/}"
34171
34172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34173
34174  # First separate the path from the arguments. This will split at the first
34175  # space.
34176  complete="$CPP"
34177  path="${complete%% *}"
34178  tmp="$complete EOL"
34179  arguments="${tmp#* }"
34180
34181  # Input might be given as Windows format, start by converting to
34182  # unix format.
34183  new_path="$path"
34184
34185  windows_path="$new_path"
34186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34187    unix_path=`$CYGPATH -u "$windows_path"`
34188    new_path="$unix_path"
34189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34191    new_path="$unix_path"
34192  fi
34193
34194
34195  # Now try to locate executable using which
34196  new_path=`$WHICH "$new_path" 2> /dev/null`
34197
34198  if test "x$new_path" = x; then
34199    # Oops. Which didn't find the executable.
34200    # The splitting of arguments from the executable at a space might have been incorrect,
34201    # since paths with space are more likely in Windows. Give it another try with the whole
34202    # argument.
34203    path="$complete"
34204    arguments="EOL"
34205    new_path="$path"
34206
34207  windows_path="$new_path"
34208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34209    unix_path=`$CYGPATH -u "$windows_path"`
34210    new_path="$unix_path"
34211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34213    new_path="$unix_path"
34214  fi
34215
34216
34217    new_path=`$WHICH "$new_path" 2> /dev/null`
34218    # bat and cmd files are not always considered executable in MSYS causing which
34219    # to not find them
34220    if test "x$new_path" = x \
34221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34223      new_path="$path"
34224
34225  windows_path="$new_path"
34226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34227    unix_path=`$CYGPATH -u "$windows_path"`
34228    new_path="$unix_path"
34229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34231    new_path="$unix_path"
34232  fi
34233
34234    fi
34235
34236    if test "x$new_path" = x; then
34237      # It's still not found. Now this is an unrecoverable error.
34238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34239$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34240      has_space=`$ECHO "$complete" | $GREP " "`
34241      if test "x$has_space" != x; then
34242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34244      fi
34245      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34246    fi
34247  fi
34248
34249  # Now new_path has a complete unix path to the binary
34250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34251    # Keep paths in /bin as-is, but remove trailing .exe if any
34252    new_path="${new_path/%.exe/}"
34253    # Do not save /bin paths to all_fixpath_prefixes!
34254  else
34255    # Not in mixed or Windows style, start by that.
34256    new_path=`cmd //c echo $new_path`
34257
34258  input_path="$new_path"
34259  # Check if we need to convert this using DOS-style short mode. If the path
34260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34261  # take no chances and rewrite it.
34262  # Note: m4 eats our [], so we need to use [ and ] instead.
34263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34264  if test "x$has_forbidden_chars" != x; then
34265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34267  fi
34268
34269    # Output is in $new_path
34270
34271  windows_path="$new_path"
34272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34273    unix_path=`$CYGPATH -u "$windows_path"`
34274    new_path="$unix_path"
34275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34277    new_path="$unix_path"
34278  fi
34279
34280    # remove trailing .exe if any
34281    new_path="${new_path/%.exe/}"
34282
34283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34285  fi
34286
34287    else
34288      # We're on a unix platform. Hooray! :)
34289      # First separate the path from the arguments. This will split at the first
34290      # space.
34291      complete="$CPP"
34292      path="${complete%% *}"
34293      tmp="$complete EOL"
34294      arguments="${tmp#* }"
34295
34296      # Cannot rely on the command "which" here since it doesn't always work.
34297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34298      if test -z "$is_absolute_path"; then
34299        # Path to executable is not absolute. Find it.
34300        IFS_save="$IFS"
34301        IFS=:
34302        for p in $PATH; do
34303          if test -f "$p/$path" && test -x "$p/$path"; then
34304            new_path="$p/$path"
34305            break
34306          fi
34307        done
34308        IFS="$IFS_save"
34309      else
34310        # This is an absolute path, we can use it without further modifications.
34311        new_path="$path"
34312      fi
34313
34314      if test "x$new_path" = x; then
34315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34316$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34317        has_space=`$ECHO "$complete" | $GREP " "`
34318        if test "x$has_space" != x; then
34319          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34320$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34321        fi
34322        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34323      fi
34324    fi
34325
34326    # Now join together the path and the arguments once again
34327    if test "x$arguments" != xEOL; then
34328      new_complete="$new_path ${arguments% *}"
34329    else
34330      new_complete="$new_path"
34331    fi
34332
34333    if test "x$complete" != "x$new_complete"; then
34334      CPP="$new_complete"
34335      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34336$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34337    fi
34338  fi
34339
34340  ac_ext=cpp
34341ac_cpp='$CXXCPP $CPPFLAGS'
34342ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34343ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34344ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34346$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34347if test -z "$CXXCPP"; then
34348  if ${ac_cv_prog_CXXCPP+:} false; then :
34349  $as_echo_n "(cached) " >&6
34350else
34351      # Double quotes because CXXCPP needs to be expanded
34352    for CXXCPP in "$CXX -E" "/lib/cpp"
34353    do
34354      ac_preproc_ok=false
34355for ac_cxx_preproc_warn_flag in '' yes
34356do
34357  # Use a header file that comes with gcc, so configuring glibc
34358  # with a fresh cross-compiler works.
34359  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34360  # <limits.h> exists even on freestanding compilers.
34361  # On the NeXT, cc -E runs the code through the compiler's parser,
34362  # not just through cpp. "Syntax error" is here to catch this case.
34363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34364/* end confdefs.h.  */
34365#ifdef __STDC__
34366# include <limits.h>
34367#else
34368# include <assert.h>
34369#endif
34370		     Syntax error
34371_ACEOF
34372if ac_fn_cxx_try_cpp "$LINENO"; then :
34373
34374else
34375  # Broken: fails on valid input.
34376continue
34377fi
34378rm -f conftest.err conftest.i conftest.$ac_ext
34379
34380  # OK, works on sane cases.  Now check whether nonexistent headers
34381  # can be detected and how.
34382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34383/* end confdefs.h.  */
34384#include <ac_nonexistent.h>
34385_ACEOF
34386if ac_fn_cxx_try_cpp "$LINENO"; then :
34387  # Broken: success on invalid input.
34388continue
34389else
34390  # Passes both tests.
34391ac_preproc_ok=:
34392break
34393fi
34394rm -f conftest.err conftest.i conftest.$ac_ext
34395
34396done
34397# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34398rm -f conftest.i conftest.err conftest.$ac_ext
34399if $ac_preproc_ok; then :
34400  break
34401fi
34402
34403    done
34404    ac_cv_prog_CXXCPP=$CXXCPP
34405
34406fi
34407  CXXCPP=$ac_cv_prog_CXXCPP
34408else
34409  ac_cv_prog_CXXCPP=$CXXCPP
34410fi
34411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34412$as_echo "$CXXCPP" >&6; }
34413ac_preproc_ok=false
34414for ac_cxx_preproc_warn_flag in '' yes
34415do
34416  # Use a header file that comes with gcc, so configuring glibc
34417  # with a fresh cross-compiler works.
34418  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34419  # <limits.h> exists even on freestanding compilers.
34420  # On the NeXT, cc -E runs the code through the compiler's parser,
34421  # not just through cpp. "Syntax error" is here to catch this case.
34422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34423/* end confdefs.h.  */
34424#ifdef __STDC__
34425# include <limits.h>
34426#else
34427# include <assert.h>
34428#endif
34429		     Syntax error
34430_ACEOF
34431if ac_fn_cxx_try_cpp "$LINENO"; then :
34432
34433else
34434  # Broken: fails on valid input.
34435continue
34436fi
34437rm -f conftest.err conftest.i conftest.$ac_ext
34438
34439  # OK, works on sane cases.  Now check whether nonexistent headers
34440  # can be detected and how.
34441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34442/* end confdefs.h.  */
34443#include <ac_nonexistent.h>
34444_ACEOF
34445if ac_fn_cxx_try_cpp "$LINENO"; then :
34446  # Broken: success on invalid input.
34447continue
34448else
34449  # Passes both tests.
34450ac_preproc_ok=:
34451break
34452fi
34453rm -f conftest.err conftest.i conftest.$ac_ext
34454
34455done
34456# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34457rm -f conftest.i conftest.err conftest.$ac_ext
34458if $ac_preproc_ok; then :
34459
34460else
34461  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34463as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34464See \`config.log' for more details" "$LINENO" 5; }
34465fi
34466
34467ac_ext=cpp
34468ac_cpp='$CXXCPP $CPPFLAGS'
34469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34472
34473
34474  # Only process if variable expands to non-empty
34475
34476  if test "x$CXXCPP" != x; then
34477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34478
34479  # First separate the path from the arguments. This will split at the first
34480  # space.
34481  complete="$CXXCPP"
34482  path="${complete%% *}"
34483  tmp="$complete EOL"
34484  arguments="${tmp#* }"
34485
34486  # Input might be given as Windows format, start by converting to
34487  # unix format.
34488  new_path=`$CYGPATH -u "$path"`
34489
34490  # Now try to locate executable using which
34491  new_path=`$WHICH "$new_path" 2> /dev/null`
34492  # bat and cmd files are not always considered executable in cygwin causing which
34493  # to not find them
34494  if test "x$new_path" = x \
34495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34497    new_path=`$CYGPATH -u "$path"`
34498  fi
34499  if test "x$new_path" = x; then
34500    # Oops. Which didn't find the executable.
34501    # The splitting of arguments from the executable at a space might have been incorrect,
34502    # since paths with space are more likely in Windows. Give it another try with the whole
34503    # argument.
34504    path="$complete"
34505    arguments="EOL"
34506    new_path=`$CYGPATH -u "$path"`
34507    new_path=`$WHICH "$new_path" 2> /dev/null`
34508    # bat and cmd files are not always considered executable in cygwin causing which
34509    # to not find them
34510    if test "x$new_path" = x \
34511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34513      new_path=`$CYGPATH -u "$path"`
34514    fi
34515    if test "x$new_path" = x; then
34516      # It's still not found. Now this is an unrecoverable error.
34517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34518$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34519      has_space=`$ECHO "$complete" | $GREP " "`
34520      if test "x$has_space" != x; then
34521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34523      fi
34524      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34525    fi
34526  fi
34527
34528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34531  # "foo.exe" is OK but "foo" is an error.
34532  #
34533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34534  # It is also a way to make sure we got the proper file name for the real test later on.
34535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34536  if test "x$test_shortpath" = x; then
34537    # Short path failed, file does not exist as specified.
34538    # Try adding .exe or .cmd
34539    if test -f "${new_path}.exe"; then
34540      input_to_shortpath="${new_path}.exe"
34541    elif test -f "${new_path}.cmd"; then
34542      input_to_shortpath="${new_path}.cmd"
34543    else
34544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34545$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34548      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34549    fi
34550  else
34551    input_to_shortpath="$new_path"
34552  fi
34553
34554  # Call helper function which possibly converts this using DOS-style short mode.
34555  # If so, the updated path is stored in $new_path.
34556  new_path="$input_to_shortpath"
34557
34558  input_path="$input_to_shortpath"
34559  # Check if we need to convert this using DOS-style short mode. If the path
34560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34561  # take no chances and rewrite it.
34562  # Note: m4 eats our [], so we need to use [ and ] instead.
34563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34564  if test "x$has_forbidden_chars" != x; then
34565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34569      # Going to short mode and back again did indeed matter. Since short mode is
34570      # case insensitive, let's make it lowercase to improve readability.
34571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34572      # Now convert it back to Unix-style (cygpath)
34573      input_path=`$CYGPATH -u "$shortmode_path"`
34574      new_path="$input_path"
34575    fi
34576  fi
34577
34578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34579  if test "x$test_cygdrive_prefix" = x; then
34580    # As a simple fix, exclude /usr/bin since it's not a real path.
34581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34583      # a path prefixed by /cygdrive for fixpath to work.
34584      new_path="$CYGWIN_ROOT_PATH$input_path"
34585    fi
34586  fi
34587
34588  # remove trailing .exe if any
34589  new_path="${new_path/%.exe/}"
34590
34591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34592
34593  # First separate the path from the arguments. This will split at the first
34594  # space.
34595  complete="$CXXCPP"
34596  path="${complete%% *}"
34597  tmp="$complete EOL"
34598  arguments="${tmp#* }"
34599
34600  # Input might be given as Windows format, start by converting to
34601  # unix format.
34602  new_path="$path"
34603
34604  windows_path="$new_path"
34605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34606    unix_path=`$CYGPATH -u "$windows_path"`
34607    new_path="$unix_path"
34608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34610    new_path="$unix_path"
34611  fi
34612
34613
34614  # Now try to locate executable using which
34615  new_path=`$WHICH "$new_path" 2> /dev/null`
34616
34617  if test "x$new_path" = x; then
34618    # Oops. Which didn't find the executable.
34619    # The splitting of arguments from the executable at a space might have been incorrect,
34620    # since paths with space are more likely in Windows. Give it another try with the whole
34621    # argument.
34622    path="$complete"
34623    arguments="EOL"
34624    new_path="$path"
34625
34626  windows_path="$new_path"
34627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34628    unix_path=`$CYGPATH -u "$windows_path"`
34629    new_path="$unix_path"
34630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34632    new_path="$unix_path"
34633  fi
34634
34635
34636    new_path=`$WHICH "$new_path" 2> /dev/null`
34637    # bat and cmd files are not always considered executable in MSYS causing which
34638    # to not find them
34639    if test "x$new_path" = x \
34640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34642      new_path="$path"
34643
34644  windows_path="$new_path"
34645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34646    unix_path=`$CYGPATH -u "$windows_path"`
34647    new_path="$unix_path"
34648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34650    new_path="$unix_path"
34651  fi
34652
34653    fi
34654
34655    if test "x$new_path" = x; then
34656      # It's still not found. Now this is an unrecoverable error.
34657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34658$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34659      has_space=`$ECHO "$complete" | $GREP " "`
34660      if test "x$has_space" != x; then
34661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34663      fi
34664      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34665    fi
34666  fi
34667
34668  # Now new_path has a complete unix path to the binary
34669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34670    # Keep paths in /bin as-is, but remove trailing .exe if any
34671    new_path="${new_path/%.exe/}"
34672    # Do not save /bin paths to all_fixpath_prefixes!
34673  else
34674    # Not in mixed or Windows style, start by that.
34675    new_path=`cmd //c echo $new_path`
34676
34677  input_path="$new_path"
34678  # Check if we need to convert this using DOS-style short mode. If the path
34679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34680  # take no chances and rewrite it.
34681  # Note: m4 eats our [], so we need to use [ and ] instead.
34682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34683  if test "x$has_forbidden_chars" != x; then
34684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34686  fi
34687
34688    # Output is in $new_path
34689
34690  windows_path="$new_path"
34691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34692    unix_path=`$CYGPATH -u "$windows_path"`
34693    new_path="$unix_path"
34694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34696    new_path="$unix_path"
34697  fi
34698
34699    # remove trailing .exe if any
34700    new_path="${new_path/%.exe/}"
34701
34702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34704  fi
34705
34706    else
34707      # We're on a unix platform. Hooray! :)
34708      # First separate the path from the arguments. This will split at the first
34709      # space.
34710      complete="$CXXCPP"
34711      path="${complete%% *}"
34712      tmp="$complete EOL"
34713      arguments="${tmp#* }"
34714
34715      # Cannot rely on the command "which" here since it doesn't always work.
34716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34717      if test -z "$is_absolute_path"; then
34718        # Path to executable is not absolute. Find it.
34719        IFS_save="$IFS"
34720        IFS=:
34721        for p in $PATH; do
34722          if test -f "$p/$path" && test -x "$p/$path"; then
34723            new_path="$p/$path"
34724            break
34725          fi
34726        done
34727        IFS="$IFS_save"
34728      else
34729        # This is an absolute path, we can use it without further modifications.
34730        new_path="$path"
34731      fi
34732
34733      if test "x$new_path" = x; then
34734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34735$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34736        has_space=`$ECHO "$complete" | $GREP " "`
34737        if test "x$has_space" != x; then
34738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34740        fi
34741        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34742      fi
34743    fi
34744
34745    # Now join together the path and the arguments once again
34746    if test "x$arguments" != xEOL; then
34747      new_complete="$new_path ${arguments% *}"
34748    else
34749      new_complete="$new_path"
34750    fi
34751
34752    if test "x$complete" != "x$new_complete"; then
34753      CXXCPP="$new_complete"
34754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34755$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34756    fi
34757  fi
34758
34759
34760  #
34761  # Setup the linker (LD)
34762  #
34763  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34764    # In the Microsoft toolchain we have a separate LD command "link".
34765    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34766    # a cygwin program for something completely different.
34767    # Extract the first word of "link", so it can be a program name with args.
34768set dummy link; ac_word=$2
34769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34770$as_echo_n "checking for $ac_word... " >&6; }
34771if ${ac_cv_prog_LD+:} false; then :
34772  $as_echo_n "(cached) " >&6
34773else
34774  if test -n "$LD"; then
34775  ac_cv_prog_LD="$LD" # Let the user override the test.
34776else
34777  ac_prog_rejected=no
34778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34779for as_dir in $PATH
34780do
34781  IFS=$as_save_IFS
34782  test -z "$as_dir" && as_dir=.
34783    for ac_exec_ext in '' $ac_executable_extensions; do
34784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34785    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34786       ac_prog_rejected=yes
34787       continue
34788     fi
34789    ac_cv_prog_LD="link"
34790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34791    break 2
34792  fi
34793done
34794  done
34795IFS=$as_save_IFS
34796
34797if test $ac_prog_rejected = yes; then
34798  # We found a bogon in the path, so make sure we never use it.
34799  set dummy $ac_cv_prog_LD
34800  shift
34801  if test $# != 0; then
34802    # We chose a different compiler from the bogus one.
34803    # However, it has the same basename, so the bogon will be chosen
34804    # first if we set LD to just the basename; use the full file name.
34805    shift
34806    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34807  fi
34808fi
34809fi
34810fi
34811LD=$ac_cv_prog_LD
34812if test -n "$LD"; then
34813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34814$as_echo "$LD" >&6; }
34815else
34816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34817$as_echo "no" >&6; }
34818fi
34819
34820
34821
34822  # Only process if variable expands to non-empty
34823
34824  if test "x$LD" != x; then
34825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34826
34827  # First separate the path from the arguments. This will split at the first
34828  # space.
34829  complete="$LD"
34830  path="${complete%% *}"
34831  tmp="$complete EOL"
34832  arguments="${tmp#* }"
34833
34834  # Input might be given as Windows format, start by converting to
34835  # unix format.
34836  new_path=`$CYGPATH -u "$path"`
34837
34838  # Now try to locate executable using which
34839  new_path=`$WHICH "$new_path" 2> /dev/null`
34840  # bat and cmd files are not always considered executable in cygwin causing which
34841  # to not find them
34842  if test "x$new_path" = x \
34843      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34844      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34845    new_path=`$CYGPATH -u "$path"`
34846  fi
34847  if test "x$new_path" = x; then
34848    # Oops. Which didn't find the executable.
34849    # The splitting of arguments from the executable at a space might have been incorrect,
34850    # since paths with space are more likely in Windows. Give it another try with the whole
34851    # argument.
34852    path="$complete"
34853    arguments="EOL"
34854    new_path=`$CYGPATH -u "$path"`
34855    new_path=`$WHICH "$new_path" 2> /dev/null`
34856    # bat and cmd files are not always considered executable in cygwin causing which
34857    # to not find them
34858    if test "x$new_path" = x \
34859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34861      new_path=`$CYGPATH -u "$path"`
34862    fi
34863    if test "x$new_path" = x; then
34864      # It's still not found. Now this is an unrecoverable error.
34865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34866$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34867      has_space=`$ECHO "$complete" | $GREP " "`
34868      if test "x$has_space" != x; then
34869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34871      fi
34872      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34873    fi
34874  fi
34875
34876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34879  # "foo.exe" is OK but "foo" is an error.
34880  #
34881  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34882  # It is also a way to make sure we got the proper file name for the real test later on.
34883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34884  if test "x$test_shortpath" = x; then
34885    # Short path failed, file does not exist as specified.
34886    # Try adding .exe or .cmd
34887    if test -f "${new_path}.exe"; then
34888      input_to_shortpath="${new_path}.exe"
34889    elif test -f "${new_path}.cmd"; then
34890      input_to_shortpath="${new_path}.cmd"
34891    else
34892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34893$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34896      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34897    fi
34898  else
34899    input_to_shortpath="$new_path"
34900  fi
34901
34902  # Call helper function which possibly converts this using DOS-style short mode.
34903  # If so, the updated path is stored in $new_path.
34904  new_path="$input_to_shortpath"
34905
34906  input_path="$input_to_shortpath"
34907  # Check if we need to convert this using DOS-style short mode. If the path
34908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34909  # take no chances and rewrite it.
34910  # Note: m4 eats our [], so we need to use [ and ] instead.
34911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34912  if test "x$has_forbidden_chars" != x; then
34913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34917      # Going to short mode and back again did indeed matter. Since short mode is
34918      # case insensitive, let's make it lowercase to improve readability.
34919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34920      # Now convert it back to Unix-style (cygpath)
34921      input_path=`$CYGPATH -u "$shortmode_path"`
34922      new_path="$input_path"
34923    fi
34924  fi
34925
34926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34927  if test "x$test_cygdrive_prefix" = x; then
34928    # As a simple fix, exclude /usr/bin since it's not a real path.
34929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34931      # a path prefixed by /cygdrive for fixpath to work.
34932      new_path="$CYGWIN_ROOT_PATH$input_path"
34933    fi
34934  fi
34935
34936  # remove trailing .exe if any
34937  new_path="${new_path/%.exe/}"
34938
34939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34940
34941  # First separate the path from the arguments. This will split at the first
34942  # space.
34943  complete="$LD"
34944  path="${complete%% *}"
34945  tmp="$complete EOL"
34946  arguments="${tmp#* }"
34947
34948  # Input might be given as Windows format, start by converting to
34949  # unix format.
34950  new_path="$path"
34951
34952  windows_path="$new_path"
34953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34954    unix_path=`$CYGPATH -u "$windows_path"`
34955    new_path="$unix_path"
34956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34958    new_path="$unix_path"
34959  fi
34960
34961
34962  # Now try to locate executable using which
34963  new_path=`$WHICH "$new_path" 2> /dev/null`
34964
34965  if test "x$new_path" = x; then
34966    # Oops. Which didn't find the executable.
34967    # The splitting of arguments from the executable at a space might have been incorrect,
34968    # since paths with space are more likely in Windows. Give it another try with the whole
34969    # argument.
34970    path="$complete"
34971    arguments="EOL"
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
34984    new_path=`$WHICH "$new_path" 2> /dev/null`
34985    # bat and cmd files are not always considered executable in MSYS causing which
34986    # to not find them
34987    if test "x$new_path" = x \
34988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34990      new_path="$path"
34991
34992  windows_path="$new_path"
34993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34994    unix_path=`$CYGPATH -u "$windows_path"`
34995    new_path="$unix_path"
34996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34998    new_path="$unix_path"
34999  fi
35000
35001    fi
35002
35003    if test "x$new_path" = x; then
35004      # It's still not found. Now this is an unrecoverable error.
35005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35006$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35007      has_space=`$ECHO "$complete" | $GREP " "`
35008      if test "x$has_space" != x; then
35009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35011      fi
35012      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35013    fi
35014  fi
35015
35016  # Now new_path has a complete unix path to the binary
35017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35018    # Keep paths in /bin as-is, but remove trailing .exe if any
35019    new_path="${new_path/%.exe/}"
35020    # Do not save /bin paths to all_fixpath_prefixes!
35021  else
35022    # Not in mixed or Windows style, start by that.
35023    new_path=`cmd //c echo $new_path`
35024
35025  input_path="$new_path"
35026  # Check if we need to convert this using DOS-style short mode. If the path
35027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35028  # take no chances and rewrite it.
35029  # Note: m4 eats our [], so we need to use [ and ] instead.
35030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35031  if test "x$has_forbidden_chars" != x; then
35032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35034  fi
35035
35036    # Output is in $new_path
35037
35038  windows_path="$new_path"
35039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35040    unix_path=`$CYGPATH -u "$windows_path"`
35041    new_path="$unix_path"
35042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35044    new_path="$unix_path"
35045  fi
35046
35047    # remove trailing .exe if any
35048    new_path="${new_path/%.exe/}"
35049
35050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35052  fi
35053
35054    else
35055      # We're on a unix platform. Hooray! :)
35056      # First separate the path from the arguments. This will split at the first
35057      # space.
35058      complete="$LD"
35059      path="${complete%% *}"
35060      tmp="$complete EOL"
35061      arguments="${tmp#* }"
35062
35063      # Cannot rely on the command "which" here since it doesn't always work.
35064      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35065      if test -z "$is_absolute_path"; then
35066        # Path to executable is not absolute. Find it.
35067        IFS_save="$IFS"
35068        IFS=:
35069        for p in $PATH; do
35070          if test -f "$p/$path" && test -x "$p/$path"; then
35071            new_path="$p/$path"
35072            break
35073          fi
35074        done
35075        IFS="$IFS_save"
35076      else
35077        # This is an absolute path, we can use it without further modifications.
35078        new_path="$path"
35079      fi
35080
35081      if test "x$new_path" = x; then
35082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35083$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35084        has_space=`$ECHO "$complete" | $GREP " "`
35085        if test "x$has_space" != x; then
35086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35088        fi
35089        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35090      fi
35091    fi
35092
35093    # Now join together the path and the arguments once again
35094    if test "x$arguments" != xEOL; then
35095      new_complete="$new_path ${arguments% *}"
35096    else
35097      new_complete="$new_path"
35098    fi
35099
35100    if test "x$complete" != "x$new_complete"; then
35101      LD="$new_complete"
35102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35103$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35104    fi
35105  fi
35106
35107    # Verify that we indeed succeeded with this trick.
35108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35109$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35110    "$LD" --version > /dev/null
35111    if test $? -eq 0 ; then
35112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35113$as_echo "no" >&6; }
35114      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35115    else
35116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35117$as_echo "yes" >&6; }
35118    fi
35119    LDCXX="$LD"
35120  else
35121    # All other toolchains use the compiler to link.
35122    LD="$CC"
35123    LDCXX="$CXX"
35124  fi
35125
35126  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35127
35128
35129  #
35130  # Setup the assembler (AS)
35131  #
35132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35133    # FIXME: should this really be solaris, or solstudio?
35134
35135
35136  # Publish this variable in the help.
35137
35138
35139  if [ -z "${AS+x}" ]; then
35140    # The variable is not set by user, try to locate tool using the code snippet
35141    for ac_prog in as
35142do
35143  # Extract the first word of "$ac_prog", so it can be a program name with args.
35144set dummy $ac_prog; ac_word=$2
35145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35146$as_echo_n "checking for $ac_word... " >&6; }
35147if ${ac_cv_path_AS+:} false; then :
35148  $as_echo_n "(cached) " >&6
35149else
35150  case $AS in
35151  [\\/]* | ?:[\\/]*)
35152  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35153  ;;
35154  *)
35155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35156for as_dir in $PATH
35157do
35158  IFS=$as_save_IFS
35159  test -z "$as_dir" && as_dir=.
35160    for ac_exec_ext in '' $ac_executable_extensions; do
35161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35162    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35164    break 2
35165  fi
35166done
35167  done
35168IFS=$as_save_IFS
35169
35170  ;;
35171esac
35172fi
35173AS=$ac_cv_path_AS
35174if test -n "$AS"; then
35175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35176$as_echo "$AS" >&6; }
35177else
35178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35179$as_echo "no" >&6; }
35180fi
35181
35182
35183  test -n "$AS" && break
35184done
35185
35186  else
35187    # The variable is set, but is it from the command line or the environment?
35188
35189    # Try to remove the string !AS! from our list.
35190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35192      # If it failed, the variable was not from the command line. Ignore it,
35193      # but warn the user (except for BASH, which is always set by the calling BASH).
35194      if test "xAS" != xBASH; then
35195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35196$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35197      fi
35198      # Try to locate tool using the code snippet
35199      for ac_prog in as
35200do
35201  # Extract the first word of "$ac_prog", so it can be a program name with args.
35202set dummy $ac_prog; ac_word=$2
35203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35204$as_echo_n "checking for $ac_word... " >&6; }
35205if ${ac_cv_path_AS+:} false; then :
35206  $as_echo_n "(cached) " >&6
35207else
35208  case $AS in
35209  [\\/]* | ?:[\\/]*)
35210  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35211  ;;
35212  *)
35213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35214for as_dir in $PATH
35215do
35216  IFS=$as_save_IFS
35217  test -z "$as_dir" && as_dir=.
35218    for ac_exec_ext in '' $ac_executable_extensions; do
35219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35220    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35222    break 2
35223  fi
35224done
35225  done
35226IFS=$as_save_IFS
35227
35228  ;;
35229esac
35230fi
35231AS=$ac_cv_path_AS
35232if test -n "$AS"; then
35233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35234$as_echo "$AS" >&6; }
35235else
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35237$as_echo "no" >&6; }
35238fi
35239
35240
35241  test -n "$AS" && break
35242done
35243
35244    else
35245      # If it succeeded, then it was overridden by the user. We will use it
35246      # for the tool.
35247
35248      # First remove it from the list of overridden variables, so we can test
35249      # for unknown variables in the end.
35250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35251
35252      # Check if we try to supply an empty value
35253      if test "x$AS" = x; then
35254        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35255$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35257$as_echo_n "checking for AS... " >&6; }
35258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35259$as_echo "disabled" >&6; }
35260      else
35261        # Check if the provided tool contains a complete path.
35262        tool_specified="$AS"
35263        tool_basename="${tool_specified##*/}"
35264        if test "x$tool_basename" = "x$tool_specified"; then
35265          # A command without a complete path is provided, search $PATH.
35266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35267$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35268          # Extract the first word of "$tool_basename", so it can be a program name with args.
35269set dummy $tool_basename; ac_word=$2
35270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35271$as_echo_n "checking for $ac_word... " >&6; }
35272if ${ac_cv_path_AS+:} false; then :
35273  $as_echo_n "(cached) " >&6
35274else
35275  case $AS in
35276  [\\/]* | ?:[\\/]*)
35277  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35278  ;;
35279  *)
35280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35281for as_dir in $PATH
35282do
35283  IFS=$as_save_IFS
35284  test -z "$as_dir" && as_dir=.
35285    for ac_exec_ext in '' $ac_executable_extensions; do
35286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35287    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35289    break 2
35290  fi
35291done
35292  done
35293IFS=$as_save_IFS
35294
35295  ;;
35296esac
35297fi
35298AS=$ac_cv_path_AS
35299if test -n "$AS"; then
35300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35301$as_echo "$AS" >&6; }
35302else
35303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35304$as_echo "no" >&6; }
35305fi
35306
35307
35308          if test "x$AS" = x; then
35309            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35310          fi
35311        else
35312          # Otherwise we believe it is a complete path. Use it as it is.
35313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35314$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35315          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35316$as_echo_n "checking for AS... " >&6; }
35317          if test ! -x "$tool_specified"; then
35318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35319$as_echo "not found" >&6; }
35320            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35321          fi
35322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35323$as_echo "$tool_specified" >&6; }
35324        fi
35325      fi
35326    fi
35327
35328  fi
35329
35330
35331
35332  # Only process if variable expands to non-empty
35333
35334  if test "x$AS" != x; then
35335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35336
35337  # First separate the path from the arguments. This will split at the first
35338  # space.
35339  complete="$AS"
35340  path="${complete%% *}"
35341  tmp="$complete EOL"
35342  arguments="${tmp#* }"
35343
35344  # Input might be given as Windows format, start by converting to
35345  # unix format.
35346  new_path=`$CYGPATH -u "$path"`
35347
35348  # Now try to locate executable using which
35349  new_path=`$WHICH "$new_path" 2> /dev/null`
35350  # bat and cmd files are not always considered executable in cygwin causing which
35351  # to not find them
35352  if test "x$new_path" = x \
35353      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35354      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35355    new_path=`$CYGPATH -u "$path"`
35356  fi
35357  if test "x$new_path" = x; then
35358    # Oops. Which didn't find the executable.
35359    # The splitting of arguments from the executable at a space might have been incorrect,
35360    # since paths with space are more likely in Windows. Give it another try with the whole
35361    # argument.
35362    path="$complete"
35363    arguments="EOL"
35364    new_path=`$CYGPATH -u "$path"`
35365    new_path=`$WHICH "$new_path" 2> /dev/null`
35366    # bat and cmd files are not always considered executable in cygwin causing which
35367    # to not find them
35368    if test "x$new_path" = x \
35369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35371      new_path=`$CYGPATH -u "$path"`
35372    fi
35373    if test "x$new_path" = x; then
35374      # It's still not found. Now this is an unrecoverable error.
35375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35376$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35377      has_space=`$ECHO "$complete" | $GREP " "`
35378      if test "x$has_space" != x; then
35379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35381      fi
35382      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35383    fi
35384  fi
35385
35386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35389  # "foo.exe" is OK but "foo" is an error.
35390  #
35391  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35392  # It is also a way to make sure we got the proper file name for the real test later on.
35393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35394  if test "x$test_shortpath" = x; then
35395    # Short path failed, file does not exist as specified.
35396    # Try adding .exe or .cmd
35397    if test -f "${new_path}.exe"; then
35398      input_to_shortpath="${new_path}.exe"
35399    elif test -f "${new_path}.cmd"; then
35400      input_to_shortpath="${new_path}.cmd"
35401    else
35402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35403$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35406      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35407    fi
35408  else
35409    input_to_shortpath="$new_path"
35410  fi
35411
35412  # Call helper function which possibly converts this using DOS-style short mode.
35413  # If so, the updated path is stored in $new_path.
35414  new_path="$input_to_shortpath"
35415
35416  input_path="$input_to_shortpath"
35417  # Check if we need to convert this using DOS-style short mode. If the path
35418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35419  # take no chances and rewrite it.
35420  # Note: m4 eats our [], so we need to use [ and ] instead.
35421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35422  if test "x$has_forbidden_chars" != x; then
35423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35427      # Going to short mode and back again did indeed matter. Since short mode is
35428      # case insensitive, let's make it lowercase to improve readability.
35429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35430      # Now convert it back to Unix-style (cygpath)
35431      input_path=`$CYGPATH -u "$shortmode_path"`
35432      new_path="$input_path"
35433    fi
35434  fi
35435
35436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35437  if test "x$test_cygdrive_prefix" = x; then
35438    # As a simple fix, exclude /usr/bin since it's not a real path.
35439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35441      # a path prefixed by /cygdrive for fixpath to work.
35442      new_path="$CYGWIN_ROOT_PATH$input_path"
35443    fi
35444  fi
35445
35446  # remove trailing .exe if any
35447  new_path="${new_path/%.exe/}"
35448
35449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35450
35451  # First separate the path from the arguments. This will split at the first
35452  # space.
35453  complete="$AS"
35454  path="${complete%% *}"
35455  tmp="$complete EOL"
35456  arguments="${tmp#* }"
35457
35458  # Input might be given as Windows format, start by converting to
35459  # unix format.
35460  new_path="$path"
35461
35462  windows_path="$new_path"
35463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35464    unix_path=`$CYGPATH -u "$windows_path"`
35465    new_path="$unix_path"
35466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35468    new_path="$unix_path"
35469  fi
35470
35471
35472  # Now try to locate executable using which
35473  new_path=`$WHICH "$new_path" 2> /dev/null`
35474
35475  if test "x$new_path" = x; then
35476    # Oops. Which didn't find the executable.
35477    # The splitting of arguments from the executable at a space might have been incorrect,
35478    # since paths with space are more likely in Windows. Give it another try with the whole
35479    # argument.
35480    path="$complete"
35481    arguments="EOL"
35482    new_path="$path"
35483
35484  windows_path="$new_path"
35485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35486    unix_path=`$CYGPATH -u "$windows_path"`
35487    new_path="$unix_path"
35488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35490    new_path="$unix_path"
35491  fi
35492
35493
35494    new_path=`$WHICH "$new_path" 2> /dev/null`
35495    # bat and cmd files are not always considered executable in MSYS causing which
35496    # to not find them
35497    if test "x$new_path" = x \
35498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35500      new_path="$path"
35501
35502  windows_path="$new_path"
35503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35504    unix_path=`$CYGPATH -u "$windows_path"`
35505    new_path="$unix_path"
35506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35508    new_path="$unix_path"
35509  fi
35510
35511    fi
35512
35513    if test "x$new_path" = x; then
35514      # It's still not found. Now this is an unrecoverable error.
35515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35516$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35517      has_space=`$ECHO "$complete" | $GREP " "`
35518      if test "x$has_space" != x; then
35519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35521      fi
35522      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35523    fi
35524  fi
35525
35526  # Now new_path has a complete unix path to the binary
35527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35528    # Keep paths in /bin as-is, but remove trailing .exe if any
35529    new_path="${new_path/%.exe/}"
35530    # Do not save /bin paths to all_fixpath_prefixes!
35531  else
35532    # Not in mixed or Windows style, start by that.
35533    new_path=`cmd //c echo $new_path`
35534
35535  input_path="$new_path"
35536  # Check if we need to convert this using DOS-style short mode. If the path
35537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35538  # take no chances and rewrite it.
35539  # Note: m4 eats our [], so we need to use [ and ] instead.
35540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35541  if test "x$has_forbidden_chars" != x; then
35542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35544  fi
35545
35546    # Output is in $new_path
35547
35548  windows_path="$new_path"
35549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35550    unix_path=`$CYGPATH -u "$windows_path"`
35551    new_path="$unix_path"
35552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35554    new_path="$unix_path"
35555  fi
35556
35557    # remove trailing .exe if any
35558    new_path="${new_path/%.exe/}"
35559
35560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35562  fi
35563
35564    else
35565      # We're on a unix platform. Hooray! :)
35566      # First separate the path from the arguments. This will split at the first
35567      # space.
35568      complete="$AS"
35569      path="${complete%% *}"
35570      tmp="$complete EOL"
35571      arguments="${tmp#* }"
35572
35573      # Cannot rely on the command "which" here since it doesn't always work.
35574      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35575      if test -z "$is_absolute_path"; then
35576        # Path to executable is not absolute. Find it.
35577        IFS_save="$IFS"
35578        IFS=:
35579        for p in $PATH; do
35580          if test -f "$p/$path" && test -x "$p/$path"; then
35581            new_path="$p/$path"
35582            break
35583          fi
35584        done
35585        IFS="$IFS_save"
35586      else
35587        # This is an absolute path, we can use it without further modifications.
35588        new_path="$path"
35589      fi
35590
35591      if test "x$new_path" = x; then
35592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35593$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35594        has_space=`$ECHO "$complete" | $GREP " "`
35595        if test "x$has_space" != x; then
35596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35598        fi
35599        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35600      fi
35601    fi
35602
35603    # Now join together the path and the arguments once again
35604    if test "x$arguments" != xEOL; then
35605      new_complete="$new_path ${arguments% *}"
35606    else
35607      new_complete="$new_path"
35608    fi
35609
35610    if test "x$complete" != "x$new_complete"; then
35611      AS="$new_complete"
35612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35613$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35614    fi
35615  fi
35616
35617  else
35618    # FIXME: is this correct for microsoft?
35619    AS="$CC -c"
35620  fi
35621
35622
35623  #
35624  # Setup the archiver (AR)
35625  #
35626  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35627    # The corresponding ar tool is lib.exe (used to create static libraries)
35628    # Extract the first word of "lib", so it can be a program name with args.
35629set dummy lib; ac_word=$2
35630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35631$as_echo_n "checking for $ac_word... " >&6; }
35632if ${ac_cv_prog_AR+:} false; then :
35633  $as_echo_n "(cached) " >&6
35634else
35635  if test -n "$AR"; then
35636  ac_cv_prog_AR="$AR" # Let the user override the test.
35637else
35638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35639for as_dir in $PATH
35640do
35641  IFS=$as_save_IFS
35642  test -z "$as_dir" && as_dir=.
35643    for ac_exec_ext in '' $ac_executable_extensions; do
35644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35645    ac_cv_prog_AR="lib"
35646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35647    break 2
35648  fi
35649done
35650  done
35651IFS=$as_save_IFS
35652
35653fi
35654fi
35655AR=$ac_cv_prog_AR
35656if test -n "$AR"; then
35657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35658$as_echo "$AR" >&6; }
35659else
35660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35661$as_echo "no" >&6; }
35662fi
35663
35664
35665  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35666
35667
35668  # Publish this variable in the help.
35669
35670
35671  if [ -z "${AR+x}" ]; then
35672    # The variable is not set by user, try to locate tool using the code snippet
35673    if test -n "$ac_tool_prefix"; then
35674  for ac_prog in ar gcc-ar
35675  do
35676    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35677set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35679$as_echo_n "checking for $ac_word... " >&6; }
35680if ${ac_cv_prog_AR+:} false; then :
35681  $as_echo_n "(cached) " >&6
35682else
35683  if test -n "$AR"; then
35684  ac_cv_prog_AR="$AR" # Let the user override the test.
35685else
35686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35687for as_dir in $PATH
35688do
35689  IFS=$as_save_IFS
35690  test -z "$as_dir" && as_dir=.
35691    for ac_exec_ext in '' $ac_executable_extensions; do
35692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35693    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35695    break 2
35696  fi
35697done
35698  done
35699IFS=$as_save_IFS
35700
35701fi
35702fi
35703AR=$ac_cv_prog_AR
35704if test -n "$AR"; then
35705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35706$as_echo "$AR" >&6; }
35707else
35708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35709$as_echo "no" >&6; }
35710fi
35711
35712
35713    test -n "$AR" && break
35714  done
35715fi
35716if test -z "$AR"; then
35717  ac_ct_AR=$AR
35718  for ac_prog in ar gcc-ar
35719do
35720  # Extract the first word of "$ac_prog", so it can be a program name with args.
35721set dummy $ac_prog; ac_word=$2
35722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35723$as_echo_n "checking for $ac_word... " >&6; }
35724if ${ac_cv_prog_ac_ct_AR+:} false; then :
35725  $as_echo_n "(cached) " >&6
35726else
35727  if test -n "$ac_ct_AR"; then
35728  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35729else
35730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35731for as_dir in $PATH
35732do
35733  IFS=$as_save_IFS
35734  test -z "$as_dir" && as_dir=.
35735    for ac_exec_ext in '' $ac_executable_extensions; do
35736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35737    ac_cv_prog_ac_ct_AR="$ac_prog"
35738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35739    break 2
35740  fi
35741done
35742  done
35743IFS=$as_save_IFS
35744
35745fi
35746fi
35747ac_ct_AR=$ac_cv_prog_ac_ct_AR
35748if test -n "$ac_ct_AR"; then
35749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35750$as_echo "$ac_ct_AR" >&6; }
35751else
35752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35753$as_echo "no" >&6; }
35754fi
35755
35756
35757  test -n "$ac_ct_AR" && break
35758done
35759
35760  if test "x$ac_ct_AR" = x; then
35761    AR=""
35762  else
35763    case $cross_compiling:$ac_tool_warned in
35764yes:)
35765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35767ac_tool_warned=yes ;;
35768esac
35769    AR=$ac_ct_AR
35770  fi
35771fi
35772
35773  else
35774    # The variable is set, but is it from the command line or the environment?
35775
35776    # Try to remove the string !AR! from our list.
35777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35779      # If it failed, the variable was not from the command line. Ignore it,
35780      # but warn the user (except for BASH, which is always set by the calling BASH).
35781      if test "xAR" != xBASH; then
35782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35783$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35784      fi
35785      # Try to locate tool using the code snippet
35786      if test -n "$ac_tool_prefix"; then
35787  for ac_prog in ar gcc-ar
35788  do
35789    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35790set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35792$as_echo_n "checking for $ac_word... " >&6; }
35793if ${ac_cv_prog_AR+:} false; then :
35794  $as_echo_n "(cached) " >&6
35795else
35796  if test -n "$AR"; then
35797  ac_cv_prog_AR="$AR" # Let the user override the test.
35798else
35799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35800for as_dir in $PATH
35801do
35802  IFS=$as_save_IFS
35803  test -z "$as_dir" && as_dir=.
35804    for ac_exec_ext in '' $ac_executable_extensions; do
35805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35806    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35808    break 2
35809  fi
35810done
35811  done
35812IFS=$as_save_IFS
35813
35814fi
35815fi
35816AR=$ac_cv_prog_AR
35817if test -n "$AR"; then
35818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35819$as_echo "$AR" >&6; }
35820else
35821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35822$as_echo "no" >&6; }
35823fi
35824
35825
35826    test -n "$AR" && break
35827  done
35828fi
35829if test -z "$AR"; then
35830  ac_ct_AR=$AR
35831  for ac_prog in ar gcc-ar
35832do
35833  # Extract the first word of "$ac_prog", so it can be a program name with args.
35834set dummy $ac_prog; ac_word=$2
35835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35836$as_echo_n "checking for $ac_word... " >&6; }
35837if ${ac_cv_prog_ac_ct_AR+:} false; then :
35838  $as_echo_n "(cached) " >&6
35839else
35840  if test -n "$ac_ct_AR"; then
35841  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35842else
35843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35844for as_dir in $PATH
35845do
35846  IFS=$as_save_IFS
35847  test -z "$as_dir" && as_dir=.
35848    for ac_exec_ext in '' $ac_executable_extensions; do
35849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35850    ac_cv_prog_ac_ct_AR="$ac_prog"
35851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35852    break 2
35853  fi
35854done
35855  done
35856IFS=$as_save_IFS
35857
35858fi
35859fi
35860ac_ct_AR=$ac_cv_prog_ac_ct_AR
35861if test -n "$ac_ct_AR"; then
35862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35863$as_echo "$ac_ct_AR" >&6; }
35864else
35865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35866$as_echo "no" >&6; }
35867fi
35868
35869
35870  test -n "$ac_ct_AR" && break
35871done
35872
35873  if test "x$ac_ct_AR" = x; then
35874    AR=""
35875  else
35876    case $cross_compiling:$ac_tool_warned in
35877yes:)
35878{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35879$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35880ac_tool_warned=yes ;;
35881esac
35882    AR=$ac_ct_AR
35883  fi
35884fi
35885
35886    else
35887      # If it succeeded, then it was overridden by the user. We will use it
35888      # for the tool.
35889
35890      # First remove it from the list of overridden variables, so we can test
35891      # for unknown variables in the end.
35892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35893
35894      # Check if we try to supply an empty value
35895      if test "x$AR" = x; then
35896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35897$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35899$as_echo_n "checking for AR... " >&6; }
35900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35901$as_echo "disabled" >&6; }
35902      else
35903        # Check if the provided tool contains a complete path.
35904        tool_specified="$AR"
35905        tool_basename="${tool_specified##*/}"
35906        if test "x$tool_basename" = "x$tool_specified"; then
35907          # A command without a complete path is provided, search $PATH.
35908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35909$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35910          # Extract the first word of "$tool_basename", so it can be a program name with args.
35911set dummy $tool_basename; ac_word=$2
35912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35913$as_echo_n "checking for $ac_word... " >&6; }
35914if ${ac_cv_path_AR+:} false; then :
35915  $as_echo_n "(cached) " >&6
35916else
35917  case $AR in
35918  [\\/]* | ?:[\\/]*)
35919  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35920  ;;
35921  *)
35922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35923for as_dir in $PATH
35924do
35925  IFS=$as_save_IFS
35926  test -z "$as_dir" && as_dir=.
35927    for ac_exec_ext in '' $ac_executable_extensions; do
35928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35929    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35931    break 2
35932  fi
35933done
35934  done
35935IFS=$as_save_IFS
35936
35937  ;;
35938esac
35939fi
35940AR=$ac_cv_path_AR
35941if test -n "$AR"; then
35942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35943$as_echo "$AR" >&6; }
35944else
35945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35946$as_echo "no" >&6; }
35947fi
35948
35949
35950          if test "x$AR" = x; then
35951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35952          fi
35953        else
35954          # Otherwise we believe it is a complete path. Use it as it is.
35955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35956$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35958$as_echo_n "checking for AR... " >&6; }
35959          if test ! -x "$tool_specified"; then
35960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35961$as_echo "not found" >&6; }
35962            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35963          fi
35964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35965$as_echo "$tool_specified" >&6; }
35966        fi
35967      fi
35968    fi
35969
35970  fi
35971
35972
35973  else
35974
35975
35976  # Publish this variable in the help.
35977
35978
35979  if [ -z "${AR+x}" ]; then
35980    # The variable is not set by user, try to locate tool using the code snippet
35981    if test -n "$ac_tool_prefix"; then
35982  for ac_prog in ar
35983  do
35984    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35987$as_echo_n "checking for $ac_word... " >&6; }
35988if ${ac_cv_prog_AR+:} false; then :
35989  $as_echo_n "(cached) " >&6
35990else
35991  if test -n "$AR"; then
35992  ac_cv_prog_AR="$AR" # Let the user override the test.
35993else
35994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35995for as_dir in $PATH
35996do
35997  IFS=$as_save_IFS
35998  test -z "$as_dir" && as_dir=.
35999    for ac_exec_ext in '' $ac_executable_extensions; do
36000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36001    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36003    break 2
36004  fi
36005done
36006  done
36007IFS=$as_save_IFS
36008
36009fi
36010fi
36011AR=$ac_cv_prog_AR
36012if test -n "$AR"; then
36013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36014$as_echo "$AR" >&6; }
36015else
36016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36017$as_echo "no" >&6; }
36018fi
36019
36020
36021    test -n "$AR" && break
36022  done
36023fi
36024if test -z "$AR"; then
36025  ac_ct_AR=$AR
36026  for ac_prog in ar
36027do
36028  # Extract the first word of "$ac_prog", so it can be a program name with args.
36029set dummy $ac_prog; ac_word=$2
36030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36031$as_echo_n "checking for $ac_word... " >&6; }
36032if ${ac_cv_prog_ac_ct_AR+:} false; then :
36033  $as_echo_n "(cached) " >&6
36034else
36035  if test -n "$ac_ct_AR"; then
36036  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36037else
36038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36039for as_dir in $PATH
36040do
36041  IFS=$as_save_IFS
36042  test -z "$as_dir" && as_dir=.
36043    for ac_exec_ext in '' $ac_executable_extensions; do
36044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36045    ac_cv_prog_ac_ct_AR="$ac_prog"
36046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36047    break 2
36048  fi
36049done
36050  done
36051IFS=$as_save_IFS
36052
36053fi
36054fi
36055ac_ct_AR=$ac_cv_prog_ac_ct_AR
36056if test -n "$ac_ct_AR"; then
36057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36058$as_echo "$ac_ct_AR" >&6; }
36059else
36060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36061$as_echo "no" >&6; }
36062fi
36063
36064
36065  test -n "$ac_ct_AR" && break
36066done
36067
36068  if test "x$ac_ct_AR" = x; then
36069    AR=""
36070  else
36071    case $cross_compiling:$ac_tool_warned in
36072yes:)
36073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36075ac_tool_warned=yes ;;
36076esac
36077    AR=$ac_ct_AR
36078  fi
36079fi
36080
36081  else
36082    # The variable is set, but is it from the command line or the environment?
36083
36084    # Try to remove the string !AR! from our list.
36085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36087      # If it failed, the variable was not from the command line. Ignore it,
36088      # but warn the user (except for BASH, which is always set by the calling BASH).
36089      if test "xAR" != xBASH; then
36090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36091$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36092      fi
36093      # Try to locate tool using the code snippet
36094      if test -n "$ac_tool_prefix"; then
36095  for ac_prog in ar
36096  do
36097    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36100$as_echo_n "checking for $ac_word... " >&6; }
36101if ${ac_cv_prog_AR+:} false; then :
36102  $as_echo_n "(cached) " >&6
36103else
36104  if test -n "$AR"; then
36105  ac_cv_prog_AR="$AR" # Let the user override the test.
36106else
36107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36108for as_dir in $PATH
36109do
36110  IFS=$as_save_IFS
36111  test -z "$as_dir" && as_dir=.
36112    for ac_exec_ext in '' $ac_executable_extensions; do
36113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36114    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36116    break 2
36117  fi
36118done
36119  done
36120IFS=$as_save_IFS
36121
36122fi
36123fi
36124AR=$ac_cv_prog_AR
36125if test -n "$AR"; then
36126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36127$as_echo "$AR" >&6; }
36128else
36129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36130$as_echo "no" >&6; }
36131fi
36132
36133
36134    test -n "$AR" && break
36135  done
36136fi
36137if test -z "$AR"; then
36138  ac_ct_AR=$AR
36139  for ac_prog in ar
36140do
36141  # Extract the first word of "$ac_prog", so it can be a program name with args.
36142set dummy $ac_prog; ac_word=$2
36143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36144$as_echo_n "checking for $ac_word... " >&6; }
36145if ${ac_cv_prog_ac_ct_AR+:} false; then :
36146  $as_echo_n "(cached) " >&6
36147else
36148  if test -n "$ac_ct_AR"; then
36149  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36150else
36151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36152for as_dir in $PATH
36153do
36154  IFS=$as_save_IFS
36155  test -z "$as_dir" && as_dir=.
36156    for ac_exec_ext in '' $ac_executable_extensions; do
36157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36158    ac_cv_prog_ac_ct_AR="$ac_prog"
36159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36160    break 2
36161  fi
36162done
36163  done
36164IFS=$as_save_IFS
36165
36166fi
36167fi
36168ac_ct_AR=$ac_cv_prog_ac_ct_AR
36169if test -n "$ac_ct_AR"; then
36170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36171$as_echo "$ac_ct_AR" >&6; }
36172else
36173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36174$as_echo "no" >&6; }
36175fi
36176
36177
36178  test -n "$ac_ct_AR" && break
36179done
36180
36181  if test "x$ac_ct_AR" = x; then
36182    AR=""
36183  else
36184    case $cross_compiling:$ac_tool_warned in
36185yes:)
36186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36188ac_tool_warned=yes ;;
36189esac
36190    AR=$ac_ct_AR
36191  fi
36192fi
36193
36194    else
36195      # If it succeeded, then it was overridden by the user. We will use it
36196      # for the tool.
36197
36198      # First remove it from the list of overridden variables, so we can test
36199      # for unknown variables in the end.
36200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36201
36202      # Check if we try to supply an empty value
36203      if test "x$AR" = x; then
36204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36205$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36207$as_echo_n "checking for AR... " >&6; }
36208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36209$as_echo "disabled" >&6; }
36210      else
36211        # Check if the provided tool contains a complete path.
36212        tool_specified="$AR"
36213        tool_basename="${tool_specified##*/}"
36214        if test "x$tool_basename" = "x$tool_specified"; then
36215          # A command without a complete path is provided, search $PATH.
36216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36217$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36218          # Extract the first word of "$tool_basename", so it can be a program name with args.
36219set dummy $tool_basename; ac_word=$2
36220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36221$as_echo_n "checking for $ac_word... " >&6; }
36222if ${ac_cv_path_AR+:} false; then :
36223  $as_echo_n "(cached) " >&6
36224else
36225  case $AR in
36226  [\\/]* | ?:[\\/]*)
36227  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36228  ;;
36229  *)
36230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36231for as_dir in $PATH
36232do
36233  IFS=$as_save_IFS
36234  test -z "$as_dir" && as_dir=.
36235    for ac_exec_ext in '' $ac_executable_extensions; do
36236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36237    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36239    break 2
36240  fi
36241done
36242  done
36243IFS=$as_save_IFS
36244
36245  ;;
36246esac
36247fi
36248AR=$ac_cv_path_AR
36249if test -n "$AR"; then
36250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36251$as_echo "$AR" >&6; }
36252else
36253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36254$as_echo "no" >&6; }
36255fi
36256
36257
36258          if test "x$AR" = x; then
36259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36260          fi
36261        else
36262          # Otherwise we believe it is a complete path. Use it as it is.
36263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36264$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36266$as_echo_n "checking for AR... " >&6; }
36267          if test ! -x "$tool_specified"; then
36268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36269$as_echo "not found" >&6; }
36270            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36271          fi
36272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36273$as_echo "$tool_specified" >&6; }
36274        fi
36275      fi
36276    fi
36277
36278  fi
36279
36280
36281  fi
36282
36283  # Only process if variable expands to non-empty
36284
36285  if test "x$AR" != x; then
36286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36287
36288  # First separate the path from the arguments. This will split at the first
36289  # space.
36290  complete="$AR"
36291  path="${complete%% *}"
36292  tmp="$complete EOL"
36293  arguments="${tmp#* }"
36294
36295  # Input might be given as Windows format, start by converting to
36296  # unix format.
36297  new_path=`$CYGPATH -u "$path"`
36298
36299  # Now try to locate executable using which
36300  new_path=`$WHICH "$new_path" 2> /dev/null`
36301  # bat and cmd files are not always considered executable in cygwin causing which
36302  # to not find them
36303  if test "x$new_path" = x \
36304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36306    new_path=`$CYGPATH -u "$path"`
36307  fi
36308  if test "x$new_path" = x; then
36309    # Oops. Which didn't find the executable.
36310    # The splitting of arguments from the executable at a space might have been incorrect,
36311    # since paths with space are more likely in Windows. Give it another try with the whole
36312    # argument.
36313    path="$complete"
36314    arguments="EOL"
36315    new_path=`$CYGPATH -u "$path"`
36316    new_path=`$WHICH "$new_path" 2> /dev/null`
36317    # bat and cmd files are not always considered executable in cygwin causing which
36318    # to not find them
36319    if test "x$new_path" = x \
36320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36322      new_path=`$CYGPATH -u "$path"`
36323    fi
36324    if test "x$new_path" = x; then
36325      # It's still not found. Now this is an unrecoverable error.
36326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36327$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36328      has_space=`$ECHO "$complete" | $GREP " "`
36329      if test "x$has_space" != x; then
36330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36332      fi
36333      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36334    fi
36335  fi
36336
36337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36340  # "foo.exe" is OK but "foo" is an error.
36341  #
36342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36343  # It is also a way to make sure we got the proper file name for the real test later on.
36344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36345  if test "x$test_shortpath" = x; then
36346    # Short path failed, file does not exist as specified.
36347    # Try adding .exe or .cmd
36348    if test -f "${new_path}.exe"; then
36349      input_to_shortpath="${new_path}.exe"
36350    elif test -f "${new_path}.cmd"; then
36351      input_to_shortpath="${new_path}.cmd"
36352    else
36353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36354$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36357      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36358    fi
36359  else
36360    input_to_shortpath="$new_path"
36361  fi
36362
36363  # Call helper function which possibly converts this using DOS-style short mode.
36364  # If so, the updated path is stored in $new_path.
36365  new_path="$input_to_shortpath"
36366
36367  input_path="$input_to_shortpath"
36368  # Check if we need to convert this using DOS-style short mode. If the path
36369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36370  # take no chances and rewrite it.
36371  # Note: m4 eats our [], so we need to use [ and ] instead.
36372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36373  if test "x$has_forbidden_chars" != x; then
36374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36378      # Going to short mode and back again did indeed matter. Since short mode is
36379      # case insensitive, let's make it lowercase to improve readability.
36380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36381      # Now convert it back to Unix-style (cygpath)
36382      input_path=`$CYGPATH -u "$shortmode_path"`
36383      new_path="$input_path"
36384    fi
36385  fi
36386
36387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36388  if test "x$test_cygdrive_prefix" = x; then
36389    # As a simple fix, exclude /usr/bin since it's not a real path.
36390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36392      # a path prefixed by /cygdrive for fixpath to work.
36393      new_path="$CYGWIN_ROOT_PATH$input_path"
36394    fi
36395  fi
36396
36397  # remove trailing .exe if any
36398  new_path="${new_path/%.exe/}"
36399
36400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36401
36402  # First separate the path from the arguments. This will split at the first
36403  # space.
36404  complete="$AR"
36405  path="${complete%% *}"
36406  tmp="$complete EOL"
36407  arguments="${tmp#* }"
36408
36409  # Input might be given as Windows format, start by converting to
36410  # unix format.
36411  new_path="$path"
36412
36413  windows_path="$new_path"
36414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36415    unix_path=`$CYGPATH -u "$windows_path"`
36416    new_path="$unix_path"
36417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36419    new_path="$unix_path"
36420  fi
36421
36422
36423  # Now try to locate executable using which
36424  new_path=`$WHICH "$new_path" 2> /dev/null`
36425
36426  if test "x$new_path" = x; then
36427    # Oops. Which didn't find the executable.
36428    # The splitting of arguments from the executable at a space might have been incorrect,
36429    # since paths with space are more likely in Windows. Give it another try with the whole
36430    # argument.
36431    path="$complete"
36432    arguments="EOL"
36433    new_path="$path"
36434
36435  windows_path="$new_path"
36436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36437    unix_path=`$CYGPATH -u "$windows_path"`
36438    new_path="$unix_path"
36439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36441    new_path="$unix_path"
36442  fi
36443
36444
36445    new_path=`$WHICH "$new_path" 2> /dev/null`
36446    # bat and cmd files are not always considered executable in MSYS causing which
36447    # to not find them
36448    if test "x$new_path" = x \
36449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36451      new_path="$path"
36452
36453  windows_path="$new_path"
36454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36455    unix_path=`$CYGPATH -u "$windows_path"`
36456    new_path="$unix_path"
36457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36459    new_path="$unix_path"
36460  fi
36461
36462    fi
36463
36464    if test "x$new_path" = x; then
36465      # It's still not found. Now this is an unrecoverable error.
36466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36467$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36468      has_space=`$ECHO "$complete" | $GREP " "`
36469      if test "x$has_space" != x; then
36470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36472      fi
36473      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36474    fi
36475  fi
36476
36477  # Now new_path has a complete unix path to the binary
36478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36479    # Keep paths in /bin as-is, but remove trailing .exe if any
36480    new_path="${new_path/%.exe/}"
36481    # Do not save /bin paths to all_fixpath_prefixes!
36482  else
36483    # Not in mixed or Windows style, start by that.
36484    new_path=`cmd //c echo $new_path`
36485
36486  input_path="$new_path"
36487  # Check if we need to convert this using DOS-style short mode. If the path
36488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36489  # take no chances and rewrite it.
36490  # Note: m4 eats our [], so we need to use [ and ] instead.
36491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36492  if test "x$has_forbidden_chars" != x; then
36493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36495  fi
36496
36497    # Output is in $new_path
36498
36499  windows_path="$new_path"
36500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36501    unix_path=`$CYGPATH -u "$windows_path"`
36502    new_path="$unix_path"
36503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36505    new_path="$unix_path"
36506  fi
36507
36508    # remove trailing .exe if any
36509    new_path="${new_path/%.exe/}"
36510
36511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36513  fi
36514
36515    else
36516      # We're on a unix platform. Hooray! :)
36517      # First separate the path from the arguments. This will split at the first
36518      # space.
36519      complete="$AR"
36520      path="${complete%% *}"
36521      tmp="$complete EOL"
36522      arguments="${tmp#* }"
36523
36524      # Cannot rely on the command "which" here since it doesn't always work.
36525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36526      if test -z "$is_absolute_path"; then
36527        # Path to executable is not absolute. Find it.
36528        IFS_save="$IFS"
36529        IFS=:
36530        for p in $PATH; do
36531          if test -f "$p/$path" && test -x "$p/$path"; then
36532            new_path="$p/$path"
36533            break
36534          fi
36535        done
36536        IFS="$IFS_save"
36537      else
36538        # This is an absolute path, we can use it without further modifications.
36539        new_path="$path"
36540      fi
36541
36542      if test "x$new_path" = x; then
36543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36544$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36545        has_space=`$ECHO "$complete" | $GREP " "`
36546        if test "x$has_space" != x; then
36547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36549        fi
36550        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36551      fi
36552    fi
36553
36554    # Now join together the path and the arguments once again
36555    if test "x$arguments" != xEOL; then
36556      new_complete="$new_path ${arguments% *}"
36557    else
36558      new_complete="$new_path"
36559    fi
36560
36561    if test "x$complete" != "x$new_complete"; then
36562      AR="$new_complete"
36563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36564$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36565    fi
36566  fi
36567
36568
36569
36570  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36571
36572
36573  # Publish this variable in the help.
36574
36575
36576  if [ -z "${LIPO+x}" ]; then
36577    # The variable is not set by user, try to locate tool using the code snippet
36578    for ac_prog in lipo
36579do
36580  # Extract the first word of "$ac_prog", so it can be a program name with args.
36581set dummy $ac_prog; ac_word=$2
36582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36583$as_echo_n "checking for $ac_word... " >&6; }
36584if ${ac_cv_path_LIPO+:} false; then :
36585  $as_echo_n "(cached) " >&6
36586else
36587  case $LIPO in
36588  [\\/]* | ?:[\\/]*)
36589  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36590  ;;
36591  *)
36592  as_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_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
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
36607  ;;
36608esac
36609fi
36610LIPO=$ac_cv_path_LIPO
36611if test -n "$LIPO"; then
36612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36613$as_echo "$LIPO" >&6; }
36614else
36615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36616$as_echo "no" >&6; }
36617fi
36618
36619
36620  test -n "$LIPO" && break
36621done
36622
36623  else
36624    # The variable is set, but is it from the command line or the environment?
36625
36626    # Try to remove the string !LIPO! from our list.
36627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36629      # If it failed, the variable was not from the command line. Ignore it,
36630      # but warn the user (except for BASH, which is always set by the calling BASH).
36631      if test "xLIPO" != xBASH; then
36632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36633$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36634      fi
36635      # Try to locate tool using the code snippet
36636      for ac_prog in lipo
36637do
36638  # Extract the first word of "$ac_prog", so it can be a program name with args.
36639set dummy $ac_prog; ac_word=$2
36640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36641$as_echo_n "checking for $ac_word... " >&6; }
36642if ${ac_cv_path_LIPO+:} false; then :
36643  $as_echo_n "(cached) " >&6
36644else
36645  case $LIPO in
36646  [\\/]* | ?:[\\/]*)
36647  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36648  ;;
36649  *)
36650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36651for as_dir in $PATH
36652do
36653  IFS=$as_save_IFS
36654  test -z "$as_dir" && as_dir=.
36655    for ac_exec_ext in '' $ac_executable_extensions; do
36656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36657    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36659    break 2
36660  fi
36661done
36662  done
36663IFS=$as_save_IFS
36664
36665  ;;
36666esac
36667fi
36668LIPO=$ac_cv_path_LIPO
36669if test -n "$LIPO"; then
36670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36671$as_echo "$LIPO" >&6; }
36672else
36673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36674$as_echo "no" >&6; }
36675fi
36676
36677
36678  test -n "$LIPO" && break
36679done
36680
36681    else
36682      # If it succeeded, then it was overridden by the user. We will use it
36683      # for the tool.
36684
36685      # First remove it from the list of overridden variables, so we can test
36686      # for unknown variables in the end.
36687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36688
36689      # Check if we try to supply an empty value
36690      if test "x$LIPO" = x; then
36691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36692$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36694$as_echo_n "checking for LIPO... " >&6; }
36695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36696$as_echo "disabled" >&6; }
36697      else
36698        # Check if the provided tool contains a complete path.
36699        tool_specified="$LIPO"
36700        tool_basename="${tool_specified##*/}"
36701        if test "x$tool_basename" = "x$tool_specified"; then
36702          # A command without a complete path is provided, search $PATH.
36703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36704$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36705          # Extract the first word of "$tool_basename", so it can be a program name with args.
36706set dummy $tool_basename; ac_word=$2
36707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36708$as_echo_n "checking for $ac_word... " >&6; }
36709if ${ac_cv_path_LIPO+:} false; then :
36710  $as_echo_n "(cached) " >&6
36711else
36712  case $LIPO in
36713  [\\/]* | ?:[\\/]*)
36714  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36715  ;;
36716  *)
36717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36718for as_dir in $PATH
36719do
36720  IFS=$as_save_IFS
36721  test -z "$as_dir" && as_dir=.
36722    for ac_exec_ext in '' $ac_executable_extensions; do
36723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36724    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36726    break 2
36727  fi
36728done
36729  done
36730IFS=$as_save_IFS
36731
36732  ;;
36733esac
36734fi
36735LIPO=$ac_cv_path_LIPO
36736if test -n "$LIPO"; then
36737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36738$as_echo "$LIPO" >&6; }
36739else
36740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36741$as_echo "no" >&6; }
36742fi
36743
36744
36745          if test "x$LIPO" = x; then
36746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36747          fi
36748        else
36749          # Otherwise we believe it is a complete path. Use it as it is.
36750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36751$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36753$as_echo_n "checking for LIPO... " >&6; }
36754          if test ! -x "$tool_specified"; then
36755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36756$as_echo "not found" >&6; }
36757            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36758          fi
36759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36760$as_echo "$tool_specified" >&6; }
36761        fi
36762      fi
36763    fi
36764
36765  fi
36766
36767
36768
36769  # Only process if variable expands to non-empty
36770
36771  if test "x$LIPO" != x; then
36772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36773
36774  # First separate the path from the arguments. This will split at the first
36775  # space.
36776  complete="$LIPO"
36777  path="${complete%% *}"
36778  tmp="$complete EOL"
36779  arguments="${tmp#* }"
36780
36781  # Input might be given as Windows format, start by converting to
36782  # unix format.
36783  new_path=`$CYGPATH -u "$path"`
36784
36785  # Now try to locate executable using which
36786  new_path=`$WHICH "$new_path" 2> /dev/null`
36787  # bat and cmd files are not always considered executable in cygwin causing which
36788  # to not find them
36789  if test "x$new_path" = x \
36790      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36791      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36792    new_path=`$CYGPATH -u "$path"`
36793  fi
36794  if test "x$new_path" = x; then
36795    # Oops. Which didn't find the executable.
36796    # The splitting of arguments from the executable at a space might have been incorrect,
36797    # since paths with space are more likely in Windows. Give it another try with the whole
36798    # argument.
36799    path="$complete"
36800    arguments="EOL"
36801    new_path=`$CYGPATH -u "$path"`
36802    new_path=`$WHICH "$new_path" 2> /dev/null`
36803    # bat and cmd files are not always considered executable in cygwin causing which
36804    # to not find them
36805    if test "x$new_path" = x \
36806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36808      new_path=`$CYGPATH -u "$path"`
36809    fi
36810    if test "x$new_path" = x; then
36811      # It's still not found. Now this is an unrecoverable error.
36812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36813$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36814      has_space=`$ECHO "$complete" | $GREP " "`
36815      if test "x$has_space" != x; then
36816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36818      fi
36819      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36820    fi
36821  fi
36822
36823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36826  # "foo.exe" is OK but "foo" is an error.
36827  #
36828  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36829  # It is also a way to make sure we got the proper file name for the real test later on.
36830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36831  if test "x$test_shortpath" = x; then
36832    # Short path failed, file does not exist as specified.
36833    # Try adding .exe or .cmd
36834    if test -f "${new_path}.exe"; then
36835      input_to_shortpath="${new_path}.exe"
36836    elif test -f "${new_path}.cmd"; then
36837      input_to_shortpath="${new_path}.cmd"
36838    else
36839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36840$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36841      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36842$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36843      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36844    fi
36845  else
36846    input_to_shortpath="$new_path"
36847  fi
36848
36849  # Call helper function which possibly converts this using DOS-style short mode.
36850  # If so, the updated path is stored in $new_path.
36851  new_path="$input_to_shortpath"
36852
36853  input_path="$input_to_shortpath"
36854  # Check if we need to convert this using DOS-style short mode. If the path
36855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36856  # take no chances and rewrite it.
36857  # Note: m4 eats our [], so we need to use [ and ] instead.
36858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36859  if test "x$has_forbidden_chars" != x; then
36860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36864      # Going to short mode and back again did indeed matter. Since short mode is
36865      # case insensitive, let's make it lowercase to improve readability.
36866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36867      # Now convert it back to Unix-style (cygpath)
36868      input_path=`$CYGPATH -u "$shortmode_path"`
36869      new_path="$input_path"
36870    fi
36871  fi
36872
36873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36874  if test "x$test_cygdrive_prefix" = x; then
36875    # As a simple fix, exclude /usr/bin since it's not a real path.
36876    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36878      # a path prefixed by /cygdrive for fixpath to work.
36879      new_path="$CYGWIN_ROOT_PATH$input_path"
36880    fi
36881  fi
36882
36883  # remove trailing .exe if any
36884  new_path="${new_path/%.exe/}"
36885
36886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36887
36888  # First separate the path from the arguments. This will split at the first
36889  # space.
36890  complete="$LIPO"
36891  path="${complete%% *}"
36892  tmp="$complete EOL"
36893  arguments="${tmp#* }"
36894
36895  # Input might be given as Windows format, start by converting to
36896  # unix format.
36897  new_path="$path"
36898
36899  windows_path="$new_path"
36900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36901    unix_path=`$CYGPATH -u "$windows_path"`
36902    new_path="$unix_path"
36903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36905    new_path="$unix_path"
36906  fi
36907
36908
36909  # Now try to locate executable using which
36910  new_path=`$WHICH "$new_path" 2> /dev/null`
36911
36912  if test "x$new_path" = x; then
36913    # Oops. Which didn't find the executable.
36914    # The splitting of arguments from the executable at a space might have been incorrect,
36915    # since paths with space are more likely in Windows. Give it another try with the whole
36916    # argument.
36917    path="$complete"
36918    arguments="EOL"
36919    new_path="$path"
36920
36921  windows_path="$new_path"
36922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36923    unix_path=`$CYGPATH -u "$windows_path"`
36924    new_path="$unix_path"
36925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36927    new_path="$unix_path"
36928  fi
36929
36930
36931    new_path=`$WHICH "$new_path" 2> /dev/null`
36932    # bat and cmd files are not always considered executable in MSYS causing which
36933    # to not find them
36934    if test "x$new_path" = x \
36935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36937      new_path="$path"
36938
36939  windows_path="$new_path"
36940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36941    unix_path=`$CYGPATH -u "$windows_path"`
36942    new_path="$unix_path"
36943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36945    new_path="$unix_path"
36946  fi
36947
36948    fi
36949
36950    if test "x$new_path" = x; then
36951      # It's still not found. Now this is an unrecoverable error.
36952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36953$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36954      has_space=`$ECHO "$complete" | $GREP " "`
36955      if test "x$has_space" != x; then
36956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36958      fi
36959      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36960    fi
36961  fi
36962
36963  # Now new_path has a complete unix path to the binary
36964  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36965    # Keep paths in /bin as-is, but remove trailing .exe if any
36966    new_path="${new_path/%.exe/}"
36967    # Do not save /bin paths to all_fixpath_prefixes!
36968  else
36969    # Not in mixed or Windows style, start by that.
36970    new_path=`cmd //c echo $new_path`
36971
36972  input_path="$new_path"
36973  # Check if we need to convert this using DOS-style short mode. If the path
36974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36975  # take no chances and rewrite it.
36976  # Note: m4 eats our [], so we need to use [ and ] instead.
36977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36978  if test "x$has_forbidden_chars" != x; then
36979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36981  fi
36982
36983    # Output is in $new_path
36984
36985  windows_path="$new_path"
36986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36987    unix_path=`$CYGPATH -u "$windows_path"`
36988    new_path="$unix_path"
36989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36991    new_path="$unix_path"
36992  fi
36993
36994    # remove trailing .exe if any
36995    new_path="${new_path/%.exe/}"
36996
36997    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36998    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36999  fi
37000
37001    else
37002      # We're on a unix platform. Hooray! :)
37003      # First separate the path from the arguments. This will split at the first
37004      # space.
37005      complete="$LIPO"
37006      path="${complete%% *}"
37007      tmp="$complete EOL"
37008      arguments="${tmp#* }"
37009
37010      # Cannot rely on the command "which" here since it doesn't always work.
37011      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37012      if test -z "$is_absolute_path"; then
37013        # Path to executable is not absolute. Find it.
37014        IFS_save="$IFS"
37015        IFS=:
37016        for p in $PATH; do
37017          if test -f "$p/$path" && test -x "$p/$path"; then
37018            new_path="$p/$path"
37019            break
37020          fi
37021        done
37022        IFS="$IFS_save"
37023      else
37024        # This is an absolute path, we can use it without further modifications.
37025        new_path="$path"
37026      fi
37027
37028      if test "x$new_path" = x; then
37029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37030$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37031        has_space=`$ECHO "$complete" | $GREP " "`
37032        if test "x$has_space" != x; then
37033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37035        fi
37036        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37037      fi
37038    fi
37039
37040    # Now join together the path and the arguments once again
37041    if test "x$arguments" != xEOL; then
37042      new_complete="$new_path ${arguments% *}"
37043    else
37044      new_complete="$new_path"
37045    fi
37046
37047    if test "x$complete" != "x$new_complete"; then
37048      LIPO="$new_complete"
37049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37050$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37051    fi
37052  fi
37053
37054  fi
37055
37056  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37057    # Extract the first word of "mt", so it can be a program name with args.
37058set dummy mt; ac_word=$2
37059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37060$as_echo_n "checking for $ac_word... " >&6; }
37061if ${ac_cv_prog_MT+:} false; then :
37062  $as_echo_n "(cached) " >&6
37063else
37064  if test -n "$MT"; then
37065  ac_cv_prog_MT="$MT" # Let the user override the test.
37066else
37067  ac_prog_rejected=no
37068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37069for as_dir in $PATH
37070do
37071  IFS=$as_save_IFS
37072  test -z "$as_dir" && as_dir=.
37073    for ac_exec_ext in '' $ac_executable_extensions; do
37074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37075    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37076       ac_prog_rejected=yes
37077       continue
37078     fi
37079    ac_cv_prog_MT="mt"
37080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37081    break 2
37082  fi
37083done
37084  done
37085IFS=$as_save_IFS
37086
37087if test $ac_prog_rejected = yes; then
37088  # We found a bogon in the path, so make sure we never use it.
37089  set dummy $ac_cv_prog_MT
37090  shift
37091  if test $# != 0; then
37092    # We chose a different compiler from the bogus one.
37093    # However, it has the same basename, so the bogon will be chosen
37094    # first if we set MT to just the basename; use the full file name.
37095    shift
37096    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37097  fi
37098fi
37099fi
37100fi
37101MT=$ac_cv_prog_MT
37102if test -n "$MT"; then
37103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37104$as_echo "$MT" >&6; }
37105else
37106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37107$as_echo "no" >&6; }
37108fi
37109
37110
37111
37112  # Only process if variable expands to non-empty
37113
37114  if test "x$MT" != x; then
37115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37116
37117  # First separate the path from the arguments. This will split at the first
37118  # space.
37119  complete="$MT"
37120  path="${complete%% *}"
37121  tmp="$complete EOL"
37122  arguments="${tmp#* }"
37123
37124  # Input might be given as Windows format, start by converting to
37125  # unix format.
37126  new_path=`$CYGPATH -u "$path"`
37127
37128  # Now try to locate executable using which
37129  new_path=`$WHICH "$new_path" 2> /dev/null`
37130  # bat and cmd files are not always considered executable in cygwin causing which
37131  # to not find them
37132  if test "x$new_path" = x \
37133      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37134      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37135    new_path=`$CYGPATH -u "$path"`
37136  fi
37137  if test "x$new_path" = x; then
37138    # Oops. Which didn't find the executable.
37139    # The splitting of arguments from the executable at a space might have been incorrect,
37140    # since paths with space are more likely in Windows. Give it another try with the whole
37141    # argument.
37142    path="$complete"
37143    arguments="EOL"
37144    new_path=`$CYGPATH -u "$path"`
37145    new_path=`$WHICH "$new_path" 2> /dev/null`
37146    # bat and cmd files are not always considered executable in cygwin causing which
37147    # to not find them
37148    if test "x$new_path" = x \
37149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37151      new_path=`$CYGPATH -u "$path"`
37152    fi
37153    if test "x$new_path" = x; then
37154      # It's still not found. Now this is an unrecoverable error.
37155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37156$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37157      has_space=`$ECHO "$complete" | $GREP " "`
37158      if test "x$has_space" != x; then
37159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37161      fi
37162      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37163    fi
37164  fi
37165
37166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37169  # "foo.exe" is OK but "foo" is an error.
37170  #
37171  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37172  # It is also a way to make sure we got the proper file name for the real test later on.
37173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37174  if test "x$test_shortpath" = x; then
37175    # Short path failed, file does not exist as specified.
37176    # Try adding .exe or .cmd
37177    if test -f "${new_path}.exe"; then
37178      input_to_shortpath="${new_path}.exe"
37179    elif test -f "${new_path}.cmd"; then
37180      input_to_shortpath="${new_path}.cmd"
37181    else
37182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37183$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37184      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37185$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37186      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37187    fi
37188  else
37189    input_to_shortpath="$new_path"
37190  fi
37191
37192  # Call helper function which possibly converts this using DOS-style short mode.
37193  # If so, the updated path is stored in $new_path.
37194  new_path="$input_to_shortpath"
37195
37196  input_path="$input_to_shortpath"
37197  # Check if we need to convert this using DOS-style short mode. If the path
37198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37199  # take no chances and rewrite it.
37200  # Note: m4 eats our [], so we need to use [ and ] instead.
37201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37202  if test "x$has_forbidden_chars" != x; then
37203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37207      # Going to short mode and back again did indeed matter. Since short mode is
37208      # case insensitive, let's make it lowercase to improve readability.
37209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37210      # Now convert it back to Unix-style (cygpath)
37211      input_path=`$CYGPATH -u "$shortmode_path"`
37212      new_path="$input_path"
37213    fi
37214  fi
37215
37216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37217  if test "x$test_cygdrive_prefix" = x; then
37218    # As a simple fix, exclude /usr/bin since it's not a real path.
37219    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37221      # a path prefixed by /cygdrive for fixpath to work.
37222      new_path="$CYGWIN_ROOT_PATH$input_path"
37223    fi
37224  fi
37225
37226  # remove trailing .exe if any
37227  new_path="${new_path/%.exe/}"
37228
37229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37230
37231  # First separate the path from the arguments. This will split at the first
37232  # space.
37233  complete="$MT"
37234  path="${complete%% *}"
37235  tmp="$complete EOL"
37236  arguments="${tmp#* }"
37237
37238  # Input might be given as Windows format, start by converting to
37239  # unix format.
37240  new_path="$path"
37241
37242  windows_path="$new_path"
37243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37244    unix_path=`$CYGPATH -u "$windows_path"`
37245    new_path="$unix_path"
37246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37248    new_path="$unix_path"
37249  fi
37250
37251
37252  # Now try to locate executable using which
37253  new_path=`$WHICH "$new_path" 2> /dev/null`
37254
37255  if test "x$new_path" = x; then
37256    # Oops. Which didn't find the executable.
37257    # The splitting of arguments from the executable at a space might have been incorrect,
37258    # since paths with space are more likely in Windows. Give it another try with the whole
37259    # argument.
37260    path="$complete"
37261    arguments="EOL"
37262    new_path="$path"
37263
37264  windows_path="$new_path"
37265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37266    unix_path=`$CYGPATH -u "$windows_path"`
37267    new_path="$unix_path"
37268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37270    new_path="$unix_path"
37271  fi
37272
37273
37274    new_path=`$WHICH "$new_path" 2> /dev/null`
37275    # bat and cmd files are not always considered executable in MSYS causing which
37276    # to not find them
37277    if test "x$new_path" = x \
37278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37280      new_path="$path"
37281
37282  windows_path="$new_path"
37283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37284    unix_path=`$CYGPATH -u "$windows_path"`
37285    new_path="$unix_path"
37286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37288    new_path="$unix_path"
37289  fi
37290
37291    fi
37292
37293    if test "x$new_path" = x; then
37294      # It's still not found. Now this is an unrecoverable error.
37295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37296$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37297      has_space=`$ECHO "$complete" | $GREP " "`
37298      if test "x$has_space" != x; then
37299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37301      fi
37302      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37303    fi
37304  fi
37305
37306  # Now new_path has a complete unix path to the binary
37307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37308    # Keep paths in /bin as-is, but remove trailing .exe if any
37309    new_path="${new_path/%.exe/}"
37310    # Do not save /bin paths to all_fixpath_prefixes!
37311  else
37312    # Not in mixed or Windows style, start by that.
37313    new_path=`cmd //c echo $new_path`
37314
37315  input_path="$new_path"
37316  # Check if we need to convert this using DOS-style short mode. If the path
37317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37318  # take no chances and rewrite it.
37319  # Note: m4 eats our [], so we need to use [ and ] instead.
37320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37321  if test "x$has_forbidden_chars" != x; then
37322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37324  fi
37325
37326    # Output is in $new_path
37327
37328  windows_path="$new_path"
37329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37330    unix_path=`$CYGPATH -u "$windows_path"`
37331    new_path="$unix_path"
37332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37334    new_path="$unix_path"
37335  fi
37336
37337    # remove trailing .exe if any
37338    new_path="${new_path/%.exe/}"
37339
37340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37342  fi
37343
37344    else
37345      # We're on a unix platform. Hooray! :)
37346      # First separate the path from the arguments. This will split at the first
37347      # space.
37348      complete="$MT"
37349      path="${complete%% *}"
37350      tmp="$complete EOL"
37351      arguments="${tmp#* }"
37352
37353      # Cannot rely on the command "which" here since it doesn't always work.
37354      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37355      if test -z "$is_absolute_path"; then
37356        # Path to executable is not absolute. Find it.
37357        IFS_save="$IFS"
37358        IFS=:
37359        for p in $PATH; do
37360          if test -f "$p/$path" && test -x "$p/$path"; then
37361            new_path="$p/$path"
37362            break
37363          fi
37364        done
37365        IFS="$IFS_save"
37366      else
37367        # This is an absolute path, we can use it without further modifications.
37368        new_path="$path"
37369      fi
37370
37371      if test "x$new_path" = x; then
37372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37373$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37374        has_space=`$ECHO "$complete" | $GREP " "`
37375        if test "x$has_space" != x; then
37376          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37378        fi
37379        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37380      fi
37381    fi
37382
37383    # Now join together the path and the arguments once again
37384    if test "x$arguments" != xEOL; then
37385      new_complete="$new_path ${arguments% *}"
37386    else
37387      new_complete="$new_path"
37388    fi
37389
37390    if test "x$complete" != "x$new_complete"; then
37391      MT="$new_complete"
37392      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37393$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37394    fi
37395  fi
37396
37397    # Setup the resource compiler (RC)
37398    # Extract the first word of "rc", so it can be a program name with args.
37399set dummy rc; ac_word=$2
37400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37401$as_echo_n "checking for $ac_word... " >&6; }
37402if ${ac_cv_prog_RC+:} false; then :
37403  $as_echo_n "(cached) " >&6
37404else
37405  if test -n "$RC"; then
37406  ac_cv_prog_RC="$RC" # Let the user override the test.
37407else
37408  ac_prog_rejected=no
37409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37410for as_dir in $PATH
37411do
37412  IFS=$as_save_IFS
37413  test -z "$as_dir" && as_dir=.
37414    for ac_exec_ext in '' $ac_executable_extensions; do
37415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37416    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37417       ac_prog_rejected=yes
37418       continue
37419     fi
37420    ac_cv_prog_RC="rc"
37421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37422    break 2
37423  fi
37424done
37425  done
37426IFS=$as_save_IFS
37427
37428if test $ac_prog_rejected = yes; then
37429  # We found a bogon in the path, so make sure we never use it.
37430  set dummy $ac_cv_prog_RC
37431  shift
37432  if test $# != 0; then
37433    # We chose a different compiler from the bogus one.
37434    # However, it has the same basename, so the bogon will be chosen
37435    # first if we set RC to just the basename; use the full file name.
37436    shift
37437    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37438  fi
37439fi
37440fi
37441fi
37442RC=$ac_cv_prog_RC
37443if test -n "$RC"; then
37444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37445$as_echo "$RC" >&6; }
37446else
37447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37448$as_echo "no" >&6; }
37449fi
37450
37451
37452
37453  # Only process if variable expands to non-empty
37454
37455  if test "x$RC" != x; then
37456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37457
37458  # First separate the path from the arguments. This will split at the first
37459  # space.
37460  complete="$RC"
37461  path="${complete%% *}"
37462  tmp="$complete EOL"
37463  arguments="${tmp#* }"
37464
37465  # Input might be given as Windows format, start by converting to
37466  # unix format.
37467  new_path=`$CYGPATH -u "$path"`
37468
37469  # Now try to locate executable using which
37470  new_path=`$WHICH "$new_path" 2> /dev/null`
37471  # bat and cmd files are not always considered executable in cygwin causing which
37472  # to not find them
37473  if test "x$new_path" = x \
37474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37476    new_path=`$CYGPATH -u "$path"`
37477  fi
37478  if test "x$new_path" = x; then
37479    # Oops. Which didn't find the executable.
37480    # The splitting of arguments from the executable at a space might have been incorrect,
37481    # since paths with space are more likely in Windows. Give it another try with the whole
37482    # argument.
37483    path="$complete"
37484    arguments="EOL"
37485    new_path=`$CYGPATH -u "$path"`
37486    new_path=`$WHICH "$new_path" 2> /dev/null`
37487    # bat and cmd files are not always considered executable in cygwin causing which
37488    # to not find them
37489    if test "x$new_path" = x \
37490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37492      new_path=`$CYGPATH -u "$path"`
37493    fi
37494    if test "x$new_path" = x; then
37495      # It's still not found. Now this is an unrecoverable error.
37496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37497$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37498      has_space=`$ECHO "$complete" | $GREP " "`
37499      if test "x$has_space" != x; then
37500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37502      fi
37503      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37504    fi
37505  fi
37506
37507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37510  # "foo.exe" is OK but "foo" is an error.
37511  #
37512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37513  # It is also a way to make sure we got the proper file name for the real test later on.
37514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37515  if test "x$test_shortpath" = x; then
37516    # Short path failed, file does not exist as specified.
37517    # Try adding .exe or .cmd
37518    if test -f "${new_path}.exe"; then
37519      input_to_shortpath="${new_path}.exe"
37520    elif test -f "${new_path}.cmd"; then
37521      input_to_shortpath="${new_path}.cmd"
37522    else
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37524$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37527      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37528    fi
37529  else
37530    input_to_shortpath="$new_path"
37531  fi
37532
37533  # Call helper function which possibly converts this using DOS-style short mode.
37534  # If so, the updated path is stored in $new_path.
37535  new_path="$input_to_shortpath"
37536
37537  input_path="$input_to_shortpath"
37538  # Check if we need to convert this using DOS-style short mode. If the path
37539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37540  # take no chances and rewrite it.
37541  # Note: m4 eats our [], so we need to use [ and ] instead.
37542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37543  if test "x$has_forbidden_chars" != x; then
37544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37548      # Going to short mode and back again did indeed matter. Since short mode is
37549      # case insensitive, let's make it lowercase to improve readability.
37550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37551      # Now convert it back to Unix-style (cygpath)
37552      input_path=`$CYGPATH -u "$shortmode_path"`
37553      new_path="$input_path"
37554    fi
37555  fi
37556
37557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37558  if test "x$test_cygdrive_prefix" = x; then
37559    # As a simple fix, exclude /usr/bin since it's not a real path.
37560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37562      # a path prefixed by /cygdrive for fixpath to work.
37563      new_path="$CYGWIN_ROOT_PATH$input_path"
37564    fi
37565  fi
37566
37567  # remove trailing .exe if any
37568  new_path="${new_path/%.exe/}"
37569
37570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37571
37572  # First separate the path from the arguments. This will split at the first
37573  # space.
37574  complete="$RC"
37575  path="${complete%% *}"
37576  tmp="$complete EOL"
37577  arguments="${tmp#* }"
37578
37579  # Input might be given as Windows format, start by converting to
37580  # unix format.
37581  new_path="$path"
37582
37583  windows_path="$new_path"
37584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37585    unix_path=`$CYGPATH -u "$windows_path"`
37586    new_path="$unix_path"
37587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37589    new_path="$unix_path"
37590  fi
37591
37592
37593  # Now try to locate executable using which
37594  new_path=`$WHICH "$new_path" 2> /dev/null`
37595
37596  if test "x$new_path" = x; then
37597    # Oops. Which didn't find the executable.
37598    # The splitting of arguments from the executable at a space might have been incorrect,
37599    # since paths with space are more likely in Windows. Give it another try with the whole
37600    # argument.
37601    path="$complete"
37602    arguments="EOL"
37603    new_path="$path"
37604
37605  windows_path="$new_path"
37606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37607    unix_path=`$CYGPATH -u "$windows_path"`
37608    new_path="$unix_path"
37609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37611    new_path="$unix_path"
37612  fi
37613
37614
37615    new_path=`$WHICH "$new_path" 2> /dev/null`
37616    # bat and cmd files are not always considered executable in MSYS causing which
37617    # to not find them
37618    if test "x$new_path" = x \
37619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37621      new_path="$path"
37622
37623  windows_path="$new_path"
37624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37625    unix_path=`$CYGPATH -u "$windows_path"`
37626    new_path="$unix_path"
37627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37629    new_path="$unix_path"
37630  fi
37631
37632    fi
37633
37634    if test "x$new_path" = x; then
37635      # It's still not found. Now this is an unrecoverable error.
37636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37637$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37638      has_space=`$ECHO "$complete" | $GREP " "`
37639      if test "x$has_space" != x; then
37640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37642      fi
37643      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37644    fi
37645  fi
37646
37647  # Now new_path has a complete unix path to the binary
37648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37649    # Keep paths in /bin as-is, but remove trailing .exe if any
37650    new_path="${new_path/%.exe/}"
37651    # Do not save /bin paths to all_fixpath_prefixes!
37652  else
37653    # Not in mixed or Windows style, start by that.
37654    new_path=`cmd //c echo $new_path`
37655
37656  input_path="$new_path"
37657  # Check if we need to convert this using DOS-style short mode. If the path
37658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37659  # take no chances and rewrite it.
37660  # Note: m4 eats our [], so we need to use [ and ] instead.
37661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37662  if test "x$has_forbidden_chars" != x; then
37663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37665  fi
37666
37667    # Output is in $new_path
37668
37669  windows_path="$new_path"
37670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37671    unix_path=`$CYGPATH -u "$windows_path"`
37672    new_path="$unix_path"
37673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37675    new_path="$unix_path"
37676  fi
37677
37678    # remove trailing .exe if any
37679    new_path="${new_path/%.exe/}"
37680
37681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37683  fi
37684
37685    else
37686      # We're on a unix platform. Hooray! :)
37687      # First separate the path from the arguments. This will split at the first
37688      # space.
37689      complete="$RC"
37690      path="${complete%% *}"
37691      tmp="$complete EOL"
37692      arguments="${tmp#* }"
37693
37694      # Cannot rely on the command "which" here since it doesn't always work.
37695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37696      if test -z "$is_absolute_path"; then
37697        # Path to executable is not absolute. Find it.
37698        IFS_save="$IFS"
37699        IFS=:
37700        for p in $PATH; do
37701          if test -f "$p/$path" && test -x "$p/$path"; then
37702            new_path="$p/$path"
37703            break
37704          fi
37705        done
37706        IFS="$IFS_save"
37707      else
37708        # This is an absolute path, we can use it without further modifications.
37709        new_path="$path"
37710      fi
37711
37712      if test "x$new_path" = x; then
37713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37714$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37715        has_space=`$ECHO "$complete" | $GREP " "`
37716        if test "x$has_space" != x; then
37717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37719        fi
37720        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37721      fi
37722    fi
37723
37724    # Now join together the path and the arguments once again
37725    if test "x$arguments" != xEOL; then
37726      new_complete="$new_path ${arguments% *}"
37727    else
37728      new_complete="$new_path"
37729    fi
37730
37731    if test "x$complete" != "x$new_complete"; then
37732      RC="$new_complete"
37733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37734$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37735    fi
37736  fi
37737
37738    # Extract the first word of "dumpbin", so it can be a program name with args.
37739set dummy dumpbin; ac_word=$2
37740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37741$as_echo_n "checking for $ac_word... " >&6; }
37742if ${ac_cv_prog_DUMPBIN+:} false; then :
37743  $as_echo_n "(cached) " >&6
37744else
37745  if test -n "$DUMPBIN"; then
37746  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37747else
37748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37749for as_dir in $PATH
37750do
37751  IFS=$as_save_IFS
37752  test -z "$as_dir" && as_dir=.
37753    for ac_exec_ext in '' $ac_executable_extensions; do
37754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37755    ac_cv_prog_DUMPBIN="dumpbin"
37756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37757    break 2
37758  fi
37759done
37760  done
37761IFS=$as_save_IFS
37762
37763fi
37764fi
37765DUMPBIN=$ac_cv_prog_DUMPBIN
37766if test -n "$DUMPBIN"; then
37767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37768$as_echo "$DUMPBIN" >&6; }
37769else
37770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37771$as_echo "no" >&6; }
37772fi
37773
37774
37775
37776  # Only process if variable expands to non-empty
37777
37778  if test "x$DUMPBIN" != x; then
37779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37780
37781  # First separate the path from the arguments. This will split at the first
37782  # space.
37783  complete="$DUMPBIN"
37784  path="${complete%% *}"
37785  tmp="$complete EOL"
37786  arguments="${tmp#* }"
37787
37788  # Input might be given as Windows format, start by converting to
37789  # unix format.
37790  new_path=`$CYGPATH -u "$path"`
37791
37792  # Now try to locate executable using which
37793  new_path=`$WHICH "$new_path" 2> /dev/null`
37794  # bat and cmd files are not always considered executable in cygwin causing which
37795  # to not find them
37796  if test "x$new_path" = x \
37797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37799    new_path=`$CYGPATH -u "$path"`
37800  fi
37801  if test "x$new_path" = x; then
37802    # Oops. Which didn't find the executable.
37803    # The splitting of arguments from the executable at a space might have been incorrect,
37804    # since paths with space are more likely in Windows. Give it another try with the whole
37805    # argument.
37806    path="$complete"
37807    arguments="EOL"
37808    new_path=`$CYGPATH -u "$path"`
37809    new_path=`$WHICH "$new_path" 2> /dev/null`
37810    # bat and cmd files are not always considered executable in cygwin causing which
37811    # to not find them
37812    if test "x$new_path" = x \
37813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37815      new_path=`$CYGPATH -u "$path"`
37816    fi
37817    if test "x$new_path" = x; then
37818      # It's still not found. Now this is an unrecoverable error.
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37820$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37821      has_space=`$ECHO "$complete" | $GREP " "`
37822      if test "x$has_space" != x; then
37823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37825      fi
37826      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37827    fi
37828  fi
37829
37830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37833  # "foo.exe" is OK but "foo" is an error.
37834  #
37835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37836  # It is also a way to make sure we got the proper file name for the real test later on.
37837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37838  if test "x$test_shortpath" = x; then
37839    # Short path failed, file does not exist as specified.
37840    # Try adding .exe or .cmd
37841    if test -f "${new_path}.exe"; then
37842      input_to_shortpath="${new_path}.exe"
37843    elif test -f "${new_path}.cmd"; then
37844      input_to_shortpath="${new_path}.cmd"
37845    else
37846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37847$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37850      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37851    fi
37852  else
37853    input_to_shortpath="$new_path"
37854  fi
37855
37856  # Call helper function which possibly converts this using DOS-style short mode.
37857  # If so, the updated path is stored in $new_path.
37858  new_path="$input_to_shortpath"
37859
37860  input_path="$input_to_shortpath"
37861  # Check if we need to convert this using DOS-style short mode. If the path
37862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37863  # take no chances and rewrite it.
37864  # Note: m4 eats our [], so we need to use [ and ] instead.
37865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37866  if test "x$has_forbidden_chars" != x; then
37867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37871      # Going to short mode and back again did indeed matter. Since short mode is
37872      # case insensitive, let's make it lowercase to improve readability.
37873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37874      # Now convert it back to Unix-style (cygpath)
37875      input_path=`$CYGPATH -u "$shortmode_path"`
37876      new_path="$input_path"
37877    fi
37878  fi
37879
37880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37881  if test "x$test_cygdrive_prefix" = x; then
37882    # As a simple fix, exclude /usr/bin since it's not a real path.
37883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37885      # a path prefixed by /cygdrive for fixpath to work.
37886      new_path="$CYGWIN_ROOT_PATH$input_path"
37887    fi
37888  fi
37889
37890  # remove trailing .exe if any
37891  new_path="${new_path/%.exe/}"
37892
37893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37894
37895  # First separate the path from the arguments. This will split at the first
37896  # space.
37897  complete="$DUMPBIN"
37898  path="${complete%% *}"
37899  tmp="$complete EOL"
37900  arguments="${tmp#* }"
37901
37902  # Input might be given as Windows format, start by converting to
37903  # unix format.
37904  new_path="$path"
37905
37906  windows_path="$new_path"
37907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37908    unix_path=`$CYGPATH -u "$windows_path"`
37909    new_path="$unix_path"
37910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37912    new_path="$unix_path"
37913  fi
37914
37915
37916  # Now try to locate executable using which
37917  new_path=`$WHICH "$new_path" 2> /dev/null`
37918
37919  if test "x$new_path" = x; then
37920    # Oops. Which didn't find the executable.
37921    # The splitting of arguments from the executable at a space might have been incorrect,
37922    # since paths with space are more likely in Windows. Give it another try with the whole
37923    # argument.
37924    path="$complete"
37925    arguments="EOL"
37926    new_path="$path"
37927
37928  windows_path="$new_path"
37929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37930    unix_path=`$CYGPATH -u "$windows_path"`
37931    new_path="$unix_path"
37932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37934    new_path="$unix_path"
37935  fi
37936
37937
37938    new_path=`$WHICH "$new_path" 2> /dev/null`
37939    # bat and cmd files are not always considered executable in MSYS causing which
37940    # to not find them
37941    if test "x$new_path" = x \
37942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37944      new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955    fi
37956
37957    if test "x$new_path" = x; then
37958      # It's still not found. Now this is an unrecoverable error.
37959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37960$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37961      has_space=`$ECHO "$complete" | $GREP " "`
37962      if test "x$has_space" != x; then
37963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37965      fi
37966      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37967    fi
37968  fi
37969
37970  # Now new_path has a complete unix path to the binary
37971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37972    # Keep paths in /bin as-is, but remove trailing .exe if any
37973    new_path="${new_path/%.exe/}"
37974    # Do not save /bin paths to all_fixpath_prefixes!
37975  else
37976    # Not in mixed or Windows style, start by that.
37977    new_path=`cmd //c echo $new_path`
37978
37979  input_path="$new_path"
37980  # Check if we need to convert this using DOS-style short mode. If the path
37981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37982  # take no chances and rewrite it.
37983  # Note: m4 eats our [], so we need to use [ and ] instead.
37984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37985  if test "x$has_forbidden_chars" != x; then
37986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37988  fi
37989
37990    # Output is in $new_path
37991
37992  windows_path="$new_path"
37993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37994    unix_path=`$CYGPATH -u "$windows_path"`
37995    new_path="$unix_path"
37996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37998    new_path="$unix_path"
37999  fi
38000
38001    # remove trailing .exe if any
38002    new_path="${new_path/%.exe/}"
38003
38004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38006  fi
38007
38008    else
38009      # We're on a unix platform. Hooray! :)
38010      # First separate the path from the arguments. This will split at the first
38011      # space.
38012      complete="$DUMPBIN"
38013      path="${complete%% *}"
38014      tmp="$complete EOL"
38015      arguments="${tmp#* }"
38016
38017      # Cannot rely on the command "which" here since it doesn't always work.
38018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38019      if test -z "$is_absolute_path"; then
38020        # Path to executable is not absolute. Find it.
38021        IFS_save="$IFS"
38022        IFS=:
38023        for p in $PATH; do
38024          if test -f "$p/$path" && test -x "$p/$path"; then
38025            new_path="$p/$path"
38026            break
38027          fi
38028        done
38029        IFS="$IFS_save"
38030      else
38031        # This is an absolute path, we can use it without further modifications.
38032        new_path="$path"
38033      fi
38034
38035      if test "x$new_path" = x; then
38036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38037$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38038        has_space=`$ECHO "$complete" | $GREP " "`
38039        if test "x$has_space" != x; then
38040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38042        fi
38043        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38044      fi
38045    fi
38046
38047    # Now join together the path and the arguments once again
38048    if test "x$arguments" != xEOL; then
38049      new_complete="$new_path ${arguments% *}"
38050    else
38051      new_complete="$new_path"
38052    fi
38053
38054    if test "x$complete" != "x$new_complete"; then
38055      DUMPBIN="$new_complete"
38056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38057$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38058    fi
38059  fi
38060
38061    # We need to check for 'msbuild.exe' because at the place where we expect to
38062    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38063    # won't find the 'msbuild.exe' executable in that case (and the
38064    # 'ac_executable_extensions' is unusable due to performance reasons).
38065    # Notice that we intentionally don't fix up the path to MSBUILD because we
38066    # will call it in a DOS shell during freetype detection on Windows (see
38067    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38068    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38069set dummy msbuild.exe; ac_word=$2
38070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38071$as_echo_n "checking for $ac_word... " >&6; }
38072if ${ac_cv_prog_MSBUILD+:} false; then :
38073  $as_echo_n "(cached) " >&6
38074else
38075  if test -n "$MSBUILD"; then
38076  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38077else
38078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38079for as_dir in $PATH
38080do
38081  IFS=$as_save_IFS
38082  test -z "$as_dir" && as_dir=.
38083    for ac_exec_ext in '' $ac_executable_extensions; do
38084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38085    ac_cv_prog_MSBUILD="msbuild.exe"
38086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38087    break 2
38088  fi
38089done
38090  done
38091IFS=$as_save_IFS
38092
38093fi
38094fi
38095MSBUILD=$ac_cv_prog_MSBUILD
38096if test -n "$MSBUILD"; then
38097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38098$as_echo "$MSBUILD" >&6; }
38099else
38100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38101$as_echo "no" >&6; }
38102fi
38103
38104
38105  fi
38106
38107  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38108
38109
38110  # Publish this variable in the help.
38111
38112
38113  if [ -z "${STRIP+x}" ]; then
38114    # The variable is not set by user, try to locate tool using the code snippet
38115    for ac_prog in strip
38116do
38117  # Extract the first word of "$ac_prog", so it can be a program name with args.
38118set dummy $ac_prog; ac_word=$2
38119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38120$as_echo_n "checking for $ac_word... " >&6; }
38121if ${ac_cv_path_STRIP+:} false; then :
38122  $as_echo_n "(cached) " >&6
38123else
38124  case $STRIP in
38125  [\\/]* | ?:[\\/]*)
38126  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38127  ;;
38128  *)
38129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38130for as_dir in $PATH
38131do
38132  IFS=$as_save_IFS
38133  test -z "$as_dir" && as_dir=.
38134    for ac_exec_ext in '' $ac_executable_extensions; do
38135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38136    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38138    break 2
38139  fi
38140done
38141  done
38142IFS=$as_save_IFS
38143
38144  ;;
38145esac
38146fi
38147STRIP=$ac_cv_path_STRIP
38148if test -n "$STRIP"; then
38149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38150$as_echo "$STRIP" >&6; }
38151else
38152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38153$as_echo "no" >&6; }
38154fi
38155
38156
38157  test -n "$STRIP" && break
38158done
38159
38160  else
38161    # The variable is set, but is it from the command line or the environment?
38162
38163    # Try to remove the string !STRIP! from our list.
38164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38166      # If it failed, the variable was not from the command line. Ignore it,
38167      # but warn the user (except for BASH, which is always set by the calling BASH).
38168      if test "xSTRIP" != xBASH; then
38169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38170$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38171      fi
38172      # Try to locate tool using the code snippet
38173      for ac_prog in strip
38174do
38175  # Extract the first word of "$ac_prog", so it can be a program name with args.
38176set dummy $ac_prog; ac_word=$2
38177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38178$as_echo_n "checking for $ac_word... " >&6; }
38179if ${ac_cv_path_STRIP+:} false; then :
38180  $as_echo_n "(cached) " >&6
38181else
38182  case $STRIP in
38183  [\\/]* | ?:[\\/]*)
38184  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38185  ;;
38186  *)
38187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38188for as_dir in $PATH
38189do
38190  IFS=$as_save_IFS
38191  test -z "$as_dir" && as_dir=.
38192    for ac_exec_ext in '' $ac_executable_extensions; do
38193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38194    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38196    break 2
38197  fi
38198done
38199  done
38200IFS=$as_save_IFS
38201
38202  ;;
38203esac
38204fi
38205STRIP=$ac_cv_path_STRIP
38206if test -n "$STRIP"; then
38207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38208$as_echo "$STRIP" >&6; }
38209else
38210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38211$as_echo "no" >&6; }
38212fi
38213
38214
38215  test -n "$STRIP" && break
38216done
38217
38218    else
38219      # If it succeeded, then it was overridden by the user. We will use it
38220      # for the tool.
38221
38222      # First remove it from the list of overridden variables, so we can test
38223      # for unknown variables in the end.
38224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38225
38226      # Check if we try to supply an empty value
38227      if test "x$STRIP" = x; then
38228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38229$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38231$as_echo_n "checking for STRIP... " >&6; }
38232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38233$as_echo "disabled" >&6; }
38234      else
38235        # Check if the provided tool contains a complete path.
38236        tool_specified="$STRIP"
38237        tool_basename="${tool_specified##*/}"
38238        if test "x$tool_basename" = "x$tool_specified"; then
38239          # A command without a complete path is provided, search $PATH.
38240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38241$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38242          # Extract the first word of "$tool_basename", so it can be a program name with args.
38243set dummy $tool_basename; ac_word=$2
38244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38245$as_echo_n "checking for $ac_word... " >&6; }
38246if ${ac_cv_path_STRIP+:} false; then :
38247  $as_echo_n "(cached) " >&6
38248else
38249  case $STRIP in
38250  [\\/]* | ?:[\\/]*)
38251  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38252  ;;
38253  *)
38254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38255for as_dir in $PATH
38256do
38257  IFS=$as_save_IFS
38258  test -z "$as_dir" && as_dir=.
38259    for ac_exec_ext in '' $ac_executable_extensions; do
38260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38261    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38263    break 2
38264  fi
38265done
38266  done
38267IFS=$as_save_IFS
38268
38269  ;;
38270esac
38271fi
38272STRIP=$ac_cv_path_STRIP
38273if test -n "$STRIP"; then
38274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38275$as_echo "$STRIP" >&6; }
38276else
38277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38278$as_echo "no" >&6; }
38279fi
38280
38281
38282          if test "x$STRIP" = x; then
38283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38284          fi
38285        else
38286          # Otherwise we believe it is a complete path. Use it as it is.
38287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38288$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38290$as_echo_n "checking for STRIP... " >&6; }
38291          if test ! -x "$tool_specified"; then
38292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38293$as_echo "not found" >&6; }
38294            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38295          fi
38296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38297$as_echo "$tool_specified" >&6; }
38298        fi
38299      fi
38300    fi
38301
38302  fi
38303
38304
38305
38306  # Only process if variable expands to non-empty
38307
38308  if test "x$STRIP" != x; then
38309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38310
38311  # First separate the path from the arguments. This will split at the first
38312  # space.
38313  complete="$STRIP"
38314  path="${complete%% *}"
38315  tmp="$complete EOL"
38316  arguments="${tmp#* }"
38317
38318  # Input might be given as Windows format, start by converting to
38319  # unix format.
38320  new_path=`$CYGPATH -u "$path"`
38321
38322  # Now try to locate executable using which
38323  new_path=`$WHICH "$new_path" 2> /dev/null`
38324  # bat and cmd files are not always considered executable in cygwin causing which
38325  # to not find them
38326  if test "x$new_path" = x \
38327      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38328      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38329    new_path=`$CYGPATH -u "$path"`
38330  fi
38331  if test "x$new_path" = x; then
38332    # Oops. Which didn't find the executable.
38333    # The splitting of arguments from the executable at a space might have been incorrect,
38334    # since paths with space are more likely in Windows. Give it another try with the whole
38335    # argument.
38336    path="$complete"
38337    arguments="EOL"
38338    new_path=`$CYGPATH -u "$path"`
38339    new_path=`$WHICH "$new_path" 2> /dev/null`
38340    # bat and cmd files are not always considered executable in cygwin causing which
38341    # to not find them
38342    if test "x$new_path" = x \
38343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38345      new_path=`$CYGPATH -u "$path"`
38346    fi
38347    if test "x$new_path" = x; then
38348      # It's still not found. Now this is an unrecoverable error.
38349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38350$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38351      has_space=`$ECHO "$complete" | $GREP " "`
38352      if test "x$has_space" != x; then
38353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38355      fi
38356      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38357    fi
38358  fi
38359
38360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38363  # "foo.exe" is OK but "foo" is an error.
38364  #
38365  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38366  # It is also a way to make sure we got the proper file name for the real test later on.
38367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38368  if test "x$test_shortpath" = x; then
38369    # Short path failed, file does not exist as specified.
38370    # Try adding .exe or .cmd
38371    if test -f "${new_path}.exe"; then
38372      input_to_shortpath="${new_path}.exe"
38373    elif test -f "${new_path}.cmd"; then
38374      input_to_shortpath="${new_path}.cmd"
38375    else
38376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38377$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38380      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38381    fi
38382  else
38383    input_to_shortpath="$new_path"
38384  fi
38385
38386  # Call helper function which possibly converts this using DOS-style short mode.
38387  # If so, the updated path is stored in $new_path.
38388  new_path="$input_to_shortpath"
38389
38390  input_path="$input_to_shortpath"
38391  # Check if we need to convert this using DOS-style short mode. If the path
38392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38393  # take no chances and rewrite it.
38394  # Note: m4 eats our [], so we need to use [ and ] instead.
38395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38396  if test "x$has_forbidden_chars" != x; then
38397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38401      # Going to short mode and back again did indeed matter. Since short mode is
38402      # case insensitive, let's make it lowercase to improve readability.
38403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38404      # Now convert it back to Unix-style (cygpath)
38405      input_path=`$CYGPATH -u "$shortmode_path"`
38406      new_path="$input_path"
38407    fi
38408  fi
38409
38410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38411  if test "x$test_cygdrive_prefix" = x; then
38412    # As a simple fix, exclude /usr/bin since it's not a real path.
38413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38415      # a path prefixed by /cygdrive for fixpath to work.
38416      new_path="$CYGWIN_ROOT_PATH$input_path"
38417    fi
38418  fi
38419
38420  # remove trailing .exe if any
38421  new_path="${new_path/%.exe/}"
38422
38423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38424
38425  # First separate the path from the arguments. This will split at the first
38426  # space.
38427  complete="$STRIP"
38428  path="${complete%% *}"
38429  tmp="$complete EOL"
38430  arguments="${tmp#* }"
38431
38432  # Input might be given as Windows format, start by converting to
38433  # unix format.
38434  new_path="$path"
38435
38436  windows_path="$new_path"
38437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38438    unix_path=`$CYGPATH -u "$windows_path"`
38439    new_path="$unix_path"
38440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38442    new_path="$unix_path"
38443  fi
38444
38445
38446  # Now try to locate executable using which
38447  new_path=`$WHICH "$new_path" 2> /dev/null`
38448
38449  if test "x$new_path" = x; then
38450    # Oops. Which didn't find the executable.
38451    # The splitting of arguments from the executable at a space might have been incorrect,
38452    # since paths with space are more likely in Windows. Give it another try with the whole
38453    # argument.
38454    path="$complete"
38455    arguments="EOL"
38456    new_path="$path"
38457
38458  windows_path="$new_path"
38459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38460    unix_path=`$CYGPATH -u "$windows_path"`
38461    new_path="$unix_path"
38462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38464    new_path="$unix_path"
38465  fi
38466
38467
38468    new_path=`$WHICH "$new_path" 2> /dev/null`
38469    # bat and cmd files are not always considered executable in MSYS causing which
38470    # to not find them
38471    if test "x$new_path" = x \
38472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38474      new_path="$path"
38475
38476  windows_path="$new_path"
38477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38478    unix_path=`$CYGPATH -u "$windows_path"`
38479    new_path="$unix_path"
38480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38482    new_path="$unix_path"
38483  fi
38484
38485    fi
38486
38487    if test "x$new_path" = x; then
38488      # It's still not found. Now this is an unrecoverable error.
38489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38490$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38491      has_space=`$ECHO "$complete" | $GREP " "`
38492      if test "x$has_space" != x; then
38493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38495      fi
38496      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38497    fi
38498  fi
38499
38500  # Now new_path has a complete unix path to the binary
38501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38502    # Keep paths in /bin as-is, but remove trailing .exe if any
38503    new_path="${new_path/%.exe/}"
38504    # Do not save /bin paths to all_fixpath_prefixes!
38505  else
38506    # Not in mixed or Windows style, start by that.
38507    new_path=`cmd //c echo $new_path`
38508
38509  input_path="$new_path"
38510  # Check if we need to convert this using DOS-style short mode. If the path
38511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38512  # take no chances and rewrite it.
38513  # Note: m4 eats our [], so we need to use [ and ] instead.
38514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38515  if test "x$has_forbidden_chars" != x; then
38516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38518  fi
38519
38520    # Output is in $new_path
38521
38522  windows_path="$new_path"
38523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38524    unix_path=`$CYGPATH -u "$windows_path"`
38525    new_path="$unix_path"
38526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38528    new_path="$unix_path"
38529  fi
38530
38531    # remove trailing .exe if any
38532    new_path="${new_path/%.exe/}"
38533
38534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38536  fi
38537
38538    else
38539      # We're on a unix platform. Hooray! :)
38540      # First separate the path from the arguments. This will split at the first
38541      # space.
38542      complete="$STRIP"
38543      path="${complete%% *}"
38544      tmp="$complete EOL"
38545      arguments="${tmp#* }"
38546
38547      # Cannot rely on the command "which" here since it doesn't always work.
38548      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38549      if test -z "$is_absolute_path"; then
38550        # Path to executable is not absolute. Find it.
38551        IFS_save="$IFS"
38552        IFS=:
38553        for p in $PATH; do
38554          if test -f "$p/$path" && test -x "$p/$path"; then
38555            new_path="$p/$path"
38556            break
38557          fi
38558        done
38559        IFS="$IFS_save"
38560      else
38561        # This is an absolute path, we can use it without further modifications.
38562        new_path="$path"
38563      fi
38564
38565      if test "x$new_path" = x; then
38566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38567$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38568        has_space=`$ECHO "$complete" | $GREP " "`
38569        if test "x$has_space" != x; then
38570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38572        fi
38573        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38574      fi
38575    fi
38576
38577    # Now join together the path and the arguments once again
38578    if test "x$arguments" != xEOL; then
38579      new_complete="$new_path ${arguments% *}"
38580    else
38581      new_complete="$new_path"
38582    fi
38583
38584    if test "x$complete" != "x$new_complete"; then
38585      STRIP="$new_complete"
38586      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38587$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38588    fi
38589  fi
38590
38591
38592
38593  # Publish this variable in the help.
38594
38595
38596  if [ -z "${NM+x}" ]; then
38597    # The variable is not set by user, try to locate tool using the code snippet
38598    for ac_prog in nm
38599do
38600  # Extract the first word of "$ac_prog", so it can be a program name with args.
38601set dummy $ac_prog; ac_word=$2
38602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38603$as_echo_n "checking for $ac_word... " >&6; }
38604if ${ac_cv_path_NM+:} false; then :
38605  $as_echo_n "(cached) " >&6
38606else
38607  case $NM in
38608  [\\/]* | ?:[\\/]*)
38609  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38610  ;;
38611  *)
38612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38613for as_dir in $PATH
38614do
38615  IFS=$as_save_IFS
38616  test -z "$as_dir" && as_dir=.
38617    for ac_exec_ext in '' $ac_executable_extensions; do
38618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38619    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38621    break 2
38622  fi
38623done
38624  done
38625IFS=$as_save_IFS
38626
38627  ;;
38628esac
38629fi
38630NM=$ac_cv_path_NM
38631if test -n "$NM"; then
38632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38633$as_echo "$NM" >&6; }
38634else
38635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38636$as_echo "no" >&6; }
38637fi
38638
38639
38640  test -n "$NM" && break
38641done
38642
38643  else
38644    # The variable is set, but is it from the command line or the environment?
38645
38646    # Try to remove the string !NM! from our list.
38647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38649      # If it failed, the variable was not from the command line. Ignore it,
38650      # but warn the user (except for BASH, which is always set by the calling BASH).
38651      if test "xNM" != xBASH; then
38652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38653$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38654      fi
38655      # Try to locate tool using the code snippet
38656      for ac_prog in nm
38657do
38658  # Extract the first word of "$ac_prog", so it can be a program name with args.
38659set dummy $ac_prog; ac_word=$2
38660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38661$as_echo_n "checking for $ac_word... " >&6; }
38662if ${ac_cv_path_NM+:} false; then :
38663  $as_echo_n "(cached) " >&6
38664else
38665  case $NM in
38666  [\\/]* | ?:[\\/]*)
38667  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38668  ;;
38669  *)
38670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38671for as_dir in $PATH
38672do
38673  IFS=$as_save_IFS
38674  test -z "$as_dir" && as_dir=.
38675    for ac_exec_ext in '' $ac_executable_extensions; do
38676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38677    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38679    break 2
38680  fi
38681done
38682  done
38683IFS=$as_save_IFS
38684
38685  ;;
38686esac
38687fi
38688NM=$ac_cv_path_NM
38689if test -n "$NM"; then
38690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38691$as_echo "$NM" >&6; }
38692else
38693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38694$as_echo "no" >&6; }
38695fi
38696
38697
38698  test -n "$NM" && break
38699done
38700
38701    else
38702      # If it succeeded, then it was overridden by the user. We will use it
38703      # for the tool.
38704
38705      # First remove it from the list of overridden variables, so we can test
38706      # for unknown variables in the end.
38707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38708
38709      # Check if we try to supply an empty value
38710      if test "x$NM" = x; then
38711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38712$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38714$as_echo_n "checking for NM... " >&6; }
38715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38716$as_echo "disabled" >&6; }
38717      else
38718        # Check if the provided tool contains a complete path.
38719        tool_specified="$NM"
38720        tool_basename="${tool_specified##*/}"
38721        if test "x$tool_basename" = "x$tool_specified"; then
38722          # A command without a complete path is provided, search $PATH.
38723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38724$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38725          # Extract the first word of "$tool_basename", so it can be a program name with args.
38726set dummy $tool_basename; ac_word=$2
38727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38728$as_echo_n "checking for $ac_word... " >&6; }
38729if ${ac_cv_path_NM+:} false; then :
38730  $as_echo_n "(cached) " >&6
38731else
38732  case $NM in
38733  [\\/]* | ?:[\\/]*)
38734  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38735  ;;
38736  *)
38737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38738for as_dir in $PATH
38739do
38740  IFS=$as_save_IFS
38741  test -z "$as_dir" && as_dir=.
38742    for ac_exec_ext in '' $ac_executable_extensions; do
38743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38744    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38746    break 2
38747  fi
38748done
38749  done
38750IFS=$as_save_IFS
38751
38752  ;;
38753esac
38754fi
38755NM=$ac_cv_path_NM
38756if test -n "$NM"; then
38757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38758$as_echo "$NM" >&6; }
38759else
38760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38761$as_echo "no" >&6; }
38762fi
38763
38764
38765          if test "x$NM" = x; then
38766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38767          fi
38768        else
38769          # Otherwise we believe it is a complete path. Use it as it is.
38770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38771$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38773$as_echo_n "checking for NM... " >&6; }
38774          if test ! -x "$tool_specified"; then
38775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38776$as_echo "not found" >&6; }
38777            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38778          fi
38779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38780$as_echo "$tool_specified" >&6; }
38781        fi
38782      fi
38783    fi
38784
38785  fi
38786
38787
38788
38789  # Only process if variable expands to non-empty
38790
38791  if test "x$NM" != x; then
38792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38793
38794  # First separate the path from the arguments. This will split at the first
38795  # space.
38796  complete="$NM"
38797  path="${complete%% *}"
38798  tmp="$complete EOL"
38799  arguments="${tmp#* }"
38800
38801  # Input might be given as Windows format, start by converting to
38802  # unix format.
38803  new_path=`$CYGPATH -u "$path"`
38804
38805  # Now try to locate executable using which
38806  new_path=`$WHICH "$new_path" 2> /dev/null`
38807  # bat and cmd files are not always considered executable in cygwin causing which
38808  # to not find them
38809  if test "x$new_path" = x \
38810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38812    new_path=`$CYGPATH -u "$path"`
38813  fi
38814  if test "x$new_path" = x; then
38815    # Oops. Which didn't find the executable.
38816    # The splitting of arguments from the executable at a space might have been incorrect,
38817    # since paths with space are more likely in Windows. Give it another try with the whole
38818    # argument.
38819    path="$complete"
38820    arguments="EOL"
38821    new_path=`$CYGPATH -u "$path"`
38822    new_path=`$WHICH "$new_path" 2> /dev/null`
38823    # bat and cmd files are not always considered executable in cygwin causing which
38824    # to not find them
38825    if test "x$new_path" = x \
38826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38828      new_path=`$CYGPATH -u "$path"`
38829    fi
38830    if test "x$new_path" = x; then
38831      # It's still not found. Now this is an unrecoverable error.
38832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38833$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38834      has_space=`$ECHO "$complete" | $GREP " "`
38835      if test "x$has_space" != x; then
38836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38838      fi
38839      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38840    fi
38841  fi
38842
38843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38846  # "foo.exe" is OK but "foo" is an error.
38847  #
38848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38849  # It is also a way to make sure we got the proper file name for the real test later on.
38850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38851  if test "x$test_shortpath" = x; then
38852    # Short path failed, file does not exist as specified.
38853    # Try adding .exe or .cmd
38854    if test -f "${new_path}.exe"; then
38855      input_to_shortpath="${new_path}.exe"
38856    elif test -f "${new_path}.cmd"; then
38857      input_to_shortpath="${new_path}.cmd"
38858    else
38859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38860$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38863      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38864    fi
38865  else
38866    input_to_shortpath="$new_path"
38867  fi
38868
38869  # Call helper function which possibly converts this using DOS-style short mode.
38870  # If so, the updated path is stored in $new_path.
38871  new_path="$input_to_shortpath"
38872
38873  input_path="$input_to_shortpath"
38874  # Check if we need to convert this using DOS-style short mode. If the path
38875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38876  # take no chances and rewrite it.
38877  # Note: m4 eats our [], so we need to use [ and ] instead.
38878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38879  if test "x$has_forbidden_chars" != x; then
38880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38884      # Going to short mode and back again did indeed matter. Since short mode is
38885      # case insensitive, let's make it lowercase to improve readability.
38886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38887      # Now convert it back to Unix-style (cygpath)
38888      input_path=`$CYGPATH -u "$shortmode_path"`
38889      new_path="$input_path"
38890    fi
38891  fi
38892
38893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38894  if test "x$test_cygdrive_prefix" = x; then
38895    # As a simple fix, exclude /usr/bin since it's not a real path.
38896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38898      # a path prefixed by /cygdrive for fixpath to work.
38899      new_path="$CYGWIN_ROOT_PATH$input_path"
38900    fi
38901  fi
38902
38903  # remove trailing .exe if any
38904  new_path="${new_path/%.exe/}"
38905
38906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38907
38908  # First separate the path from the arguments. This will split at the first
38909  # space.
38910  complete="$NM"
38911  path="${complete%% *}"
38912  tmp="$complete EOL"
38913  arguments="${tmp#* }"
38914
38915  # Input might be given as Windows format, start by converting to
38916  # unix format.
38917  new_path="$path"
38918
38919  windows_path="$new_path"
38920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38921    unix_path=`$CYGPATH -u "$windows_path"`
38922    new_path="$unix_path"
38923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38925    new_path="$unix_path"
38926  fi
38927
38928
38929  # Now try to locate executable using which
38930  new_path=`$WHICH "$new_path" 2> /dev/null`
38931
38932  if test "x$new_path" = x; then
38933    # Oops. Which didn't find the executable.
38934    # The splitting of arguments from the executable at a space might have been incorrect,
38935    # since paths with space are more likely in Windows. Give it another try with the whole
38936    # argument.
38937    path="$complete"
38938    arguments="EOL"
38939    new_path="$path"
38940
38941  windows_path="$new_path"
38942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38943    unix_path=`$CYGPATH -u "$windows_path"`
38944    new_path="$unix_path"
38945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38947    new_path="$unix_path"
38948  fi
38949
38950
38951    new_path=`$WHICH "$new_path" 2> /dev/null`
38952    # bat and cmd files are not always considered executable in MSYS causing which
38953    # to not find them
38954    if test "x$new_path" = x \
38955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38957      new_path="$path"
38958
38959  windows_path="$new_path"
38960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38961    unix_path=`$CYGPATH -u "$windows_path"`
38962    new_path="$unix_path"
38963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38965    new_path="$unix_path"
38966  fi
38967
38968    fi
38969
38970    if test "x$new_path" = x; then
38971      # It's still not found. Now this is an unrecoverable error.
38972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38973$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38974      has_space=`$ECHO "$complete" | $GREP " "`
38975      if test "x$has_space" != x; then
38976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38978      fi
38979      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38980    fi
38981  fi
38982
38983  # Now new_path has a complete unix path to the binary
38984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38985    # Keep paths in /bin as-is, but remove trailing .exe if any
38986    new_path="${new_path/%.exe/}"
38987    # Do not save /bin paths to all_fixpath_prefixes!
38988  else
38989    # Not in mixed or Windows style, start by that.
38990    new_path=`cmd //c echo $new_path`
38991
38992  input_path="$new_path"
38993  # Check if we need to convert this using DOS-style short mode. If the path
38994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38995  # take no chances and rewrite it.
38996  # Note: m4 eats our [], so we need to use [ and ] instead.
38997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38998  if test "x$has_forbidden_chars" != x; then
38999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39001  fi
39002
39003    # Output is in $new_path
39004
39005  windows_path="$new_path"
39006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39007    unix_path=`$CYGPATH -u "$windows_path"`
39008    new_path="$unix_path"
39009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39011    new_path="$unix_path"
39012  fi
39013
39014    # remove trailing .exe if any
39015    new_path="${new_path/%.exe/}"
39016
39017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39019  fi
39020
39021    else
39022      # We're on a unix platform. Hooray! :)
39023      # First separate the path from the arguments. This will split at the first
39024      # space.
39025      complete="$NM"
39026      path="${complete%% *}"
39027      tmp="$complete EOL"
39028      arguments="${tmp#* }"
39029
39030      # Cannot rely on the command "which" here since it doesn't always work.
39031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39032      if test -z "$is_absolute_path"; then
39033        # Path to executable is not absolute. Find it.
39034        IFS_save="$IFS"
39035        IFS=:
39036        for p in $PATH; do
39037          if test -f "$p/$path" && test -x "$p/$path"; then
39038            new_path="$p/$path"
39039            break
39040          fi
39041        done
39042        IFS="$IFS_save"
39043      else
39044        # This is an absolute path, we can use it without further modifications.
39045        new_path="$path"
39046      fi
39047
39048      if test "x$new_path" = x; then
39049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39050$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39051        has_space=`$ECHO "$complete" | $GREP " "`
39052        if test "x$has_space" != x; then
39053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39055        fi
39056        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39057      fi
39058    fi
39059
39060    # Now join together the path and the arguments once again
39061    if test "x$arguments" != xEOL; then
39062      new_complete="$new_path ${arguments% *}"
39063    else
39064      new_complete="$new_path"
39065    fi
39066
39067    if test "x$complete" != "x$new_complete"; then
39068      NM="$new_complete"
39069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39070$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39071    fi
39072  fi
39073
39074
39075
39076  # Publish this variable in the help.
39077
39078
39079  if [ -z "${GNM+x}" ]; then
39080    # The variable is not set by user, try to locate tool using the code snippet
39081    for ac_prog in gnm
39082do
39083  # Extract the first word of "$ac_prog", so it can be a program name with args.
39084set dummy $ac_prog; ac_word=$2
39085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39086$as_echo_n "checking for $ac_word... " >&6; }
39087if ${ac_cv_path_GNM+:} false; then :
39088  $as_echo_n "(cached) " >&6
39089else
39090  case $GNM in
39091  [\\/]* | ?:[\\/]*)
39092  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39093  ;;
39094  *)
39095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39096for as_dir in $PATH
39097do
39098  IFS=$as_save_IFS
39099  test -z "$as_dir" && as_dir=.
39100    for ac_exec_ext in '' $ac_executable_extensions; do
39101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39102    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39104    break 2
39105  fi
39106done
39107  done
39108IFS=$as_save_IFS
39109
39110  ;;
39111esac
39112fi
39113GNM=$ac_cv_path_GNM
39114if test -n "$GNM"; then
39115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39116$as_echo "$GNM" >&6; }
39117else
39118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39119$as_echo "no" >&6; }
39120fi
39121
39122
39123  test -n "$GNM" && break
39124done
39125
39126  else
39127    # The variable is set, but is it from the command line or the environment?
39128
39129    # Try to remove the string !GNM! from our list.
39130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39132      # If it failed, the variable was not from the command line. Ignore it,
39133      # but warn the user (except for BASH, which is always set by the calling BASH).
39134      if test "xGNM" != xBASH; then
39135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39136$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39137      fi
39138      # Try to locate tool using the code snippet
39139      for ac_prog in gnm
39140do
39141  # Extract the first word of "$ac_prog", so it can be a program name with args.
39142set dummy $ac_prog; ac_word=$2
39143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39144$as_echo_n "checking for $ac_word... " >&6; }
39145if ${ac_cv_path_GNM+:} false; then :
39146  $as_echo_n "(cached) " >&6
39147else
39148  case $GNM in
39149  [\\/]* | ?:[\\/]*)
39150  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39151  ;;
39152  *)
39153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39154for as_dir in $PATH
39155do
39156  IFS=$as_save_IFS
39157  test -z "$as_dir" && as_dir=.
39158    for ac_exec_ext in '' $ac_executable_extensions; do
39159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39160    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39162    break 2
39163  fi
39164done
39165  done
39166IFS=$as_save_IFS
39167
39168  ;;
39169esac
39170fi
39171GNM=$ac_cv_path_GNM
39172if test -n "$GNM"; then
39173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39174$as_echo "$GNM" >&6; }
39175else
39176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39177$as_echo "no" >&6; }
39178fi
39179
39180
39181  test -n "$GNM" && break
39182done
39183
39184    else
39185      # If it succeeded, then it was overridden by the user. We will use it
39186      # for the tool.
39187
39188      # First remove it from the list of overridden variables, so we can test
39189      # for unknown variables in the end.
39190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39191
39192      # Check if we try to supply an empty value
39193      if test "x$GNM" = x; then
39194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39195$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39197$as_echo_n "checking for GNM... " >&6; }
39198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39199$as_echo "disabled" >&6; }
39200      else
39201        # Check if the provided tool contains a complete path.
39202        tool_specified="$GNM"
39203        tool_basename="${tool_specified##*/}"
39204        if test "x$tool_basename" = "x$tool_specified"; then
39205          # A command without a complete path is provided, search $PATH.
39206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39207$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39208          # Extract the first word of "$tool_basename", so it can be a program name with args.
39209set dummy $tool_basename; ac_word=$2
39210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39211$as_echo_n "checking for $ac_word... " >&6; }
39212if ${ac_cv_path_GNM+:} false; then :
39213  $as_echo_n "(cached) " >&6
39214else
39215  case $GNM in
39216  [\\/]* | ?:[\\/]*)
39217  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39218  ;;
39219  *)
39220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39221for as_dir in $PATH
39222do
39223  IFS=$as_save_IFS
39224  test -z "$as_dir" && as_dir=.
39225    for ac_exec_ext in '' $ac_executable_extensions; do
39226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39227    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39229    break 2
39230  fi
39231done
39232  done
39233IFS=$as_save_IFS
39234
39235  ;;
39236esac
39237fi
39238GNM=$ac_cv_path_GNM
39239if test -n "$GNM"; then
39240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39241$as_echo "$GNM" >&6; }
39242else
39243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39244$as_echo "no" >&6; }
39245fi
39246
39247
39248          if test "x$GNM" = x; then
39249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39250          fi
39251        else
39252          # Otherwise we believe it is a complete path. Use it as it is.
39253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39254$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39256$as_echo_n "checking for GNM... " >&6; }
39257          if test ! -x "$tool_specified"; then
39258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39259$as_echo "not found" >&6; }
39260            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39261          fi
39262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39263$as_echo "$tool_specified" >&6; }
39264        fi
39265      fi
39266    fi
39267
39268  fi
39269
39270
39271
39272  # Only process if variable expands to non-empty
39273
39274  if test "x$GNM" != x; then
39275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39276
39277  # First separate the path from the arguments. This will split at the first
39278  # space.
39279  complete="$GNM"
39280  path="${complete%% *}"
39281  tmp="$complete EOL"
39282  arguments="${tmp#* }"
39283
39284  # Input might be given as Windows format, start by converting to
39285  # unix format.
39286  new_path=`$CYGPATH -u "$path"`
39287
39288  # Now try to locate executable using which
39289  new_path=`$WHICH "$new_path" 2> /dev/null`
39290  # bat and cmd files are not always considered executable in cygwin causing which
39291  # to not find them
39292  if test "x$new_path" = x \
39293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39295    new_path=`$CYGPATH -u "$path"`
39296  fi
39297  if test "x$new_path" = x; then
39298    # Oops. Which didn't find the executable.
39299    # The splitting of arguments from the executable at a space might have been incorrect,
39300    # since paths with space are more likely in Windows. Give it another try with the whole
39301    # argument.
39302    path="$complete"
39303    arguments="EOL"
39304    new_path=`$CYGPATH -u "$path"`
39305    new_path=`$WHICH "$new_path" 2> /dev/null`
39306    # bat and cmd files are not always considered executable in cygwin causing which
39307    # to not find them
39308    if test "x$new_path" = x \
39309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39311      new_path=`$CYGPATH -u "$path"`
39312    fi
39313    if test "x$new_path" = x; then
39314      # It's still not found. Now this is an unrecoverable error.
39315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39316$as_echo "$as_me: The path of GNM, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39321      fi
39322      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39323    fi
39324  fi
39325
39326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39329  # "foo.exe" is OK but "foo" is an error.
39330  #
39331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39332  # It is also a way to make sure we got the proper file name for the real test later on.
39333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39334  if test "x$test_shortpath" = x; then
39335    # Short path failed, file does not exist as specified.
39336    # Try adding .exe or .cmd
39337    if test -f "${new_path}.exe"; then
39338      input_to_shortpath="${new_path}.exe"
39339    elif test -f "${new_path}.cmd"; then
39340      input_to_shortpath="${new_path}.cmd"
39341    else
39342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39343$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39346      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39347    fi
39348  else
39349    input_to_shortpath="$new_path"
39350  fi
39351
39352  # Call helper function which possibly converts this using DOS-style short mode.
39353  # If so, the updated path is stored in $new_path.
39354  new_path="$input_to_shortpath"
39355
39356  input_path="$input_to_shortpath"
39357  # Check if we need to convert this using DOS-style short mode. If the path
39358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39359  # take no chances and rewrite it.
39360  # Note: m4 eats our [], so we need to use [ and ] instead.
39361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39362  if test "x$has_forbidden_chars" != x; then
39363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39367      # Going to short mode and back again did indeed matter. Since short mode is
39368      # case insensitive, let's make it lowercase to improve readability.
39369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39370      # Now convert it back to Unix-style (cygpath)
39371      input_path=`$CYGPATH -u "$shortmode_path"`
39372      new_path="$input_path"
39373    fi
39374  fi
39375
39376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39377  if test "x$test_cygdrive_prefix" = x; then
39378    # As a simple fix, exclude /usr/bin since it's not a real path.
39379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39381      # a path prefixed by /cygdrive for fixpath to work.
39382      new_path="$CYGWIN_ROOT_PATH$input_path"
39383    fi
39384  fi
39385
39386  # remove trailing .exe if any
39387  new_path="${new_path/%.exe/}"
39388
39389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39390
39391  # First separate the path from the arguments. This will split at the first
39392  # space.
39393  complete="$GNM"
39394  path="${complete%% *}"
39395  tmp="$complete EOL"
39396  arguments="${tmp#* }"
39397
39398  # Input might be given as Windows format, start by converting to
39399  # unix format.
39400  new_path="$path"
39401
39402  windows_path="$new_path"
39403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39404    unix_path=`$CYGPATH -u "$windows_path"`
39405    new_path="$unix_path"
39406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39408    new_path="$unix_path"
39409  fi
39410
39411
39412  # Now try to locate executable using which
39413  new_path=`$WHICH "$new_path" 2> /dev/null`
39414
39415  if test "x$new_path" = x; then
39416    # Oops. Which didn't find the executable.
39417    # The splitting of arguments from the executable at a space might have been incorrect,
39418    # since paths with space are more likely in Windows. Give it another try with the whole
39419    # argument.
39420    path="$complete"
39421    arguments="EOL"
39422    new_path="$path"
39423
39424  windows_path="$new_path"
39425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39426    unix_path=`$CYGPATH -u "$windows_path"`
39427    new_path="$unix_path"
39428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39430    new_path="$unix_path"
39431  fi
39432
39433
39434    new_path=`$WHICH "$new_path" 2> /dev/null`
39435    # bat and cmd files are not always considered executable in MSYS causing which
39436    # to not find them
39437    if test "x$new_path" = x \
39438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39440      new_path="$path"
39441
39442  windows_path="$new_path"
39443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39444    unix_path=`$CYGPATH -u "$windows_path"`
39445    new_path="$unix_path"
39446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39448    new_path="$unix_path"
39449  fi
39450
39451    fi
39452
39453    if test "x$new_path" = x; then
39454      # It's still not found. Now this is an unrecoverable error.
39455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39456$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39457      has_space=`$ECHO "$complete" | $GREP " "`
39458      if test "x$has_space" != x; then
39459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39461      fi
39462      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39463    fi
39464  fi
39465
39466  # Now new_path has a complete unix path to the binary
39467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39468    # Keep paths in /bin as-is, but remove trailing .exe if any
39469    new_path="${new_path/%.exe/}"
39470    # Do not save /bin paths to all_fixpath_prefixes!
39471  else
39472    # Not in mixed or Windows style, start by that.
39473    new_path=`cmd //c echo $new_path`
39474
39475  input_path="$new_path"
39476  # Check if we need to convert this using DOS-style short mode. If the path
39477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39478  # take no chances and rewrite it.
39479  # Note: m4 eats our [], so we need to use [ and ] instead.
39480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39481  if test "x$has_forbidden_chars" != x; then
39482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39484  fi
39485
39486    # Output is in $new_path
39487
39488  windows_path="$new_path"
39489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39490    unix_path=`$CYGPATH -u "$windows_path"`
39491    new_path="$unix_path"
39492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39494    new_path="$unix_path"
39495  fi
39496
39497    # remove trailing .exe if any
39498    new_path="${new_path/%.exe/}"
39499
39500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39502  fi
39503
39504    else
39505      # We're on a unix platform. Hooray! :)
39506      # First separate the path from the arguments. This will split at the first
39507      # space.
39508      complete="$GNM"
39509      path="${complete%% *}"
39510      tmp="$complete EOL"
39511      arguments="${tmp#* }"
39512
39513      # Cannot rely on the command "which" here since it doesn't always work.
39514      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39515      if test -z "$is_absolute_path"; then
39516        # Path to executable is not absolute. Find it.
39517        IFS_save="$IFS"
39518        IFS=:
39519        for p in $PATH; do
39520          if test -f "$p/$path" && test -x "$p/$path"; then
39521            new_path="$p/$path"
39522            break
39523          fi
39524        done
39525        IFS="$IFS_save"
39526      else
39527        # This is an absolute path, we can use it without further modifications.
39528        new_path="$path"
39529      fi
39530
39531      if test "x$new_path" = x; then
39532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39533$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39534        has_space=`$ECHO "$complete" | $GREP " "`
39535        if test "x$has_space" != x; then
39536          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39538        fi
39539        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39540      fi
39541    fi
39542
39543    # Now join together the path and the arguments once again
39544    if test "x$arguments" != xEOL; then
39545      new_complete="$new_path ${arguments% *}"
39546    else
39547      new_complete="$new_path"
39548    fi
39549
39550    if test "x$complete" != "x$new_complete"; then
39551      GNM="$new_complete"
39552      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39553$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39554    fi
39555  fi
39556
39557  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39558    # FIXME: we should unify this with the solaris case above.
39559
39560
39561  # Publish this variable in the help.
39562
39563
39564  if [ -z "${STRIP+x}" ]; then
39565    # The variable is not set by user, try to locate tool using the code snippet
39566    if test -n "$ac_tool_prefix"; then
39567  for ac_prog in strip
39568  do
39569    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39572$as_echo_n "checking for $ac_word... " >&6; }
39573if ${ac_cv_prog_STRIP+:} false; then :
39574  $as_echo_n "(cached) " >&6
39575else
39576  if test -n "$STRIP"; then
39577  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39578else
39579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39580for as_dir in $PATH
39581do
39582  IFS=$as_save_IFS
39583  test -z "$as_dir" && as_dir=.
39584    for ac_exec_ext in '' $ac_executable_extensions; do
39585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39586    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39588    break 2
39589  fi
39590done
39591  done
39592IFS=$as_save_IFS
39593
39594fi
39595fi
39596STRIP=$ac_cv_prog_STRIP
39597if test -n "$STRIP"; then
39598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39599$as_echo "$STRIP" >&6; }
39600else
39601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39602$as_echo "no" >&6; }
39603fi
39604
39605
39606    test -n "$STRIP" && break
39607  done
39608fi
39609if test -z "$STRIP"; then
39610  ac_ct_STRIP=$STRIP
39611  for ac_prog in strip
39612do
39613  # Extract the first word of "$ac_prog", so it can be a program name with args.
39614set dummy $ac_prog; ac_word=$2
39615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39616$as_echo_n "checking for $ac_word... " >&6; }
39617if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39618  $as_echo_n "(cached) " >&6
39619else
39620  if test -n "$ac_ct_STRIP"; then
39621  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39622else
39623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39624for as_dir in $PATH
39625do
39626  IFS=$as_save_IFS
39627  test -z "$as_dir" && as_dir=.
39628    for ac_exec_ext in '' $ac_executable_extensions; do
39629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39630    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39632    break 2
39633  fi
39634done
39635  done
39636IFS=$as_save_IFS
39637
39638fi
39639fi
39640ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39641if test -n "$ac_ct_STRIP"; then
39642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39643$as_echo "$ac_ct_STRIP" >&6; }
39644else
39645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39646$as_echo "no" >&6; }
39647fi
39648
39649
39650  test -n "$ac_ct_STRIP" && break
39651done
39652
39653  if test "x$ac_ct_STRIP" = x; then
39654    STRIP=""
39655  else
39656    case $cross_compiling:$ac_tool_warned in
39657yes:)
39658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39660ac_tool_warned=yes ;;
39661esac
39662    STRIP=$ac_ct_STRIP
39663  fi
39664fi
39665
39666  else
39667    # The variable is set, but is it from the command line or the environment?
39668
39669    # Try to remove the string !STRIP! from our list.
39670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39672      # If it failed, the variable was not from the command line. Ignore it,
39673      # but warn the user (except for BASH, which is always set by the calling BASH).
39674      if test "xSTRIP" != xBASH; then
39675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39676$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39677      fi
39678      # Try to locate tool using the code snippet
39679      if test -n "$ac_tool_prefix"; then
39680  for ac_prog in strip
39681  do
39682    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39683set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39685$as_echo_n "checking for $ac_word... " >&6; }
39686if ${ac_cv_prog_STRIP+:} false; then :
39687  $as_echo_n "(cached) " >&6
39688else
39689  if test -n "$STRIP"; then
39690  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39691else
39692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39693for as_dir in $PATH
39694do
39695  IFS=$as_save_IFS
39696  test -z "$as_dir" && as_dir=.
39697    for ac_exec_ext in '' $ac_executable_extensions; do
39698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39699    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39701    break 2
39702  fi
39703done
39704  done
39705IFS=$as_save_IFS
39706
39707fi
39708fi
39709STRIP=$ac_cv_prog_STRIP
39710if test -n "$STRIP"; then
39711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39712$as_echo "$STRIP" >&6; }
39713else
39714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39715$as_echo "no" >&6; }
39716fi
39717
39718
39719    test -n "$STRIP" && break
39720  done
39721fi
39722if test -z "$STRIP"; then
39723  ac_ct_STRIP=$STRIP
39724  for ac_prog in strip
39725do
39726  # Extract the first word of "$ac_prog", so it can be a program name with args.
39727set dummy $ac_prog; ac_word=$2
39728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39729$as_echo_n "checking for $ac_word... " >&6; }
39730if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39731  $as_echo_n "(cached) " >&6
39732else
39733  if test -n "$ac_ct_STRIP"; then
39734  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39735else
39736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39737for as_dir in $PATH
39738do
39739  IFS=$as_save_IFS
39740  test -z "$as_dir" && as_dir=.
39741    for ac_exec_ext in '' $ac_executable_extensions; do
39742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39743    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39745    break 2
39746  fi
39747done
39748  done
39749IFS=$as_save_IFS
39750
39751fi
39752fi
39753ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39754if test -n "$ac_ct_STRIP"; then
39755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39756$as_echo "$ac_ct_STRIP" >&6; }
39757else
39758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39759$as_echo "no" >&6; }
39760fi
39761
39762
39763  test -n "$ac_ct_STRIP" && break
39764done
39765
39766  if test "x$ac_ct_STRIP" = x; then
39767    STRIP=""
39768  else
39769    case $cross_compiling:$ac_tool_warned in
39770yes:)
39771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39773ac_tool_warned=yes ;;
39774esac
39775    STRIP=$ac_ct_STRIP
39776  fi
39777fi
39778
39779    else
39780      # If it succeeded, then it was overridden by the user. We will use it
39781      # for the tool.
39782
39783      # First remove it from the list of overridden variables, so we can test
39784      # for unknown variables in the end.
39785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39786
39787      # Check if we try to supply an empty value
39788      if test "x$STRIP" = x; then
39789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39790$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39792$as_echo_n "checking for STRIP... " >&6; }
39793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39794$as_echo "disabled" >&6; }
39795      else
39796        # Check if the provided tool contains a complete path.
39797        tool_specified="$STRIP"
39798        tool_basename="${tool_specified##*/}"
39799        if test "x$tool_basename" = "x$tool_specified"; then
39800          # A command without a complete path is provided, search $PATH.
39801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39802$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39803          # Extract the first word of "$tool_basename", so it can be a program name with args.
39804set dummy $tool_basename; ac_word=$2
39805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39806$as_echo_n "checking for $ac_word... " >&6; }
39807if ${ac_cv_path_STRIP+:} false; then :
39808  $as_echo_n "(cached) " >&6
39809else
39810  case $STRIP in
39811  [\\/]* | ?:[\\/]*)
39812  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39813  ;;
39814  *)
39815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39816for as_dir in $PATH
39817do
39818  IFS=$as_save_IFS
39819  test -z "$as_dir" && as_dir=.
39820    for ac_exec_ext in '' $ac_executable_extensions; do
39821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39822    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39824    break 2
39825  fi
39826done
39827  done
39828IFS=$as_save_IFS
39829
39830  ;;
39831esac
39832fi
39833STRIP=$ac_cv_path_STRIP
39834if test -n "$STRIP"; then
39835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39836$as_echo "$STRIP" >&6; }
39837else
39838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39839$as_echo "no" >&6; }
39840fi
39841
39842
39843          if test "x$STRIP" = x; then
39844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39845          fi
39846        else
39847          # Otherwise we believe it is a complete path. Use it as it is.
39848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39849$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39851$as_echo_n "checking for STRIP... " >&6; }
39852          if test ! -x "$tool_specified"; then
39853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39854$as_echo "not found" >&6; }
39855            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39856          fi
39857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39858$as_echo "$tool_specified" >&6; }
39859        fi
39860      fi
39861    fi
39862
39863  fi
39864
39865
39866
39867  # Only process if variable expands to non-empty
39868
39869  if test "x$STRIP" != x; then
39870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39871
39872  # First separate the path from the arguments. This will split at the first
39873  # space.
39874  complete="$STRIP"
39875  path="${complete%% *}"
39876  tmp="$complete EOL"
39877  arguments="${tmp#* }"
39878
39879  # Input might be given as Windows format, start by converting to
39880  # unix format.
39881  new_path=`$CYGPATH -u "$path"`
39882
39883  # Now try to locate executable using which
39884  new_path=`$WHICH "$new_path" 2> /dev/null`
39885  # bat and cmd files are not always considered executable in cygwin causing which
39886  # to not find them
39887  if test "x$new_path" = x \
39888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39890    new_path=`$CYGPATH -u "$path"`
39891  fi
39892  if test "x$new_path" = x; then
39893    # Oops. Which didn't find the executable.
39894    # The splitting of arguments from the executable at a space might have been incorrect,
39895    # since paths with space are more likely in Windows. Give it another try with the whole
39896    # argument.
39897    path="$complete"
39898    arguments="EOL"
39899    new_path=`$CYGPATH -u "$path"`
39900    new_path=`$WHICH "$new_path" 2> /dev/null`
39901    # bat and cmd files are not always considered executable in cygwin causing which
39902    # to not find them
39903    if test "x$new_path" = x \
39904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39906      new_path=`$CYGPATH -u "$path"`
39907    fi
39908    if test "x$new_path" = x; then
39909      # It's still not found. Now this is an unrecoverable error.
39910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39911$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39912      has_space=`$ECHO "$complete" | $GREP " "`
39913      if test "x$has_space" != x; then
39914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39916      fi
39917      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39918    fi
39919  fi
39920
39921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39924  # "foo.exe" is OK but "foo" is an error.
39925  #
39926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39927  # It is also a way to make sure we got the proper file name for the real test later on.
39928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39929  if test "x$test_shortpath" = x; then
39930    # Short path failed, file does not exist as specified.
39931    # Try adding .exe or .cmd
39932    if test -f "${new_path}.exe"; then
39933      input_to_shortpath="${new_path}.exe"
39934    elif test -f "${new_path}.cmd"; then
39935      input_to_shortpath="${new_path}.cmd"
39936    else
39937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39938$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39941      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39942    fi
39943  else
39944    input_to_shortpath="$new_path"
39945  fi
39946
39947  # Call helper function which possibly converts this using DOS-style short mode.
39948  # If so, the updated path is stored in $new_path.
39949  new_path="$input_to_shortpath"
39950
39951  input_path="$input_to_shortpath"
39952  # Check if we need to convert this using DOS-style short mode. If the path
39953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39954  # take no chances and rewrite it.
39955  # Note: m4 eats our [], so we need to use [ and ] instead.
39956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39957  if test "x$has_forbidden_chars" != x; then
39958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39962      # Going to short mode and back again did indeed matter. Since short mode is
39963      # case insensitive, let's make it lowercase to improve readability.
39964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39965      # Now convert it back to Unix-style (cygpath)
39966      input_path=`$CYGPATH -u "$shortmode_path"`
39967      new_path="$input_path"
39968    fi
39969  fi
39970
39971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39972  if test "x$test_cygdrive_prefix" = x; then
39973    # As a simple fix, exclude /usr/bin since it's not a real path.
39974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39976      # a path prefixed by /cygdrive for fixpath to work.
39977      new_path="$CYGWIN_ROOT_PATH$input_path"
39978    fi
39979  fi
39980
39981  # remove trailing .exe if any
39982  new_path="${new_path/%.exe/}"
39983
39984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39985
39986  # First separate the path from the arguments. This will split at the first
39987  # space.
39988  complete="$STRIP"
39989  path="${complete%% *}"
39990  tmp="$complete EOL"
39991  arguments="${tmp#* }"
39992
39993  # Input might be given as Windows format, start by converting to
39994  # unix format.
39995  new_path="$path"
39996
39997  windows_path="$new_path"
39998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39999    unix_path=`$CYGPATH -u "$windows_path"`
40000    new_path="$unix_path"
40001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40003    new_path="$unix_path"
40004  fi
40005
40006
40007  # Now try to locate executable using which
40008  new_path=`$WHICH "$new_path" 2> /dev/null`
40009
40010  if test "x$new_path" = x; then
40011    # Oops. Which didn't find the executable.
40012    # The splitting of arguments from the executable at a space might have been incorrect,
40013    # since paths with space are more likely in Windows. Give it another try with the whole
40014    # argument.
40015    path="$complete"
40016    arguments="EOL"
40017    new_path="$path"
40018
40019  windows_path="$new_path"
40020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40021    unix_path=`$CYGPATH -u "$windows_path"`
40022    new_path="$unix_path"
40023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40025    new_path="$unix_path"
40026  fi
40027
40028
40029    new_path=`$WHICH "$new_path" 2> /dev/null`
40030    # bat and cmd files are not always considered executable in MSYS causing which
40031    # to not find them
40032    if test "x$new_path" = x \
40033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40035      new_path="$path"
40036
40037  windows_path="$new_path"
40038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40039    unix_path=`$CYGPATH -u "$windows_path"`
40040    new_path="$unix_path"
40041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40043    new_path="$unix_path"
40044  fi
40045
40046    fi
40047
40048    if test "x$new_path" = x; then
40049      # It's still not found. Now this is an unrecoverable error.
40050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40051$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40052      has_space=`$ECHO "$complete" | $GREP " "`
40053      if test "x$has_space" != x; then
40054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40056      fi
40057      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40058    fi
40059  fi
40060
40061  # Now new_path has a complete unix path to the binary
40062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40063    # Keep paths in /bin as-is, but remove trailing .exe if any
40064    new_path="${new_path/%.exe/}"
40065    # Do not save /bin paths to all_fixpath_prefixes!
40066  else
40067    # Not in mixed or Windows style, start by that.
40068    new_path=`cmd //c echo $new_path`
40069
40070  input_path="$new_path"
40071  # Check if we need to convert this using DOS-style short mode. If the path
40072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40073  # take no chances and rewrite it.
40074  # Note: m4 eats our [], so we need to use [ and ] instead.
40075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40076  if test "x$has_forbidden_chars" != x; then
40077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40079  fi
40080
40081    # Output is in $new_path
40082
40083  windows_path="$new_path"
40084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40085    unix_path=`$CYGPATH -u "$windows_path"`
40086    new_path="$unix_path"
40087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40089    new_path="$unix_path"
40090  fi
40091
40092    # remove trailing .exe if any
40093    new_path="${new_path/%.exe/}"
40094
40095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40097  fi
40098
40099    else
40100      # We're on a unix platform. Hooray! :)
40101      # First separate the path from the arguments. This will split at the first
40102      # space.
40103      complete="$STRIP"
40104      path="${complete%% *}"
40105      tmp="$complete EOL"
40106      arguments="${tmp#* }"
40107
40108      # Cannot rely on the command "which" here since it doesn't always work.
40109      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40110      if test -z "$is_absolute_path"; then
40111        # Path to executable is not absolute. Find it.
40112        IFS_save="$IFS"
40113        IFS=:
40114        for p in $PATH; do
40115          if test -f "$p/$path" && test -x "$p/$path"; then
40116            new_path="$p/$path"
40117            break
40118          fi
40119        done
40120        IFS="$IFS_save"
40121      else
40122        # This is an absolute path, we can use it without further modifications.
40123        new_path="$path"
40124      fi
40125
40126      if test "x$new_path" = x; then
40127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40128$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40129        has_space=`$ECHO "$complete" | $GREP " "`
40130        if test "x$has_space" != x; then
40131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40133        fi
40134        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40135      fi
40136    fi
40137
40138    # Now join together the path and the arguments once again
40139    if test "x$arguments" != xEOL; then
40140      new_complete="$new_path ${arguments% *}"
40141    else
40142      new_complete="$new_path"
40143    fi
40144
40145    if test "x$complete" != "x$new_complete"; then
40146      STRIP="$new_complete"
40147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40148$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40149    fi
40150  fi
40151
40152    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40153
40154
40155  # Publish this variable in the help.
40156
40157
40158  if [ -z "${NM+x}" ]; then
40159    # The variable is not set by user, try to locate tool using the code snippet
40160    if test -n "$ac_tool_prefix"; then
40161  for ac_prog in nm gcc-nm
40162  do
40163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40166$as_echo_n "checking for $ac_word... " >&6; }
40167if ${ac_cv_prog_NM+:} false; then :
40168  $as_echo_n "(cached) " >&6
40169else
40170  if test -n "$NM"; then
40171  ac_cv_prog_NM="$NM" # Let the user override the test.
40172else
40173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40174for as_dir in $PATH
40175do
40176  IFS=$as_save_IFS
40177  test -z "$as_dir" && as_dir=.
40178    for ac_exec_ext in '' $ac_executable_extensions; do
40179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40180    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40182    break 2
40183  fi
40184done
40185  done
40186IFS=$as_save_IFS
40187
40188fi
40189fi
40190NM=$ac_cv_prog_NM
40191if test -n "$NM"; then
40192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40193$as_echo "$NM" >&6; }
40194else
40195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40196$as_echo "no" >&6; }
40197fi
40198
40199
40200    test -n "$NM" && break
40201  done
40202fi
40203if test -z "$NM"; then
40204  ac_ct_NM=$NM
40205  for ac_prog in nm gcc-nm
40206do
40207  # Extract the first word of "$ac_prog", so it can be a program name with args.
40208set dummy $ac_prog; ac_word=$2
40209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40210$as_echo_n "checking for $ac_word... " >&6; }
40211if ${ac_cv_prog_ac_ct_NM+:} false; then :
40212  $as_echo_n "(cached) " >&6
40213else
40214  if test -n "$ac_ct_NM"; then
40215  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40216else
40217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40218for as_dir in $PATH
40219do
40220  IFS=$as_save_IFS
40221  test -z "$as_dir" && as_dir=.
40222    for ac_exec_ext in '' $ac_executable_extensions; do
40223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40224    ac_cv_prog_ac_ct_NM="$ac_prog"
40225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40226    break 2
40227  fi
40228done
40229  done
40230IFS=$as_save_IFS
40231
40232fi
40233fi
40234ac_ct_NM=$ac_cv_prog_ac_ct_NM
40235if test -n "$ac_ct_NM"; then
40236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40237$as_echo "$ac_ct_NM" >&6; }
40238else
40239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40240$as_echo "no" >&6; }
40241fi
40242
40243
40244  test -n "$ac_ct_NM" && break
40245done
40246
40247  if test "x$ac_ct_NM" = x; then
40248    NM=""
40249  else
40250    case $cross_compiling:$ac_tool_warned in
40251yes:)
40252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40254ac_tool_warned=yes ;;
40255esac
40256    NM=$ac_ct_NM
40257  fi
40258fi
40259
40260  else
40261    # The variable is set, but is it from the command line or the environment?
40262
40263    # Try to remove the string !NM! from our list.
40264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40266      # If it failed, the variable was not from the command line. Ignore it,
40267      # but warn the user (except for BASH, which is always set by the calling BASH).
40268      if test "xNM" != xBASH; then
40269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40270$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40271      fi
40272      # Try to locate tool using the code snippet
40273      if test -n "$ac_tool_prefix"; then
40274  for ac_prog in nm gcc-nm
40275  do
40276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40279$as_echo_n "checking for $ac_word... " >&6; }
40280if ${ac_cv_prog_NM+:} false; then :
40281  $as_echo_n "(cached) " >&6
40282else
40283  if test -n "$NM"; then
40284  ac_cv_prog_NM="$NM" # Let the user override the test.
40285else
40286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40287for as_dir in $PATH
40288do
40289  IFS=$as_save_IFS
40290  test -z "$as_dir" && as_dir=.
40291    for ac_exec_ext in '' $ac_executable_extensions; do
40292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40293    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40295    break 2
40296  fi
40297done
40298  done
40299IFS=$as_save_IFS
40300
40301fi
40302fi
40303NM=$ac_cv_prog_NM
40304if test -n "$NM"; then
40305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40306$as_echo "$NM" >&6; }
40307else
40308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40309$as_echo "no" >&6; }
40310fi
40311
40312
40313    test -n "$NM" && break
40314  done
40315fi
40316if test -z "$NM"; then
40317  ac_ct_NM=$NM
40318  for ac_prog in nm gcc-nm
40319do
40320  # Extract the first word of "$ac_prog", so it can be a program name with args.
40321set dummy $ac_prog; ac_word=$2
40322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40323$as_echo_n "checking for $ac_word... " >&6; }
40324if ${ac_cv_prog_ac_ct_NM+:} false; then :
40325  $as_echo_n "(cached) " >&6
40326else
40327  if test -n "$ac_ct_NM"; then
40328  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40329else
40330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40331for as_dir in $PATH
40332do
40333  IFS=$as_save_IFS
40334  test -z "$as_dir" && as_dir=.
40335    for ac_exec_ext in '' $ac_executable_extensions; do
40336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40337    ac_cv_prog_ac_ct_NM="$ac_prog"
40338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40339    break 2
40340  fi
40341done
40342  done
40343IFS=$as_save_IFS
40344
40345fi
40346fi
40347ac_ct_NM=$ac_cv_prog_ac_ct_NM
40348if test -n "$ac_ct_NM"; then
40349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40350$as_echo "$ac_ct_NM" >&6; }
40351else
40352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40353$as_echo "no" >&6; }
40354fi
40355
40356
40357  test -n "$ac_ct_NM" && break
40358done
40359
40360  if test "x$ac_ct_NM" = x; then
40361    NM=""
40362  else
40363    case $cross_compiling:$ac_tool_warned in
40364yes:)
40365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40367ac_tool_warned=yes ;;
40368esac
40369    NM=$ac_ct_NM
40370  fi
40371fi
40372
40373    else
40374      # If it succeeded, then it was overridden by the user. We will use it
40375      # for the tool.
40376
40377      # First remove it from the list of overridden variables, so we can test
40378      # for unknown variables in the end.
40379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40380
40381      # Check if we try to supply an empty value
40382      if test "x$NM" = x; then
40383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40384$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40386$as_echo_n "checking for NM... " >&6; }
40387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40388$as_echo "disabled" >&6; }
40389      else
40390        # Check if the provided tool contains a complete path.
40391        tool_specified="$NM"
40392        tool_basename="${tool_specified##*/}"
40393        if test "x$tool_basename" = "x$tool_specified"; then
40394          # A command without a complete path is provided, search $PATH.
40395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40396$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40397          # Extract the first word of "$tool_basename", so it can be a program name with args.
40398set dummy $tool_basename; ac_word=$2
40399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40400$as_echo_n "checking for $ac_word... " >&6; }
40401if ${ac_cv_path_NM+:} false; then :
40402  $as_echo_n "(cached) " >&6
40403else
40404  case $NM in
40405  [\\/]* | ?:[\\/]*)
40406  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40407  ;;
40408  *)
40409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40410for as_dir in $PATH
40411do
40412  IFS=$as_save_IFS
40413  test -z "$as_dir" && as_dir=.
40414    for ac_exec_ext in '' $ac_executable_extensions; do
40415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40416    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40418    break 2
40419  fi
40420done
40421  done
40422IFS=$as_save_IFS
40423
40424  ;;
40425esac
40426fi
40427NM=$ac_cv_path_NM
40428if test -n "$NM"; then
40429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40430$as_echo "$NM" >&6; }
40431else
40432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40433$as_echo "no" >&6; }
40434fi
40435
40436
40437          if test "x$NM" = x; then
40438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40439          fi
40440        else
40441          # Otherwise we believe it is a complete path. Use it as it is.
40442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40443$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40445$as_echo_n "checking for NM... " >&6; }
40446          if test ! -x "$tool_specified"; then
40447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40448$as_echo "not found" >&6; }
40449            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40450          fi
40451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40452$as_echo "$tool_specified" >&6; }
40453        fi
40454      fi
40455    fi
40456
40457  fi
40458
40459
40460    else
40461
40462
40463  # Publish this variable in the help.
40464
40465
40466  if [ -z "${NM+x}" ]; then
40467    # The variable is not set by user, try to locate tool using the code snippet
40468    if test -n "$ac_tool_prefix"; then
40469  for ac_prog in nm
40470  do
40471    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40472set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40474$as_echo_n "checking for $ac_word... " >&6; }
40475if ${ac_cv_prog_NM+:} false; then :
40476  $as_echo_n "(cached) " >&6
40477else
40478  if test -n "$NM"; then
40479  ac_cv_prog_NM="$NM" # Let the user override the test.
40480else
40481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40482for as_dir in $PATH
40483do
40484  IFS=$as_save_IFS
40485  test -z "$as_dir" && as_dir=.
40486    for ac_exec_ext in '' $ac_executable_extensions; do
40487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40488    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40490    break 2
40491  fi
40492done
40493  done
40494IFS=$as_save_IFS
40495
40496fi
40497fi
40498NM=$ac_cv_prog_NM
40499if test -n "$NM"; then
40500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40501$as_echo "$NM" >&6; }
40502else
40503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40504$as_echo "no" >&6; }
40505fi
40506
40507
40508    test -n "$NM" && break
40509  done
40510fi
40511if test -z "$NM"; then
40512  ac_ct_NM=$NM
40513  for ac_prog in nm
40514do
40515  # Extract the first word of "$ac_prog", so it can be a program name with args.
40516set dummy $ac_prog; ac_word=$2
40517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40518$as_echo_n "checking for $ac_word... " >&6; }
40519if ${ac_cv_prog_ac_ct_NM+:} false; then :
40520  $as_echo_n "(cached) " >&6
40521else
40522  if test -n "$ac_ct_NM"; then
40523  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40524else
40525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40526for as_dir in $PATH
40527do
40528  IFS=$as_save_IFS
40529  test -z "$as_dir" && as_dir=.
40530    for ac_exec_ext in '' $ac_executable_extensions; do
40531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40532    ac_cv_prog_ac_ct_NM="$ac_prog"
40533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40534    break 2
40535  fi
40536done
40537  done
40538IFS=$as_save_IFS
40539
40540fi
40541fi
40542ac_ct_NM=$ac_cv_prog_ac_ct_NM
40543if test -n "$ac_ct_NM"; then
40544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40545$as_echo "$ac_ct_NM" >&6; }
40546else
40547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40548$as_echo "no" >&6; }
40549fi
40550
40551
40552  test -n "$ac_ct_NM" && break
40553done
40554
40555  if test "x$ac_ct_NM" = x; then
40556    NM=""
40557  else
40558    case $cross_compiling:$ac_tool_warned in
40559yes:)
40560{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40561$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40562ac_tool_warned=yes ;;
40563esac
40564    NM=$ac_ct_NM
40565  fi
40566fi
40567
40568  else
40569    # The variable is set, but is it from the command line or the environment?
40570
40571    # Try to remove the string !NM! from our list.
40572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40574      # If it failed, the variable was not from the command line. Ignore it,
40575      # but warn the user (except for BASH, which is always set by the calling BASH).
40576      if test "xNM" != xBASH; then
40577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40578$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40579      fi
40580      # Try to locate tool using the code snippet
40581      if test -n "$ac_tool_prefix"; then
40582  for ac_prog in nm
40583  do
40584    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40587$as_echo_n "checking for $ac_word... " >&6; }
40588if ${ac_cv_prog_NM+:} false; then :
40589  $as_echo_n "(cached) " >&6
40590else
40591  if test -n "$NM"; then
40592  ac_cv_prog_NM="$NM" # Let the user override the test.
40593else
40594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40595for as_dir in $PATH
40596do
40597  IFS=$as_save_IFS
40598  test -z "$as_dir" && as_dir=.
40599    for ac_exec_ext in '' $ac_executable_extensions; do
40600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40601    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40603    break 2
40604  fi
40605done
40606  done
40607IFS=$as_save_IFS
40608
40609fi
40610fi
40611NM=$ac_cv_prog_NM
40612if test -n "$NM"; then
40613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40614$as_echo "$NM" >&6; }
40615else
40616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40617$as_echo "no" >&6; }
40618fi
40619
40620
40621    test -n "$NM" && break
40622  done
40623fi
40624if test -z "$NM"; then
40625  ac_ct_NM=$NM
40626  for ac_prog in nm
40627do
40628  # Extract the first word of "$ac_prog", so it can be a program name with args.
40629set dummy $ac_prog; ac_word=$2
40630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40631$as_echo_n "checking for $ac_word... " >&6; }
40632if ${ac_cv_prog_ac_ct_NM+:} false; then :
40633  $as_echo_n "(cached) " >&6
40634else
40635  if test -n "$ac_ct_NM"; then
40636  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40637else
40638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40639for as_dir in $PATH
40640do
40641  IFS=$as_save_IFS
40642  test -z "$as_dir" && as_dir=.
40643    for ac_exec_ext in '' $ac_executable_extensions; do
40644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40645    ac_cv_prog_ac_ct_NM="$ac_prog"
40646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40647    break 2
40648  fi
40649done
40650  done
40651IFS=$as_save_IFS
40652
40653fi
40654fi
40655ac_ct_NM=$ac_cv_prog_ac_ct_NM
40656if test -n "$ac_ct_NM"; then
40657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40658$as_echo "$ac_ct_NM" >&6; }
40659else
40660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40661$as_echo "no" >&6; }
40662fi
40663
40664
40665  test -n "$ac_ct_NM" && break
40666done
40667
40668  if test "x$ac_ct_NM" = x; then
40669    NM=""
40670  else
40671    case $cross_compiling:$ac_tool_warned in
40672yes:)
40673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40675ac_tool_warned=yes ;;
40676esac
40677    NM=$ac_ct_NM
40678  fi
40679fi
40680
40681    else
40682      # If it succeeded, then it was overridden by the user. We will use it
40683      # for the tool.
40684
40685      # First remove it from the list of overridden variables, so we can test
40686      # for unknown variables in the end.
40687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40688
40689      # Check if we try to supply an empty value
40690      if test "x$NM" = x; then
40691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40692$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40694$as_echo_n "checking for NM... " >&6; }
40695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40696$as_echo "disabled" >&6; }
40697      else
40698        # Check if the provided tool contains a complete path.
40699        tool_specified="$NM"
40700        tool_basename="${tool_specified##*/}"
40701        if test "x$tool_basename" = "x$tool_specified"; then
40702          # A command without a complete path is provided, search $PATH.
40703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40704$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40705          # Extract the first word of "$tool_basename", so it can be a program name with args.
40706set dummy $tool_basename; ac_word=$2
40707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40708$as_echo_n "checking for $ac_word... " >&6; }
40709if ${ac_cv_path_NM+:} false; then :
40710  $as_echo_n "(cached) " >&6
40711else
40712  case $NM in
40713  [\\/]* | ?:[\\/]*)
40714  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40715  ;;
40716  *)
40717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40718for as_dir in $PATH
40719do
40720  IFS=$as_save_IFS
40721  test -z "$as_dir" && as_dir=.
40722    for ac_exec_ext in '' $ac_executable_extensions; do
40723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40724    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40726    break 2
40727  fi
40728done
40729  done
40730IFS=$as_save_IFS
40731
40732  ;;
40733esac
40734fi
40735NM=$ac_cv_path_NM
40736if test -n "$NM"; then
40737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40738$as_echo "$NM" >&6; }
40739else
40740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40741$as_echo "no" >&6; }
40742fi
40743
40744
40745          if test "x$NM" = x; then
40746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40747          fi
40748        else
40749          # Otherwise we believe it is a complete path. Use it as it is.
40750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40751$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40753$as_echo_n "checking for NM... " >&6; }
40754          if test ! -x "$tool_specified"; then
40755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40756$as_echo "not found" >&6; }
40757            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40758          fi
40759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40760$as_echo "$tool_specified" >&6; }
40761        fi
40762      fi
40763    fi
40764
40765  fi
40766
40767
40768    fi
40769
40770  # Only process if variable expands to non-empty
40771
40772  if test "x$NM" != x; then
40773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40774
40775  # First separate the path from the arguments. This will split at the first
40776  # space.
40777  complete="$NM"
40778  path="${complete%% *}"
40779  tmp="$complete EOL"
40780  arguments="${tmp#* }"
40781
40782  # Input might be given as Windows format, start by converting to
40783  # unix format.
40784  new_path=`$CYGPATH -u "$path"`
40785
40786  # Now try to locate executable using which
40787  new_path=`$WHICH "$new_path" 2> /dev/null`
40788  # bat and cmd files are not always considered executable in cygwin causing which
40789  # to not find them
40790  if test "x$new_path" = x \
40791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40793    new_path=`$CYGPATH -u "$path"`
40794  fi
40795  if test "x$new_path" = x; then
40796    # Oops. Which didn't find the executable.
40797    # The splitting of arguments from the executable at a space might have been incorrect,
40798    # since paths with space are more likely in Windows. Give it another try with the whole
40799    # argument.
40800    path="$complete"
40801    arguments="EOL"
40802    new_path=`$CYGPATH -u "$path"`
40803    new_path=`$WHICH "$new_path" 2> /dev/null`
40804    # bat and cmd files are not always considered executable in cygwin causing which
40805    # to not find them
40806    if test "x$new_path" = x \
40807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40809      new_path=`$CYGPATH -u "$path"`
40810    fi
40811    if test "x$new_path" = x; then
40812      # It's still not found. Now this is an unrecoverable error.
40813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40814$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40815      has_space=`$ECHO "$complete" | $GREP " "`
40816      if test "x$has_space" != x; then
40817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40819      fi
40820      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40821    fi
40822  fi
40823
40824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40827  # "foo.exe" is OK but "foo" is an error.
40828  #
40829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40830  # It is also a way to make sure we got the proper file name for the real test later on.
40831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40832  if test "x$test_shortpath" = x; then
40833    # Short path failed, file does not exist as specified.
40834    # Try adding .exe or .cmd
40835    if test -f "${new_path}.exe"; then
40836      input_to_shortpath="${new_path}.exe"
40837    elif test -f "${new_path}.cmd"; then
40838      input_to_shortpath="${new_path}.cmd"
40839    else
40840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40841$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40844      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40845    fi
40846  else
40847    input_to_shortpath="$new_path"
40848  fi
40849
40850  # Call helper function which possibly converts this using DOS-style short mode.
40851  # If so, the updated path is stored in $new_path.
40852  new_path="$input_to_shortpath"
40853
40854  input_path="$input_to_shortpath"
40855  # Check if we need to convert this using DOS-style short mode. If the path
40856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40857  # take no chances and rewrite it.
40858  # Note: m4 eats our [], so we need to use [ and ] instead.
40859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40860  if test "x$has_forbidden_chars" != x; then
40861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40865      # Going to short mode and back again did indeed matter. Since short mode is
40866      # case insensitive, let's make it lowercase to improve readability.
40867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40868      # Now convert it back to Unix-style (cygpath)
40869      input_path=`$CYGPATH -u "$shortmode_path"`
40870      new_path="$input_path"
40871    fi
40872  fi
40873
40874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40875  if test "x$test_cygdrive_prefix" = x; then
40876    # As a simple fix, exclude /usr/bin since it's not a real path.
40877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40879      # a path prefixed by /cygdrive for fixpath to work.
40880      new_path="$CYGWIN_ROOT_PATH$input_path"
40881    fi
40882  fi
40883
40884  # remove trailing .exe if any
40885  new_path="${new_path/%.exe/}"
40886
40887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40888
40889  # First separate the path from the arguments. This will split at the first
40890  # space.
40891  complete="$NM"
40892  path="${complete%% *}"
40893  tmp="$complete EOL"
40894  arguments="${tmp#* }"
40895
40896  # Input might be given as Windows format, start by converting to
40897  # unix format.
40898  new_path="$path"
40899
40900  windows_path="$new_path"
40901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40902    unix_path=`$CYGPATH -u "$windows_path"`
40903    new_path="$unix_path"
40904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40906    new_path="$unix_path"
40907  fi
40908
40909
40910  # Now try to locate executable using which
40911  new_path=`$WHICH "$new_path" 2> /dev/null`
40912
40913  if test "x$new_path" = x; then
40914    # Oops. Which didn't find the executable.
40915    # The splitting of arguments from the executable at a space might have been incorrect,
40916    # since paths with space are more likely in Windows. Give it another try with the whole
40917    # argument.
40918    path="$complete"
40919    arguments="EOL"
40920    new_path="$path"
40921
40922  windows_path="$new_path"
40923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40924    unix_path=`$CYGPATH -u "$windows_path"`
40925    new_path="$unix_path"
40926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40928    new_path="$unix_path"
40929  fi
40930
40931
40932    new_path=`$WHICH "$new_path" 2> /dev/null`
40933    # bat and cmd files are not always considered executable in MSYS causing which
40934    # to not find them
40935    if test "x$new_path" = x \
40936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40938      new_path="$path"
40939
40940  windows_path="$new_path"
40941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40942    unix_path=`$CYGPATH -u "$windows_path"`
40943    new_path="$unix_path"
40944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40946    new_path="$unix_path"
40947  fi
40948
40949    fi
40950
40951    if test "x$new_path" = x; then
40952      # It's still not found. Now this is an unrecoverable error.
40953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40955      has_space=`$ECHO "$complete" | $GREP " "`
40956      if test "x$has_space" != x; then
40957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40959      fi
40960      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40961    fi
40962  fi
40963
40964  # Now new_path has a complete unix path to the binary
40965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40966    # Keep paths in /bin as-is, but remove trailing .exe if any
40967    new_path="${new_path/%.exe/}"
40968    # Do not save /bin paths to all_fixpath_prefixes!
40969  else
40970    # Not in mixed or Windows style, start by that.
40971    new_path=`cmd //c echo $new_path`
40972
40973  input_path="$new_path"
40974  # Check if we need to convert this using DOS-style short mode. If the path
40975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40976  # take no chances and rewrite it.
40977  # Note: m4 eats our [], so we need to use [ and ] instead.
40978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40979  if test "x$has_forbidden_chars" != x; then
40980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40982  fi
40983
40984    # Output is in $new_path
40985
40986  windows_path="$new_path"
40987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40988    unix_path=`$CYGPATH -u "$windows_path"`
40989    new_path="$unix_path"
40990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40992    new_path="$unix_path"
40993  fi
40994
40995    # remove trailing .exe if any
40996    new_path="${new_path/%.exe/}"
40997
40998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41000  fi
41001
41002    else
41003      # We're on a unix platform. Hooray! :)
41004      # First separate the path from the arguments. This will split at the first
41005      # space.
41006      complete="$NM"
41007      path="${complete%% *}"
41008      tmp="$complete EOL"
41009      arguments="${tmp#* }"
41010
41011      # Cannot rely on the command "which" here since it doesn't always work.
41012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41013      if test -z "$is_absolute_path"; then
41014        # Path to executable is not absolute. Find it.
41015        IFS_save="$IFS"
41016        IFS=:
41017        for p in $PATH; do
41018          if test -f "$p/$path" && test -x "$p/$path"; then
41019            new_path="$p/$path"
41020            break
41021          fi
41022        done
41023        IFS="$IFS_save"
41024      else
41025        # This is an absolute path, we can use it without further modifications.
41026        new_path="$path"
41027      fi
41028
41029      if test "x$new_path" = x; then
41030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41031$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41032        has_space=`$ECHO "$complete" | $GREP " "`
41033        if test "x$has_space" != x; then
41034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41036        fi
41037        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41038      fi
41039    fi
41040
41041    # Now join together the path and the arguments once again
41042    if test "x$arguments" != xEOL; then
41043      new_complete="$new_path ${arguments% *}"
41044    else
41045      new_complete="$new_path"
41046    fi
41047
41048    if test "x$complete" != "x$new_complete"; then
41049      NM="$new_complete"
41050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41051$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41052    fi
41053  fi
41054
41055    GNM="$NM"
41056
41057  fi
41058
41059  # objcopy is used for moving debug symbols to separate files when
41060  # full debug symbols are enabled.
41061  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41062
41063
41064  # Publish this variable in the help.
41065
41066
41067  if [ -z "${OBJCOPY+x}" ]; then
41068    # The variable is not set by user, try to locate tool using the code snippet
41069    if test -n "$ac_tool_prefix"; then
41070  for ac_prog in gobjcopy objcopy
41071  do
41072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41075$as_echo_n "checking for $ac_word... " >&6; }
41076if ${ac_cv_prog_OBJCOPY+:} false; then :
41077  $as_echo_n "(cached) " >&6
41078else
41079  if test -n "$OBJCOPY"; then
41080  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41081else
41082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41083for as_dir in $PATH
41084do
41085  IFS=$as_save_IFS
41086  test -z "$as_dir" && as_dir=.
41087    for ac_exec_ext in '' $ac_executable_extensions; do
41088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41089    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41091    break 2
41092  fi
41093done
41094  done
41095IFS=$as_save_IFS
41096
41097fi
41098fi
41099OBJCOPY=$ac_cv_prog_OBJCOPY
41100if test -n "$OBJCOPY"; then
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41102$as_echo "$OBJCOPY" >&6; }
41103else
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41105$as_echo "no" >&6; }
41106fi
41107
41108
41109    test -n "$OBJCOPY" && break
41110  done
41111fi
41112if test -z "$OBJCOPY"; then
41113  ac_ct_OBJCOPY=$OBJCOPY
41114  for ac_prog in gobjcopy objcopy
41115do
41116  # Extract the first word of "$ac_prog", so it can be a program name with args.
41117set dummy $ac_prog; ac_word=$2
41118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41119$as_echo_n "checking for $ac_word... " >&6; }
41120if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41121  $as_echo_n "(cached) " >&6
41122else
41123  if test -n "$ac_ct_OBJCOPY"; then
41124  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41125else
41126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41127for as_dir in $PATH
41128do
41129  IFS=$as_save_IFS
41130  test -z "$as_dir" && as_dir=.
41131    for ac_exec_ext in '' $ac_executable_extensions; do
41132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41133    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41135    break 2
41136  fi
41137done
41138  done
41139IFS=$as_save_IFS
41140
41141fi
41142fi
41143ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41144if test -n "$ac_ct_OBJCOPY"; then
41145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41146$as_echo "$ac_ct_OBJCOPY" >&6; }
41147else
41148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41149$as_echo "no" >&6; }
41150fi
41151
41152
41153  test -n "$ac_ct_OBJCOPY" && break
41154done
41155
41156  if test "x$ac_ct_OBJCOPY" = x; then
41157    OBJCOPY=""
41158  else
41159    case $cross_compiling:$ac_tool_warned in
41160yes:)
41161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41163ac_tool_warned=yes ;;
41164esac
41165    OBJCOPY=$ac_ct_OBJCOPY
41166  fi
41167fi
41168
41169  else
41170    # The variable is set, but is it from the command line or the environment?
41171
41172    # Try to remove the string !OBJCOPY! from our list.
41173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41175      # If it failed, the variable was not from the command line. Ignore it,
41176      # but warn the user (except for BASH, which is always set by the calling BASH).
41177      if test "xOBJCOPY" != xBASH; then
41178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41179$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41180      fi
41181      # Try to locate tool using the code snippet
41182      if test -n "$ac_tool_prefix"; then
41183  for ac_prog in gobjcopy objcopy
41184  do
41185    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41186set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41188$as_echo_n "checking for $ac_word... " >&6; }
41189if ${ac_cv_prog_OBJCOPY+:} false; then :
41190  $as_echo_n "(cached) " >&6
41191else
41192  if test -n "$OBJCOPY"; then
41193  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41194else
41195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41196for as_dir in $PATH
41197do
41198  IFS=$as_save_IFS
41199  test -z "$as_dir" && as_dir=.
41200    for ac_exec_ext in '' $ac_executable_extensions; do
41201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41202    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41204    break 2
41205  fi
41206done
41207  done
41208IFS=$as_save_IFS
41209
41210fi
41211fi
41212OBJCOPY=$ac_cv_prog_OBJCOPY
41213if test -n "$OBJCOPY"; then
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41215$as_echo "$OBJCOPY" >&6; }
41216else
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41218$as_echo "no" >&6; }
41219fi
41220
41221
41222    test -n "$OBJCOPY" && break
41223  done
41224fi
41225if test -z "$OBJCOPY"; then
41226  ac_ct_OBJCOPY=$OBJCOPY
41227  for ac_prog in gobjcopy objcopy
41228do
41229  # Extract the first word of "$ac_prog", so it can be a program name with args.
41230set dummy $ac_prog; ac_word=$2
41231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41232$as_echo_n "checking for $ac_word... " >&6; }
41233if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41234  $as_echo_n "(cached) " >&6
41235else
41236  if test -n "$ac_ct_OBJCOPY"; then
41237  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41238else
41239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41240for as_dir in $PATH
41241do
41242  IFS=$as_save_IFS
41243  test -z "$as_dir" && as_dir=.
41244    for ac_exec_ext in '' $ac_executable_extensions; do
41245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41246    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41248    break 2
41249  fi
41250done
41251  done
41252IFS=$as_save_IFS
41253
41254fi
41255fi
41256ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41257if test -n "$ac_ct_OBJCOPY"; then
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41259$as_echo "$ac_ct_OBJCOPY" >&6; }
41260else
41261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41262$as_echo "no" >&6; }
41263fi
41264
41265
41266  test -n "$ac_ct_OBJCOPY" && break
41267done
41268
41269  if test "x$ac_ct_OBJCOPY" = x; then
41270    OBJCOPY=""
41271  else
41272    case $cross_compiling:$ac_tool_warned in
41273yes:)
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41275$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41276ac_tool_warned=yes ;;
41277esac
41278    OBJCOPY=$ac_ct_OBJCOPY
41279  fi
41280fi
41281
41282    else
41283      # If it succeeded, then it was overridden by the user. We will use it
41284      # for the tool.
41285
41286      # First remove it from the list of overridden variables, so we can test
41287      # for unknown variables in the end.
41288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41289
41290      # Check if we try to supply an empty value
41291      if test "x$OBJCOPY" = x; then
41292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41293$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41295$as_echo_n "checking for OBJCOPY... " >&6; }
41296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41297$as_echo "disabled" >&6; }
41298      else
41299        # Check if the provided tool contains a complete path.
41300        tool_specified="$OBJCOPY"
41301        tool_basename="${tool_specified##*/}"
41302        if test "x$tool_basename" = "x$tool_specified"; then
41303          # A command without a complete path is provided, search $PATH.
41304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41305$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41306          # Extract the first word of "$tool_basename", so it can be a program name with args.
41307set dummy $tool_basename; ac_word=$2
41308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41309$as_echo_n "checking for $ac_word... " >&6; }
41310if ${ac_cv_path_OBJCOPY+:} false; then :
41311  $as_echo_n "(cached) " >&6
41312else
41313  case $OBJCOPY in
41314  [\\/]* | ?:[\\/]*)
41315  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41316  ;;
41317  *)
41318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41319for as_dir in $PATH
41320do
41321  IFS=$as_save_IFS
41322  test -z "$as_dir" && as_dir=.
41323    for ac_exec_ext in '' $ac_executable_extensions; do
41324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41325    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41327    break 2
41328  fi
41329done
41330  done
41331IFS=$as_save_IFS
41332
41333  ;;
41334esac
41335fi
41336OBJCOPY=$ac_cv_path_OBJCOPY
41337if test -n "$OBJCOPY"; then
41338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41339$as_echo "$OBJCOPY" >&6; }
41340else
41341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41342$as_echo "no" >&6; }
41343fi
41344
41345
41346          if test "x$OBJCOPY" = x; then
41347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41348          fi
41349        else
41350          # Otherwise we believe it is a complete path. Use it as it is.
41351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41352$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41354$as_echo_n "checking for OBJCOPY... " >&6; }
41355          if test ! -x "$tool_specified"; then
41356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41357$as_echo "not found" >&6; }
41358            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41359          fi
41360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41361$as_echo "$tool_specified" >&6; }
41362        fi
41363      fi
41364    fi
41365
41366  fi
41367
41368
41369    # Only call fixup if objcopy was found.
41370    if test -n "$OBJCOPY"; then
41371
41372  # Only process if variable expands to non-empty
41373
41374  if test "x$OBJCOPY" != x; then
41375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41376
41377  # First separate the path from the arguments. This will split at the first
41378  # space.
41379  complete="$OBJCOPY"
41380  path="${complete%% *}"
41381  tmp="$complete EOL"
41382  arguments="${tmp#* }"
41383
41384  # Input might be given as Windows format, start by converting to
41385  # unix format.
41386  new_path=`$CYGPATH -u "$path"`
41387
41388  # Now try to locate executable using which
41389  new_path=`$WHICH "$new_path" 2> /dev/null`
41390  # bat and cmd files are not always considered executable in cygwin causing which
41391  # to not find them
41392  if test "x$new_path" = x \
41393      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41394      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41395    new_path=`$CYGPATH -u "$path"`
41396  fi
41397  if test "x$new_path" = x; then
41398    # Oops. Which didn't find the executable.
41399    # The splitting of arguments from the executable at a space might have been incorrect,
41400    # since paths with space are more likely in Windows. Give it another try with the whole
41401    # argument.
41402    path="$complete"
41403    arguments="EOL"
41404    new_path=`$CYGPATH -u "$path"`
41405    new_path=`$WHICH "$new_path" 2> /dev/null`
41406    # bat and cmd files are not always considered executable in cygwin causing which
41407    # to not find them
41408    if test "x$new_path" = x \
41409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41411      new_path=`$CYGPATH -u "$path"`
41412    fi
41413    if test "x$new_path" = x; then
41414      # It's still not found. Now this is an unrecoverable error.
41415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41416$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41417      has_space=`$ECHO "$complete" | $GREP " "`
41418      if test "x$has_space" != x; then
41419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41421      fi
41422      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41423    fi
41424  fi
41425
41426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41429  # "foo.exe" is OK but "foo" is an error.
41430  #
41431  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41432  # It is also a way to make sure we got the proper file name for the real test later on.
41433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41434  if test "x$test_shortpath" = x; then
41435    # Short path failed, file does not exist as specified.
41436    # Try adding .exe or .cmd
41437    if test -f "${new_path}.exe"; then
41438      input_to_shortpath="${new_path}.exe"
41439    elif test -f "${new_path}.cmd"; then
41440      input_to_shortpath="${new_path}.cmd"
41441    else
41442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41443$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41444      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41445$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41446      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41447    fi
41448  else
41449    input_to_shortpath="$new_path"
41450  fi
41451
41452  # Call helper function which possibly converts this using DOS-style short mode.
41453  # If so, the updated path is stored in $new_path.
41454  new_path="$input_to_shortpath"
41455
41456  input_path="$input_to_shortpath"
41457  # Check if we need to convert this using DOS-style short mode. If the path
41458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41459  # take no chances and rewrite it.
41460  # Note: m4 eats our [], so we need to use [ and ] instead.
41461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41462  if test "x$has_forbidden_chars" != x; then
41463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41467      # Going to short mode and back again did indeed matter. Since short mode is
41468      # case insensitive, let's make it lowercase to improve readability.
41469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41470      # Now convert it back to Unix-style (cygpath)
41471      input_path=`$CYGPATH -u "$shortmode_path"`
41472      new_path="$input_path"
41473    fi
41474  fi
41475
41476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41477  if test "x$test_cygdrive_prefix" = x; then
41478    # As a simple fix, exclude /usr/bin since it's not a real path.
41479    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41481      # a path prefixed by /cygdrive for fixpath to work.
41482      new_path="$CYGWIN_ROOT_PATH$input_path"
41483    fi
41484  fi
41485
41486  # remove trailing .exe if any
41487  new_path="${new_path/%.exe/}"
41488
41489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41490
41491  # First separate the path from the arguments. This will split at the first
41492  # space.
41493  complete="$OBJCOPY"
41494  path="${complete%% *}"
41495  tmp="$complete EOL"
41496  arguments="${tmp#* }"
41497
41498  # Input might be given as Windows format, start by converting to
41499  # unix format.
41500  new_path="$path"
41501
41502  windows_path="$new_path"
41503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41504    unix_path=`$CYGPATH -u "$windows_path"`
41505    new_path="$unix_path"
41506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41508    new_path="$unix_path"
41509  fi
41510
41511
41512  # Now try to locate executable using which
41513  new_path=`$WHICH "$new_path" 2> /dev/null`
41514
41515  if test "x$new_path" = x; then
41516    # Oops. Which didn't find the executable.
41517    # The splitting of arguments from the executable at a space might have been incorrect,
41518    # since paths with space are more likely in Windows. Give it another try with the whole
41519    # argument.
41520    path="$complete"
41521    arguments="EOL"
41522    new_path="$path"
41523
41524  windows_path="$new_path"
41525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41526    unix_path=`$CYGPATH -u "$windows_path"`
41527    new_path="$unix_path"
41528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41530    new_path="$unix_path"
41531  fi
41532
41533
41534    new_path=`$WHICH "$new_path" 2> /dev/null`
41535    # bat and cmd files are not always considered executable in MSYS causing which
41536    # to not find them
41537    if test "x$new_path" = x \
41538        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41539        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41540      new_path="$path"
41541
41542  windows_path="$new_path"
41543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41544    unix_path=`$CYGPATH -u "$windows_path"`
41545    new_path="$unix_path"
41546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41548    new_path="$unix_path"
41549  fi
41550
41551    fi
41552
41553    if test "x$new_path" = x; then
41554      # It's still not found. Now this is an unrecoverable error.
41555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41556$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41557      has_space=`$ECHO "$complete" | $GREP " "`
41558      if test "x$has_space" != x; then
41559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41561      fi
41562      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41563    fi
41564  fi
41565
41566  # Now new_path has a complete unix path to the binary
41567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41568    # Keep paths in /bin as-is, but remove trailing .exe if any
41569    new_path="${new_path/%.exe/}"
41570    # Do not save /bin paths to all_fixpath_prefixes!
41571  else
41572    # Not in mixed or Windows style, start by that.
41573    new_path=`cmd //c echo $new_path`
41574
41575  input_path="$new_path"
41576  # Check if we need to convert this using DOS-style short mode. If the path
41577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41578  # take no chances and rewrite it.
41579  # Note: m4 eats our [], so we need to use [ and ] instead.
41580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41581  if test "x$has_forbidden_chars" != x; then
41582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41584  fi
41585
41586    # Output is in $new_path
41587
41588  windows_path="$new_path"
41589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41590    unix_path=`$CYGPATH -u "$windows_path"`
41591    new_path="$unix_path"
41592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41594    new_path="$unix_path"
41595  fi
41596
41597    # remove trailing .exe if any
41598    new_path="${new_path/%.exe/}"
41599
41600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41602  fi
41603
41604    else
41605      # We're on a unix platform. Hooray! :)
41606      # First separate the path from the arguments. This will split at the first
41607      # space.
41608      complete="$OBJCOPY"
41609      path="${complete%% *}"
41610      tmp="$complete EOL"
41611      arguments="${tmp#* }"
41612
41613      # Cannot rely on the command "which" here since it doesn't always work.
41614      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41615      if test -z "$is_absolute_path"; then
41616        # Path to executable is not absolute. Find it.
41617        IFS_save="$IFS"
41618        IFS=:
41619        for p in $PATH; do
41620          if test -f "$p/$path" && test -x "$p/$path"; then
41621            new_path="$p/$path"
41622            break
41623          fi
41624        done
41625        IFS="$IFS_save"
41626      else
41627        # This is an absolute path, we can use it without further modifications.
41628        new_path="$path"
41629      fi
41630
41631      if test "x$new_path" = x; then
41632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41633$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41634        has_space=`$ECHO "$complete" | $GREP " "`
41635        if test "x$has_space" != x; then
41636          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41637$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41638        fi
41639        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41640      fi
41641    fi
41642
41643    # Now join together the path and the arguments once again
41644    if test "x$arguments" != xEOL; then
41645      new_complete="$new_path ${arguments% *}"
41646    else
41647      new_complete="$new_path"
41648    fi
41649
41650    if test "x$complete" != "x$new_complete"; then
41651      OBJCOPY="$new_complete"
41652      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41653$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41654    fi
41655  fi
41656
41657      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41658        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41659        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41660        # - version number is last blank separate word on first line
41661        # - version number formats that have been seen:
41662        #   - <major>.<minor>
41663        #   - <major>.<minor>.<micro>
41664        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41665        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41666         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41667              -e 's/.* //' \
41668              -e '/^[01]\./b bad' \
41669              -e '/^2\./{' \
41670              -e '  s/^2\.//' \
41671              -e '  /^[0-9]$/b bad' \
41672              -e '  /^[0-9]\./b bad' \
41673              -e '  /^1[0-9]$/b bad' \
41674              -e '  /^1[0-9]\./b bad' \
41675              -e '  /^20\./b bad' \
41676              -e '  /^21\.0$/b bad' \
41677              -e '  /^21\.0\./b bad' \
41678              -e '}' \
41679              -e ':good' \
41680              -e 's/.*/VALID_VERSION/p' \
41681              -e 'q' \
41682              -e ':bad' \
41683              -e 's/.*/BAD_VERSION/p' \
41684              -e 'q'`
41685        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41686          OBJCOPY=
41687          { $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
41688$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41689          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41690$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41691          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41692$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41693          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41694$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41695          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41696$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41697        fi
41698      fi
41699    fi
41700  fi
41701
41702
41703
41704  # Publish this variable in the help.
41705
41706
41707  if [ -z "${OBJDUMP+x}" ]; then
41708    # The variable is not set by user, try to locate tool using the code snippet
41709    if test -n "$ac_tool_prefix"; then
41710  for ac_prog in gobjdump objdump
41711  do
41712    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41713set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41715$as_echo_n "checking for $ac_word... " >&6; }
41716if ${ac_cv_prog_OBJDUMP+:} false; then :
41717  $as_echo_n "(cached) " >&6
41718else
41719  if test -n "$OBJDUMP"; then
41720  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41721else
41722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41723for as_dir in $PATH
41724do
41725  IFS=$as_save_IFS
41726  test -z "$as_dir" && as_dir=.
41727    for ac_exec_ext in '' $ac_executable_extensions; do
41728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41729    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41731    break 2
41732  fi
41733done
41734  done
41735IFS=$as_save_IFS
41736
41737fi
41738fi
41739OBJDUMP=$ac_cv_prog_OBJDUMP
41740if test -n "$OBJDUMP"; then
41741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41742$as_echo "$OBJDUMP" >&6; }
41743else
41744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41745$as_echo "no" >&6; }
41746fi
41747
41748
41749    test -n "$OBJDUMP" && break
41750  done
41751fi
41752if test -z "$OBJDUMP"; then
41753  ac_ct_OBJDUMP=$OBJDUMP
41754  for ac_prog in gobjdump objdump
41755do
41756  # Extract the first word of "$ac_prog", so it can be a program name with args.
41757set dummy $ac_prog; ac_word=$2
41758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41759$as_echo_n "checking for $ac_word... " >&6; }
41760if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41761  $as_echo_n "(cached) " >&6
41762else
41763  if test -n "$ac_ct_OBJDUMP"; then
41764  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41765else
41766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41767for as_dir in $PATH
41768do
41769  IFS=$as_save_IFS
41770  test -z "$as_dir" && as_dir=.
41771    for ac_exec_ext in '' $ac_executable_extensions; do
41772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41773    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41775    break 2
41776  fi
41777done
41778  done
41779IFS=$as_save_IFS
41780
41781fi
41782fi
41783ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41784if test -n "$ac_ct_OBJDUMP"; then
41785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41786$as_echo "$ac_ct_OBJDUMP" >&6; }
41787else
41788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41789$as_echo "no" >&6; }
41790fi
41791
41792
41793  test -n "$ac_ct_OBJDUMP" && break
41794done
41795
41796  if test "x$ac_ct_OBJDUMP" = x; then
41797    OBJDUMP=""
41798  else
41799    case $cross_compiling:$ac_tool_warned in
41800yes:)
41801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41803ac_tool_warned=yes ;;
41804esac
41805    OBJDUMP=$ac_ct_OBJDUMP
41806  fi
41807fi
41808
41809  else
41810    # The variable is set, but is it from the command line or the environment?
41811
41812    # Try to remove the string !OBJDUMP! from our list.
41813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41815      # If it failed, the variable was not from the command line. Ignore it,
41816      # but warn the user (except for BASH, which is always set by the calling BASH).
41817      if test "xOBJDUMP" != xBASH; then
41818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41819$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41820      fi
41821      # Try to locate tool using the code snippet
41822      if test -n "$ac_tool_prefix"; then
41823  for ac_prog in gobjdump objdump
41824  do
41825    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41826set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41828$as_echo_n "checking for $ac_word... " >&6; }
41829if ${ac_cv_prog_OBJDUMP+:} false; then :
41830  $as_echo_n "(cached) " >&6
41831else
41832  if test -n "$OBJDUMP"; then
41833  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41834else
41835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41836for as_dir in $PATH
41837do
41838  IFS=$as_save_IFS
41839  test -z "$as_dir" && as_dir=.
41840    for ac_exec_ext in '' $ac_executable_extensions; do
41841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41842    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41844    break 2
41845  fi
41846done
41847  done
41848IFS=$as_save_IFS
41849
41850fi
41851fi
41852OBJDUMP=$ac_cv_prog_OBJDUMP
41853if test -n "$OBJDUMP"; then
41854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41855$as_echo "$OBJDUMP" >&6; }
41856else
41857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41858$as_echo "no" >&6; }
41859fi
41860
41861
41862    test -n "$OBJDUMP" && break
41863  done
41864fi
41865if test -z "$OBJDUMP"; then
41866  ac_ct_OBJDUMP=$OBJDUMP
41867  for ac_prog in gobjdump objdump
41868do
41869  # Extract the first word of "$ac_prog", so it can be a program name with args.
41870set dummy $ac_prog; ac_word=$2
41871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41872$as_echo_n "checking for $ac_word... " >&6; }
41873if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41874  $as_echo_n "(cached) " >&6
41875else
41876  if test -n "$ac_ct_OBJDUMP"; then
41877  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41878else
41879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41880for as_dir in $PATH
41881do
41882  IFS=$as_save_IFS
41883  test -z "$as_dir" && as_dir=.
41884    for ac_exec_ext in '' $ac_executable_extensions; do
41885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41886    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41888    break 2
41889  fi
41890done
41891  done
41892IFS=$as_save_IFS
41893
41894fi
41895fi
41896ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41897if test -n "$ac_ct_OBJDUMP"; then
41898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41899$as_echo "$ac_ct_OBJDUMP" >&6; }
41900else
41901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41902$as_echo "no" >&6; }
41903fi
41904
41905
41906  test -n "$ac_ct_OBJDUMP" && break
41907done
41908
41909  if test "x$ac_ct_OBJDUMP" = x; then
41910    OBJDUMP=""
41911  else
41912    case $cross_compiling:$ac_tool_warned in
41913yes:)
41914{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41915$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41916ac_tool_warned=yes ;;
41917esac
41918    OBJDUMP=$ac_ct_OBJDUMP
41919  fi
41920fi
41921
41922    else
41923      # If it succeeded, then it was overridden by the user. We will use it
41924      # for the tool.
41925
41926      # First remove it from the list of overridden variables, so we can test
41927      # for unknown variables in the end.
41928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41929
41930      # Check if we try to supply an empty value
41931      if test "x$OBJDUMP" = x; then
41932        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41933$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41935$as_echo_n "checking for OBJDUMP... " >&6; }
41936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41937$as_echo "disabled" >&6; }
41938      else
41939        # Check if the provided tool contains a complete path.
41940        tool_specified="$OBJDUMP"
41941        tool_basename="${tool_specified##*/}"
41942        if test "x$tool_basename" = "x$tool_specified"; then
41943          # A command without a complete path is provided, search $PATH.
41944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41945$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41946          # Extract the first word of "$tool_basename", so it can be a program name with args.
41947set dummy $tool_basename; ac_word=$2
41948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41949$as_echo_n "checking for $ac_word... " >&6; }
41950if ${ac_cv_path_OBJDUMP+:} false; then :
41951  $as_echo_n "(cached) " >&6
41952else
41953  case $OBJDUMP in
41954  [\\/]* | ?:[\\/]*)
41955  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41956  ;;
41957  *)
41958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41959for as_dir in $PATH
41960do
41961  IFS=$as_save_IFS
41962  test -z "$as_dir" && as_dir=.
41963    for ac_exec_ext in '' $ac_executable_extensions; do
41964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41965    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41967    break 2
41968  fi
41969done
41970  done
41971IFS=$as_save_IFS
41972
41973  ;;
41974esac
41975fi
41976OBJDUMP=$ac_cv_path_OBJDUMP
41977if test -n "$OBJDUMP"; then
41978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41979$as_echo "$OBJDUMP" >&6; }
41980else
41981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41982$as_echo "no" >&6; }
41983fi
41984
41985
41986          if test "x$OBJDUMP" = x; then
41987            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41988          fi
41989        else
41990          # Otherwise we believe it is a complete path. Use it as it is.
41991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41992$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41993          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41994$as_echo_n "checking for OBJDUMP... " >&6; }
41995          if test ! -x "$tool_specified"; then
41996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41997$as_echo "not found" >&6; }
41998            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41999          fi
42000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42001$as_echo "$tool_specified" >&6; }
42002        fi
42003      fi
42004    fi
42005
42006  fi
42007
42008
42009  if test "x$OBJDUMP" != x; then
42010    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42011    # bails if argument is missing.
42012
42013  # Only process if variable expands to non-empty
42014
42015  if test "x$OBJDUMP" != x; then
42016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42017
42018  # First separate the path from the arguments. This will split at the first
42019  # space.
42020  complete="$OBJDUMP"
42021  path="${complete%% *}"
42022  tmp="$complete EOL"
42023  arguments="${tmp#* }"
42024
42025  # Input might be given as Windows format, start by converting to
42026  # unix format.
42027  new_path=`$CYGPATH -u "$path"`
42028
42029  # Now try to locate executable using which
42030  new_path=`$WHICH "$new_path" 2> /dev/null`
42031  # bat and cmd files are not always considered executable in cygwin causing which
42032  # to not find them
42033  if test "x$new_path" = x \
42034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42036    new_path=`$CYGPATH -u "$path"`
42037  fi
42038  if test "x$new_path" = x; then
42039    # Oops. Which didn't find the executable.
42040    # The splitting of arguments from the executable at a space might have been incorrect,
42041    # since paths with space are more likely in Windows. Give it another try with the whole
42042    # argument.
42043    path="$complete"
42044    arguments="EOL"
42045    new_path=`$CYGPATH -u "$path"`
42046    new_path=`$WHICH "$new_path" 2> /dev/null`
42047    # bat and cmd files are not always considered executable in cygwin causing which
42048    # to not find them
42049    if test "x$new_path" = x \
42050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42052      new_path=`$CYGPATH -u "$path"`
42053    fi
42054    if test "x$new_path" = x; then
42055      # It's still not found. Now this is an unrecoverable error.
42056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42057$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42058      has_space=`$ECHO "$complete" | $GREP " "`
42059      if test "x$has_space" != x; then
42060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42062      fi
42063      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42064    fi
42065  fi
42066
42067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42070  # "foo.exe" is OK but "foo" is an error.
42071  #
42072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42073  # It is also a way to make sure we got the proper file name for the real test later on.
42074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42075  if test "x$test_shortpath" = x; then
42076    # Short path failed, file does not exist as specified.
42077    # Try adding .exe or .cmd
42078    if test -f "${new_path}.exe"; then
42079      input_to_shortpath="${new_path}.exe"
42080    elif test -f "${new_path}.cmd"; then
42081      input_to_shortpath="${new_path}.cmd"
42082    else
42083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42084$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42087      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42088    fi
42089  else
42090    input_to_shortpath="$new_path"
42091  fi
42092
42093  # Call helper function which possibly converts this using DOS-style short mode.
42094  # If so, the updated path is stored in $new_path.
42095  new_path="$input_to_shortpath"
42096
42097  input_path="$input_to_shortpath"
42098  # Check if we need to convert this using DOS-style short mode. If the path
42099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42100  # take no chances and rewrite it.
42101  # Note: m4 eats our [], so we need to use [ and ] instead.
42102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42103  if test "x$has_forbidden_chars" != x; then
42104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42108      # Going to short mode and back again did indeed matter. Since short mode is
42109      # case insensitive, let's make it lowercase to improve readability.
42110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42111      # Now convert it back to Unix-style (cygpath)
42112      input_path=`$CYGPATH -u "$shortmode_path"`
42113      new_path="$input_path"
42114    fi
42115  fi
42116
42117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42118  if test "x$test_cygdrive_prefix" = x; then
42119    # As a simple fix, exclude /usr/bin since it's not a real path.
42120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42122      # a path prefixed by /cygdrive for fixpath to work.
42123      new_path="$CYGWIN_ROOT_PATH$input_path"
42124    fi
42125  fi
42126
42127  # remove trailing .exe if any
42128  new_path="${new_path/%.exe/}"
42129
42130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42131
42132  # First separate the path from the arguments. This will split at the first
42133  # space.
42134  complete="$OBJDUMP"
42135  path="${complete%% *}"
42136  tmp="$complete EOL"
42137  arguments="${tmp#* }"
42138
42139  # Input might be given as Windows format, start by converting to
42140  # unix format.
42141  new_path="$path"
42142
42143  windows_path="$new_path"
42144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42145    unix_path=`$CYGPATH -u "$windows_path"`
42146    new_path="$unix_path"
42147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42149    new_path="$unix_path"
42150  fi
42151
42152
42153  # Now try to locate executable using which
42154  new_path=`$WHICH "$new_path" 2> /dev/null`
42155
42156  if test "x$new_path" = x; then
42157    # Oops. Which didn't find the executable.
42158    # The splitting of arguments from the executable at a space might have been incorrect,
42159    # since paths with space are more likely in Windows. Give it another try with the whole
42160    # argument.
42161    path="$complete"
42162    arguments="EOL"
42163    new_path="$path"
42164
42165  windows_path="$new_path"
42166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42167    unix_path=`$CYGPATH -u "$windows_path"`
42168    new_path="$unix_path"
42169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42171    new_path="$unix_path"
42172  fi
42173
42174
42175    new_path=`$WHICH "$new_path" 2> /dev/null`
42176    # bat and cmd files are not always considered executable in MSYS causing which
42177    # to not find them
42178    if test "x$new_path" = x \
42179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42181      new_path="$path"
42182
42183  windows_path="$new_path"
42184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42185    unix_path=`$CYGPATH -u "$windows_path"`
42186    new_path="$unix_path"
42187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42189    new_path="$unix_path"
42190  fi
42191
42192    fi
42193
42194    if test "x$new_path" = x; then
42195      # It's still not found. Now this is an unrecoverable error.
42196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42197$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42198      has_space=`$ECHO "$complete" | $GREP " "`
42199      if test "x$has_space" != x; then
42200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42202      fi
42203      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42204    fi
42205  fi
42206
42207  # Now new_path has a complete unix path to the binary
42208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42209    # Keep paths in /bin as-is, but remove trailing .exe if any
42210    new_path="${new_path/%.exe/}"
42211    # Do not save /bin paths to all_fixpath_prefixes!
42212  else
42213    # Not in mixed or Windows style, start by that.
42214    new_path=`cmd //c echo $new_path`
42215
42216  input_path="$new_path"
42217  # Check if we need to convert this using DOS-style short mode. If the path
42218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42219  # take no chances and rewrite it.
42220  # Note: m4 eats our [], so we need to use [ and ] instead.
42221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42222  if test "x$has_forbidden_chars" != x; then
42223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42225  fi
42226
42227    # Output is in $new_path
42228
42229  windows_path="$new_path"
42230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42231    unix_path=`$CYGPATH -u "$windows_path"`
42232    new_path="$unix_path"
42233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42235    new_path="$unix_path"
42236  fi
42237
42238    # remove trailing .exe if any
42239    new_path="${new_path/%.exe/}"
42240
42241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42243  fi
42244
42245    else
42246      # We're on a unix platform. Hooray! :)
42247      # First separate the path from the arguments. This will split at the first
42248      # space.
42249      complete="$OBJDUMP"
42250      path="${complete%% *}"
42251      tmp="$complete EOL"
42252      arguments="${tmp#* }"
42253
42254      # Cannot rely on the command "which" here since it doesn't always work.
42255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42256      if test -z "$is_absolute_path"; then
42257        # Path to executable is not absolute. Find it.
42258        IFS_save="$IFS"
42259        IFS=:
42260        for p in $PATH; do
42261          if test -f "$p/$path" && test -x "$p/$path"; then
42262            new_path="$p/$path"
42263            break
42264          fi
42265        done
42266        IFS="$IFS_save"
42267      else
42268        # This is an absolute path, we can use it without further modifications.
42269        new_path="$path"
42270      fi
42271
42272      if test "x$new_path" = x; then
42273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42274$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42275        has_space=`$ECHO "$complete" | $GREP " "`
42276        if test "x$has_space" != x; then
42277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42279        fi
42280        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42281      fi
42282    fi
42283
42284    # Now join together the path and the arguments once again
42285    if test "x$arguments" != xEOL; then
42286      new_complete="$new_path ${arguments% *}"
42287    else
42288      new_complete="$new_path"
42289    fi
42290
42291    if test "x$complete" != "x$new_complete"; then
42292      OBJDUMP="$new_complete"
42293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42294$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42295    fi
42296  fi
42297
42298  fi
42299
42300
42301  # Restore old path.
42302  PATH="$OLD_PATH"
42303
42304  # Restore the flags to the user specified values.
42305  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42306  CFLAGS="$ORG_CFLAGS"
42307  CXXFLAGS="$ORG_CXXFLAGS"
42308
42309
42310# Finally do some processing after the detection phase
42311
42312  if test "x$COMPILE_TYPE" = "xcross"; then
42313    # Now we need to find a C/C++ compiler that can build executables for the
42314    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42315    # used once. Also, we need to do this without adding a tools dir to the
42316    # path, otherwise we might pick up cross-compilers which don't use standard
42317    # naming.
42318
42319    OLDPATH="$PATH"
42320
42321
42322# Check whether --with-build-devkit was given.
42323if test "${with_build_devkit+set}" = set; then :
42324  withval=$with_build_devkit;
42325fi
42326
42327    if test "x$with_build_devkit" = "xyes"; then
42328      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42329    elif test -n "$with_build_devkit"; then
42330      if test ! -d "$with_build_devkit"; then
42331        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42332      else
42333
42334  # Only process if variable expands to non-empty
42335
42336  if test "x$with_build_devkit" != x; then
42337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42338
42339  # Input might be given as Windows format, start by converting to
42340  # unix format.
42341  path="$with_build_devkit"
42342  new_path=`$CYGPATH -u "$path"`
42343
42344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42347  # "foo.exe" is OK but "foo" is an error.
42348  #
42349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42350  # It is also a way to make sure we got the proper file name for the real test later on.
42351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42352  if test "x$test_shortpath" = x; then
42353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42354$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42355    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42356  fi
42357
42358  # Call helper function which possibly converts this using DOS-style short mode.
42359  # If so, the updated path is stored in $new_path.
42360
42361  input_path="$new_path"
42362  # Check if we need to convert this using DOS-style short mode. If the path
42363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42364  # take no chances and rewrite it.
42365  # Note: m4 eats our [], so we need to use [ and ] instead.
42366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42367  if test "x$has_forbidden_chars" != x; then
42368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42372      # Going to short mode and back again did indeed matter. Since short mode is
42373      # case insensitive, let's make it lowercase to improve readability.
42374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42375      # Now convert it back to Unix-style (cygpath)
42376      input_path=`$CYGPATH -u "$shortmode_path"`
42377      new_path="$input_path"
42378    fi
42379  fi
42380
42381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42382  if test "x$test_cygdrive_prefix" = x; then
42383    # As a simple fix, exclude /usr/bin since it's not a real path.
42384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42386      # a path prefixed by /cygdrive for fixpath to work.
42387      new_path="$CYGWIN_ROOT_PATH$input_path"
42388    fi
42389  fi
42390
42391
42392  if test "x$path" != "x$new_path"; then
42393    with_build_devkit="$new_path"
42394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42395$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42396  fi
42397
42398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42399
42400  path="$with_build_devkit"
42401  has_colon=`$ECHO $path | $GREP ^.:`
42402  new_path="$path"
42403  if test "x$has_colon" = x; then
42404    # Not in mixed or Windows style, start by that.
42405    new_path=`cmd //c echo $path`
42406  fi
42407
42408
42409  input_path="$new_path"
42410  # Check if we need to convert this using DOS-style short mode. If the path
42411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42412  # take no chances and rewrite it.
42413  # Note: m4 eats our [], so we need to use [ and ] instead.
42414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42415  if test "x$has_forbidden_chars" != x; then
42416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42418  fi
42419
42420
42421  windows_path="$new_path"
42422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42423    unix_path=`$CYGPATH -u "$windows_path"`
42424    new_path="$unix_path"
42425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42427    new_path="$unix_path"
42428  fi
42429
42430  if test "x$path" != "x$new_path"; then
42431    with_build_devkit="$new_path"
42432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42433$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42434  fi
42435
42436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42438
42439    else
42440      # We're on a unix platform. Hooray! :)
42441      path="$with_build_devkit"
42442      has_space=`$ECHO "$path" | $GREP " "`
42443      if test "x$has_space" != x; then
42444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42445$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42447      fi
42448
42449      # Use eval to expand a potential ~
42450      eval path="$path"
42451      if test ! -f "$path" && test ! -d "$path"; then
42452        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42453      fi
42454
42455      if test -d "$path"; then
42456        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42457      else
42458        dir="`$DIRNAME "$path"`"
42459        base="`$BASENAME "$path"`"
42460        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
42461      fi
42462    fi
42463  fi
42464
42465        BUILD_DEVKIT_ROOT="$with_build_devkit"
42466        # Check for a meta data info file in the root of the devkit
42467        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42468          # Process devkit.info so that existing devkit variables are not
42469          # modified by this
42470          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42471              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42472              -e "s/\$host/\$build/g" \
42473              $BUILD_DEVKIT_ROOT/devkit.info \
42474              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42475          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42476          # This potentially sets the following:
42477          # A descriptive name of the devkit
42478
42479  if test "x$BUILD_DEVKIT_NAME" = x; then
42480    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42481  fi
42482
42483          # Corresponds to --with-extra-path
42484
42485  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42486    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42487  fi
42488
42489          # Corresponds to --with-toolchain-path
42490
42491  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42492    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42493  fi
42494
42495          # Corresponds to --with-sysroot
42496
42497  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42498    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42499  fi
42500
42501          # Skip the Window specific parts
42502        fi
42503
42504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42505$as_echo_n "checking for build platform devkit... " >&6; }
42506        if test "x$BUILD_DEVKIT_NAME" != x; then
42507          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42508$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42509        else
42510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42511$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42512        fi
42513
42514        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42515
42516  if test "x$BUILD_SYSROOT" != "x"; then
42517    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42518      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42519        # Solaris Studio does not have a concept of sysroot. Instead we must
42520        # make sure the default include and lib dirs are appended to each
42521        # compile and link command line. Must also add -I-xbuiltin to enable
42522        # inlining of system functions and intrinsics.
42523        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
42524        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42525            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42526            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42527      fi
42528    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42529      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42530      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42531    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42532      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42533      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42534    fi
42535    # Propagate the sysroot args to hotspot
42536    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42537    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42538    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42539    # The global CFLAGS and LDFLAGS variables need these for configure to function
42540    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42541    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42542    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42543    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42544  fi
42545
42546  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42547    # We also need -iframework<path>/System/Library/Frameworks
42548    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42549    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42550    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42551    # set this here so it doesn't have to be peppered throughout the forest
42552    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42553    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42554  fi
42555
42556
42557
42558
42559
42560         # Fallback default of just /bin if DEVKIT_PATH is not defined
42561        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42562          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42563        fi
42564        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42565      fi
42566    fi
42567
42568    # FIXME: we should list the discovered compilers as an exclude pattern!
42569    # If we do that, we can do this detection before POST_DETECTION, and still
42570    # find the build compilers in the tools dir, if needed.
42571
42572
42573
42574  # Publish this variable in the help.
42575
42576
42577  if [ -z "${BUILD_CC+x}" ]; then
42578    # The variable is not set by user, try to locate tool using the code snippet
42579    for ac_prog in cl cc gcc
42580do
42581  # Extract the first word of "$ac_prog", so it can be a program name with args.
42582set dummy $ac_prog; ac_word=$2
42583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42584$as_echo_n "checking for $ac_word... " >&6; }
42585if ${ac_cv_path_BUILD_CC+:} false; then :
42586  $as_echo_n "(cached) " >&6
42587else
42588  case $BUILD_CC in
42589  [\\/]* | ?:[\\/]*)
42590  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42591  ;;
42592  *)
42593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42594for as_dir in $PATH
42595do
42596  IFS=$as_save_IFS
42597  test -z "$as_dir" && as_dir=.
42598    for ac_exec_ext in '' $ac_executable_extensions; do
42599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42600    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42602    break 2
42603  fi
42604done
42605  done
42606IFS=$as_save_IFS
42607
42608  ;;
42609esac
42610fi
42611BUILD_CC=$ac_cv_path_BUILD_CC
42612if test -n "$BUILD_CC"; then
42613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42614$as_echo "$BUILD_CC" >&6; }
42615else
42616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42617$as_echo "no" >&6; }
42618fi
42619
42620
42621  test -n "$BUILD_CC" && break
42622done
42623
42624  else
42625    # The variable is set, but is it from the command line or the environment?
42626
42627    # Try to remove the string !BUILD_CC! from our list.
42628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42630      # If it failed, the variable was not from the command line. Ignore it,
42631      # but warn the user (except for BASH, which is always set by the calling BASH).
42632      if test "xBUILD_CC" != xBASH; then
42633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42634$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42635      fi
42636      # Try to locate tool using the code snippet
42637      for ac_prog in cl cc gcc
42638do
42639  # Extract the first word of "$ac_prog", so it can be a program name with args.
42640set dummy $ac_prog; ac_word=$2
42641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42642$as_echo_n "checking for $ac_word... " >&6; }
42643if ${ac_cv_path_BUILD_CC+:} false; then :
42644  $as_echo_n "(cached) " >&6
42645else
42646  case $BUILD_CC in
42647  [\\/]* | ?:[\\/]*)
42648  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42649  ;;
42650  *)
42651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42652for as_dir in $PATH
42653do
42654  IFS=$as_save_IFS
42655  test -z "$as_dir" && as_dir=.
42656    for ac_exec_ext in '' $ac_executable_extensions; do
42657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42658    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42660    break 2
42661  fi
42662done
42663  done
42664IFS=$as_save_IFS
42665
42666  ;;
42667esac
42668fi
42669BUILD_CC=$ac_cv_path_BUILD_CC
42670if test -n "$BUILD_CC"; then
42671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42672$as_echo "$BUILD_CC" >&6; }
42673else
42674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42675$as_echo "no" >&6; }
42676fi
42677
42678
42679  test -n "$BUILD_CC" && break
42680done
42681
42682    else
42683      # If it succeeded, then it was overridden by the user. We will use it
42684      # for the tool.
42685
42686      # First remove it from the list of overridden variables, so we can test
42687      # for unknown variables in the end.
42688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42689
42690      # Check if we try to supply an empty value
42691      if test "x$BUILD_CC" = x; then
42692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42693$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42695$as_echo_n "checking for BUILD_CC... " >&6; }
42696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42697$as_echo "disabled" >&6; }
42698      else
42699        # Check if the provided tool contains a complete path.
42700        tool_specified="$BUILD_CC"
42701        tool_basename="${tool_specified##*/}"
42702        if test "x$tool_basename" = "x$tool_specified"; then
42703          # A command without a complete path is provided, search $PATH.
42704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42705$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42706          # Extract the first word of "$tool_basename", so it can be a program name with args.
42707set dummy $tool_basename; ac_word=$2
42708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42709$as_echo_n "checking for $ac_word... " >&6; }
42710if ${ac_cv_path_BUILD_CC+:} false; then :
42711  $as_echo_n "(cached) " >&6
42712else
42713  case $BUILD_CC in
42714  [\\/]* | ?:[\\/]*)
42715  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42716  ;;
42717  *)
42718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42719for as_dir in $PATH
42720do
42721  IFS=$as_save_IFS
42722  test -z "$as_dir" && as_dir=.
42723    for ac_exec_ext in '' $ac_executable_extensions; do
42724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42725    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42727    break 2
42728  fi
42729done
42730  done
42731IFS=$as_save_IFS
42732
42733  ;;
42734esac
42735fi
42736BUILD_CC=$ac_cv_path_BUILD_CC
42737if test -n "$BUILD_CC"; then
42738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42739$as_echo "$BUILD_CC" >&6; }
42740else
42741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42742$as_echo "no" >&6; }
42743fi
42744
42745
42746          if test "x$BUILD_CC" = x; then
42747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42748          fi
42749        else
42750          # Otherwise we believe it is a complete path. Use it as it is.
42751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42752$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42754$as_echo_n "checking for BUILD_CC... " >&6; }
42755          if test ! -x "$tool_specified"; then
42756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42757$as_echo "not found" >&6; }
42758            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42759          fi
42760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42761$as_echo "$tool_specified" >&6; }
42762        fi
42763      fi
42764    fi
42765
42766  fi
42767
42768
42769
42770  if test "x$BUILD_CC" = x; then
42771    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42772  fi
42773
42774
42775
42776  # Only process if variable expands to non-empty
42777
42778  if test "x$BUILD_CC" != x; then
42779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42780
42781  # First separate the path from the arguments. This will split at the first
42782  # space.
42783  complete="$BUILD_CC"
42784  path="${complete%% *}"
42785  tmp="$complete EOL"
42786  arguments="${tmp#* }"
42787
42788  # Input might be given as Windows format, start by converting to
42789  # unix format.
42790  new_path=`$CYGPATH -u "$path"`
42791
42792  # Now try to locate executable using which
42793  new_path=`$WHICH "$new_path" 2> /dev/null`
42794  # bat and cmd files are not always considered executable in cygwin causing which
42795  # to not find them
42796  if test "x$new_path" = x \
42797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42799    new_path=`$CYGPATH -u "$path"`
42800  fi
42801  if test "x$new_path" = x; then
42802    # Oops. Which didn't find the executable.
42803    # The splitting of arguments from the executable at a space might have been incorrect,
42804    # since paths with space are more likely in Windows. Give it another try with the whole
42805    # argument.
42806    path="$complete"
42807    arguments="EOL"
42808    new_path=`$CYGPATH -u "$path"`
42809    new_path=`$WHICH "$new_path" 2> /dev/null`
42810    # bat and cmd files are not always considered executable in cygwin causing which
42811    # to not find them
42812    if test "x$new_path" = x \
42813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42815      new_path=`$CYGPATH -u "$path"`
42816    fi
42817    if test "x$new_path" = x; then
42818      # It's still not found. Now this is an unrecoverable error.
42819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42820$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42821      has_space=`$ECHO "$complete" | $GREP " "`
42822      if test "x$has_space" != x; then
42823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42825      fi
42826      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42827    fi
42828  fi
42829
42830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42833  # "foo.exe" is OK but "foo" is an error.
42834  #
42835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42836  # It is also a way to make sure we got the proper file name for the real test later on.
42837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42838  if test "x$test_shortpath" = x; then
42839    # Short path failed, file does not exist as specified.
42840    # Try adding .exe or .cmd
42841    if test -f "${new_path}.exe"; then
42842      input_to_shortpath="${new_path}.exe"
42843    elif test -f "${new_path}.cmd"; then
42844      input_to_shortpath="${new_path}.cmd"
42845    else
42846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42847$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42850      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42851    fi
42852  else
42853    input_to_shortpath="$new_path"
42854  fi
42855
42856  # Call helper function which possibly converts this using DOS-style short mode.
42857  # If so, the updated path is stored in $new_path.
42858  new_path="$input_to_shortpath"
42859
42860  input_path="$input_to_shortpath"
42861  # Check if we need to convert this using DOS-style short mode. If the path
42862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42863  # take no chances and rewrite it.
42864  # Note: m4 eats our [], so we need to use [ and ] instead.
42865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42866  if test "x$has_forbidden_chars" != x; then
42867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42871      # Going to short mode and back again did indeed matter. Since short mode is
42872      # case insensitive, let's make it lowercase to improve readability.
42873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42874      # Now convert it back to Unix-style (cygpath)
42875      input_path=`$CYGPATH -u "$shortmode_path"`
42876      new_path="$input_path"
42877    fi
42878  fi
42879
42880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42881  if test "x$test_cygdrive_prefix" = x; then
42882    # As a simple fix, exclude /usr/bin since it's not a real path.
42883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42885      # a path prefixed by /cygdrive for fixpath to work.
42886      new_path="$CYGWIN_ROOT_PATH$input_path"
42887    fi
42888  fi
42889
42890  # remove trailing .exe if any
42891  new_path="${new_path/%.exe/}"
42892
42893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42894
42895  # First separate the path from the arguments. This will split at the first
42896  # space.
42897  complete="$BUILD_CC"
42898  path="${complete%% *}"
42899  tmp="$complete EOL"
42900  arguments="${tmp#* }"
42901
42902  # Input might be given as Windows format, start by converting to
42903  # unix format.
42904  new_path="$path"
42905
42906  windows_path="$new_path"
42907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42908    unix_path=`$CYGPATH -u "$windows_path"`
42909    new_path="$unix_path"
42910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42912    new_path="$unix_path"
42913  fi
42914
42915
42916  # Now try to locate executable using which
42917  new_path=`$WHICH "$new_path" 2> /dev/null`
42918
42919  if test "x$new_path" = x; then
42920    # Oops. Which didn't find the executable.
42921    # The splitting of arguments from the executable at a space might have been incorrect,
42922    # since paths with space are more likely in Windows. Give it another try with the whole
42923    # argument.
42924    path="$complete"
42925    arguments="EOL"
42926    new_path="$path"
42927
42928  windows_path="$new_path"
42929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42930    unix_path=`$CYGPATH -u "$windows_path"`
42931    new_path="$unix_path"
42932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42934    new_path="$unix_path"
42935  fi
42936
42937
42938    new_path=`$WHICH "$new_path" 2> /dev/null`
42939    # bat and cmd files are not always considered executable in MSYS causing which
42940    # to not find them
42941    if test "x$new_path" = x \
42942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42944      new_path="$path"
42945
42946  windows_path="$new_path"
42947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42948    unix_path=`$CYGPATH -u "$windows_path"`
42949    new_path="$unix_path"
42950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42952    new_path="$unix_path"
42953  fi
42954
42955    fi
42956
42957    if test "x$new_path" = x; then
42958      # It's still not found. Now this is an unrecoverable error.
42959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42960$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42961      has_space=`$ECHO "$complete" | $GREP " "`
42962      if test "x$has_space" != x; then
42963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42965      fi
42966      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42967    fi
42968  fi
42969
42970  # Now new_path has a complete unix path to the binary
42971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42972    # Keep paths in /bin as-is, but remove trailing .exe if any
42973    new_path="${new_path/%.exe/}"
42974    # Do not save /bin paths to all_fixpath_prefixes!
42975  else
42976    # Not in mixed or Windows style, start by that.
42977    new_path=`cmd //c echo $new_path`
42978
42979  input_path="$new_path"
42980  # Check if we need to convert this using DOS-style short mode. If the path
42981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42982  # take no chances and rewrite it.
42983  # Note: m4 eats our [], so we need to use [ and ] instead.
42984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42985  if test "x$has_forbidden_chars" != x; then
42986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42988  fi
42989
42990    # Output is in $new_path
42991
42992  windows_path="$new_path"
42993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42994    unix_path=`$CYGPATH -u "$windows_path"`
42995    new_path="$unix_path"
42996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42998    new_path="$unix_path"
42999  fi
43000
43001    # remove trailing .exe if any
43002    new_path="${new_path/%.exe/}"
43003
43004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43006  fi
43007
43008    else
43009      # We're on a unix platform. Hooray! :)
43010      # First separate the path from the arguments. This will split at the first
43011      # space.
43012      complete="$BUILD_CC"
43013      path="${complete%% *}"
43014      tmp="$complete EOL"
43015      arguments="${tmp#* }"
43016
43017      # Cannot rely on the command "which" here since it doesn't always work.
43018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43019      if test -z "$is_absolute_path"; then
43020        # Path to executable is not absolute. Find it.
43021        IFS_save="$IFS"
43022        IFS=:
43023        for p in $PATH; do
43024          if test -f "$p/$path" && test -x "$p/$path"; then
43025            new_path="$p/$path"
43026            break
43027          fi
43028        done
43029        IFS="$IFS_save"
43030      else
43031        # This is an absolute path, we can use it without further modifications.
43032        new_path="$path"
43033      fi
43034
43035      if test "x$new_path" = x; then
43036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43037$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43038        has_space=`$ECHO "$complete" | $GREP " "`
43039        if test "x$has_space" != x; then
43040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43042        fi
43043        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43044      fi
43045    fi
43046
43047    # Now join together the path and the arguments once again
43048    if test "x$arguments" != xEOL; then
43049      new_complete="$new_path ${arguments% *}"
43050    else
43051      new_complete="$new_path"
43052    fi
43053
43054    if test "x$complete" != "x$new_complete"; then
43055      BUILD_CC="$new_complete"
43056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43057$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43058    fi
43059  fi
43060
43061
43062
43063
43064  # Publish this variable in the help.
43065
43066
43067  if [ -z "${BUILD_CXX+x}" ]; then
43068    # The variable is not set by user, try to locate tool using the code snippet
43069    for ac_prog in cl CC g++
43070do
43071  # Extract the first word of "$ac_prog", so it can be a program name with args.
43072set dummy $ac_prog; ac_word=$2
43073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43074$as_echo_n "checking for $ac_word... " >&6; }
43075if ${ac_cv_path_BUILD_CXX+:} false; then :
43076  $as_echo_n "(cached) " >&6
43077else
43078  case $BUILD_CXX in
43079  [\\/]* | ?:[\\/]*)
43080  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43081  ;;
43082  *)
43083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43084for as_dir in $PATH
43085do
43086  IFS=$as_save_IFS
43087  test -z "$as_dir" && as_dir=.
43088    for ac_exec_ext in '' $ac_executable_extensions; do
43089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43090    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43092    break 2
43093  fi
43094done
43095  done
43096IFS=$as_save_IFS
43097
43098  ;;
43099esac
43100fi
43101BUILD_CXX=$ac_cv_path_BUILD_CXX
43102if test -n "$BUILD_CXX"; then
43103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43104$as_echo "$BUILD_CXX" >&6; }
43105else
43106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43107$as_echo "no" >&6; }
43108fi
43109
43110
43111  test -n "$BUILD_CXX" && break
43112done
43113
43114  else
43115    # The variable is set, but is it from the command line or the environment?
43116
43117    # Try to remove the string !BUILD_CXX! from our list.
43118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43120      # If it failed, the variable was not from the command line. Ignore it,
43121      # but warn the user (except for BASH, which is always set by the calling BASH).
43122      if test "xBUILD_CXX" != xBASH; then
43123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43124$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43125      fi
43126      # Try to locate tool using the code snippet
43127      for ac_prog in cl CC g++
43128do
43129  # Extract the first word of "$ac_prog", so it can be a program name with args.
43130set dummy $ac_prog; ac_word=$2
43131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43132$as_echo_n "checking for $ac_word... " >&6; }
43133if ${ac_cv_path_BUILD_CXX+:} false; then :
43134  $as_echo_n "(cached) " >&6
43135else
43136  case $BUILD_CXX in
43137  [\\/]* | ?:[\\/]*)
43138  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43139  ;;
43140  *)
43141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43142for as_dir in $PATH
43143do
43144  IFS=$as_save_IFS
43145  test -z "$as_dir" && as_dir=.
43146    for ac_exec_ext in '' $ac_executable_extensions; do
43147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43148    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43150    break 2
43151  fi
43152done
43153  done
43154IFS=$as_save_IFS
43155
43156  ;;
43157esac
43158fi
43159BUILD_CXX=$ac_cv_path_BUILD_CXX
43160if test -n "$BUILD_CXX"; then
43161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43162$as_echo "$BUILD_CXX" >&6; }
43163else
43164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43165$as_echo "no" >&6; }
43166fi
43167
43168
43169  test -n "$BUILD_CXX" && break
43170done
43171
43172    else
43173      # If it succeeded, then it was overridden by the user. We will use it
43174      # for the tool.
43175
43176      # First remove it from the list of overridden variables, so we can test
43177      # for unknown variables in the end.
43178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43179
43180      # Check if we try to supply an empty value
43181      if test "x$BUILD_CXX" = x; then
43182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43183$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43185$as_echo_n "checking for BUILD_CXX... " >&6; }
43186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43187$as_echo "disabled" >&6; }
43188      else
43189        # Check if the provided tool contains a complete path.
43190        tool_specified="$BUILD_CXX"
43191        tool_basename="${tool_specified##*/}"
43192        if test "x$tool_basename" = "x$tool_specified"; then
43193          # A command without a complete path is provided, search $PATH.
43194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43195$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43196          # Extract the first word of "$tool_basename", so it can be a program name with args.
43197set dummy $tool_basename; ac_word=$2
43198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43199$as_echo_n "checking for $ac_word... " >&6; }
43200if ${ac_cv_path_BUILD_CXX+:} false; then :
43201  $as_echo_n "(cached) " >&6
43202else
43203  case $BUILD_CXX in
43204  [\\/]* | ?:[\\/]*)
43205  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43206  ;;
43207  *)
43208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43209for as_dir in $PATH
43210do
43211  IFS=$as_save_IFS
43212  test -z "$as_dir" && as_dir=.
43213    for ac_exec_ext in '' $ac_executable_extensions; do
43214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43215    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43217    break 2
43218  fi
43219done
43220  done
43221IFS=$as_save_IFS
43222
43223  ;;
43224esac
43225fi
43226BUILD_CXX=$ac_cv_path_BUILD_CXX
43227if test -n "$BUILD_CXX"; then
43228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43229$as_echo "$BUILD_CXX" >&6; }
43230else
43231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43232$as_echo "no" >&6; }
43233fi
43234
43235
43236          if test "x$BUILD_CXX" = x; then
43237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43238          fi
43239        else
43240          # Otherwise we believe it is a complete path. Use it as it is.
43241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43242$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43244$as_echo_n "checking for BUILD_CXX... " >&6; }
43245          if test ! -x "$tool_specified"; then
43246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43247$as_echo "not found" >&6; }
43248            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43249          fi
43250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43251$as_echo "$tool_specified" >&6; }
43252        fi
43253      fi
43254    fi
43255
43256  fi
43257
43258
43259
43260  if test "x$BUILD_CXX" = x; then
43261    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43262  fi
43263
43264
43265
43266  # Only process if variable expands to non-empty
43267
43268  if test "x$BUILD_CXX" != x; then
43269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43270
43271  # First separate the path from the arguments. This will split at the first
43272  # space.
43273  complete="$BUILD_CXX"
43274  path="${complete%% *}"
43275  tmp="$complete EOL"
43276  arguments="${tmp#* }"
43277
43278  # Input might be given as Windows format, start by converting to
43279  # unix format.
43280  new_path=`$CYGPATH -u "$path"`
43281
43282  # Now try to locate executable using which
43283  new_path=`$WHICH "$new_path" 2> /dev/null`
43284  # bat and cmd files are not always considered executable in cygwin causing which
43285  # to not find them
43286  if test "x$new_path" = x \
43287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43289    new_path=`$CYGPATH -u "$path"`
43290  fi
43291  if test "x$new_path" = x; then
43292    # Oops. Which didn't find the executable.
43293    # The splitting of arguments from the executable at a space might have been incorrect,
43294    # since paths with space are more likely in Windows. Give it another try with the whole
43295    # argument.
43296    path="$complete"
43297    arguments="EOL"
43298    new_path=`$CYGPATH -u "$path"`
43299    new_path=`$WHICH "$new_path" 2> /dev/null`
43300    # bat and cmd files are not always considered executable in cygwin causing which
43301    # to not find them
43302    if test "x$new_path" = x \
43303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43305      new_path=`$CYGPATH -u "$path"`
43306    fi
43307    if test "x$new_path" = x; then
43308      # It's still not found. Now this is an unrecoverable error.
43309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43310$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43311      has_space=`$ECHO "$complete" | $GREP " "`
43312      if test "x$has_space" != x; then
43313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43315      fi
43316      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43317    fi
43318  fi
43319
43320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43323  # "foo.exe" is OK but "foo" is an error.
43324  #
43325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43326  # It is also a way to make sure we got the proper file name for the real test later on.
43327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43328  if test "x$test_shortpath" = x; then
43329    # Short path failed, file does not exist as specified.
43330    # Try adding .exe or .cmd
43331    if test -f "${new_path}.exe"; then
43332      input_to_shortpath="${new_path}.exe"
43333    elif test -f "${new_path}.cmd"; then
43334      input_to_shortpath="${new_path}.cmd"
43335    else
43336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43337$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43340      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43341    fi
43342  else
43343    input_to_shortpath="$new_path"
43344  fi
43345
43346  # Call helper function which possibly converts this using DOS-style short mode.
43347  # If so, the updated path is stored in $new_path.
43348  new_path="$input_to_shortpath"
43349
43350  input_path="$input_to_shortpath"
43351  # Check if we need to convert this using DOS-style short mode. If the path
43352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43353  # take no chances and rewrite it.
43354  # Note: m4 eats our [], so we need to use [ and ] instead.
43355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43356  if test "x$has_forbidden_chars" != x; then
43357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43361      # Going to short mode and back again did indeed matter. Since short mode is
43362      # case insensitive, let's make it lowercase to improve readability.
43363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43364      # Now convert it back to Unix-style (cygpath)
43365      input_path=`$CYGPATH -u "$shortmode_path"`
43366      new_path="$input_path"
43367    fi
43368  fi
43369
43370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43371  if test "x$test_cygdrive_prefix" = x; then
43372    # As a simple fix, exclude /usr/bin since it's not a real path.
43373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43375      # a path prefixed by /cygdrive for fixpath to work.
43376      new_path="$CYGWIN_ROOT_PATH$input_path"
43377    fi
43378  fi
43379
43380  # remove trailing .exe if any
43381  new_path="${new_path/%.exe/}"
43382
43383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43384
43385  # First separate the path from the arguments. This will split at the first
43386  # space.
43387  complete="$BUILD_CXX"
43388  path="${complete%% *}"
43389  tmp="$complete EOL"
43390  arguments="${tmp#* }"
43391
43392  # Input might be given as Windows format, start by converting to
43393  # unix format.
43394  new_path="$path"
43395
43396  windows_path="$new_path"
43397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43398    unix_path=`$CYGPATH -u "$windows_path"`
43399    new_path="$unix_path"
43400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43402    new_path="$unix_path"
43403  fi
43404
43405
43406  # Now try to locate executable using which
43407  new_path=`$WHICH "$new_path" 2> /dev/null`
43408
43409  if test "x$new_path" = x; then
43410    # Oops. Which didn't find the executable.
43411    # The splitting of arguments from the executable at a space might have been incorrect,
43412    # since paths with space are more likely in Windows. Give it another try with the whole
43413    # argument.
43414    path="$complete"
43415    arguments="EOL"
43416    new_path="$path"
43417
43418  windows_path="$new_path"
43419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43420    unix_path=`$CYGPATH -u "$windows_path"`
43421    new_path="$unix_path"
43422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43424    new_path="$unix_path"
43425  fi
43426
43427
43428    new_path=`$WHICH "$new_path" 2> /dev/null`
43429    # bat and cmd files are not always considered executable in MSYS causing which
43430    # to not find them
43431    if test "x$new_path" = x \
43432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43434      new_path="$path"
43435
43436  windows_path="$new_path"
43437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43438    unix_path=`$CYGPATH -u "$windows_path"`
43439    new_path="$unix_path"
43440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43442    new_path="$unix_path"
43443  fi
43444
43445    fi
43446
43447    if test "x$new_path" = x; then
43448      # It's still not found. Now this is an unrecoverable error.
43449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43450$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43451      has_space=`$ECHO "$complete" | $GREP " "`
43452      if test "x$has_space" != x; then
43453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43455      fi
43456      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43457    fi
43458  fi
43459
43460  # Now new_path has a complete unix path to the binary
43461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43462    # Keep paths in /bin as-is, but remove trailing .exe if any
43463    new_path="${new_path/%.exe/}"
43464    # Do not save /bin paths to all_fixpath_prefixes!
43465  else
43466    # Not in mixed or Windows style, start by that.
43467    new_path=`cmd //c echo $new_path`
43468
43469  input_path="$new_path"
43470  # Check if we need to convert this using DOS-style short mode. If the path
43471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43472  # take no chances and rewrite it.
43473  # Note: m4 eats our [], so we need to use [ and ] instead.
43474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43475  if test "x$has_forbidden_chars" != x; then
43476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43478  fi
43479
43480    # Output is in $new_path
43481
43482  windows_path="$new_path"
43483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43484    unix_path=`$CYGPATH -u "$windows_path"`
43485    new_path="$unix_path"
43486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43488    new_path="$unix_path"
43489  fi
43490
43491    # remove trailing .exe if any
43492    new_path="${new_path/%.exe/}"
43493
43494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43496  fi
43497
43498    else
43499      # We're on a unix platform. Hooray! :)
43500      # First separate the path from the arguments. This will split at the first
43501      # space.
43502      complete="$BUILD_CXX"
43503      path="${complete%% *}"
43504      tmp="$complete EOL"
43505      arguments="${tmp#* }"
43506
43507      # Cannot rely on the command "which" here since it doesn't always work.
43508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43509      if test -z "$is_absolute_path"; then
43510        # Path to executable is not absolute. Find it.
43511        IFS_save="$IFS"
43512        IFS=:
43513        for p in $PATH; do
43514          if test -f "$p/$path" && test -x "$p/$path"; then
43515            new_path="$p/$path"
43516            break
43517          fi
43518        done
43519        IFS="$IFS_save"
43520      else
43521        # This is an absolute path, we can use it without further modifications.
43522        new_path="$path"
43523      fi
43524
43525      if test "x$new_path" = x; then
43526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43527$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43528        has_space=`$ECHO "$complete" | $GREP " "`
43529        if test "x$has_space" != x; then
43530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43532        fi
43533        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43534      fi
43535    fi
43536
43537    # Now join together the path and the arguments once again
43538    if test "x$arguments" != xEOL; then
43539      new_complete="$new_path ${arguments% *}"
43540    else
43541      new_complete="$new_path"
43542    fi
43543
43544    if test "x$complete" != "x$new_complete"; then
43545      BUILD_CXX="$new_complete"
43546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43547$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43548    fi
43549  fi
43550
43551
43552
43553  # Publish this variable in the help.
43554
43555
43556  if [ -z "${BUILD_NM+x}" ]; then
43557    # The variable is not set by user, try to locate tool using the code snippet
43558    for ac_prog in nm gcc-nm
43559do
43560  # Extract the first word of "$ac_prog", so it can be a program name with args.
43561set dummy $ac_prog; ac_word=$2
43562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43563$as_echo_n "checking for $ac_word... " >&6; }
43564if ${ac_cv_path_BUILD_NM+:} false; then :
43565  $as_echo_n "(cached) " >&6
43566else
43567  case $BUILD_NM in
43568  [\\/]* | ?:[\\/]*)
43569  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43570  ;;
43571  *)
43572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43573for as_dir in $PATH
43574do
43575  IFS=$as_save_IFS
43576  test -z "$as_dir" && as_dir=.
43577    for ac_exec_ext in '' $ac_executable_extensions; do
43578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43579    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43581    break 2
43582  fi
43583done
43584  done
43585IFS=$as_save_IFS
43586
43587  ;;
43588esac
43589fi
43590BUILD_NM=$ac_cv_path_BUILD_NM
43591if test -n "$BUILD_NM"; then
43592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43593$as_echo "$BUILD_NM" >&6; }
43594else
43595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43596$as_echo "no" >&6; }
43597fi
43598
43599
43600  test -n "$BUILD_NM" && break
43601done
43602
43603  else
43604    # The variable is set, but is it from the command line or the environment?
43605
43606    # Try to remove the string !BUILD_NM! from our list.
43607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43609      # If it failed, the variable was not from the command line. Ignore it,
43610      # but warn the user (except for BASH, which is always set by the calling BASH).
43611      if test "xBUILD_NM" != xBASH; then
43612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43613$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43614      fi
43615      # Try to locate tool using the code snippet
43616      for ac_prog in nm gcc-nm
43617do
43618  # Extract the first word of "$ac_prog", so it can be a program name with args.
43619set dummy $ac_prog; ac_word=$2
43620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43621$as_echo_n "checking for $ac_word... " >&6; }
43622if ${ac_cv_path_BUILD_NM+:} false; then :
43623  $as_echo_n "(cached) " >&6
43624else
43625  case $BUILD_NM in
43626  [\\/]* | ?:[\\/]*)
43627  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43628  ;;
43629  *)
43630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43631for as_dir in $PATH
43632do
43633  IFS=$as_save_IFS
43634  test -z "$as_dir" && as_dir=.
43635    for ac_exec_ext in '' $ac_executable_extensions; do
43636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43637    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43639    break 2
43640  fi
43641done
43642  done
43643IFS=$as_save_IFS
43644
43645  ;;
43646esac
43647fi
43648BUILD_NM=$ac_cv_path_BUILD_NM
43649if test -n "$BUILD_NM"; then
43650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43651$as_echo "$BUILD_NM" >&6; }
43652else
43653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43654$as_echo "no" >&6; }
43655fi
43656
43657
43658  test -n "$BUILD_NM" && break
43659done
43660
43661    else
43662      # If it succeeded, then it was overridden by the user. We will use it
43663      # for the tool.
43664
43665      # First remove it from the list of overridden variables, so we can test
43666      # for unknown variables in the end.
43667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43668
43669      # Check if we try to supply an empty value
43670      if test "x$BUILD_NM" = x; then
43671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43672$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43674$as_echo_n "checking for BUILD_NM... " >&6; }
43675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43676$as_echo "disabled" >&6; }
43677      else
43678        # Check if the provided tool contains a complete path.
43679        tool_specified="$BUILD_NM"
43680        tool_basename="${tool_specified##*/}"
43681        if test "x$tool_basename" = "x$tool_specified"; then
43682          # A command without a complete path is provided, search $PATH.
43683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43684$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43685          # Extract the first word of "$tool_basename", so it can be a program name with args.
43686set dummy $tool_basename; ac_word=$2
43687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43688$as_echo_n "checking for $ac_word... " >&6; }
43689if ${ac_cv_path_BUILD_NM+:} false; then :
43690  $as_echo_n "(cached) " >&6
43691else
43692  case $BUILD_NM in
43693  [\\/]* | ?:[\\/]*)
43694  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43695  ;;
43696  *)
43697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43698for as_dir in $PATH
43699do
43700  IFS=$as_save_IFS
43701  test -z "$as_dir" && as_dir=.
43702    for ac_exec_ext in '' $ac_executable_extensions; do
43703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43704    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43706    break 2
43707  fi
43708done
43709  done
43710IFS=$as_save_IFS
43711
43712  ;;
43713esac
43714fi
43715BUILD_NM=$ac_cv_path_BUILD_NM
43716if test -n "$BUILD_NM"; then
43717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43718$as_echo "$BUILD_NM" >&6; }
43719else
43720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43721$as_echo "no" >&6; }
43722fi
43723
43724
43725          if test "x$BUILD_NM" = x; then
43726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43727          fi
43728        else
43729          # Otherwise we believe it is a complete path. Use it as it is.
43730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43731$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43733$as_echo_n "checking for BUILD_NM... " >&6; }
43734          if test ! -x "$tool_specified"; then
43735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43736$as_echo "not found" >&6; }
43737            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43738          fi
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43740$as_echo "$tool_specified" >&6; }
43741        fi
43742      fi
43743    fi
43744
43745  fi
43746
43747
43748
43749  # Only process if variable expands to non-empty
43750
43751  if test "x$BUILD_NM" != x; then
43752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43753
43754  # First separate the path from the arguments. This will split at the first
43755  # space.
43756  complete="$BUILD_NM"
43757  path="${complete%% *}"
43758  tmp="$complete EOL"
43759  arguments="${tmp#* }"
43760
43761  # Input might be given as Windows format, start by converting to
43762  # unix format.
43763  new_path=`$CYGPATH -u "$path"`
43764
43765  # Now try to locate executable using which
43766  new_path=`$WHICH "$new_path" 2> /dev/null`
43767  # bat and cmd files are not always considered executable in cygwin causing which
43768  # to not find them
43769  if test "x$new_path" = x \
43770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43772    new_path=`$CYGPATH -u "$path"`
43773  fi
43774  if test "x$new_path" = x; then
43775    # Oops. Which didn't find the executable.
43776    # The splitting of arguments from the executable at a space might have been incorrect,
43777    # since paths with space are more likely in Windows. Give it another try with the whole
43778    # argument.
43779    path="$complete"
43780    arguments="EOL"
43781    new_path=`$CYGPATH -u "$path"`
43782    new_path=`$WHICH "$new_path" 2> /dev/null`
43783    # bat and cmd files are not always considered executable in cygwin causing which
43784    # to not find them
43785    if test "x$new_path" = x \
43786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43788      new_path=`$CYGPATH -u "$path"`
43789    fi
43790    if test "x$new_path" = x; then
43791      # It's still not found. Now this is an unrecoverable error.
43792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43793$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43794      has_space=`$ECHO "$complete" | $GREP " "`
43795      if test "x$has_space" != x; then
43796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43798      fi
43799      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43800    fi
43801  fi
43802
43803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43806  # "foo.exe" is OK but "foo" is an error.
43807  #
43808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43809  # It is also a way to make sure we got the proper file name for the real test later on.
43810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43811  if test "x$test_shortpath" = x; then
43812    # Short path failed, file does not exist as specified.
43813    # Try adding .exe or .cmd
43814    if test -f "${new_path}.exe"; then
43815      input_to_shortpath="${new_path}.exe"
43816    elif test -f "${new_path}.cmd"; then
43817      input_to_shortpath="${new_path}.cmd"
43818    else
43819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43820$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43823      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43824    fi
43825  else
43826    input_to_shortpath="$new_path"
43827  fi
43828
43829  # Call helper function which possibly converts this using DOS-style short mode.
43830  # If so, the updated path is stored in $new_path.
43831  new_path="$input_to_shortpath"
43832
43833  input_path="$input_to_shortpath"
43834  # Check if we need to convert this using DOS-style short mode. If the path
43835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43836  # take no chances and rewrite it.
43837  # Note: m4 eats our [], so we need to use [ and ] instead.
43838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43839  if test "x$has_forbidden_chars" != x; then
43840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43844      # Going to short mode and back again did indeed matter. Since short mode is
43845      # case insensitive, let's make it lowercase to improve readability.
43846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43847      # Now convert it back to Unix-style (cygpath)
43848      input_path=`$CYGPATH -u "$shortmode_path"`
43849      new_path="$input_path"
43850    fi
43851  fi
43852
43853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43854  if test "x$test_cygdrive_prefix" = x; then
43855    # As a simple fix, exclude /usr/bin since it's not a real path.
43856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43858      # a path prefixed by /cygdrive for fixpath to work.
43859      new_path="$CYGWIN_ROOT_PATH$input_path"
43860    fi
43861  fi
43862
43863  # remove trailing .exe if any
43864  new_path="${new_path/%.exe/}"
43865
43866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43867
43868  # First separate the path from the arguments. This will split at the first
43869  # space.
43870  complete="$BUILD_NM"
43871  path="${complete%% *}"
43872  tmp="$complete EOL"
43873  arguments="${tmp#* }"
43874
43875  # Input might be given as Windows format, start by converting to
43876  # unix format.
43877  new_path="$path"
43878
43879  windows_path="$new_path"
43880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43881    unix_path=`$CYGPATH -u "$windows_path"`
43882    new_path="$unix_path"
43883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43885    new_path="$unix_path"
43886  fi
43887
43888
43889  # Now try to locate executable using which
43890  new_path=`$WHICH "$new_path" 2> /dev/null`
43891
43892  if test "x$new_path" = x; then
43893    # Oops. Which didn't find the executable.
43894    # The splitting of arguments from the executable at a space might have been incorrect,
43895    # since paths with space are more likely in Windows. Give it another try with the whole
43896    # argument.
43897    path="$complete"
43898    arguments="EOL"
43899    new_path="$path"
43900
43901  windows_path="$new_path"
43902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43903    unix_path=`$CYGPATH -u "$windows_path"`
43904    new_path="$unix_path"
43905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43907    new_path="$unix_path"
43908  fi
43909
43910
43911    new_path=`$WHICH "$new_path" 2> /dev/null`
43912    # bat and cmd files are not always considered executable in MSYS causing which
43913    # to not find them
43914    if test "x$new_path" = x \
43915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43917      new_path="$path"
43918
43919  windows_path="$new_path"
43920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43921    unix_path=`$CYGPATH -u "$windows_path"`
43922    new_path="$unix_path"
43923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43925    new_path="$unix_path"
43926  fi
43927
43928    fi
43929
43930    if test "x$new_path" = x; then
43931      # It's still not found. Now this is an unrecoverable error.
43932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43933$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43934      has_space=`$ECHO "$complete" | $GREP " "`
43935      if test "x$has_space" != x; then
43936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43938      fi
43939      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43940    fi
43941  fi
43942
43943  # Now new_path has a complete unix path to the binary
43944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43945    # Keep paths in /bin as-is, but remove trailing .exe if any
43946    new_path="${new_path/%.exe/}"
43947    # Do not save /bin paths to all_fixpath_prefixes!
43948  else
43949    # Not in mixed or Windows style, start by that.
43950    new_path=`cmd //c echo $new_path`
43951
43952  input_path="$new_path"
43953  # Check if we need to convert this using DOS-style short mode. If the path
43954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43955  # take no chances and rewrite it.
43956  # Note: m4 eats our [], so we need to use [ and ] instead.
43957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43958  if test "x$has_forbidden_chars" != x; then
43959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43961  fi
43962
43963    # Output is in $new_path
43964
43965  windows_path="$new_path"
43966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43967    unix_path=`$CYGPATH -u "$windows_path"`
43968    new_path="$unix_path"
43969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43971    new_path="$unix_path"
43972  fi
43973
43974    # remove trailing .exe if any
43975    new_path="${new_path/%.exe/}"
43976
43977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43979  fi
43980
43981    else
43982      # We're on a unix platform. Hooray! :)
43983      # First separate the path from the arguments. This will split at the first
43984      # space.
43985      complete="$BUILD_NM"
43986      path="${complete%% *}"
43987      tmp="$complete EOL"
43988      arguments="${tmp#* }"
43989
43990      # Cannot rely on the command "which" here since it doesn't always work.
43991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43992      if test -z "$is_absolute_path"; then
43993        # Path to executable is not absolute. Find it.
43994        IFS_save="$IFS"
43995        IFS=:
43996        for p in $PATH; do
43997          if test -f "$p/$path" && test -x "$p/$path"; then
43998            new_path="$p/$path"
43999            break
44000          fi
44001        done
44002        IFS="$IFS_save"
44003      else
44004        # This is an absolute path, we can use it without further modifications.
44005        new_path="$path"
44006      fi
44007
44008      if test "x$new_path" = x; then
44009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44010$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44011        has_space=`$ECHO "$complete" | $GREP " "`
44012        if test "x$has_space" != x; then
44013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44015        fi
44016        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44017      fi
44018    fi
44019
44020    # Now join together the path and the arguments once again
44021    if test "x$arguments" != xEOL; then
44022      new_complete="$new_path ${arguments% *}"
44023    else
44024      new_complete="$new_path"
44025    fi
44026
44027    if test "x$complete" != "x$new_complete"; then
44028      BUILD_NM="$new_complete"
44029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44030$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44031    fi
44032  fi
44033
44034
44035
44036  # Publish this variable in the help.
44037
44038
44039  if [ -z "${BUILD_AR+x}" ]; then
44040    # The variable is not set by user, try to locate tool using the code snippet
44041    for ac_prog in ar gcc-ar
44042do
44043  # Extract the first word of "$ac_prog", so it can be a program name with args.
44044set dummy $ac_prog; ac_word=$2
44045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44046$as_echo_n "checking for $ac_word... " >&6; }
44047if ${ac_cv_path_BUILD_AR+:} false; then :
44048  $as_echo_n "(cached) " >&6
44049else
44050  case $BUILD_AR in
44051  [\\/]* | ?:[\\/]*)
44052  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44053  ;;
44054  *)
44055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44056for as_dir in $PATH
44057do
44058  IFS=$as_save_IFS
44059  test -z "$as_dir" && as_dir=.
44060    for ac_exec_ext in '' $ac_executable_extensions; do
44061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44062    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44064    break 2
44065  fi
44066done
44067  done
44068IFS=$as_save_IFS
44069
44070  ;;
44071esac
44072fi
44073BUILD_AR=$ac_cv_path_BUILD_AR
44074if test -n "$BUILD_AR"; then
44075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44076$as_echo "$BUILD_AR" >&6; }
44077else
44078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44079$as_echo "no" >&6; }
44080fi
44081
44082
44083  test -n "$BUILD_AR" && break
44084done
44085
44086  else
44087    # The variable is set, but is it from the command line or the environment?
44088
44089    # Try to remove the string !BUILD_AR! from our list.
44090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44092      # If it failed, the variable was not from the command line. Ignore it,
44093      # but warn the user (except for BASH, which is always set by the calling BASH).
44094      if test "xBUILD_AR" != xBASH; then
44095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44096$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44097      fi
44098      # Try to locate tool using the code snippet
44099      for ac_prog in ar gcc-ar
44100do
44101  # Extract the first word of "$ac_prog", so it can be a program name with args.
44102set dummy $ac_prog; ac_word=$2
44103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44104$as_echo_n "checking for $ac_word... " >&6; }
44105if ${ac_cv_path_BUILD_AR+:} false; then :
44106  $as_echo_n "(cached) " >&6
44107else
44108  case $BUILD_AR in
44109  [\\/]* | ?:[\\/]*)
44110  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44111  ;;
44112  *)
44113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44114for as_dir in $PATH
44115do
44116  IFS=$as_save_IFS
44117  test -z "$as_dir" && as_dir=.
44118    for ac_exec_ext in '' $ac_executable_extensions; do
44119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44120    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44122    break 2
44123  fi
44124done
44125  done
44126IFS=$as_save_IFS
44127
44128  ;;
44129esac
44130fi
44131BUILD_AR=$ac_cv_path_BUILD_AR
44132if test -n "$BUILD_AR"; then
44133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44134$as_echo "$BUILD_AR" >&6; }
44135else
44136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44137$as_echo "no" >&6; }
44138fi
44139
44140
44141  test -n "$BUILD_AR" && break
44142done
44143
44144    else
44145      # If it succeeded, then it was overridden by the user. We will use it
44146      # for the tool.
44147
44148      # First remove it from the list of overridden variables, so we can test
44149      # for unknown variables in the end.
44150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44151
44152      # Check if we try to supply an empty value
44153      if test "x$BUILD_AR" = x; then
44154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44155$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44157$as_echo_n "checking for BUILD_AR... " >&6; }
44158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44159$as_echo "disabled" >&6; }
44160      else
44161        # Check if the provided tool contains a complete path.
44162        tool_specified="$BUILD_AR"
44163        tool_basename="${tool_specified##*/}"
44164        if test "x$tool_basename" = "x$tool_specified"; then
44165          # A command without a complete path is provided, search $PATH.
44166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44167$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44168          # Extract the first word of "$tool_basename", so it can be a program name with args.
44169set dummy $tool_basename; ac_word=$2
44170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44171$as_echo_n "checking for $ac_word... " >&6; }
44172if ${ac_cv_path_BUILD_AR+:} false; then :
44173  $as_echo_n "(cached) " >&6
44174else
44175  case $BUILD_AR in
44176  [\\/]* | ?:[\\/]*)
44177  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44178  ;;
44179  *)
44180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44181for as_dir in $PATH
44182do
44183  IFS=$as_save_IFS
44184  test -z "$as_dir" && as_dir=.
44185    for ac_exec_ext in '' $ac_executable_extensions; do
44186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44187    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44189    break 2
44190  fi
44191done
44192  done
44193IFS=$as_save_IFS
44194
44195  ;;
44196esac
44197fi
44198BUILD_AR=$ac_cv_path_BUILD_AR
44199if test -n "$BUILD_AR"; then
44200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44201$as_echo "$BUILD_AR" >&6; }
44202else
44203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44204$as_echo "no" >&6; }
44205fi
44206
44207
44208          if test "x$BUILD_AR" = x; then
44209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44210          fi
44211        else
44212          # Otherwise we believe it is a complete path. Use it as it is.
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44214$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44216$as_echo_n "checking for BUILD_AR... " >&6; }
44217          if test ! -x "$tool_specified"; then
44218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44219$as_echo "not found" >&6; }
44220            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44221          fi
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44223$as_echo "$tool_specified" >&6; }
44224        fi
44225      fi
44226    fi
44227
44228  fi
44229
44230
44231
44232  # Only process if variable expands to non-empty
44233
44234  if test "x$BUILD_AR" != x; then
44235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44236
44237  # First separate the path from the arguments. This will split at the first
44238  # space.
44239  complete="$BUILD_AR"
44240  path="${complete%% *}"
44241  tmp="$complete EOL"
44242  arguments="${tmp#* }"
44243
44244  # Input might be given as Windows format, start by converting to
44245  # unix format.
44246  new_path=`$CYGPATH -u "$path"`
44247
44248  # Now try to locate executable using which
44249  new_path=`$WHICH "$new_path" 2> /dev/null`
44250  # bat and cmd files are not always considered executable in cygwin causing which
44251  # to not find them
44252  if test "x$new_path" = x \
44253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44255    new_path=`$CYGPATH -u "$path"`
44256  fi
44257  if test "x$new_path" = x; then
44258    # Oops. Which didn't find the executable.
44259    # The splitting of arguments from the executable at a space might have been incorrect,
44260    # since paths with space are more likely in Windows. Give it another try with the whole
44261    # argument.
44262    path="$complete"
44263    arguments="EOL"
44264    new_path=`$CYGPATH -u "$path"`
44265    new_path=`$WHICH "$new_path" 2> /dev/null`
44266    # bat and cmd files are not always considered executable in cygwin causing which
44267    # to not find them
44268    if test "x$new_path" = x \
44269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44271      new_path=`$CYGPATH -u "$path"`
44272    fi
44273    if test "x$new_path" = x; then
44274      # It's still not found. Now this is an unrecoverable error.
44275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44276$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44277      has_space=`$ECHO "$complete" | $GREP " "`
44278      if test "x$has_space" != x; then
44279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44281      fi
44282      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44283    fi
44284  fi
44285
44286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44289  # "foo.exe" is OK but "foo" is an error.
44290  #
44291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44292  # It is also a way to make sure we got the proper file name for the real test later on.
44293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44294  if test "x$test_shortpath" = x; then
44295    # Short path failed, file does not exist as specified.
44296    # Try adding .exe or .cmd
44297    if test -f "${new_path}.exe"; then
44298      input_to_shortpath="${new_path}.exe"
44299    elif test -f "${new_path}.cmd"; then
44300      input_to_shortpath="${new_path}.cmd"
44301    else
44302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44303$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44306      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44307    fi
44308  else
44309    input_to_shortpath="$new_path"
44310  fi
44311
44312  # Call helper function which possibly converts this using DOS-style short mode.
44313  # If so, the updated path is stored in $new_path.
44314  new_path="$input_to_shortpath"
44315
44316  input_path="$input_to_shortpath"
44317  # Check if we need to convert this using DOS-style short mode. If the path
44318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44319  # take no chances and rewrite it.
44320  # Note: m4 eats our [], so we need to use [ and ] instead.
44321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44322  if test "x$has_forbidden_chars" != x; then
44323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44327      # Going to short mode and back again did indeed matter. Since short mode is
44328      # case insensitive, let's make it lowercase to improve readability.
44329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44330      # Now convert it back to Unix-style (cygpath)
44331      input_path=`$CYGPATH -u "$shortmode_path"`
44332      new_path="$input_path"
44333    fi
44334  fi
44335
44336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44337  if test "x$test_cygdrive_prefix" = x; then
44338    # As a simple fix, exclude /usr/bin since it's not a real path.
44339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44341      # a path prefixed by /cygdrive for fixpath to work.
44342      new_path="$CYGWIN_ROOT_PATH$input_path"
44343    fi
44344  fi
44345
44346  # remove trailing .exe if any
44347  new_path="${new_path/%.exe/}"
44348
44349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44350
44351  # First separate the path from the arguments. This will split at the first
44352  # space.
44353  complete="$BUILD_AR"
44354  path="${complete%% *}"
44355  tmp="$complete EOL"
44356  arguments="${tmp#* }"
44357
44358  # Input might be given as Windows format, start by converting to
44359  # unix format.
44360  new_path="$path"
44361
44362  windows_path="$new_path"
44363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44364    unix_path=`$CYGPATH -u "$windows_path"`
44365    new_path="$unix_path"
44366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44368    new_path="$unix_path"
44369  fi
44370
44371
44372  # Now try to locate executable using which
44373  new_path=`$WHICH "$new_path" 2> /dev/null`
44374
44375  if test "x$new_path" = x; then
44376    # Oops. Which didn't find the executable.
44377    # The splitting of arguments from the executable at a space might have been incorrect,
44378    # since paths with space are more likely in Windows. Give it another try with the whole
44379    # argument.
44380    path="$complete"
44381    arguments="EOL"
44382    new_path="$path"
44383
44384  windows_path="$new_path"
44385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44386    unix_path=`$CYGPATH -u "$windows_path"`
44387    new_path="$unix_path"
44388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44390    new_path="$unix_path"
44391  fi
44392
44393
44394    new_path=`$WHICH "$new_path" 2> /dev/null`
44395    # bat and cmd files are not always considered executable in MSYS causing which
44396    # to not find them
44397    if test "x$new_path" = x \
44398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44400      new_path="$path"
44401
44402  windows_path="$new_path"
44403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44404    unix_path=`$CYGPATH -u "$windows_path"`
44405    new_path="$unix_path"
44406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44408    new_path="$unix_path"
44409  fi
44410
44411    fi
44412
44413    if test "x$new_path" = x; then
44414      # It's still not found. Now this is an unrecoverable error.
44415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44416$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44417      has_space=`$ECHO "$complete" | $GREP " "`
44418      if test "x$has_space" != x; then
44419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44421      fi
44422      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44423    fi
44424  fi
44425
44426  # Now new_path has a complete unix path to the binary
44427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44428    # Keep paths in /bin as-is, but remove trailing .exe if any
44429    new_path="${new_path/%.exe/}"
44430    # Do not save /bin paths to all_fixpath_prefixes!
44431  else
44432    # Not in mixed or Windows style, start by that.
44433    new_path=`cmd //c echo $new_path`
44434
44435  input_path="$new_path"
44436  # Check if we need to convert this using DOS-style short mode. If the path
44437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44438  # take no chances and rewrite it.
44439  # Note: m4 eats our [], so we need to use [ and ] instead.
44440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44441  if test "x$has_forbidden_chars" != x; then
44442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44444  fi
44445
44446    # Output is in $new_path
44447
44448  windows_path="$new_path"
44449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44450    unix_path=`$CYGPATH -u "$windows_path"`
44451    new_path="$unix_path"
44452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44454    new_path="$unix_path"
44455  fi
44456
44457    # remove trailing .exe if any
44458    new_path="${new_path/%.exe/}"
44459
44460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44462  fi
44463
44464    else
44465      # We're on a unix platform. Hooray! :)
44466      # First separate the path from the arguments. This will split at the first
44467      # space.
44468      complete="$BUILD_AR"
44469      path="${complete%% *}"
44470      tmp="$complete EOL"
44471      arguments="${tmp#* }"
44472
44473      # Cannot rely on the command "which" here since it doesn't always work.
44474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44475      if test -z "$is_absolute_path"; then
44476        # Path to executable is not absolute. Find it.
44477        IFS_save="$IFS"
44478        IFS=:
44479        for p in $PATH; do
44480          if test -f "$p/$path" && test -x "$p/$path"; then
44481            new_path="$p/$path"
44482            break
44483          fi
44484        done
44485        IFS="$IFS_save"
44486      else
44487        # This is an absolute path, we can use it without further modifications.
44488        new_path="$path"
44489      fi
44490
44491      if test "x$new_path" = x; then
44492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44493$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44494        has_space=`$ECHO "$complete" | $GREP " "`
44495        if test "x$has_space" != x; then
44496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44498        fi
44499        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44500      fi
44501    fi
44502
44503    # Now join together the path and the arguments once again
44504    if test "x$arguments" != xEOL; then
44505      new_complete="$new_path ${arguments% *}"
44506    else
44507      new_complete="$new_path"
44508    fi
44509
44510    if test "x$complete" != "x$new_complete"; then
44511      BUILD_AR="$new_complete"
44512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44513$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44514    fi
44515  fi
44516
44517    # Assume the C compiler is the assembler
44518    BUILD_AS="$BUILD_CC -c"
44519    # Just like for the target compiler, use the compiler as linker
44520    BUILD_LD="$BUILD_CC"
44521    BUILD_LDCXX="$BUILD_CXX"
44522
44523    PATH="$OLDPATH"
44524  else
44525    # If we are not cross compiling, use the normal target compilers for
44526    # building the build platform executables.
44527    BUILD_CC="$CC"
44528    BUILD_CXX="$CXX"
44529    BUILD_LD="$LD"
44530    BUILD_LDCXX="$LDCXX"
44531    BUILD_NM="$NM"
44532    BUILD_AS="$AS"
44533    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44534    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44535    BUILD_AR="$AR"
44536  fi
44537
44538
44539
44540
44541
44542
44543
44544
44545
44546
44547
44548
44549  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44550    # For hotspot, we need these in Windows mixed path,
44551    # so rewrite them all. Need added .exe suffix.
44552    HOTSPOT_CXX="$CXX.exe"
44553    HOTSPOT_LD="$LD.exe"
44554    HOTSPOT_MT="$MT.exe"
44555    HOTSPOT_RC="$RC.exe"
44556
44557  unix_path="$HOTSPOT_CXX"
44558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44559    windows_path=`$CYGPATH -m "$unix_path"`
44560    HOTSPOT_CXX="$windows_path"
44561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44562    windows_path=`cmd //c echo $unix_path`
44563    HOTSPOT_CXX="$windows_path"
44564  fi
44565
44566
44567  unix_path="$HOTSPOT_LD"
44568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44569    windows_path=`$CYGPATH -m "$unix_path"`
44570    HOTSPOT_LD="$windows_path"
44571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44572    windows_path=`cmd //c echo $unix_path`
44573    HOTSPOT_LD="$windows_path"
44574  fi
44575
44576
44577  unix_path="$HOTSPOT_MT"
44578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44579    windows_path=`$CYGPATH -m "$unix_path"`
44580    HOTSPOT_MT="$windows_path"
44581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44582    windows_path=`cmd //c echo $unix_path`
44583    HOTSPOT_MT="$windows_path"
44584  fi
44585
44586
44587  unix_path="$HOTSPOT_RC"
44588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44589    windows_path=`$CYGPATH -m "$unix_path"`
44590    HOTSPOT_RC="$windows_path"
44591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44592    windows_path=`cmd //c echo $unix_path`
44593    HOTSPOT_RC="$windows_path"
44594  fi
44595
44596
44597
44598  else
44599    HOTSPOT_CXX="$CXX"
44600    HOTSPOT_LD="$LD"
44601  fi
44602
44603
44604
44605  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44606    USE_CLANG=true
44607  fi
44608
44609
44610
44611
44612
44613  # The package path is used only on macosx?
44614  # FIXME: clean this up, and/or move it elsewhere.
44615  PACKAGE_PATH=/opt/local
44616
44617
44618  # Check for extra potential brokenness.
44619  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44620    # On Windows, double-check that we got the right compiler.
44621    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44622    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44623    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44624      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44625        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
44626      fi
44627    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44628      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44629        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44630      fi
44631    fi
44632  fi
44633
44634  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44635    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44636    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44637    # This is later checked when setting flags.
44638
44639    # "-Og" suppported for GCC 4.8 and later
44640    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666
44667
44668
44669
44670
44671
44672
44673
44674
44675
44676
44677
44678
44679
44680
44681
44682
44683
44684
44685
44686
44687
44688    # Execute function body
44689
44690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44691$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44692  supports=yes
44693
44694  saved_cflags="$CFLAGS"
44695  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44696  ac_ext=c
44697ac_cpp='$CPP $CPPFLAGS'
44698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44700ac_compiler_gnu=$ac_cv_c_compiler_gnu
44701
44702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44703/* end confdefs.h.  */
44704int i;
44705_ACEOF
44706if ac_fn_c_try_compile "$LINENO"; then :
44707
44708else
44709  supports=no
44710fi
44711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44712  ac_ext=cpp
44713ac_cpp='$CXXCPP $CPPFLAGS'
44714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44717
44718  CFLAGS="$saved_cflags"
44719
44720  saved_cxxflags="$CXXFLAGS"
44721  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44722  ac_ext=cpp
44723ac_cpp='$CXXCPP $CPPFLAGS'
44724ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44725ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44726ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44727
44728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44729/* end confdefs.h.  */
44730int i;
44731_ACEOF
44732if ac_fn_cxx_try_compile "$LINENO"; then :
44733
44734else
44735  supports=no
44736fi
44737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44738  ac_ext=cpp
44739ac_cpp='$CXXCPP $CPPFLAGS'
44740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44743
44744  CXXFLAGS="$saved_cxxflags"
44745
44746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44747$as_echo "$supports" >&6; }
44748  if test "x$supports" = "xyes" ; then
44749    :
44750    HAS_CFLAG_OPTIMIZE_DEBUG=true
44751  else
44752    :
44753    HAS_CFLAG_OPTIMIZE_DEBUG=false
44754  fi
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768    # "-z relro" supported in GNU binutils 2.17 and later
44769    LINKER_RELRO_FLAG="-Wl,-z,relro"
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
44813
44814
44815
44816
44817    # Execute function body
44818
44819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44820$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44821  supports=yes
44822
44823  saved_ldflags="$LDFLAGS"
44824  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44825  ac_ext=c
44826ac_cpp='$CPP $CPPFLAGS'
44827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44829ac_compiler_gnu=$ac_cv_c_compiler_gnu
44830
44831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44832/* end confdefs.h.  */
44833
44834int
44835main ()
44836{
44837
44838  ;
44839  return 0;
44840}
44841_ACEOF
44842if ac_fn_c_try_link "$LINENO"; then :
44843
44844else
44845  supports=no
44846fi
44847rm -f core conftest.err conftest.$ac_objext \
44848    conftest$ac_exeext conftest.$ac_ext
44849  ac_ext=cpp
44850ac_cpp='$CXXCPP $CPPFLAGS'
44851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44854
44855  LDFLAGS="$saved_ldflags"
44856
44857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44858$as_echo "$supports" >&6; }
44859  if test "x$supports" = "xyes" ; then
44860    :
44861    HAS_LINKER_RELRO=true
44862  else
44863    :
44864    HAS_LINKER_RELRO=false
44865  fi
44866
44867
44868
44869
44870
44871
44872
44873
44874
44875
44876
44877
44878
44879    # "-z now" supported in GNU binutils 2.11 and later
44880    LINKER_NOW_FLAG="-Wl,-z,now"
44881
44882
44883
44884
44885
44886
44887
44888
44889
44890
44891
44892
44893
44894
44895
44896
44897
44898
44899
44900
44901
44902
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921
44922
44923
44924
44925
44926
44927
44928    # Execute function body
44929
44930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44931$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44932  supports=yes
44933
44934  saved_ldflags="$LDFLAGS"
44935  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44936  ac_ext=c
44937ac_cpp='$CPP $CPPFLAGS'
44938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44940ac_compiler_gnu=$ac_cv_c_compiler_gnu
44941
44942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44943/* end confdefs.h.  */
44944
44945int
44946main ()
44947{
44948
44949  ;
44950  return 0;
44951}
44952_ACEOF
44953if ac_fn_c_try_link "$LINENO"; then :
44954
44955else
44956  supports=no
44957fi
44958rm -f core conftest.err conftest.$ac_objext \
44959    conftest$ac_exeext conftest.$ac_ext
44960  ac_ext=cpp
44961ac_cpp='$CXXCPP $CPPFLAGS'
44962ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44963ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44964ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44965
44966  LDFLAGS="$saved_ldflags"
44967
44968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44969$as_echo "$supports" >&6; }
44970  if test "x$supports" = "xyes" ; then
44971    :
44972    HAS_LINKER_NOW=true
44973  else
44974    :
44975    HAS_LINKER_NOW=false
44976  fi
44977
44978
44979
44980
44981
44982
44983
44984
44985
44986
44987
44988
44989  fi
44990
44991  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44992  # in executable.'
44993  USING_BROKEN_SUSE_LD=no
44994  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44996$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44997    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44998    $ECHO "int main() { }" > main.c
44999    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45001$as_echo "no" >&6; }
45002      USING_BROKEN_SUSE_LD=no
45003    else
45004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45005$as_echo "yes" >&6; }
45006      USING_BROKEN_SUSE_LD=yes
45007    fi
45008    rm -rf version-script.map main.c a.out
45009  fi
45010
45011
45012
45013# Setup the JTReg Regression Test Harness.
45014
45015
45016# Check whether --with-jtreg was given.
45017if test "${with_jtreg+set}" = set; then :
45018  withval=$with_jtreg;
45019else
45020  with_jtreg=no
45021fi
45022
45023
45024  if test "x$with_jtreg" = xno; then
45025    # jtreg disabled
45026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45027$as_echo_n "checking for jtreg... " >&6; }
45028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45029$as_echo "no" >&6; }
45030  else
45031    if test "x$with_jtreg" != xyes; then
45032      # with path specified.
45033      JT_HOME="$with_jtreg"
45034    fi
45035
45036    if test "x$JT_HOME" != x; then
45037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45038$as_echo_n "checking for jtreg... " >&6; }
45039
45040      # use JT_HOME enviroment var.
45041
45042  # Only process if variable expands to non-empty
45043
45044  if test "x$JT_HOME" != x; then
45045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45046
45047  # Input might be given as Windows format, start by converting to
45048  # unix format.
45049  path="$JT_HOME"
45050  new_path=`$CYGPATH -u "$path"`
45051
45052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45055  # "foo.exe" is OK but "foo" is an error.
45056  #
45057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45058  # It is also a way to make sure we got the proper file name for the real test later on.
45059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45060  if test "x$test_shortpath" = x; then
45061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45062$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45063    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45064  fi
45065
45066  # Call helper function which possibly converts this using DOS-style short mode.
45067  # If so, the updated path is stored in $new_path.
45068
45069  input_path="$new_path"
45070  # Check if we need to convert this using DOS-style short mode. If the path
45071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45072  # take no chances and rewrite it.
45073  # Note: m4 eats our [], so we need to use [ and ] instead.
45074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45075  if test "x$has_forbidden_chars" != x; then
45076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45080      # Going to short mode and back again did indeed matter. Since short mode is
45081      # case insensitive, let's make it lowercase to improve readability.
45082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45083      # Now convert it back to Unix-style (cygpath)
45084      input_path=`$CYGPATH -u "$shortmode_path"`
45085      new_path="$input_path"
45086    fi
45087  fi
45088
45089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45090  if test "x$test_cygdrive_prefix" = x; then
45091    # As a simple fix, exclude /usr/bin since it's not a real path.
45092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45094      # a path prefixed by /cygdrive for fixpath to work.
45095      new_path="$CYGWIN_ROOT_PATH$input_path"
45096    fi
45097  fi
45098
45099
45100  if test "x$path" != "x$new_path"; then
45101    JT_HOME="$new_path"
45102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45103$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45104  fi
45105
45106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45107
45108  path="$JT_HOME"
45109  has_colon=`$ECHO $path | $GREP ^.:`
45110  new_path="$path"
45111  if test "x$has_colon" = x; then
45112    # Not in mixed or Windows style, start by that.
45113    new_path=`cmd //c echo $path`
45114  fi
45115
45116
45117  input_path="$new_path"
45118  # Check if we need to convert this using DOS-style short mode. If the path
45119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45120  # take no chances and rewrite it.
45121  # Note: m4 eats our [], so we need to use [ and ] instead.
45122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45123  if test "x$has_forbidden_chars" != x; then
45124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45126  fi
45127
45128
45129  windows_path="$new_path"
45130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45131    unix_path=`$CYGPATH -u "$windows_path"`
45132    new_path="$unix_path"
45133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45135    new_path="$unix_path"
45136  fi
45137
45138  if test "x$path" != "x$new_path"; then
45139    JT_HOME="$new_path"
45140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45141$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45142  fi
45143
45144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45146
45147    else
45148      # We're on a unix platform. Hooray! :)
45149      path="$JT_HOME"
45150      has_space=`$ECHO "$path" | $GREP " "`
45151      if test "x$has_space" != x; then
45152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45153$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45155      fi
45156
45157      # Use eval to expand a potential ~
45158      eval path="$path"
45159      if test ! -f "$path" && test ! -d "$path"; then
45160        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45161      fi
45162
45163      if test -d "$path"; then
45164        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45165      else
45166        dir="`$DIRNAME "$path"`"
45167        base="`$BASENAME "$path"`"
45168        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45169      fi
45170    fi
45171  fi
45172
45173
45174      # jtreg win32 script works for everybody
45175      JTREGEXE="$JT_HOME/bin/jtreg"
45176
45177      if test ! -f "$JTREGEXE"; then
45178        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45179      fi
45180
45181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45182$as_echo "$JTREGEXE" >&6; }
45183    else
45184      # try to find jtreg on path
45185
45186
45187
45188  # Publish this variable in the help.
45189
45190
45191  if [ -z "${JTREGEXE+x}" ]; then
45192    # The variable is not set by user, try to locate tool using the code snippet
45193    for ac_prog in jtreg
45194do
45195  # Extract the first word of "$ac_prog", so it can be a program name with args.
45196set dummy $ac_prog; ac_word=$2
45197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45198$as_echo_n "checking for $ac_word... " >&6; }
45199if ${ac_cv_path_JTREGEXE+:} false; then :
45200  $as_echo_n "(cached) " >&6
45201else
45202  case $JTREGEXE in
45203  [\\/]* | ?:[\\/]*)
45204  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45205  ;;
45206  *)
45207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45208for as_dir in $PATH
45209do
45210  IFS=$as_save_IFS
45211  test -z "$as_dir" && as_dir=.
45212    for ac_exec_ext in '' $ac_executable_extensions; do
45213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45214    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45216    break 2
45217  fi
45218done
45219  done
45220IFS=$as_save_IFS
45221
45222  ;;
45223esac
45224fi
45225JTREGEXE=$ac_cv_path_JTREGEXE
45226if test -n "$JTREGEXE"; then
45227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45228$as_echo "$JTREGEXE" >&6; }
45229else
45230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45231$as_echo "no" >&6; }
45232fi
45233
45234
45235  test -n "$JTREGEXE" && break
45236done
45237
45238  else
45239    # The variable is set, but is it from the command line or the environment?
45240
45241    # Try to remove the string !JTREGEXE! from our list.
45242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45244      # If it failed, the variable was not from the command line. Ignore it,
45245      # but warn the user (except for BASH, which is always set by the calling BASH).
45246      if test "xJTREGEXE" != xBASH; then
45247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45248$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45249      fi
45250      # Try to locate tool using the code snippet
45251      for ac_prog in jtreg
45252do
45253  # Extract the first word of "$ac_prog", so it can be a program name with args.
45254set dummy $ac_prog; ac_word=$2
45255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45256$as_echo_n "checking for $ac_word... " >&6; }
45257if ${ac_cv_path_JTREGEXE+:} false; then :
45258  $as_echo_n "(cached) " >&6
45259else
45260  case $JTREGEXE in
45261  [\\/]* | ?:[\\/]*)
45262  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45263  ;;
45264  *)
45265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45266for as_dir in $PATH
45267do
45268  IFS=$as_save_IFS
45269  test -z "$as_dir" && as_dir=.
45270    for ac_exec_ext in '' $ac_executable_extensions; do
45271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45272    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45274    break 2
45275  fi
45276done
45277  done
45278IFS=$as_save_IFS
45279
45280  ;;
45281esac
45282fi
45283JTREGEXE=$ac_cv_path_JTREGEXE
45284if test -n "$JTREGEXE"; then
45285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45286$as_echo "$JTREGEXE" >&6; }
45287else
45288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45289$as_echo "no" >&6; }
45290fi
45291
45292
45293  test -n "$JTREGEXE" && break
45294done
45295
45296    else
45297      # If it succeeded, then it was overridden by the user. We will use it
45298      # for the tool.
45299
45300      # First remove it from the list of overridden variables, so we can test
45301      # for unknown variables in the end.
45302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45303
45304      # Check if we try to supply an empty value
45305      if test "x$JTREGEXE" = x; then
45306        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45307$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45309$as_echo_n "checking for JTREGEXE... " >&6; }
45310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45311$as_echo "disabled" >&6; }
45312      else
45313        # Check if the provided tool contains a complete path.
45314        tool_specified="$JTREGEXE"
45315        tool_basename="${tool_specified##*/}"
45316        if test "x$tool_basename" = "x$tool_specified"; then
45317          # A command without a complete path is provided, search $PATH.
45318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45319$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45320          # Extract the first word of "$tool_basename", so it can be a program name with args.
45321set dummy $tool_basename; ac_word=$2
45322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45323$as_echo_n "checking for $ac_word... " >&6; }
45324if ${ac_cv_path_JTREGEXE+:} false; then :
45325  $as_echo_n "(cached) " >&6
45326else
45327  case $JTREGEXE in
45328  [\\/]* | ?:[\\/]*)
45329  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45330  ;;
45331  *)
45332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45333for as_dir in $PATH
45334do
45335  IFS=$as_save_IFS
45336  test -z "$as_dir" && as_dir=.
45337    for ac_exec_ext in '' $ac_executable_extensions; do
45338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45339    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45341    break 2
45342  fi
45343done
45344  done
45345IFS=$as_save_IFS
45346
45347  ;;
45348esac
45349fi
45350JTREGEXE=$ac_cv_path_JTREGEXE
45351if test -n "$JTREGEXE"; then
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45353$as_echo "$JTREGEXE" >&6; }
45354else
45355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45356$as_echo "no" >&6; }
45357fi
45358
45359
45360          if test "x$JTREGEXE" = x; then
45361            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45362          fi
45363        else
45364          # Otherwise we believe it is a complete path. Use it as it is.
45365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45366$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45367          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45368$as_echo_n "checking for JTREGEXE... " >&6; }
45369          if test ! -x "$tool_specified"; then
45370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45371$as_echo "not found" >&6; }
45372            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45373          fi
45374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45375$as_echo "$tool_specified" >&6; }
45376        fi
45377      fi
45378    fi
45379
45380  fi
45381
45382
45383
45384  if test "x$JTREGEXE" = x; then
45385    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45386  fi
45387
45388
45389      JT_HOME="`$DIRNAME $JTREGEXE`"
45390    fi
45391  fi
45392
45393
45394
45395
45396
45397
45398  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45399  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45400  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
45401  #                              commands produced by the link step (currently AIX only)
45402  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45403    COMPILER_TARGET_BITS_FLAG="-q"
45404    COMPILER_COMMAND_FILE_FLAG="-f"
45405    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
45406  else
45407    COMPILER_TARGET_BITS_FLAG="-m"
45408    COMPILER_COMMAND_FILE_FLAG="@"
45409    COMPILER_BINDCMD_FILE_FLAG=""
45410
45411    # The solstudio linker does not support @-files.
45412    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45413      COMPILER_COMMAND_FILE_FLAG=
45414    fi
45415
45416    # Check if @file is supported by gcc
45417    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45419$as_echo_n "checking if @file is supported by gcc... " >&6; }
45420      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45421      $ECHO "" "--version" > command.file
45422      if $CXX @command.file 2>&5 >&5; then
45423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45424$as_echo "yes" >&6; }
45425        COMPILER_COMMAND_FILE_FLAG="@"
45426      else
45427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45428$as_echo "no" >&6; }
45429        COMPILER_COMMAND_FILE_FLAG=
45430      fi
45431      rm -rf command.file
45432    fi
45433  fi
45434
45435
45436
45437
45438  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45439  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45440    ARFLAGS="-r"
45441  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45442    ARFLAGS="-X64"
45443  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45444    # lib.exe is used as AR to create static libraries.
45445    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45446  else
45447    ARFLAGS=""
45448  fi
45449
45450
45451  ## Setup strip.
45452  # FIXME: should this really be per platform, or should it be per toolchain type?
45453  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45454  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45455  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45456    STRIPFLAGS="-g"
45457  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45458    STRIPFLAGS="-x"
45459  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45460    STRIPFLAGS="-S"
45461  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45462    STRIPFLAGS="-X32_64"
45463  fi
45464
45465
45466
45467  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45468    CC_OUT_OPTION=-Fo
45469    EXE_OUT_OPTION=-out:
45470    LD_OUT_OPTION=-out:
45471    AR_OUT_OPTION=-out:
45472  else
45473    # The option used to specify the target .o,.a or .so file.
45474    # When compiling, how to specify the to be created object file.
45475    CC_OUT_OPTION='-o$(SPACE)'
45476    # When linking, how to specify the to be created executable.
45477    EXE_OUT_OPTION='-o$(SPACE)'
45478    # When linking, how to specify the to be created dynamically linkable library.
45479    LD_OUT_OPTION='-o$(SPACE)'
45480    # When archiving, how to specify the to be create static archive for object files.
45481    AR_OUT_OPTION='rcs$(SPACE)'
45482  fi
45483
45484
45485
45486
45487
45488  # On Windows, we need to set RC flags.
45489  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45490    RC_FLAGS="-nologo -l0x409"
45491    if test "x$DEBUG_LEVEL" = xrelease; then
45492      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45493    fi
45494
45495    # The version variables used to create RC_FLAGS may be overridden
45496    # in a custom configure script, or possibly the command line.
45497    # Let those variables be expanded at make time in spec.gmk.
45498    # The \$ are escaped to the shell, and the $(...) variables
45499    # are evaluated by make.
45500    RC_FLAGS="$RC_FLAGS \
45501        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45502        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45503        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45504        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45505        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45506        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45507        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45508  fi
45509
45510
45511  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45512    # silence copyright notice and other headers.
45513    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45514  fi
45515
45516
45517# Now we can test some aspects on the target using configure macros.
45518
45519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45520$as_echo_n "checking for ANSI C header files... " >&6; }
45521if ${ac_cv_header_stdc+:} false; then :
45522  $as_echo_n "(cached) " >&6
45523else
45524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45525/* end confdefs.h.  */
45526#include <stdlib.h>
45527#include <stdarg.h>
45528#include <string.h>
45529#include <float.h>
45530
45531int
45532main ()
45533{
45534
45535  ;
45536  return 0;
45537}
45538_ACEOF
45539if ac_fn_cxx_try_compile "$LINENO"; then :
45540  ac_cv_header_stdc=yes
45541else
45542  ac_cv_header_stdc=no
45543fi
45544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45545
45546if test $ac_cv_header_stdc = yes; then
45547  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45549/* end confdefs.h.  */
45550#include <string.h>
45551
45552_ACEOF
45553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45554  $EGREP "memchr" >/dev/null 2>&1; then :
45555
45556else
45557  ac_cv_header_stdc=no
45558fi
45559rm -f conftest*
45560
45561fi
45562
45563if test $ac_cv_header_stdc = yes; then
45564  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45566/* end confdefs.h.  */
45567#include <stdlib.h>
45568
45569_ACEOF
45570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45571  $EGREP "free" >/dev/null 2>&1; then :
45572
45573else
45574  ac_cv_header_stdc=no
45575fi
45576rm -f conftest*
45577
45578fi
45579
45580if test $ac_cv_header_stdc = yes; then
45581  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45582  if test "$cross_compiling" = yes; then :
45583  :
45584else
45585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45586/* end confdefs.h.  */
45587#include <ctype.h>
45588#include <stdlib.h>
45589#if ((' ' & 0x0FF) == 0x020)
45590# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45591# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45592#else
45593# define ISLOWER(c) \
45594		   (('a' <= (c) && (c) <= 'i') \
45595		     || ('j' <= (c) && (c) <= 'r') \
45596		     || ('s' <= (c) && (c) <= 'z'))
45597# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45598#endif
45599
45600#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45601int
45602main ()
45603{
45604  int i;
45605  for (i = 0; i < 256; i++)
45606    if (XOR (islower (i), ISLOWER (i))
45607	|| toupper (i) != TOUPPER (i))
45608      return 2;
45609  return 0;
45610}
45611_ACEOF
45612if ac_fn_cxx_try_run "$LINENO"; then :
45613
45614else
45615  ac_cv_header_stdc=no
45616fi
45617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45618  conftest.$ac_objext conftest.beam conftest.$ac_ext
45619fi
45620
45621fi
45622fi
45623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45624$as_echo "$ac_cv_header_stdc" >&6; }
45625if test $ac_cv_header_stdc = yes; then
45626
45627$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45628
45629fi
45630
45631# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45632for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45633		  inttypes.h stdint.h unistd.h
45634do :
45635  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45636ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45637"
45638if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45639  cat >>confdefs.h <<_ACEOF
45640#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45641_ACEOF
45642
45643fi
45644
45645done
45646
45647
45648
45649  ###############################################################################
45650  #
45651  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45652  # (The JVM can use 32 or 64 bit Java pointers but that decision
45653  # is made at runtime.)
45654  #
45655
45656  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45657    # Always specify -m flag on Solaris
45658    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45659
45660  # When we add flags to the "official" CFLAGS etc, we need to
45661  # keep track of these additions in ADDED_CFLAGS etc. These
45662  # will later be checked to make sure only controlled additions
45663  # have been made to CFLAGS etc.
45664  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45665  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45666  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45667
45668  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45669  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45670  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45671
45672  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45673  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45674  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45675
45676  elif test "x$COMPILE_TYPE" = xreduced; then
45677    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45678      # Specify -m if running reduced on unix platforms
45679
45680  # When we add flags to the "official" CFLAGS etc, we need to
45681  # keep track of these additions in ADDED_CFLAGS etc. These
45682  # will later be checked to make sure only controlled additions
45683  # have been made to CFLAGS etc.
45684  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45685  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45686  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45687
45688  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45689  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45690  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45691
45692  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45693  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45694  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45695
45696    fi
45697  fi
45698
45699  # Make compilation sanity check
45700  for ac_header in stdio.h
45701do :
45702  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45703if test "x$ac_cv_header_stdio_h" = xyes; then :
45704  cat >>confdefs.h <<_ACEOF
45705#define HAVE_STDIO_H 1
45706_ACEOF
45707
45708else
45709
45710    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45711$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45712    if test "x$COMPILE_TYPE" = xreduced; then
45713
45714  # Print a helpful message on how to acquire the necessary build dependency.
45715  # reduced is the help tag: freetype, cups, alsa etc
45716  MISSING_DEPENDENCY=reduced
45717
45718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45719    cygwin_help $MISSING_DEPENDENCY
45720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45721    msys_help $MISSING_DEPENDENCY
45722  else
45723    PKGHANDLER_COMMAND=
45724
45725    case $PKGHANDLER in
45726      apt-get)
45727        apt_help     $MISSING_DEPENDENCY ;;
45728      yum)
45729        yum_help     $MISSING_DEPENDENCY ;;
45730      port)
45731        port_help    $MISSING_DEPENDENCY ;;
45732      pkgutil)
45733        pkgutil_help $MISSING_DEPENDENCY ;;
45734      pkgadd)
45735        pkgadd_help  $MISSING_DEPENDENCY ;;
45736    esac
45737
45738    if test "x$PKGHANDLER_COMMAND" != x; then
45739      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45740    fi
45741  fi
45742
45743      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45744$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45745    elif test "x$COMPILE_TYPE" = xcross; then
45746      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45747$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45748    fi
45749    as_fn_error $? "Cannot continue." "$LINENO" 5
45750
45751fi
45752
45753done
45754
45755
45756  # The cast to long int works around a bug in the HP C Compiler
45757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45759# This bug is HP SR number 8606223364.
45760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45761$as_echo_n "checking size of int *... " >&6; }
45762if ${ac_cv_sizeof_int_p+:} false; then :
45763  $as_echo_n "(cached) " >&6
45764else
45765  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45766
45767else
45768  if test "$ac_cv_type_int_p" = yes; then
45769     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45771as_fn_error 77 "cannot compute sizeof (int *)
45772See \`config.log' for more details" "$LINENO" 5; }
45773   else
45774     ac_cv_sizeof_int_p=0
45775   fi
45776fi
45777
45778fi
45779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45780$as_echo "$ac_cv_sizeof_int_p" >&6; }
45781
45782
45783
45784cat >>confdefs.h <<_ACEOF
45785#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45786_ACEOF
45787
45788
45789
45790  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45791  if test "x$ac_cv_sizeof_int_p" = x; then
45792    # The test failed, lets stick to the assumed value.
45793    { $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
45794$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45795  else
45796    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45797
45798    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45799      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45800      # Let's try to implicitely set the compilers target architecture and retry the test
45801      { $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
45802$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;}
45803      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45804$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45805
45806  # When we add flags to the "official" CFLAGS etc, we need to
45807  # keep track of these additions in ADDED_CFLAGS etc. These
45808  # will later be checked to make sure only controlled additions
45809  # have been made to CFLAGS etc.
45810  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45811  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45812  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45813
45814  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45815  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45816  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45817
45818  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45819  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45820  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45821
45822
45823      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45824      unset ac_cv_sizeof_int_p
45825      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45826      cat >>confdefs.h <<_ACEOF
45827#undef SIZEOF_INT_P
45828_ACEOF
45829
45830      # The cast to long int works around a bug in the HP C Compiler
45831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45833# This bug is HP SR number 8606223364.
45834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45835$as_echo_n "checking size of int *... " >&6; }
45836if ${ac_cv_sizeof_int_p+:} false; then :
45837  $as_echo_n "(cached) " >&6
45838else
45839  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45840
45841else
45842  if test "$ac_cv_type_int_p" = yes; then
45843     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45845as_fn_error 77 "cannot compute sizeof (int *)
45846See \`config.log' for more details" "$LINENO" 5; }
45847   else
45848     ac_cv_sizeof_int_p=0
45849   fi
45850fi
45851
45852fi
45853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45854$as_echo "$ac_cv_sizeof_int_p" >&6; }
45855
45856
45857
45858cat >>confdefs.h <<_ACEOF
45859#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45860_ACEOF
45861
45862
45863
45864      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45865
45866      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45867        { $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
45868$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;}
45869        if test "x$COMPILE_TYPE" = xreduced; then
45870
45871  # Print a helpful message on how to acquire the necessary build dependency.
45872  # reduced is the help tag: freetype, cups, alsa etc
45873  MISSING_DEPENDENCY=reduced
45874
45875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45876    cygwin_help $MISSING_DEPENDENCY
45877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45878    msys_help $MISSING_DEPENDENCY
45879  else
45880    PKGHANDLER_COMMAND=
45881
45882    case $PKGHANDLER in
45883      apt-get)
45884        apt_help     $MISSING_DEPENDENCY ;;
45885      yum)
45886        yum_help     $MISSING_DEPENDENCY ;;
45887      port)
45888        port_help    $MISSING_DEPENDENCY ;;
45889      pkgutil)
45890        pkgutil_help $MISSING_DEPENDENCY ;;
45891      pkgadd)
45892        pkgadd_help  $MISSING_DEPENDENCY ;;
45893    esac
45894
45895    if test "x$PKGHANDLER_COMMAND" != x; then
45896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45897    fi
45898  fi
45899
45900          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45901$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45902        elif test "x$COMPILE_TYPE" = xcross; then
45903          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45904$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45905        fi
45906        as_fn_error $? "Cannot continue." "$LINENO" 5
45907      fi
45908    fi
45909  fi
45910
45911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45912$as_echo_n "checking for target address size... " >&6; }
45913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45914$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45915
45916
45917  ###############################################################################
45918  #
45919  # Is the target little of big endian?
45920  #
45921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45922$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45923if ${ac_cv_c_bigendian+:} false; then :
45924  $as_echo_n "(cached) " >&6
45925else
45926  ac_cv_c_bigendian=unknown
45927    # See if we're dealing with a universal compiler.
45928    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45929/* end confdefs.h.  */
45930#ifndef __APPLE_CC__
45931	       not a universal capable compiler
45932	     #endif
45933	     typedef int dummy;
45934
45935_ACEOF
45936if ac_fn_cxx_try_compile "$LINENO"; then :
45937
45938	# Check for potential -arch flags.  It is not universal unless
45939	# there are at least two -arch flags with different values.
45940	ac_arch=
45941	ac_prev=
45942	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45943	 if test -n "$ac_prev"; then
45944	   case $ac_word in
45945	     i?86 | x86_64 | ppc | ppc64)
45946	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45947		 ac_arch=$ac_word
45948	       else
45949		 ac_cv_c_bigendian=universal
45950		 break
45951	       fi
45952	       ;;
45953	   esac
45954	   ac_prev=
45955	 elif test "x$ac_word" = "x-arch"; then
45956	   ac_prev=arch
45957	 fi
45958       done
45959fi
45960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45961    if test $ac_cv_c_bigendian = unknown; then
45962      # See if sys/param.h defines the BYTE_ORDER macro.
45963      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45964/* end confdefs.h.  */
45965#include <sys/types.h>
45966	     #include <sys/param.h>
45967
45968int
45969main ()
45970{
45971#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45972		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45973		     && LITTLE_ENDIAN)
45974	      bogus endian macros
45975	     #endif
45976
45977  ;
45978  return 0;
45979}
45980_ACEOF
45981if ac_fn_cxx_try_compile "$LINENO"; then :
45982  # It does; now see whether it defined to BIG_ENDIAN or not.
45983	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45984/* end confdefs.h.  */
45985#include <sys/types.h>
45986		#include <sys/param.h>
45987
45988int
45989main ()
45990{
45991#if BYTE_ORDER != BIG_ENDIAN
45992		 not big endian
45993		#endif
45994
45995  ;
45996  return 0;
45997}
45998_ACEOF
45999if ac_fn_cxx_try_compile "$LINENO"; then :
46000  ac_cv_c_bigendian=yes
46001else
46002  ac_cv_c_bigendian=no
46003fi
46004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46005fi
46006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46007    fi
46008    if test $ac_cv_c_bigendian = unknown; then
46009      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46010      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46011/* end confdefs.h.  */
46012#include <limits.h>
46013
46014int
46015main ()
46016{
46017#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46018	      bogus endian macros
46019	     #endif
46020
46021  ;
46022  return 0;
46023}
46024_ACEOF
46025if ac_fn_cxx_try_compile "$LINENO"; then :
46026  # It does; now see whether it defined to _BIG_ENDIAN or not.
46027	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46028/* end confdefs.h.  */
46029#include <limits.h>
46030
46031int
46032main ()
46033{
46034#ifndef _BIG_ENDIAN
46035		 not big endian
46036		#endif
46037
46038  ;
46039  return 0;
46040}
46041_ACEOF
46042if ac_fn_cxx_try_compile "$LINENO"; then :
46043  ac_cv_c_bigendian=yes
46044else
46045  ac_cv_c_bigendian=no
46046fi
46047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46048fi
46049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46050    fi
46051    if test $ac_cv_c_bigendian = unknown; then
46052      # Compile a test program.
46053      if test "$cross_compiling" = yes; then :
46054  # Try to guess by grepping values from an object file.
46055	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46056/* end confdefs.h.  */
46057short int ascii_mm[] =
46058		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46059		short int ascii_ii[] =
46060		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46061		int use_ascii (int i) {
46062		  return ascii_mm[i] + ascii_ii[i];
46063		}
46064		short int ebcdic_ii[] =
46065		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46066		short int ebcdic_mm[] =
46067		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46068		int use_ebcdic (int i) {
46069		  return ebcdic_mm[i] + ebcdic_ii[i];
46070		}
46071		extern int foo;
46072
46073int
46074main ()
46075{
46076return use_ascii (foo) == use_ebcdic (foo);
46077  ;
46078  return 0;
46079}
46080_ACEOF
46081if ac_fn_cxx_try_compile "$LINENO"; then :
46082  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46083	      ac_cv_c_bigendian=yes
46084	    fi
46085	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46086	      if test "$ac_cv_c_bigendian" = unknown; then
46087		ac_cv_c_bigendian=no
46088	      else
46089		# finding both strings is unlikely to happen, but who knows?
46090		ac_cv_c_bigendian=unknown
46091	      fi
46092	    fi
46093fi
46094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46095else
46096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46097/* end confdefs.h.  */
46098$ac_includes_default
46099int
46100main ()
46101{
46102
46103	     /* Are we little or big endian?  From Harbison&Steele.  */
46104	     union
46105	     {
46106	       long int l;
46107	       char c[sizeof (long int)];
46108	     } u;
46109	     u.l = 1;
46110	     return u.c[sizeof (long int) - 1] == 1;
46111
46112  ;
46113  return 0;
46114}
46115_ACEOF
46116if ac_fn_cxx_try_run "$LINENO"; then :
46117  ac_cv_c_bigendian=no
46118else
46119  ac_cv_c_bigendian=yes
46120fi
46121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46122  conftest.$ac_objext conftest.beam conftest.$ac_ext
46123fi
46124
46125    fi
46126fi
46127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46128$as_echo "$ac_cv_c_bigendian" >&6; }
46129 case $ac_cv_c_bigendian in #(
46130   yes)
46131     ENDIAN="big";; #(
46132   no)
46133     ENDIAN="little" ;; #(
46134   universal)
46135     ENDIAN="universal_endianness"
46136     ;; #(
46137   *)
46138     ENDIAN="unknown" ;;
46139 esac
46140
46141
46142  if test "x$ENDIAN" = xuniversal_endianness; then
46143    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46144  fi
46145  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46146    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
46147  fi
46148
46149
46150# Configure flags for the tools
46151
46152  ###############################################################################
46153  #
46154  # How to compile shared libraries.
46155  #
46156
46157  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46158    PICFLAG="-fPIC"
46159    C_FLAG_REORDER=''
46160    CXX_FLAG_REORDER=''
46161
46162    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46163      # Linking is different on MacOSX
46164      if test "x$STATIC_BUILD" = xtrue; then
46165        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46166      else
46167        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46168      fi
46169      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46170      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46171      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46172      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
46173    else
46174      # Default works for linux, might work on other platforms as well.
46175      SHARED_LIBRARY_FLAGS='-shared'
46176      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46177      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46178      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46179      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46180    fi
46181  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46182    C_FLAG_REORDER=''
46183    CXX_FLAG_REORDER=''
46184
46185    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46186      # Linking is different on MacOSX
46187      PICFLAG=''
46188      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46189      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46190      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46191      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46192      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
46193    else
46194      # Default works for linux, might work on other platforms as well.
46195      PICFLAG='-fPIC'
46196      SHARED_LIBRARY_FLAGS='-shared'
46197      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46198      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46199      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46200      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46201    fi
46202  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46203    PICFLAG="-KPIC"
46204    C_FLAG_REORDER='-xF'
46205    CXX_FLAG_REORDER='-xF'
46206    SHARED_LIBRARY_FLAGS="-G"
46207    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46208    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46209    SET_SHARED_LIBRARY_NAME='-h $1'
46210    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46211  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46212    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
46213    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
46214    # will have to patch this single instruction with a call to some out-of-order code which
46215    # does the load from the TOC. This is of course slow. But in that case we also would have
46216    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
46217    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
46218    # can be patched directly by the linker and does not require a jump to out-of-order code.
46219    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
46220    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
46221    # loads for accessing a global variable). But there are rumors that this may be seen as a
46222    # 'performance feature' because of improved code locality of the symbols used in a
46223    # compilation unit.
46224    PICFLAG="-qpic"
46225    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
46226    C_FLAG_REORDER=''
46227    CXX_FLAG_REORDER=''
46228    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
46229    SET_EXECUTABLE_ORIGIN=""
46230    SET_SHARED_LIBRARY_ORIGIN=''
46231    SET_SHARED_LIBRARY_NAME=''
46232    SET_SHARED_LIBRARY_MAPFILE=''
46233  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46234    PICFLAG=""
46235    C_FLAG_REORDER=''
46236    CXX_FLAG_REORDER=''
46237    SHARED_LIBRARY_FLAGS="-dll"
46238    SET_EXECUTABLE_ORIGIN=''
46239    SET_SHARED_LIBRARY_ORIGIN=''
46240    SET_SHARED_LIBRARY_NAME=''
46241    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
46242  fi
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46253    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46254    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46255    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46256  fi
46257  # The (cross) compiler is now configured, we can now test capabilities
46258  # of the target platform.
46259
46260
46261
46262  ###############################################################################
46263  #
46264  # Setup the opt flags for different compilers
46265  # and different operating systems.
46266  #
46267
46268  # FIXME: this was indirectly the old default, but just inherited.
46269  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46270  #   C_FLAG_DEPS="-MMD -MF"
46271  # fi
46272
46273  # Generate make dependency files
46274  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46275    C_FLAG_DEPS="-MMD -MF"
46276  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46277    C_FLAG_DEPS="-MMD -MF"
46278  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46279    C_FLAG_DEPS="-xMMD -xMF"
46280  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46281    C_FLAG_DEPS="-qmakedep=gcc -MF"
46282  fi
46283  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46284
46285
46286
46287  # Debug symbols
46288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46289    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46290      # reduce from default "-g2" option to save space
46291      CFLAGS_DEBUG_SYMBOLS="-g1"
46292      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46293    else
46294      CFLAGS_DEBUG_SYMBOLS="-g"
46295      CXXFLAGS_DEBUG_SYMBOLS="-g"
46296    fi
46297  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46298    CFLAGS_DEBUG_SYMBOLS="-g"
46299    CXXFLAGS_DEBUG_SYMBOLS="-g"
46300  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46301    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46302    # -g0 enables debug symbols without disabling inlining.
46303    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46304  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46305    CFLAGS_DEBUG_SYMBOLS="-g"
46306    CXXFLAGS_DEBUG_SYMBOLS="-g"
46307  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46308    CFLAGS_DEBUG_SYMBOLS="-Zi"
46309    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
46310  fi
46311
46312
46313
46314  # bounds, memory and behavior checking options
46315  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46316    case $DEBUG_LEVEL in
46317    release )
46318      # no adjustment
46319      ;;
46320    fastdebug )
46321      # no adjustment
46322      ;;
46323    slowdebug )
46324      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
46325      # get's added conditionally on whether we produce debug symbols or not.
46326      # This is most likely not really correct.
46327
46328      # Add runtime stack smashing and undefined behavior checks.
46329      # Not all versions of gcc support -fstack-protector
46330      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46331
46332
46333
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362
46363
46364
46365
46366
46367
46368
46369
46370
46371
46372
46373    # Execute function body
46374
46375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
46376$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
46377  supports=yes
46378
46379  saved_cflags="$CFLAGS"
46380  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
46381  ac_ext=c
46382ac_cpp='$CPP $CPPFLAGS'
46383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46385ac_compiler_gnu=$ac_cv_c_compiler_gnu
46386
46387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46388/* end confdefs.h.  */
46389int i;
46390_ACEOF
46391if ac_fn_c_try_compile "$LINENO"; then :
46392
46393else
46394  supports=no
46395fi
46396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46397  ac_ext=cpp
46398ac_cpp='$CXXCPP $CPPFLAGS'
46399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46402
46403  CFLAGS="$saved_cflags"
46404
46405  saved_cxxflags="$CXXFLAGS"
46406  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
46407  ac_ext=cpp
46408ac_cpp='$CXXCPP $CPPFLAGS'
46409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46412
46413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46414/* end confdefs.h.  */
46415int i;
46416_ACEOF
46417if ac_fn_cxx_try_compile "$LINENO"; then :
46418
46419else
46420  supports=no
46421fi
46422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46423  ac_ext=cpp
46424ac_cpp='$CXXCPP $CPPFLAGS'
46425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46428
46429  CXXFLAGS="$saved_cxxflags"
46430
46431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46432$as_echo "$supports" >&6; }
46433  if test "x$supports" = "xyes" ; then
46434    :
46435
46436  else
46437    :
46438    STACK_PROTECTOR_CFLAG=""
46439  fi
46440
46441
46442
46443
46444
46445
46446
46447
46448
46449
46450
46451
46452
46453      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46454      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46455      ;;
46456    esac
46457  fi
46458
46459  # Optimization levels
46460  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46461    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46462
46463    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46464      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46465      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46466      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46467      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46468      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46469      C_O_FLAG_NONE="-xregs=no%frameptr"
46470      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46471      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46472      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46473      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46474      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46475      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46476        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46477        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46478      fi
46479    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46480      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46481      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46482      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46483      C_O_FLAG_DEBUG=""
46484      C_O_FLAG_NONE=""
46485      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46486      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46487      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46488      CXX_O_FLAG_DEBUG=""
46489      CXX_O_FLAG_NONE=""
46490    fi
46491  else
46492    # The remaining toolchains share opt flags between CC and CXX;
46493    # setup for C and duplicate afterwards.
46494    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46495      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46496        # On MacOSX we optimize for size, something
46497        # we should do for all platforms?
46498        C_O_FLAG_HIGHEST="-Os"
46499        C_O_FLAG_HI="-Os"
46500        C_O_FLAG_NORM="-Os"
46501      else
46502        C_O_FLAG_HIGHEST="-O3"
46503        C_O_FLAG_HI="-O3"
46504        C_O_FLAG_NORM="-O2"
46505      fi
46506      C_O_FLAG_DEBUG="-O0"
46507      C_O_FLAG_NONE="-O0"
46508    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46509      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46510        # On MacOSX we optimize for size, something
46511        # we should do for all platforms?
46512        C_O_FLAG_HIGHEST="-Os"
46513        C_O_FLAG_HI="-Os"
46514        C_O_FLAG_NORM="-Os"
46515      else
46516        C_O_FLAG_HIGHEST="-O3"
46517        C_O_FLAG_HI="-O3"
46518        C_O_FLAG_NORM="-O2"
46519      fi
46520      C_O_FLAG_DEBUG="-O0"
46521      C_O_FLAG_NONE="-O0"
46522    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46523      C_O_FLAG_HIGHEST="-O3"
46524      C_O_FLAG_HI="-O3 -qstrict"
46525      C_O_FLAG_NORM="-O2"
46526      C_O_FLAG_DEBUG="-qnoopt"
46527      C_O_FLAG_NONE="-qnoopt"
46528    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46529      C_O_FLAG_HIGHEST="-O2"
46530      C_O_FLAG_HI="-O1"
46531      C_O_FLAG_NORM="-O1"
46532      C_O_FLAG_DEBUG="-Od"
46533      C_O_FLAG_NONE="-Od"
46534    fi
46535    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46536    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46537    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46538    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46539    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46540  fi
46541
46542  # Adjust optimization flags according to debug level.
46543  case $DEBUG_LEVEL in
46544    release )
46545      # no adjustment
46546      ;;
46547    fastdebug )
46548      # Not quite so much optimization
46549      C_O_FLAG_HI="$C_O_FLAG_NORM"
46550      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46551      ;;
46552    slowdebug )
46553      # Disable optimization
46554      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46555      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46556      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46557      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46558      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46559      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46560      ;;
46561  esac
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575  # Special extras...
46576  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46577    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46578      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46579      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46580    fi
46581    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46582    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46583  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46584    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46585    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46586  fi
46587
46588  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46589  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46590  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46591
46592  ###############################################################################
46593  #
46594  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46595  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46596  #
46597
46598  # Setup compiler/platform specific flags into
46599  #    CFLAGS_JDK    - C Compiler flags
46600  #    CXXFLAGS_JDK  - C++ Compiler flags
46601  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46602  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46603    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46604      # Force compatibility with i586 on 32 bit intel platforms.
46605      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46606    fi
46607    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46608        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46609    case $OPENJDK_TARGET_CPU_ARCH in
46610      arm )
46611        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46612        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46613        ;;
46614      ppc )
46615        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46616        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46617        ;;
46618      * )
46619        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46620        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46621        ;;
46622    esac
46623  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46624    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46625      if test "x$OPENJDK_TARGET_CPU" = xx86; then
46626        # Force compatibility with i586 on 32 bit intel platforms.
46627        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46628      fi
46629      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46630          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46631      case $OPENJDK_TARGET_CPU_ARCH in
46632        ppc )
46633          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46634          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46635          ;;
46636        * )
46637          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46638          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46639          ;;
46640      esac
46641    fi
46642  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46643    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46644    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46645      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46646    fi
46647
46648    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46649    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46650  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46651    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46652    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46653  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46654    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46655        -MD -Zc:wchar_t- -W3 -wd4800 \
46656        -DWIN32_LEAN_AND_MEAN \
46657        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46658        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46659        -DWIN32 -DIAL"
46660    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46661      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46662    else
46663      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46664    fi
46665    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46666    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46667    # studio.
46668    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46669      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46670      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
46671    fi
46672  fi
46673
46674  ###############################################################################
46675
46676  # Adjust flags according to debug level.
46677  case $DEBUG_LEVEL in
46678    fastdebug | slowdebug )
46679      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46680      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46681      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46682      ;;
46683    release )
46684      ;;
46685    * )
46686      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46687      ;;
46688  esac
46689
46690  # Setup LP64
46691  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46692
46693  # Set some common defines. These works for all compilers, but assume
46694  # -D is universally accepted.
46695
46696  # Setup endianness
46697  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46698    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46699    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46700    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46701    #   Note: -Dmacro         is the same as    #define macro 1
46702    #         -Dmacro=        is the same as    #define macro
46703    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46704      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46705    else
46706      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46707    fi
46708  else
46709    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46710    # are defined in the system?
46711    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46712      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46713    else
46714      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46715    fi
46716  fi
46717
46718  # Setup target OS define. Use OS target name but in upper case.
46719  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46720  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46721
46722  # Setup target CPU
46723  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46724
46725  # Setup debug/release defines
46726  if test "x$DEBUG_LEVEL" = xrelease; then
46727    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46728    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46729      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46730    fi
46731  else
46732    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46733  fi
46734
46735  # Set some additional per-OS defines.
46736  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46737    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46738  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46739    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46740  fi
46741
46742  # Additional macosx handling
46743  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46744    # Setting these parameters makes it an error to link to macosx APIs that are
46745    # newer than the given OS version and makes the linked binaries compatible
46746    # even if built on a newer version of the OS.
46747    # The expected format is X.Y.Z
46748    MACOSX_VERSION_MIN=10.7.0
46749
46750
46751    # The macro takes the version with no dots, ex: 1070
46752    # Let the flags variables get resolved in make for easier override on make
46753    # command line.
46754    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46755    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46756  fi
46757
46758  # Setup some hard coded includes
46759  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46760      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46761      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46762      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46763      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46764      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46765
46766  # The shared libraries are compiled using the picflag.
46767  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46768  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46769
46770  # Executable flags
46771  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46772  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46773
46774
46775
46776
46777
46778
46779  # Flags for compiling test libraries
46780  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46781  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46782
46783  # Flags for compiling test executables
46784  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46785  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46786
46787
46788
46789
46790
46791
46792  # Setup LDFLAGS et al.
46793  #
46794
46795  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46796    LDFLAGS_MICROSOFT="-nologo -opt:ref"
46797    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
46798    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46799      LDFLAGS_SAFESH="-safeseh"
46800      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
46801    fi
46802  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46803    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46804    # We have previously set HAS_GNU_HASH if this is the case
46805    if test -n "$HAS_GNU_HASH"; then
46806      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
46807      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
46808    fi
46809    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46810      # And since we now know that the linker is gnu, then add -z defs, to forbid
46811      # undefined symbols in object files.
46812      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
46813      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
46814      case $DEBUG_LEVEL in
46815        release )
46816          # tell linker to optimize libraries.
46817          # Should this be supplied to the OSS linker as well?
46818          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
46819          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
46820          ;;
46821        slowdebug )
46822          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46823            # do relocations at load
46824            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46825            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46826          fi
46827          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46828            # mark relocations read only
46829            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46830            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46831          fi
46832          ;;
46833        fastdebug )
46834          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46835            # mark relocations read only
46836            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46837            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46838          fi
46839          ;;
46840        * )
46841          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46842          ;;
46843        esac
46844    fi
46845  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46846    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
46847    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
46848    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
46849    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
46850  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46851    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
46852    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
46853  fi
46854
46855  # Customize LDFLAGS for executables
46856
46857  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46858
46859  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46860    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46861      LDFLAGS_STACK_SIZE=1048576
46862    else
46863      LDFLAGS_STACK_SIZE=327680
46864    fi
46865    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46866  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46867    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
46868  fi
46869
46870  # Customize LDFLAGS for libs
46871  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46872
46873  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
46874  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46875    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46876        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46877    JDKLIB_LIBS=""
46878  else
46879    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46880        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46881
46882    # On some platforms (mac) the linker warns about non existing -L dirs.
46883    # Add server first if available. Linking aginst client does not always produce the same results.
46884    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46885    # Default to server for other variants.
46886    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46887      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46888    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46889      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46890    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46891      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46892    else
46893      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46894    fi
46895
46896    JDKLIB_LIBS="-ljava -ljvm"
46897    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46898      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46899    fi
46900  fi
46901
46902
46903
46904
46905
46906
46907
46908
46909  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46910  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46911
46912
46913
46914
46915
46916  # Some Zero and Shark settings.
46917  # ZERO_ARCHFLAG tells the compiler which mode to build for
46918  case "${OPENJDK_TARGET_CPU}" in
46919    s390)
46920      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46921      ;;
46922    *)
46923      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46924  esac
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967    # Execute function body
46968
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46970$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46971  supports=yes
46972
46973  saved_cflags="$CFLAGS"
46974  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46975  ac_ext=c
46976ac_cpp='$CPP $CPPFLAGS'
46977ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46978ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46979ac_compiler_gnu=$ac_cv_c_compiler_gnu
46980
46981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46982/* end confdefs.h.  */
46983int i;
46984_ACEOF
46985if ac_fn_c_try_compile "$LINENO"; then :
46986
46987else
46988  supports=no
46989fi
46990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46991  ac_ext=cpp
46992ac_cpp='$CXXCPP $CPPFLAGS'
46993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46996
46997  CFLAGS="$saved_cflags"
46998
46999  saved_cxxflags="$CXXFLAGS"
47000  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47001  ac_ext=cpp
47002ac_cpp='$CXXCPP $CPPFLAGS'
47003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47006
47007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47008/* end confdefs.h.  */
47009int i;
47010_ACEOF
47011if ac_fn_cxx_try_compile "$LINENO"; then :
47012
47013else
47014  supports=no
47015fi
47016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47017  ac_ext=cpp
47018ac_cpp='$CXXCPP $CPPFLAGS'
47019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47022
47023  CXXFLAGS="$saved_cxxflags"
47024
47025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47026$as_echo "$supports" >&6; }
47027  if test "x$supports" = "xyes" ; then
47028    :
47029
47030  else
47031    :
47032    ZERO_ARCHFLAG=""
47033  fi
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048  # Check that the compiler supports -mX (or -qX on AIX) flags
47049  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47050
47051
47052
47053
47054
47055
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    # Execute function body
47098
47099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47100$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47101  supports=yes
47102
47103  saved_cflags="$CFLAGS"
47104  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47105  ac_ext=c
47106ac_cpp='$CPP $CPPFLAGS'
47107ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47108ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47109ac_compiler_gnu=$ac_cv_c_compiler_gnu
47110
47111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47112/* end confdefs.h.  */
47113int i;
47114_ACEOF
47115if ac_fn_c_try_compile "$LINENO"; then :
47116
47117else
47118  supports=no
47119fi
47120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47121  ac_ext=cpp
47122ac_cpp='$CXXCPP $CPPFLAGS'
47123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47126
47127  CFLAGS="$saved_cflags"
47128
47129  saved_cxxflags="$CXXFLAGS"
47130  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47131  ac_ext=cpp
47132ac_cpp='$CXXCPP $CPPFLAGS'
47133ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47134ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47135ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47136
47137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47138/* end confdefs.h.  */
47139int i;
47140_ACEOF
47141if ac_fn_cxx_try_compile "$LINENO"; then :
47142
47143else
47144  supports=no
47145fi
47146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47147  ac_ext=cpp
47148ac_cpp='$CXXCPP $CPPFLAGS'
47149ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47150ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47151ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47152
47153  CXXFLAGS="$saved_cxxflags"
47154
47155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47156$as_echo "$supports" >&6; }
47157  if test "x$supports" = "xyes" ; then
47158    :
47159    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47160  else
47161    :
47162    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47163  fi
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178  # Check whether --enable-warnings-as-errors was given.
47179if test "${enable_warnings_as_errors+set}" = set; then :
47180  enableval=$enable_warnings_as_errors;
47181fi
47182
47183
47184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47185$as_echo_n "checking if native warnings are errors... " >&6; }
47186  if test "x$enable_warnings_as_errors" = "xyes"; then
47187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47188$as_echo "yes (explicitely set)" >&6; }
47189    WARNINGS_AS_ERRORS=true
47190  elif test "x$enable_warnings_as_errors" = "xno"; then
47191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47192$as_echo "no" >&6; }
47193    WARNINGS_AS_ERRORS=false
47194  elif test "x$enable_warnings_as_errors" = "x"; then
47195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47196$as_echo "yes (default)" >&6; }
47197    WARNINGS_AS_ERRORS=true
47198  else
47199    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47200  fi
47201
47202  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47203    # Set legacy hotspot variable
47204    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47205  else
47206    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47207  fi
47208
47209
47210
47211
47212  case "${TOOLCHAIN_TYPE}" in
47213    microsoft)
47214      DISABLE_WARNING_PREFIX="-wd"
47215      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47216      ;;
47217    solstudio)
47218      DISABLE_WARNING_PREFIX="-erroff="
47219      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47220      ;;
47221    gcc)
47222      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270    # Execute function body
47271
47272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47273$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47274  supports=yes
47275
47276  saved_cflags="$CFLAGS"
47277  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47278  ac_ext=c
47279ac_cpp='$CPP $CPPFLAGS'
47280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47282ac_compiler_gnu=$ac_cv_c_compiler_gnu
47283
47284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47285/* end confdefs.h.  */
47286int i;
47287_ACEOF
47288if ac_fn_c_try_compile "$LINENO"; then :
47289
47290else
47291  supports=no
47292fi
47293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47294  ac_ext=cpp
47295ac_cpp='$CXXCPP $CPPFLAGS'
47296ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47297ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47298ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47299
47300  CFLAGS="$saved_cflags"
47301
47302  saved_cxxflags="$CXXFLAGS"
47303  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47304  ac_ext=cpp
47305ac_cpp='$CXXCPP $CPPFLAGS'
47306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47309
47310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47311/* end confdefs.h.  */
47312int i;
47313_ACEOF
47314if ac_fn_cxx_try_compile "$LINENO"; then :
47315
47316else
47317  supports=no
47318fi
47319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47320  ac_ext=cpp
47321ac_cpp='$CXXCPP $CPPFLAGS'
47322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47325
47326  CXXFLAGS="$saved_cxxflags"
47327
47328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47329$as_echo "$supports" >&6; }
47330  if test "x$supports" = "xyes" ; then
47331    :
47332    GCC_CAN_DISABLE_WARNINGS=true
47333  else
47334    :
47335    GCC_CAN_DISABLE_WARNINGS=false
47336
47337  fi
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47351        DISABLE_WARNING_PREFIX="-Wno-"
47352      else
47353        DISABLE_WARNING_PREFIX=
47354      fi
47355      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47356      # Repeate the check for the BUILD_CC
47357      CC_OLD="$CC"
47358      CC="$BUILD_CC"
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406    # Execute function body
47407
47408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47409$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47410  supports=yes
47411
47412  saved_cflags="$CFLAGS"
47413  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47414  ac_ext=c
47415ac_cpp='$CPP $CPPFLAGS'
47416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47418ac_compiler_gnu=$ac_cv_c_compiler_gnu
47419
47420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47421/* end confdefs.h.  */
47422int i;
47423_ACEOF
47424if ac_fn_c_try_compile "$LINENO"; then :
47425
47426else
47427  supports=no
47428fi
47429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47430  ac_ext=cpp
47431ac_cpp='$CXXCPP $CPPFLAGS'
47432ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47433ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47434ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47435
47436  CFLAGS="$saved_cflags"
47437
47438  saved_cxxflags="$CXXFLAGS"
47439  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47440  ac_ext=cpp
47441ac_cpp='$CXXCPP $CPPFLAGS'
47442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47445
47446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47447/* end confdefs.h.  */
47448int i;
47449_ACEOF
47450if ac_fn_cxx_try_compile "$LINENO"; then :
47451
47452else
47453  supports=no
47454fi
47455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47456  ac_ext=cpp
47457ac_cpp='$CXXCPP $CPPFLAGS'
47458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47461
47462  CXXFLAGS="$saved_cxxflags"
47463
47464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47465$as_echo "$supports" >&6; }
47466  if test "x$supports" = "xyes" ; then
47467    :
47468    BUILD_CC_CAN_DISABLE_WARNINGS=true
47469  else
47470    :
47471    BUILD_CC_CAN_DISABLE_WARNINGS=false
47472
47473  fi
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47487        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47488      else
47489        BUILD_CC_DISABLE_WARNING_PREFIX=
47490      fi
47491      CC="$CC_OLD"
47492      ;;
47493    clang)
47494      DISABLE_WARNING_PREFIX="-Wno-"
47495      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47496      ;;
47497    xlc)
47498      DISABLE_WARNING_PREFIX="-qsuppress="
47499      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
47500      ;;
47501  esac
47502
47503
47504
47505
47506# Setup debug symbols (need objcopy from the toolchain for that)
47507
47508  #
47509  # NATIVE_DEBUG_SYMBOLS
47510  # This must be done after the toolchain is setup, since we're looking at objcopy.
47511  #
47512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47513$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47514
47515# Check whether --with-native-debug-symbols was given.
47516if test "${with_native_debug_symbols+set}" = set; then :
47517  withval=$with_native_debug_symbols;
47518        if test "x$OPENJDK_TARGET_OS" = xaix; then
47519          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
47520            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
47521          fi
47522        fi
47523
47524else
47525
47526        if test "x$OPENJDK_TARGET_OS" = xaix; then
47527          # AIX doesn't support 'zipped' so use 'internal' as default
47528          with_native_debug_symbols="internal"
47529        else
47530          if test "x$STATIC_BUILD" = xtrue; then
47531            with_native_debug_symbols="none"
47532          else
47533            with_native_debug_symbols="zipped"
47534          fi
47535        fi
47536
47537fi
47538
47539  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47541$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47542
47543  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47544
47545    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47546      if test "x$OBJCOPY" = x; then
47547        # enabling of enable-debug-symbols and can't find objcopy
47548        # this is an error
47549        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47550      fi
47551    fi
47552
47553    COMPILE_WITH_DEBUG_SYMBOLS=true
47554    COPY_DEBUG_SYMBOLS=true
47555    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
47556
47557    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47558    DEBUG_BINARIES=false
47559    STRIP_POLICY=min_strip
47560
47561  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47562    COMPILE_WITH_DEBUG_SYMBOLS=false
47563    COPY_DEBUG_SYMBOLS=false
47564    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47565
47566    DEBUG_BINARIES=false
47567    STRIP_POLICY=no_strip
47568  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47569    COMPILE_WITH_DEBUG_SYMBOLS=true
47570    COPY_DEBUG_SYMBOLS=false
47571    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47572
47573    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
47574    DEBUG_BINARIES=true
47575    STRIP_POLICY=no_strip
47576    STRIP=""
47577
47578  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47579
47580    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47581      if test "x$OBJCOPY" = x; then
47582        # enabling of enable-debug-symbols and can't find objcopy
47583        # this is an error
47584        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47585      fi
47586    fi
47587
47588    COMPILE_WITH_DEBUG_SYMBOLS=true
47589    COPY_DEBUG_SYMBOLS=true
47590    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47591
47592    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47593    DEBUG_BINARIES=false
47594    STRIP_POLICY=min_strip
47595  else
47596    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47597  fi
47598
47599  # --enable-debug-symbols is deprecated.
47600  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47601
47602  # Check whether --enable-debug-symbols was given.
47603if test "${enable_debug_symbols+set}" = set; then :
47604  enableval=$enable_debug_symbols;
47605fi
47606
47607  if test "x$enable_debug_symbols" != x; then
47608    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47609$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47610
47611    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47612      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47613$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47614    fi
47615
47616  fi
47617
47618
47619  # --enable-zip-debug-info is deprecated.
47620  # Please use --with-native-debug-symbols=zipped .
47621
47622  # Check whether --enable-zip-debug-info was given.
47623if test "${enable_zip_debug_info+set}" = set; then :
47624  enableval=$enable_zip_debug_info;
47625fi
47626
47627  if test "x$enable_zip_debug_info" != x; then
47628    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47629$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47630
47631    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47632      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47633$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47634    fi
47635
47636  fi
47637
47638
47639
47640
47641
47642
47643  # Legacy values
47644
47645
47646
47647
47648  # Check whether --enable-native-coverage was given.
47649if test "${enable_native_coverage+set}" = set; then :
47650  enableval=$enable_native_coverage;
47651fi
47652
47653  GCOV_ENABLED="false"
47654  if test "x$enable_native_coverage" = "xyes"; then
47655    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47657$as_echo_n "checking if native coverage is enabled... " >&6; }
47658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47659$as_echo "yes" >&6; }
47660      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47661      GCOV_LDFLAGS="-fprofile-arcs"
47662      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47663      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47664      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47665      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47666      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47667      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47668      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47669      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47670      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47671      GCOV_ENABLED="true"
47672    else
47673      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47674    fi
47675  elif test "x$enable_native_coverage" = "xno"; then
47676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47677$as_echo_n "checking if native coverage is enabled... " >&6; }
47678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47679$as_echo "no" >&6; }
47680  elif test "x$enable_native_coverage" != "x"; then
47681    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47682  fi
47683
47684
47685
47686
47687###############################################################################
47688#
47689# Check dependencies for external and internal libraries.
47690#
47691###############################################################################
47692
47693# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47694
47695  # When using cygwin or msys, we need a wrapper binary that renames
47696  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47697  # @files and rewrites these too! This wrapper binary is
47698  # called fixpath.
47699  FIXPATH=
47700  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47702$as_echo_n "checking if fixpath can be created... " >&6; }
47703    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47704    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47705    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47706    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47707      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47708      FIXPATH="$FIXPATH_BIN -c"
47709    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47710      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47711      # @ was chosen as separator to minimize risk of other tools messing around with it
47712      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47713          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47714      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47715      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47716    fi
47717    FIXPATH_SRC_W="$FIXPATH_SRC"
47718    FIXPATH_BIN_W="$FIXPATH_BIN"
47719
47720  unix_path="$FIXPATH_SRC_W"
47721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47722    windows_path=`$CYGPATH -m "$unix_path"`
47723    FIXPATH_SRC_W="$windows_path"
47724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47725    windows_path=`cmd //c echo $unix_path`
47726    FIXPATH_SRC_W="$windows_path"
47727  fi
47728
47729
47730  unix_path="$FIXPATH_BIN_W"
47731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47732    windows_path=`$CYGPATH -m "$unix_path"`
47733    FIXPATH_BIN_W="$windows_path"
47734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47735    windows_path=`cmd //c echo $unix_path`
47736    FIXPATH_BIN_W="$windows_path"
47737  fi
47738
47739    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47740    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47741    cd $FIXPATH_DIR
47742    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47743    cd $CURDIR
47744
47745    if test ! -x $FIXPATH_BIN; then
47746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47747$as_echo "no" >&6; }
47748      cat $FIXPATH_DIR/fixpath1.log
47749      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47750    fi
47751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47752$as_echo "yes" >&6; }
47753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47754$as_echo_n "checking if fixpath.exe works... " >&6; }
47755    cd $FIXPATH_DIR
47756    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47757        > $FIXPATH_DIR/fixpath2.log 2>&1
47758    cd $CURDIR
47759    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47761$as_echo "no" >&6; }
47762      cat $FIXPATH_DIR/fixpath2.log
47763      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47764    fi
47765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47766$as_echo "yes" >&6; }
47767
47768    FIXPATH_DETACH_FLAG="--detach"
47769  fi
47770
47771
47772
47773
47774
47775
47776  # Check if X11 is needed
47777  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47778    # No X11 support on windows or macosx
47779    NEEDS_LIB_X11=false
47780  else
47781    if test "x$SUPPORT_HEADFUL" = xno; then
47782      # No X11 support if building headless-only
47783      NEEDS_LIB_X11=false
47784    else
47785      # All other instances need X11
47786      NEEDS_LIB_X11=true
47787    fi
47788  fi
47789
47790  # Check if cups is needed
47791  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47792    # Windows have a separate print system
47793    NEEDS_LIB_CUPS=false
47794  else
47795    NEEDS_LIB_CUPS=true
47796  fi
47797
47798  # Check if freetype is needed
47799  if test "x$OPENJDK" = "xtrue"; then
47800    NEEDS_LIB_FREETYPE=true
47801  else
47802    NEEDS_LIB_FREETYPE=false
47803  fi
47804
47805  # Check if alsa is needed
47806  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47807    NEEDS_LIB_ALSA=true
47808  else
47809    NEEDS_LIB_ALSA=false
47810  fi
47811
47812  # Check if ffi is needed
47813  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47814    NEEDS_LIB_FFI=true
47815  else
47816    NEEDS_LIB_FFI=false
47817  fi
47818
47819
47820  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47821  # dynamic build is configured on command line.
47822
47823# Check whether --with-stdc++lib was given.
47824if test "${with_stdc__lib+set}" = set; then :
47825  withval=$with_stdc__lib;
47826        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47827                && test "x$with_stdc__lib" != xdefault; then
47828          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47829        fi
47830
47831else
47832  with_stdc__lib=default
47833
47834fi
47835
47836
47837  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47838    # Test if -lstdc++ works.
47839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47840$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47841    ac_ext=cpp
47842ac_cpp='$CXXCPP $CPPFLAGS'
47843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47846
47847    OLD_CXXFLAGS="$CXXFLAGS"
47848    CXXFLAGS="$CXXFLAGS -lstdc++"
47849    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47850/* end confdefs.h.  */
47851
47852int
47853main ()
47854{
47855return 0;
47856  ;
47857  return 0;
47858}
47859_ACEOF
47860if ac_fn_cxx_try_link "$LINENO"; then :
47861  has_dynamic_libstdcxx=yes
47862else
47863  has_dynamic_libstdcxx=no
47864fi
47865rm -f core conftest.err conftest.$ac_objext \
47866    conftest$ac_exeext conftest.$ac_ext
47867    CXXFLAGS="$OLD_CXXFLAGS"
47868    ac_ext=cpp
47869ac_cpp='$CXXCPP $CPPFLAGS'
47870ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47871ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47872ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47873
47874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47875$as_echo "$has_dynamic_libstdcxx" >&6; }
47876
47877    # Test if stdc++ can be linked statically.
47878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47879$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47880    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47881    ac_ext=cpp
47882ac_cpp='$CXXCPP $CPPFLAGS'
47883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47886
47887    OLD_LIBS="$LIBS"
47888    OLD_CXX="$CXX"
47889    LIBS="$STATIC_STDCXX_FLAGS"
47890    CXX="$CC"
47891    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47892/* end confdefs.h.  */
47893
47894int
47895main ()
47896{
47897return 0;
47898  ;
47899  return 0;
47900}
47901_ACEOF
47902if ac_fn_cxx_try_link "$LINENO"; then :
47903  has_static_libstdcxx=yes
47904else
47905  has_static_libstdcxx=no
47906fi
47907rm -f core conftest.err conftest.$ac_objext \
47908    conftest$ac_exeext conftest.$ac_ext
47909    LIBS="$OLD_LIBS"
47910    CXX="$OLD_CXX"
47911    ac_ext=cpp
47912ac_cpp='$CXXCPP $CPPFLAGS'
47913ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47914ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47915ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47916
47917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47918$as_echo "$has_static_libstdcxx" >&6; }
47919
47920    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47921      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47922    fi
47923
47924    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47925      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47926    fi
47927
47928    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47929      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47930    fi
47931
47932    # If dynamic was requested, it's available since it would fail above otherwise.
47933    # If dynamic wasn't requested, go with static unless it isn't available.
47934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47935$as_echo_n "checking how to link with libstdc++... " >&6; }
47936    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47937      LIBCXX="$LIBCXX -lstdc++"
47938      LDCXX="$CXX"
47939      STATIC_CXX_SETTING="STATIC_CXX=false"
47940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47941$as_echo "dynamic" >&6; }
47942    else
47943      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47944      LDCXX="$CC"
47945      STATIC_CXX_SETTING="STATIC_CXX=true"
47946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47947$as_echo "static" >&6; }
47948    fi
47949  fi
47950
47951
47952  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47953  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47954    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47955  fi
47956
47957  # TODO better (platform agnostic) test
47958  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47959    LIBCXX="-lstdc++"
47960  fi
47961
47962
47963  # Setup Windows runtime dlls
47964  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47965
47966
47967# Check whether --with-msvcr-dll was given.
47968if test "${with_msvcr_dll+set}" = set; then :
47969  withval=$with_msvcr_dll;
47970fi
47971
47972
47973  if test "x$with_msvcr_dll" != x; then
47974    # If given explicitely by user, do not probe. If not present, fail directly.
47975
47976  DLL_NAME="$MSVCR_NAME"
47977  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47978  METHOD="--with-msvcr-dll"
47979  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47981$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47982
47983    # Need to check if the found msvcr is correct architecture
47984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47985$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47986    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47988      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47989      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47990      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47991        CORRECT_MSVCR_ARCH="PE32 executable"
47992      else
47993        CORRECT_MSVCR_ARCH="PE32+ executable"
47994      fi
47995    else
47996      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47997        CORRECT_MSVCR_ARCH=386
47998      else
47999        CORRECT_MSVCR_ARCH=x86-64
48000      fi
48001    fi
48002    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48004$as_echo "ok" >&6; }
48005      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48006
48007  # Only process if variable expands to non-empty
48008
48009  if test "x$MSVC_DLL" != x; then
48010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48011
48012  # Input might be given as Windows format, start by converting to
48013  # unix format.
48014  path="$MSVC_DLL"
48015  new_path=`$CYGPATH -u "$path"`
48016
48017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48020  # "foo.exe" is OK but "foo" is an error.
48021  #
48022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48023  # It is also a way to make sure we got the proper file name for the real test later on.
48024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48025  if test "x$test_shortpath" = x; then
48026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48027$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48028    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48029  fi
48030
48031  # Call helper function which possibly converts this using DOS-style short mode.
48032  # If so, the updated path is stored in $new_path.
48033
48034  input_path="$new_path"
48035  # Check if we need to convert this using DOS-style short mode. If the path
48036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48037  # take no chances and rewrite it.
48038  # Note: m4 eats our [], so we need to use [ and ] instead.
48039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48040  if test "x$has_forbidden_chars" != x; then
48041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48045      # Going to short mode and back again did indeed matter. Since short mode is
48046      # case insensitive, let's make it lowercase to improve readability.
48047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48048      # Now convert it back to Unix-style (cygpath)
48049      input_path=`$CYGPATH -u "$shortmode_path"`
48050      new_path="$input_path"
48051    fi
48052  fi
48053
48054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48055  if test "x$test_cygdrive_prefix" = x; then
48056    # As a simple fix, exclude /usr/bin since it's not a real path.
48057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48059      # a path prefixed by /cygdrive for fixpath to work.
48060      new_path="$CYGWIN_ROOT_PATH$input_path"
48061    fi
48062  fi
48063
48064
48065  if test "x$path" != "x$new_path"; then
48066    MSVC_DLL="$new_path"
48067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48068$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48069  fi
48070
48071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48072
48073  path="$MSVC_DLL"
48074  has_colon=`$ECHO $path | $GREP ^.:`
48075  new_path="$path"
48076  if test "x$has_colon" = x; then
48077    # Not in mixed or Windows style, start by that.
48078    new_path=`cmd //c echo $path`
48079  fi
48080
48081
48082  input_path="$new_path"
48083  # Check if we need to convert this using DOS-style short mode. If the path
48084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48085  # take no chances and rewrite it.
48086  # Note: m4 eats our [], so we need to use [ and ] instead.
48087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48088  if test "x$has_forbidden_chars" != x; then
48089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48091  fi
48092
48093
48094  windows_path="$new_path"
48095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48096    unix_path=`$CYGPATH -u "$windows_path"`
48097    new_path="$unix_path"
48098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48100    new_path="$unix_path"
48101  fi
48102
48103  if test "x$path" != "x$new_path"; then
48104    MSVC_DLL="$new_path"
48105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48106$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48107  fi
48108
48109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48111
48112    else
48113      # We're on a unix platform. Hooray! :)
48114      path="$MSVC_DLL"
48115      has_space=`$ECHO "$path" | $GREP " "`
48116      if test "x$has_space" != x; then
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48118$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48120      fi
48121
48122      # Use eval to expand a potential ~
48123      eval path="$path"
48124      if test ! -f "$path" && test ! -d "$path"; then
48125        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48126      fi
48127
48128      if test -d "$path"; then
48129        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48130      else
48131        dir="`$DIRNAME "$path"`"
48132        base="`$BASENAME "$path"`"
48133        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48134      fi
48135    fi
48136  fi
48137
48138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48139$as_echo_n "checking for $DLL_NAME... " >&6; }
48140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48141$as_echo "$MSVC_DLL" >&6; }
48142    else
48143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48144$as_echo "incorrect, ignoring" >&6; }
48145      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48146$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48147    fi
48148  fi
48149
48150    if test "x$MSVC_DLL" = x; then
48151      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48152    fi
48153    MSVCR_DLL="$MSVC_DLL"
48154  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48155
48156  DLL_NAME="$MSVCR_NAME"
48157  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48158  METHOD="devkit"
48159  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48160    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48161$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48162
48163    # Need to check if the found msvcr is correct architecture
48164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48165$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48166    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48168      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48169      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48170      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48171        CORRECT_MSVCR_ARCH="PE32 executable"
48172      else
48173        CORRECT_MSVCR_ARCH="PE32+ executable"
48174      fi
48175    else
48176      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48177        CORRECT_MSVCR_ARCH=386
48178      else
48179        CORRECT_MSVCR_ARCH=x86-64
48180      fi
48181    fi
48182    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48184$as_echo "ok" >&6; }
48185      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48186
48187  # Only process if variable expands to non-empty
48188
48189  if test "x$MSVC_DLL" != x; then
48190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48191
48192  # Input might be given as Windows format, start by converting to
48193  # unix format.
48194  path="$MSVC_DLL"
48195  new_path=`$CYGPATH -u "$path"`
48196
48197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48200  # "foo.exe" is OK but "foo" is an error.
48201  #
48202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48203  # It is also a way to make sure we got the proper file name for the real test later on.
48204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48205  if test "x$test_shortpath" = x; then
48206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48207$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48208    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48209  fi
48210
48211  # Call helper function which possibly converts this using DOS-style short mode.
48212  # If so, the updated path is stored in $new_path.
48213
48214  input_path="$new_path"
48215  # Check if we need to convert this using DOS-style short mode. If the path
48216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48217  # take no chances and rewrite it.
48218  # Note: m4 eats our [], so we need to use [ and ] instead.
48219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48220  if test "x$has_forbidden_chars" != x; then
48221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48225      # Going to short mode and back again did indeed matter. Since short mode is
48226      # case insensitive, let's make it lowercase to improve readability.
48227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48228      # Now convert it back to Unix-style (cygpath)
48229      input_path=`$CYGPATH -u "$shortmode_path"`
48230      new_path="$input_path"
48231    fi
48232  fi
48233
48234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48235  if test "x$test_cygdrive_prefix" = x; then
48236    # As a simple fix, exclude /usr/bin since it's not a real path.
48237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48239      # a path prefixed by /cygdrive for fixpath to work.
48240      new_path="$CYGWIN_ROOT_PATH$input_path"
48241    fi
48242  fi
48243
48244
48245  if test "x$path" != "x$new_path"; then
48246    MSVC_DLL="$new_path"
48247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48248$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48249  fi
48250
48251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48252
48253  path="$MSVC_DLL"
48254  has_colon=`$ECHO $path | $GREP ^.:`
48255  new_path="$path"
48256  if test "x$has_colon" = x; then
48257    # Not in mixed or Windows style, start by that.
48258    new_path=`cmd //c echo $path`
48259  fi
48260
48261
48262  input_path="$new_path"
48263  # Check if we need to convert this using DOS-style short mode. If the path
48264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48265  # take no chances and rewrite it.
48266  # Note: m4 eats our [], so we need to use [ and ] instead.
48267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48268  if test "x$has_forbidden_chars" != x; then
48269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48271  fi
48272
48273
48274  windows_path="$new_path"
48275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48276    unix_path=`$CYGPATH -u "$windows_path"`
48277    new_path="$unix_path"
48278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48280    new_path="$unix_path"
48281  fi
48282
48283  if test "x$path" != "x$new_path"; then
48284    MSVC_DLL="$new_path"
48285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48286$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48287  fi
48288
48289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48291
48292    else
48293      # We're on a unix platform. Hooray! :)
48294      path="$MSVC_DLL"
48295      has_space=`$ECHO "$path" | $GREP " "`
48296      if test "x$has_space" != x; then
48297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48298$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48300      fi
48301
48302      # Use eval to expand a potential ~
48303      eval path="$path"
48304      if test ! -f "$path" && test ! -d "$path"; then
48305        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48306      fi
48307
48308      if test -d "$path"; then
48309        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48310      else
48311        dir="`$DIRNAME "$path"`"
48312        base="`$BASENAME "$path"`"
48313        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48314      fi
48315    fi
48316  fi
48317
48318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48319$as_echo_n "checking for $DLL_NAME... " >&6; }
48320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48321$as_echo "$MSVC_DLL" >&6; }
48322    else
48323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48324$as_echo "incorrect, ignoring" >&6; }
48325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48327    fi
48328  fi
48329
48330    if test "x$MSVC_DLL" = x; then
48331      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48332    fi
48333    MSVCR_DLL="$MSVC_DLL"
48334  else
48335
48336  DLL_NAME="${MSVCR_NAME}"
48337  MSVC_DLL=
48338
48339  if test "x$MSVC_DLL" = x; then
48340    # Probe: Using well-known location from Visual Studio 10.0
48341    if test "x$VCINSTALLDIR" != x; then
48342      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48343
48344  windows_path="$CYGWIN_VC_INSTALL_DIR"
48345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48346    unix_path=`$CYGPATH -u "$windows_path"`
48347    CYGWIN_VC_INSTALL_DIR="$unix_path"
48348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48350    CYGWIN_VC_INSTALL_DIR="$unix_path"
48351  fi
48352
48353      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48354        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48355      else
48356        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48357      fi
48358      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48359
48360  DLL_NAME="$DLL_NAME"
48361  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48362  METHOD="well-known location in VCINSTALLDIR"
48363  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48365$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48366
48367    # Need to check if the found msvcr is correct architecture
48368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48369$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48370    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48372      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48373      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48374      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48375        CORRECT_MSVCR_ARCH="PE32 executable"
48376      else
48377        CORRECT_MSVCR_ARCH="PE32+ executable"
48378      fi
48379    else
48380      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48381        CORRECT_MSVCR_ARCH=386
48382      else
48383        CORRECT_MSVCR_ARCH=x86-64
48384      fi
48385    fi
48386    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48388$as_echo "ok" >&6; }
48389      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48390
48391  # Only process if variable expands to non-empty
48392
48393  if test "x$MSVC_DLL" != x; then
48394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48395
48396  # Input might be given as Windows format, start by converting to
48397  # unix format.
48398  path="$MSVC_DLL"
48399  new_path=`$CYGPATH -u "$path"`
48400
48401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48404  # "foo.exe" is OK but "foo" is an error.
48405  #
48406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48407  # It is also a way to make sure we got the proper file name for the real test later on.
48408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48409  if test "x$test_shortpath" = x; then
48410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48411$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48412    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48413  fi
48414
48415  # Call helper function which possibly converts this using DOS-style short mode.
48416  # If so, the updated path is stored in $new_path.
48417
48418  input_path="$new_path"
48419  # Check if we need to convert this using DOS-style short mode. If the path
48420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48421  # take no chances and rewrite it.
48422  # Note: m4 eats our [], so we need to use [ and ] instead.
48423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48424  if test "x$has_forbidden_chars" != x; then
48425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48429      # Going to short mode and back again did indeed matter. Since short mode is
48430      # case insensitive, let's make it lowercase to improve readability.
48431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48432      # Now convert it back to Unix-style (cygpath)
48433      input_path=`$CYGPATH -u "$shortmode_path"`
48434      new_path="$input_path"
48435    fi
48436  fi
48437
48438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48439  if test "x$test_cygdrive_prefix" = x; then
48440    # As a simple fix, exclude /usr/bin since it's not a real path.
48441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48443      # a path prefixed by /cygdrive for fixpath to work.
48444      new_path="$CYGWIN_ROOT_PATH$input_path"
48445    fi
48446  fi
48447
48448
48449  if test "x$path" != "x$new_path"; then
48450    MSVC_DLL="$new_path"
48451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48452$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48453  fi
48454
48455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48456
48457  path="$MSVC_DLL"
48458  has_colon=`$ECHO $path | $GREP ^.:`
48459  new_path="$path"
48460  if test "x$has_colon" = x; then
48461    # Not in mixed or Windows style, start by that.
48462    new_path=`cmd //c echo $path`
48463  fi
48464
48465
48466  input_path="$new_path"
48467  # Check if we need to convert this using DOS-style short mode. If the path
48468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48469  # take no chances and rewrite it.
48470  # Note: m4 eats our [], so we need to use [ and ] instead.
48471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48472  if test "x$has_forbidden_chars" != x; then
48473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48475  fi
48476
48477
48478  windows_path="$new_path"
48479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48480    unix_path=`$CYGPATH -u "$windows_path"`
48481    new_path="$unix_path"
48482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48484    new_path="$unix_path"
48485  fi
48486
48487  if test "x$path" != "x$new_path"; then
48488    MSVC_DLL="$new_path"
48489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48490$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48491  fi
48492
48493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48495
48496    else
48497      # We're on a unix platform. Hooray! :)
48498      path="$MSVC_DLL"
48499      has_space=`$ECHO "$path" | $GREP " "`
48500      if test "x$has_space" != x; then
48501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48502$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48504      fi
48505
48506      # Use eval to expand a potential ~
48507      eval path="$path"
48508      if test ! -f "$path" && test ! -d "$path"; then
48509        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48510      fi
48511
48512      if test -d "$path"; then
48513        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48514      else
48515        dir="`$DIRNAME "$path"`"
48516        base="`$BASENAME "$path"`"
48517        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48518      fi
48519    fi
48520  fi
48521
48522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48523$as_echo_n "checking for $DLL_NAME... " >&6; }
48524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48525$as_echo "$MSVC_DLL" >&6; }
48526    else
48527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48528$as_echo "incorrect, ignoring" >&6; }
48529      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48530$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48531    fi
48532  fi
48533
48534    fi
48535  fi
48536
48537  if test "x$MSVC_DLL" = x; then
48538    # Probe: Check in the Boot JDK directory.
48539    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48540
48541  DLL_NAME="$DLL_NAME"
48542  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48543  METHOD="well-known location in Boot JDK"
48544  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48546$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48547
48548    # Need to check if the found msvcr is correct architecture
48549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48550$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48551    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48553      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48554      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48555      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48556        CORRECT_MSVCR_ARCH="PE32 executable"
48557      else
48558        CORRECT_MSVCR_ARCH="PE32+ executable"
48559      fi
48560    else
48561      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48562        CORRECT_MSVCR_ARCH=386
48563      else
48564        CORRECT_MSVCR_ARCH=x86-64
48565      fi
48566    fi
48567    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48569$as_echo "ok" >&6; }
48570      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48571
48572  # Only process if variable expands to non-empty
48573
48574  if test "x$MSVC_DLL" != x; then
48575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48576
48577  # Input might be given as Windows format, start by converting to
48578  # unix format.
48579  path="$MSVC_DLL"
48580  new_path=`$CYGPATH -u "$path"`
48581
48582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48585  # "foo.exe" is OK but "foo" is an error.
48586  #
48587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48588  # It is also a way to make sure we got the proper file name for the real test later on.
48589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48590  if test "x$test_shortpath" = x; then
48591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48592$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48593    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48594  fi
48595
48596  # Call helper function which possibly converts this using DOS-style short mode.
48597  # If so, the updated path is stored in $new_path.
48598
48599  input_path="$new_path"
48600  # Check if we need to convert this using DOS-style short mode. If the path
48601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48602  # take no chances and rewrite it.
48603  # Note: m4 eats our [], so we need to use [ and ] instead.
48604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48605  if test "x$has_forbidden_chars" != x; then
48606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48610      # Going to short mode and back again did indeed matter. Since short mode is
48611      # case insensitive, let's make it lowercase to improve readability.
48612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48613      # Now convert it back to Unix-style (cygpath)
48614      input_path=`$CYGPATH -u "$shortmode_path"`
48615      new_path="$input_path"
48616    fi
48617  fi
48618
48619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48620  if test "x$test_cygdrive_prefix" = x; then
48621    # As a simple fix, exclude /usr/bin since it's not a real path.
48622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48624      # a path prefixed by /cygdrive for fixpath to work.
48625      new_path="$CYGWIN_ROOT_PATH$input_path"
48626    fi
48627  fi
48628
48629
48630  if test "x$path" != "x$new_path"; then
48631    MSVC_DLL="$new_path"
48632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48633$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48634  fi
48635
48636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48637
48638  path="$MSVC_DLL"
48639  has_colon=`$ECHO $path | $GREP ^.:`
48640  new_path="$path"
48641  if test "x$has_colon" = x; then
48642    # Not in mixed or Windows style, start by that.
48643    new_path=`cmd //c echo $path`
48644  fi
48645
48646
48647  input_path="$new_path"
48648  # Check if we need to convert this using DOS-style short mode. If the path
48649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48650  # take no chances and rewrite it.
48651  # Note: m4 eats our [], so we need to use [ and ] instead.
48652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48653  if test "x$has_forbidden_chars" != x; then
48654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48656  fi
48657
48658
48659  windows_path="$new_path"
48660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48661    unix_path=`$CYGPATH -u "$windows_path"`
48662    new_path="$unix_path"
48663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48665    new_path="$unix_path"
48666  fi
48667
48668  if test "x$path" != "x$new_path"; then
48669    MSVC_DLL="$new_path"
48670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48671$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48672  fi
48673
48674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48676
48677    else
48678      # We're on a unix platform. Hooray! :)
48679      path="$MSVC_DLL"
48680      has_space=`$ECHO "$path" | $GREP " "`
48681      if test "x$has_space" != x; then
48682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48683$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48685      fi
48686
48687      # Use eval to expand a potential ~
48688      eval path="$path"
48689      if test ! -f "$path" && test ! -d "$path"; then
48690        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48691      fi
48692
48693      if test -d "$path"; then
48694        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48695      else
48696        dir="`$DIRNAME "$path"`"
48697        base="`$BASENAME "$path"`"
48698        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48699      fi
48700    fi
48701  fi
48702
48703      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48704$as_echo_n "checking for $DLL_NAME... " >&6; }
48705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48706$as_echo "$MSVC_DLL" >&6; }
48707    else
48708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48709$as_echo "incorrect, ignoring" >&6; }
48710      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48711$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48712    fi
48713  fi
48714
48715  fi
48716
48717  if test "x$MSVC_DLL" = x; then
48718    # Probe: Look in the Windows system32 directory
48719    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48720
48721  windows_path="$CYGWIN_SYSTEMROOT"
48722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48723    unix_path=`$CYGPATH -u "$windows_path"`
48724    CYGWIN_SYSTEMROOT="$unix_path"
48725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48727    CYGWIN_SYSTEMROOT="$unix_path"
48728  fi
48729
48730    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48731
48732  DLL_NAME="$DLL_NAME"
48733  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48734  METHOD="well-known location in SYSTEMROOT"
48735  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48736    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48737$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48738
48739    # Need to check if the found msvcr is correct architecture
48740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48741$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48742    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48744      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48745      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48746      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48747        CORRECT_MSVCR_ARCH="PE32 executable"
48748      else
48749        CORRECT_MSVCR_ARCH="PE32+ executable"
48750      fi
48751    else
48752      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48753        CORRECT_MSVCR_ARCH=386
48754      else
48755        CORRECT_MSVCR_ARCH=x86-64
48756      fi
48757    fi
48758    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48760$as_echo "ok" >&6; }
48761      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48762
48763  # Only process if variable expands to non-empty
48764
48765  if test "x$MSVC_DLL" != x; then
48766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48767
48768  # Input might be given as Windows format, start by converting to
48769  # unix format.
48770  path="$MSVC_DLL"
48771  new_path=`$CYGPATH -u "$path"`
48772
48773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48776  # "foo.exe" is OK but "foo" is an error.
48777  #
48778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48779  # It is also a way to make sure we got the proper file name for the real test later on.
48780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48781  if test "x$test_shortpath" = x; then
48782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48783$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48784    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48785  fi
48786
48787  # Call helper function which possibly converts this using DOS-style short mode.
48788  # If so, the updated path is stored in $new_path.
48789
48790  input_path="$new_path"
48791  # Check if we need to convert this using DOS-style short mode. If the path
48792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48793  # take no chances and rewrite it.
48794  # Note: m4 eats our [], so we need to use [ and ] instead.
48795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48796  if test "x$has_forbidden_chars" != x; then
48797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48801      # Going to short mode and back again did indeed matter. Since short mode is
48802      # case insensitive, let's make it lowercase to improve readability.
48803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48804      # Now convert it back to Unix-style (cygpath)
48805      input_path=`$CYGPATH -u "$shortmode_path"`
48806      new_path="$input_path"
48807    fi
48808  fi
48809
48810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48811  if test "x$test_cygdrive_prefix" = x; then
48812    # As a simple fix, exclude /usr/bin since it's not a real path.
48813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48815      # a path prefixed by /cygdrive for fixpath to work.
48816      new_path="$CYGWIN_ROOT_PATH$input_path"
48817    fi
48818  fi
48819
48820
48821  if test "x$path" != "x$new_path"; then
48822    MSVC_DLL="$new_path"
48823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48824$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48825  fi
48826
48827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48828
48829  path="$MSVC_DLL"
48830  has_colon=`$ECHO $path | $GREP ^.:`
48831  new_path="$path"
48832  if test "x$has_colon" = x; then
48833    # Not in mixed or Windows style, start by that.
48834    new_path=`cmd //c echo $path`
48835  fi
48836
48837
48838  input_path="$new_path"
48839  # Check if we need to convert this using DOS-style short mode. If the path
48840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48841  # take no chances and rewrite it.
48842  # Note: m4 eats our [], so we need to use [ and ] instead.
48843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48844  if test "x$has_forbidden_chars" != x; then
48845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48847  fi
48848
48849
48850  windows_path="$new_path"
48851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48852    unix_path=`$CYGPATH -u "$windows_path"`
48853    new_path="$unix_path"
48854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48856    new_path="$unix_path"
48857  fi
48858
48859  if test "x$path" != "x$new_path"; then
48860    MSVC_DLL="$new_path"
48861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48862$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48863  fi
48864
48865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48867
48868    else
48869      # We're on a unix platform. Hooray! :)
48870      path="$MSVC_DLL"
48871      has_space=`$ECHO "$path" | $GREP " "`
48872      if test "x$has_space" != x; then
48873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48874$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48876      fi
48877
48878      # Use eval to expand a potential ~
48879      eval path="$path"
48880      if test ! -f "$path" && test ! -d "$path"; then
48881        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48882      fi
48883
48884      if test -d "$path"; then
48885        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48886      else
48887        dir="`$DIRNAME "$path"`"
48888        base="`$BASENAME "$path"`"
48889        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48890      fi
48891    fi
48892  fi
48893
48894      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48895$as_echo_n "checking for $DLL_NAME... " >&6; }
48896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48897$as_echo "$MSVC_DLL" >&6; }
48898    else
48899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48900$as_echo "incorrect, ignoring" >&6; }
48901      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48902$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48903    fi
48904  fi
48905
48906  fi
48907
48908  if test "x$MSVC_DLL" = x; then
48909    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48910    if test "x$VS100COMNTOOLS" != x; then
48911      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48912
48913  windows_path="$CYGWIN_VS_TOOLS_DIR"
48914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48915    unix_path=`$CYGPATH -u "$windows_path"`
48916    CYGWIN_VS_TOOLS_DIR="$unix_path"
48917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48919    CYGWIN_VS_TOOLS_DIR="$unix_path"
48920  fi
48921
48922      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48923        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48924	    | $GREP -i /x64/ | $HEAD --lines 1`
48925      else
48926        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48927	    | $GREP -i /x86/ | $HEAD --lines 1`
48928      fi
48929
48930  DLL_NAME="$DLL_NAME"
48931  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48932  METHOD="search of VS100COMNTOOLS"
48933  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48934    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48935$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48936
48937    # Need to check if the found msvcr is correct architecture
48938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48939$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48940    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48942      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48943      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48944      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48945        CORRECT_MSVCR_ARCH="PE32 executable"
48946      else
48947        CORRECT_MSVCR_ARCH="PE32+ executable"
48948      fi
48949    else
48950      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48951        CORRECT_MSVCR_ARCH=386
48952      else
48953        CORRECT_MSVCR_ARCH=x86-64
48954      fi
48955    fi
48956    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48958$as_echo "ok" >&6; }
48959      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48960
48961  # Only process if variable expands to non-empty
48962
48963  if test "x$MSVC_DLL" != x; then
48964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48965
48966  # Input might be given as Windows format, start by converting to
48967  # unix format.
48968  path="$MSVC_DLL"
48969  new_path=`$CYGPATH -u "$path"`
48970
48971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48974  # "foo.exe" is OK but "foo" is an error.
48975  #
48976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48977  # It is also a way to make sure we got the proper file name for the real test later on.
48978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48979  if test "x$test_shortpath" = x; then
48980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48981$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48982    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48983  fi
48984
48985  # Call helper function which possibly converts this using DOS-style short mode.
48986  # If so, the updated path is stored in $new_path.
48987
48988  input_path="$new_path"
48989  # Check if we need to convert this using DOS-style short mode. If the path
48990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48991  # take no chances and rewrite it.
48992  # Note: m4 eats our [], so we need to use [ and ] instead.
48993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48994  if test "x$has_forbidden_chars" != x; then
48995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48999      # Going to short mode and back again did indeed matter. Since short mode is
49000      # case insensitive, let's make it lowercase to improve readability.
49001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49002      # Now convert it back to Unix-style (cygpath)
49003      input_path=`$CYGPATH -u "$shortmode_path"`
49004      new_path="$input_path"
49005    fi
49006  fi
49007
49008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49009  if test "x$test_cygdrive_prefix" = x; then
49010    # As a simple fix, exclude /usr/bin since it's not a real path.
49011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49013      # a path prefixed by /cygdrive for fixpath to work.
49014      new_path="$CYGWIN_ROOT_PATH$input_path"
49015    fi
49016  fi
49017
49018
49019  if test "x$path" != "x$new_path"; then
49020    MSVC_DLL="$new_path"
49021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49022$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49023  fi
49024
49025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49026
49027  path="$MSVC_DLL"
49028  has_colon=`$ECHO $path | $GREP ^.:`
49029  new_path="$path"
49030  if test "x$has_colon" = x; then
49031    # Not in mixed or Windows style, start by that.
49032    new_path=`cmd //c echo $path`
49033  fi
49034
49035
49036  input_path="$new_path"
49037  # Check if we need to convert this using DOS-style short mode. If the path
49038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49039  # take no chances and rewrite it.
49040  # Note: m4 eats our [], so we need to use [ and ] instead.
49041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49042  if test "x$has_forbidden_chars" != x; then
49043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49045  fi
49046
49047
49048  windows_path="$new_path"
49049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49050    unix_path=`$CYGPATH -u "$windows_path"`
49051    new_path="$unix_path"
49052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49054    new_path="$unix_path"
49055  fi
49056
49057  if test "x$path" != "x$new_path"; then
49058    MSVC_DLL="$new_path"
49059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49060$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49061  fi
49062
49063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49065
49066    else
49067      # We're on a unix platform. Hooray! :)
49068      path="$MSVC_DLL"
49069      has_space=`$ECHO "$path" | $GREP " "`
49070      if test "x$has_space" != x; then
49071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49072$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49074      fi
49075
49076      # Use eval to expand a potential ~
49077      eval path="$path"
49078      if test ! -f "$path" && test ! -d "$path"; then
49079        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49080      fi
49081
49082      if test -d "$path"; then
49083        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49084      else
49085        dir="`$DIRNAME "$path"`"
49086        base="`$BASENAME "$path"`"
49087        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49088      fi
49089    fi
49090  fi
49091
49092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49093$as_echo_n "checking for $DLL_NAME... " >&6; }
49094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49095$as_echo "$MSVC_DLL" >&6; }
49096    else
49097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49098$as_echo "incorrect, ignoring" >&6; }
49099      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49100$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49101    fi
49102  fi
49103
49104    fi
49105  fi
49106
49107  if test "x$MSVC_DLL" = x; then
49108    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49109    # (This was the original behaviour; kept since it might turn something up)
49110    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49111      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49112        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49113	    | $GREP x64 | $HEAD --lines 1`
49114      else
49115        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49116	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49117        if test "x$POSSIBLE_MSVC_DLL" = x; then
49118          # We're grasping at straws now...
49119          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49120	      | $HEAD --lines 1`
49121        fi
49122      fi
49123
49124
49125  DLL_NAME="$DLL_NAME"
49126  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49127  METHOD="search of VCINSTALLDIR"
49128  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49130$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49131
49132    # Need to check if the found msvcr is correct architecture
49133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49134$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49135    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49137      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49138      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49140        CORRECT_MSVCR_ARCH="PE32 executable"
49141      else
49142        CORRECT_MSVCR_ARCH="PE32+ executable"
49143      fi
49144    else
49145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49146        CORRECT_MSVCR_ARCH=386
49147      else
49148        CORRECT_MSVCR_ARCH=x86-64
49149      fi
49150    fi
49151    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49153$as_echo "ok" >&6; }
49154      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49155
49156  # Only process if variable expands to non-empty
49157
49158  if test "x$MSVC_DLL" != x; then
49159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49160
49161  # Input might be given as Windows format, start by converting to
49162  # unix format.
49163  path="$MSVC_DLL"
49164  new_path=`$CYGPATH -u "$path"`
49165
49166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49169  # "foo.exe" is OK but "foo" is an error.
49170  #
49171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49172  # It is also a way to make sure we got the proper file name for the real test later on.
49173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49174  if test "x$test_shortpath" = x; then
49175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49176$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49177    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49178  fi
49179
49180  # Call helper function which possibly converts this using DOS-style short mode.
49181  # If so, the updated path is stored in $new_path.
49182
49183  input_path="$new_path"
49184  # Check if we need to convert this using DOS-style short mode. If the path
49185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49186  # take no chances and rewrite it.
49187  # Note: m4 eats our [], so we need to use [ and ] instead.
49188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49189  if test "x$has_forbidden_chars" != x; then
49190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49194      # Going to short mode and back again did indeed matter. Since short mode is
49195      # case insensitive, let's make it lowercase to improve readability.
49196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49197      # Now convert it back to Unix-style (cygpath)
49198      input_path=`$CYGPATH -u "$shortmode_path"`
49199      new_path="$input_path"
49200    fi
49201  fi
49202
49203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49204  if test "x$test_cygdrive_prefix" = x; then
49205    # As a simple fix, exclude /usr/bin since it's not a real path.
49206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49208      # a path prefixed by /cygdrive for fixpath to work.
49209      new_path="$CYGWIN_ROOT_PATH$input_path"
49210    fi
49211  fi
49212
49213
49214  if test "x$path" != "x$new_path"; then
49215    MSVC_DLL="$new_path"
49216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49217$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49218  fi
49219
49220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49221
49222  path="$MSVC_DLL"
49223  has_colon=`$ECHO $path | $GREP ^.:`
49224  new_path="$path"
49225  if test "x$has_colon" = x; then
49226    # Not in mixed or Windows style, start by that.
49227    new_path=`cmd //c echo $path`
49228  fi
49229
49230
49231  input_path="$new_path"
49232  # Check if we need to convert this using DOS-style short mode. If the path
49233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49234  # take no chances and rewrite it.
49235  # Note: m4 eats our [], so we need to use [ and ] instead.
49236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49237  if test "x$has_forbidden_chars" != x; then
49238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49240  fi
49241
49242
49243  windows_path="$new_path"
49244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49245    unix_path=`$CYGPATH -u "$windows_path"`
49246    new_path="$unix_path"
49247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49249    new_path="$unix_path"
49250  fi
49251
49252  if test "x$path" != "x$new_path"; then
49253    MSVC_DLL="$new_path"
49254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49255$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49256  fi
49257
49258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49260
49261    else
49262      # We're on a unix platform. Hooray! :)
49263      path="$MSVC_DLL"
49264      has_space=`$ECHO "$path" | $GREP " "`
49265      if test "x$has_space" != x; then
49266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49267$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49269      fi
49270
49271      # Use eval to expand a potential ~
49272      eval path="$path"
49273      if test ! -f "$path" && test ! -d "$path"; then
49274        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49275      fi
49276
49277      if test -d "$path"; then
49278        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49279      else
49280        dir="`$DIRNAME "$path"`"
49281        base="`$BASENAME "$path"`"
49282        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49283      fi
49284    fi
49285  fi
49286
49287      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49288$as_echo_n "checking for $DLL_NAME... " >&6; }
49289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49290$as_echo "$MSVC_DLL" >&6; }
49291    else
49292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49293$as_echo "incorrect, ignoring" >&6; }
49294      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49295$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49296    fi
49297  fi
49298
49299    fi
49300  fi
49301
49302  if test "x$MSVC_DLL" = x; then
49303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49304$as_echo_n "checking for $DLL_NAME... " >&6; }
49305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49306$as_echo "no" >&6; }
49307    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49308  fi
49309
49310    MSVCR_DLL="$MSVC_DLL"
49311  fi
49312
49313
49314
49315# Check whether --with-msvcp-dll was given.
49316if test "${with_msvcp_dll+set}" = set; then :
49317  withval=$with_msvcp_dll;
49318fi
49319
49320
49321  if test "x$MSVCP_NAME" != "x"; then
49322    if test "x$with_msvcp_dll" != x; then
49323      # If given explicitely by user, do not probe. If not present, fail directly.
49324
49325  DLL_NAME="$MSVCP_NAME"
49326  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49327  METHOD="--with-msvcp-dll"
49328  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49329    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49330$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49331
49332    # Need to check if the found msvcr is correct architecture
49333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49334$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49335    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49337      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49338      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49339      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49340        CORRECT_MSVCR_ARCH="PE32 executable"
49341      else
49342        CORRECT_MSVCR_ARCH="PE32+ executable"
49343      fi
49344    else
49345      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49346        CORRECT_MSVCR_ARCH=386
49347      else
49348        CORRECT_MSVCR_ARCH=x86-64
49349      fi
49350    fi
49351    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49353$as_echo "ok" >&6; }
49354      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49355
49356  # Only process if variable expands to non-empty
49357
49358  if test "x$MSVC_DLL" != x; then
49359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49360
49361  # Input might be given as Windows format, start by converting to
49362  # unix format.
49363  path="$MSVC_DLL"
49364  new_path=`$CYGPATH -u "$path"`
49365
49366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49369  # "foo.exe" is OK but "foo" is an error.
49370  #
49371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49372  # It is also a way to make sure we got the proper file name for the real test later on.
49373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49374  if test "x$test_shortpath" = x; then
49375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49376$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49377    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49378  fi
49379
49380  # Call helper function which possibly converts this using DOS-style short mode.
49381  # If so, the updated path is stored in $new_path.
49382
49383  input_path="$new_path"
49384  # Check if we need to convert this using DOS-style short mode. If the path
49385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49386  # take no chances and rewrite it.
49387  # Note: m4 eats our [], so we need to use [ and ] instead.
49388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49389  if test "x$has_forbidden_chars" != x; then
49390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49394      # Going to short mode and back again did indeed matter. Since short mode is
49395      # case insensitive, let's make it lowercase to improve readability.
49396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49397      # Now convert it back to Unix-style (cygpath)
49398      input_path=`$CYGPATH -u "$shortmode_path"`
49399      new_path="$input_path"
49400    fi
49401  fi
49402
49403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49404  if test "x$test_cygdrive_prefix" = x; then
49405    # As a simple fix, exclude /usr/bin since it's not a real path.
49406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49408      # a path prefixed by /cygdrive for fixpath to work.
49409      new_path="$CYGWIN_ROOT_PATH$input_path"
49410    fi
49411  fi
49412
49413
49414  if test "x$path" != "x$new_path"; then
49415    MSVC_DLL="$new_path"
49416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49417$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49418  fi
49419
49420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49421
49422  path="$MSVC_DLL"
49423  has_colon=`$ECHO $path | $GREP ^.:`
49424  new_path="$path"
49425  if test "x$has_colon" = x; then
49426    # Not in mixed or Windows style, start by that.
49427    new_path=`cmd //c echo $path`
49428  fi
49429
49430
49431  input_path="$new_path"
49432  # Check if we need to convert this using DOS-style short mode. If the path
49433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49434  # take no chances and rewrite it.
49435  # Note: m4 eats our [], so we need to use [ and ] instead.
49436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49437  if test "x$has_forbidden_chars" != x; then
49438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49440  fi
49441
49442
49443  windows_path="$new_path"
49444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49445    unix_path=`$CYGPATH -u "$windows_path"`
49446    new_path="$unix_path"
49447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49449    new_path="$unix_path"
49450  fi
49451
49452  if test "x$path" != "x$new_path"; then
49453    MSVC_DLL="$new_path"
49454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49455$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49456  fi
49457
49458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49460
49461    else
49462      # We're on a unix platform. Hooray! :)
49463      path="$MSVC_DLL"
49464      has_space=`$ECHO "$path" | $GREP " "`
49465      if test "x$has_space" != x; then
49466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49467$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49469      fi
49470
49471      # Use eval to expand a potential ~
49472      eval path="$path"
49473      if test ! -f "$path" && test ! -d "$path"; then
49474        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49475      fi
49476
49477      if test -d "$path"; then
49478        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49479      else
49480        dir="`$DIRNAME "$path"`"
49481        base="`$BASENAME "$path"`"
49482        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49483      fi
49484    fi
49485  fi
49486
49487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49488$as_echo_n "checking for $DLL_NAME... " >&6; }
49489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49490$as_echo "$MSVC_DLL" >&6; }
49491    else
49492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49493$as_echo "incorrect, ignoring" >&6; }
49494      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49495$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49496    fi
49497  fi
49498
49499      if test "x$MSVC_DLL" = x; then
49500        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49501      fi
49502      MSVCP_DLL="$MSVC_DLL"
49503    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49504
49505  DLL_NAME="$MSVCP_NAME"
49506  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49507  METHOD="devkit"
49508  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49509    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49510$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49511
49512    # Need to check if the found msvcr is correct architecture
49513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49514$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49515    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49517      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49518      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49520        CORRECT_MSVCR_ARCH="PE32 executable"
49521      else
49522        CORRECT_MSVCR_ARCH="PE32+ executable"
49523      fi
49524    else
49525      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49526        CORRECT_MSVCR_ARCH=386
49527      else
49528        CORRECT_MSVCR_ARCH=x86-64
49529      fi
49530    fi
49531    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49533$as_echo "ok" >&6; }
49534      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49535
49536  # Only process if variable expands to non-empty
49537
49538  if test "x$MSVC_DLL" != x; then
49539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49540
49541  # Input might be given as Windows format, start by converting to
49542  # unix format.
49543  path="$MSVC_DLL"
49544  new_path=`$CYGPATH -u "$path"`
49545
49546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49549  # "foo.exe" is OK but "foo" is an error.
49550  #
49551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49552  # It is also a way to make sure we got the proper file name for the real test later on.
49553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49554  if test "x$test_shortpath" = x; then
49555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49556$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49557    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49558  fi
49559
49560  # Call helper function which possibly converts this using DOS-style short mode.
49561  # If so, the updated path is stored in $new_path.
49562
49563  input_path="$new_path"
49564  # Check if we need to convert this using DOS-style short mode. If the path
49565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49566  # take no chances and rewrite it.
49567  # Note: m4 eats our [], so we need to use [ and ] instead.
49568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49569  if test "x$has_forbidden_chars" != x; then
49570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49574      # Going to short mode and back again did indeed matter. Since short mode is
49575      # case insensitive, let's make it lowercase to improve readability.
49576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49577      # Now convert it back to Unix-style (cygpath)
49578      input_path=`$CYGPATH -u "$shortmode_path"`
49579      new_path="$input_path"
49580    fi
49581  fi
49582
49583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49584  if test "x$test_cygdrive_prefix" = x; then
49585    # As a simple fix, exclude /usr/bin since it's not a real path.
49586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49588      # a path prefixed by /cygdrive for fixpath to work.
49589      new_path="$CYGWIN_ROOT_PATH$input_path"
49590    fi
49591  fi
49592
49593
49594  if test "x$path" != "x$new_path"; then
49595    MSVC_DLL="$new_path"
49596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49597$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49598  fi
49599
49600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49601
49602  path="$MSVC_DLL"
49603  has_colon=`$ECHO $path | $GREP ^.:`
49604  new_path="$path"
49605  if test "x$has_colon" = x; then
49606    # Not in mixed or Windows style, start by that.
49607    new_path=`cmd //c echo $path`
49608  fi
49609
49610
49611  input_path="$new_path"
49612  # Check if we need to convert this using DOS-style short mode. If the path
49613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49614  # take no chances and rewrite it.
49615  # Note: m4 eats our [], so we need to use [ and ] instead.
49616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49617  if test "x$has_forbidden_chars" != x; then
49618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49620  fi
49621
49622
49623  windows_path="$new_path"
49624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49625    unix_path=`$CYGPATH -u "$windows_path"`
49626    new_path="$unix_path"
49627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49629    new_path="$unix_path"
49630  fi
49631
49632  if test "x$path" != "x$new_path"; then
49633    MSVC_DLL="$new_path"
49634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49635$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49636  fi
49637
49638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49640
49641    else
49642      # We're on a unix platform. Hooray! :)
49643      path="$MSVC_DLL"
49644      has_space=`$ECHO "$path" | $GREP " "`
49645      if test "x$has_space" != x; then
49646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49647$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49649      fi
49650
49651      # Use eval to expand a potential ~
49652      eval path="$path"
49653      if test ! -f "$path" && test ! -d "$path"; then
49654        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49655      fi
49656
49657      if test -d "$path"; then
49658        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49659      else
49660        dir="`$DIRNAME "$path"`"
49661        base="`$BASENAME "$path"`"
49662        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49663      fi
49664    fi
49665  fi
49666
49667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49668$as_echo_n "checking for $DLL_NAME... " >&6; }
49669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49670$as_echo "$MSVC_DLL" >&6; }
49671    else
49672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49673$as_echo "incorrect, ignoring" >&6; }
49674      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49675$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49676    fi
49677  fi
49678
49679      if test "x$MSVC_DLL" = x; then
49680        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49681      fi
49682      MSVCP_DLL="$MSVC_DLL"
49683    else
49684
49685  DLL_NAME="${MSVCP_NAME}"
49686  MSVC_DLL=
49687
49688  if test "x$MSVC_DLL" = x; then
49689    # Probe: Using well-known location from Visual Studio 10.0
49690    if test "x$VCINSTALLDIR" != x; then
49691      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49692
49693  windows_path="$CYGWIN_VC_INSTALL_DIR"
49694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49695    unix_path=`$CYGPATH -u "$windows_path"`
49696    CYGWIN_VC_INSTALL_DIR="$unix_path"
49697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49699    CYGWIN_VC_INSTALL_DIR="$unix_path"
49700  fi
49701
49702      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49703        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49704      else
49705        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49706      fi
49707      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49708
49709  DLL_NAME="$DLL_NAME"
49710  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49711  METHOD="well-known location in VCINSTALLDIR"
49712  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49713    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49714$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49715
49716    # Need to check if the found msvcr is correct architecture
49717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49718$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49719    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49721      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49722      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49723      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49724        CORRECT_MSVCR_ARCH="PE32 executable"
49725      else
49726        CORRECT_MSVCR_ARCH="PE32+ executable"
49727      fi
49728    else
49729      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49730        CORRECT_MSVCR_ARCH=386
49731      else
49732        CORRECT_MSVCR_ARCH=x86-64
49733      fi
49734    fi
49735    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49737$as_echo "ok" >&6; }
49738      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49739
49740  # Only process if variable expands to non-empty
49741
49742  if test "x$MSVC_DLL" != x; then
49743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49744
49745  # Input might be given as Windows format, start by converting to
49746  # unix format.
49747  path="$MSVC_DLL"
49748  new_path=`$CYGPATH -u "$path"`
49749
49750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49753  # "foo.exe" is OK but "foo" is an error.
49754  #
49755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49756  # It is also a way to make sure we got the proper file name for the real test later on.
49757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49758  if test "x$test_shortpath" = x; then
49759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49760$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49761    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49762  fi
49763
49764  # Call helper function which possibly converts this using DOS-style short mode.
49765  # If so, the updated path is stored in $new_path.
49766
49767  input_path="$new_path"
49768  # Check if we need to convert this using DOS-style short mode. If the path
49769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49770  # take no chances and rewrite it.
49771  # Note: m4 eats our [], so we need to use [ and ] instead.
49772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49773  if test "x$has_forbidden_chars" != x; then
49774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49778      # Going to short mode and back again did indeed matter. Since short mode is
49779      # case insensitive, let's make it lowercase to improve readability.
49780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49781      # Now convert it back to Unix-style (cygpath)
49782      input_path=`$CYGPATH -u "$shortmode_path"`
49783      new_path="$input_path"
49784    fi
49785  fi
49786
49787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49788  if test "x$test_cygdrive_prefix" = x; then
49789    # As a simple fix, exclude /usr/bin since it's not a real path.
49790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49792      # a path prefixed by /cygdrive for fixpath to work.
49793      new_path="$CYGWIN_ROOT_PATH$input_path"
49794    fi
49795  fi
49796
49797
49798  if test "x$path" != "x$new_path"; then
49799    MSVC_DLL="$new_path"
49800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49801$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49802  fi
49803
49804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49805
49806  path="$MSVC_DLL"
49807  has_colon=`$ECHO $path | $GREP ^.:`
49808  new_path="$path"
49809  if test "x$has_colon" = x; then
49810    # Not in mixed or Windows style, start by that.
49811    new_path=`cmd //c echo $path`
49812  fi
49813
49814
49815  input_path="$new_path"
49816  # Check if we need to convert this using DOS-style short mode. If the path
49817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49818  # take no chances and rewrite it.
49819  # Note: m4 eats our [], so we need to use [ and ] instead.
49820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49821  if test "x$has_forbidden_chars" != x; then
49822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49824  fi
49825
49826
49827  windows_path="$new_path"
49828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49829    unix_path=`$CYGPATH -u "$windows_path"`
49830    new_path="$unix_path"
49831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49833    new_path="$unix_path"
49834  fi
49835
49836  if test "x$path" != "x$new_path"; then
49837    MSVC_DLL="$new_path"
49838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49839$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49840  fi
49841
49842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49844
49845    else
49846      # We're on a unix platform. Hooray! :)
49847      path="$MSVC_DLL"
49848      has_space=`$ECHO "$path" | $GREP " "`
49849      if test "x$has_space" != x; then
49850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49851$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49853      fi
49854
49855      # Use eval to expand a potential ~
49856      eval path="$path"
49857      if test ! -f "$path" && test ! -d "$path"; then
49858        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49859      fi
49860
49861      if test -d "$path"; then
49862        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49863      else
49864        dir="`$DIRNAME "$path"`"
49865        base="`$BASENAME "$path"`"
49866        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49867      fi
49868    fi
49869  fi
49870
49871      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49872$as_echo_n "checking for $DLL_NAME... " >&6; }
49873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49874$as_echo "$MSVC_DLL" >&6; }
49875    else
49876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49877$as_echo "incorrect, ignoring" >&6; }
49878      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49879$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49880    fi
49881  fi
49882
49883    fi
49884  fi
49885
49886  if test "x$MSVC_DLL" = x; then
49887    # Probe: Check in the Boot JDK directory.
49888    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49889
49890  DLL_NAME="$DLL_NAME"
49891  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49892  METHOD="well-known location in Boot JDK"
49893  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49895$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49896
49897    # Need to check if the found msvcr is correct architecture
49898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49899$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49900    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49902      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49903      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49904      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49905        CORRECT_MSVCR_ARCH="PE32 executable"
49906      else
49907        CORRECT_MSVCR_ARCH="PE32+ executable"
49908      fi
49909    else
49910      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49911        CORRECT_MSVCR_ARCH=386
49912      else
49913        CORRECT_MSVCR_ARCH=x86-64
49914      fi
49915    fi
49916    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49918$as_echo "ok" >&6; }
49919      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49920
49921  # Only process if variable expands to non-empty
49922
49923  if test "x$MSVC_DLL" != x; then
49924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49925
49926  # Input might be given as Windows format, start by converting to
49927  # unix format.
49928  path="$MSVC_DLL"
49929  new_path=`$CYGPATH -u "$path"`
49930
49931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49934  # "foo.exe" is OK but "foo" is an error.
49935  #
49936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49937  # It is also a way to make sure we got the proper file name for the real test later on.
49938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49939  if test "x$test_shortpath" = x; then
49940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49941$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49942    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49943  fi
49944
49945  # Call helper function which possibly converts this using DOS-style short mode.
49946  # If so, the updated path is stored in $new_path.
49947
49948  input_path="$new_path"
49949  # Check if we need to convert this using DOS-style short mode. If the path
49950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49951  # take no chances and rewrite it.
49952  # Note: m4 eats our [], so we need to use [ and ] instead.
49953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49954  if test "x$has_forbidden_chars" != x; then
49955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49959      # Going to short mode and back again did indeed matter. Since short mode is
49960      # case insensitive, let's make it lowercase to improve readability.
49961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49962      # Now convert it back to Unix-style (cygpath)
49963      input_path=`$CYGPATH -u "$shortmode_path"`
49964      new_path="$input_path"
49965    fi
49966  fi
49967
49968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49969  if test "x$test_cygdrive_prefix" = x; then
49970    # As a simple fix, exclude /usr/bin since it's not a real path.
49971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49973      # a path prefixed by /cygdrive for fixpath to work.
49974      new_path="$CYGWIN_ROOT_PATH$input_path"
49975    fi
49976  fi
49977
49978
49979  if test "x$path" != "x$new_path"; then
49980    MSVC_DLL="$new_path"
49981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49982$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49983  fi
49984
49985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49986
49987  path="$MSVC_DLL"
49988  has_colon=`$ECHO $path | $GREP ^.:`
49989  new_path="$path"
49990  if test "x$has_colon" = x; then
49991    # Not in mixed or Windows style, start by that.
49992    new_path=`cmd //c echo $path`
49993  fi
49994
49995
49996  input_path="$new_path"
49997  # Check if we need to convert this using DOS-style short mode. If the path
49998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49999  # take no chances and rewrite it.
50000  # Note: m4 eats our [], so we need to use [ and ] instead.
50001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50002  if test "x$has_forbidden_chars" != x; then
50003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50005  fi
50006
50007
50008  windows_path="$new_path"
50009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50010    unix_path=`$CYGPATH -u "$windows_path"`
50011    new_path="$unix_path"
50012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50014    new_path="$unix_path"
50015  fi
50016
50017  if test "x$path" != "x$new_path"; then
50018    MSVC_DLL="$new_path"
50019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50020$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50021  fi
50022
50023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50025
50026    else
50027      # We're on a unix platform. Hooray! :)
50028      path="$MSVC_DLL"
50029      has_space=`$ECHO "$path" | $GREP " "`
50030      if test "x$has_space" != x; then
50031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50032$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50034      fi
50035
50036      # Use eval to expand a potential ~
50037      eval path="$path"
50038      if test ! -f "$path" && test ! -d "$path"; then
50039        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50040      fi
50041
50042      if test -d "$path"; then
50043        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50044      else
50045        dir="`$DIRNAME "$path"`"
50046        base="`$BASENAME "$path"`"
50047        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50048      fi
50049    fi
50050  fi
50051
50052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50053$as_echo_n "checking for $DLL_NAME... " >&6; }
50054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50055$as_echo "$MSVC_DLL" >&6; }
50056    else
50057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50058$as_echo "incorrect, ignoring" >&6; }
50059      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50060$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50061    fi
50062  fi
50063
50064  fi
50065
50066  if test "x$MSVC_DLL" = x; then
50067    # Probe: Look in the Windows system32 directory
50068    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50069
50070  windows_path="$CYGWIN_SYSTEMROOT"
50071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50072    unix_path=`$CYGPATH -u "$windows_path"`
50073    CYGWIN_SYSTEMROOT="$unix_path"
50074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50076    CYGWIN_SYSTEMROOT="$unix_path"
50077  fi
50078
50079    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50080
50081  DLL_NAME="$DLL_NAME"
50082  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50083  METHOD="well-known location in SYSTEMROOT"
50084  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50085    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50086$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50087
50088    # Need to check if the found msvcr is correct architecture
50089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50090$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50091    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50093      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50094      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50095      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50096        CORRECT_MSVCR_ARCH="PE32 executable"
50097      else
50098        CORRECT_MSVCR_ARCH="PE32+ executable"
50099      fi
50100    else
50101      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50102        CORRECT_MSVCR_ARCH=386
50103      else
50104        CORRECT_MSVCR_ARCH=x86-64
50105      fi
50106    fi
50107    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50109$as_echo "ok" >&6; }
50110      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50111
50112  # Only process if variable expands to non-empty
50113
50114  if test "x$MSVC_DLL" != x; then
50115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50116
50117  # Input might be given as Windows format, start by converting to
50118  # unix format.
50119  path="$MSVC_DLL"
50120  new_path=`$CYGPATH -u "$path"`
50121
50122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50125  # "foo.exe" is OK but "foo" is an error.
50126  #
50127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50128  # It is also a way to make sure we got the proper file name for the real test later on.
50129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50130  if test "x$test_shortpath" = x; then
50131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50132$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50133    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50134  fi
50135
50136  # Call helper function which possibly converts this using DOS-style short mode.
50137  # If so, the updated path is stored in $new_path.
50138
50139  input_path="$new_path"
50140  # Check if we need to convert this using DOS-style short mode. If the path
50141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50142  # take no chances and rewrite it.
50143  # Note: m4 eats our [], so we need to use [ and ] instead.
50144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50145  if test "x$has_forbidden_chars" != x; then
50146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50150      # Going to short mode and back again did indeed matter. Since short mode is
50151      # case insensitive, let's make it lowercase to improve readability.
50152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50153      # Now convert it back to Unix-style (cygpath)
50154      input_path=`$CYGPATH -u "$shortmode_path"`
50155      new_path="$input_path"
50156    fi
50157  fi
50158
50159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50160  if test "x$test_cygdrive_prefix" = x; then
50161    # As a simple fix, exclude /usr/bin since it's not a real path.
50162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50164      # a path prefixed by /cygdrive for fixpath to work.
50165      new_path="$CYGWIN_ROOT_PATH$input_path"
50166    fi
50167  fi
50168
50169
50170  if test "x$path" != "x$new_path"; then
50171    MSVC_DLL="$new_path"
50172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50173$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50174  fi
50175
50176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50177
50178  path="$MSVC_DLL"
50179  has_colon=`$ECHO $path | $GREP ^.:`
50180  new_path="$path"
50181  if test "x$has_colon" = x; then
50182    # Not in mixed or Windows style, start by that.
50183    new_path=`cmd //c echo $path`
50184  fi
50185
50186
50187  input_path="$new_path"
50188  # Check if we need to convert this using DOS-style short mode. If the path
50189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50190  # take no chances and rewrite it.
50191  # Note: m4 eats our [], so we need to use [ and ] instead.
50192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50193  if test "x$has_forbidden_chars" != x; then
50194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50196  fi
50197
50198
50199  windows_path="$new_path"
50200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50201    unix_path=`$CYGPATH -u "$windows_path"`
50202    new_path="$unix_path"
50203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50205    new_path="$unix_path"
50206  fi
50207
50208  if test "x$path" != "x$new_path"; then
50209    MSVC_DLL="$new_path"
50210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50211$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50212  fi
50213
50214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50216
50217    else
50218      # We're on a unix platform. Hooray! :)
50219      path="$MSVC_DLL"
50220      has_space=`$ECHO "$path" | $GREP " "`
50221      if test "x$has_space" != x; then
50222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50223$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50225      fi
50226
50227      # Use eval to expand a potential ~
50228      eval path="$path"
50229      if test ! -f "$path" && test ! -d "$path"; then
50230        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50231      fi
50232
50233      if test -d "$path"; then
50234        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50235      else
50236        dir="`$DIRNAME "$path"`"
50237        base="`$BASENAME "$path"`"
50238        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50239      fi
50240    fi
50241  fi
50242
50243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50244$as_echo_n "checking for $DLL_NAME... " >&6; }
50245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50246$as_echo "$MSVC_DLL" >&6; }
50247    else
50248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50249$as_echo "incorrect, ignoring" >&6; }
50250      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50251$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50252    fi
50253  fi
50254
50255  fi
50256
50257  if test "x$MSVC_DLL" = x; then
50258    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50259    if test "x$VS100COMNTOOLS" != x; then
50260      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50261
50262  windows_path="$CYGWIN_VS_TOOLS_DIR"
50263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50264    unix_path=`$CYGPATH -u "$windows_path"`
50265    CYGWIN_VS_TOOLS_DIR="$unix_path"
50266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50268    CYGWIN_VS_TOOLS_DIR="$unix_path"
50269  fi
50270
50271      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50272        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50273	    | $GREP -i /x64/ | $HEAD --lines 1`
50274      else
50275        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50276	    | $GREP -i /x86/ | $HEAD --lines 1`
50277      fi
50278
50279  DLL_NAME="$DLL_NAME"
50280  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50281  METHOD="search of VS100COMNTOOLS"
50282  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50283    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50284$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50285
50286    # Need to check if the found msvcr is correct architecture
50287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50288$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50289    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50291      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50292      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50293      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50294        CORRECT_MSVCR_ARCH="PE32 executable"
50295      else
50296        CORRECT_MSVCR_ARCH="PE32+ executable"
50297      fi
50298    else
50299      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50300        CORRECT_MSVCR_ARCH=386
50301      else
50302        CORRECT_MSVCR_ARCH=x86-64
50303      fi
50304    fi
50305    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50307$as_echo "ok" >&6; }
50308      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50309
50310  # Only process if variable expands to non-empty
50311
50312  if test "x$MSVC_DLL" != x; then
50313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50314
50315  # Input might be given as Windows format, start by converting to
50316  # unix format.
50317  path="$MSVC_DLL"
50318  new_path=`$CYGPATH -u "$path"`
50319
50320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50323  # "foo.exe" is OK but "foo" is an error.
50324  #
50325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50326  # It is also a way to make sure we got the proper file name for the real test later on.
50327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50328  if test "x$test_shortpath" = x; then
50329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50330$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50331    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50332  fi
50333
50334  # Call helper function which possibly converts this using DOS-style short mode.
50335  # If so, the updated path is stored in $new_path.
50336
50337  input_path="$new_path"
50338  # Check if we need to convert this using DOS-style short mode. If the path
50339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50340  # take no chances and rewrite it.
50341  # Note: m4 eats our [], so we need to use [ and ] instead.
50342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50343  if test "x$has_forbidden_chars" != x; then
50344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50348      # Going to short mode and back again did indeed matter. Since short mode is
50349      # case insensitive, let's make it lowercase to improve readability.
50350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50351      # Now convert it back to Unix-style (cygpath)
50352      input_path=`$CYGPATH -u "$shortmode_path"`
50353      new_path="$input_path"
50354    fi
50355  fi
50356
50357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50358  if test "x$test_cygdrive_prefix" = x; then
50359    # As a simple fix, exclude /usr/bin since it's not a real path.
50360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50362      # a path prefixed by /cygdrive for fixpath to work.
50363      new_path="$CYGWIN_ROOT_PATH$input_path"
50364    fi
50365  fi
50366
50367
50368  if test "x$path" != "x$new_path"; then
50369    MSVC_DLL="$new_path"
50370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50372  fi
50373
50374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50375
50376  path="$MSVC_DLL"
50377  has_colon=`$ECHO $path | $GREP ^.:`
50378  new_path="$path"
50379  if test "x$has_colon" = x; then
50380    # Not in mixed or Windows style, start by that.
50381    new_path=`cmd //c echo $path`
50382  fi
50383
50384
50385  input_path="$new_path"
50386  # Check if we need to convert this using DOS-style short mode. If the path
50387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50388  # take no chances and rewrite it.
50389  # Note: m4 eats our [], so we need to use [ and ] instead.
50390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50391  if test "x$has_forbidden_chars" != x; then
50392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50394  fi
50395
50396
50397  windows_path="$new_path"
50398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50399    unix_path=`$CYGPATH -u "$windows_path"`
50400    new_path="$unix_path"
50401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50403    new_path="$unix_path"
50404  fi
50405
50406  if test "x$path" != "x$new_path"; then
50407    MSVC_DLL="$new_path"
50408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50409$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50410  fi
50411
50412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50414
50415    else
50416      # We're on a unix platform. Hooray! :)
50417      path="$MSVC_DLL"
50418      has_space=`$ECHO "$path" | $GREP " "`
50419      if test "x$has_space" != x; then
50420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50421$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50423      fi
50424
50425      # Use eval to expand a potential ~
50426      eval path="$path"
50427      if test ! -f "$path" && test ! -d "$path"; then
50428        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50429      fi
50430
50431      if test -d "$path"; then
50432        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50433      else
50434        dir="`$DIRNAME "$path"`"
50435        base="`$BASENAME "$path"`"
50436        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50437      fi
50438    fi
50439  fi
50440
50441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50442$as_echo_n "checking for $DLL_NAME... " >&6; }
50443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50444$as_echo "$MSVC_DLL" >&6; }
50445    else
50446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50447$as_echo "incorrect, ignoring" >&6; }
50448      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50449$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50450    fi
50451  fi
50452
50453    fi
50454  fi
50455
50456  if test "x$MSVC_DLL" = x; then
50457    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50458    # (This was the original behaviour; kept since it might turn something up)
50459    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50460      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50461        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50462	    | $GREP x64 | $HEAD --lines 1`
50463      else
50464        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50465	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50466        if test "x$POSSIBLE_MSVC_DLL" = x; then
50467          # We're grasping at straws now...
50468          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50469	      | $HEAD --lines 1`
50470        fi
50471      fi
50472
50473
50474  DLL_NAME="$DLL_NAME"
50475  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50476  METHOD="search of VCINSTALLDIR"
50477  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50478    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50479$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50480
50481    # Need to check if the found msvcr is correct architecture
50482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50483$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50484    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50486      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50487      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50488      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50489        CORRECT_MSVCR_ARCH="PE32 executable"
50490      else
50491        CORRECT_MSVCR_ARCH="PE32+ executable"
50492      fi
50493    else
50494      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50495        CORRECT_MSVCR_ARCH=386
50496      else
50497        CORRECT_MSVCR_ARCH=x86-64
50498      fi
50499    fi
50500    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50502$as_echo "ok" >&6; }
50503      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50504
50505  # Only process if variable expands to non-empty
50506
50507  if test "x$MSVC_DLL" != x; then
50508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50509
50510  # Input might be given as Windows format, start by converting to
50511  # unix format.
50512  path="$MSVC_DLL"
50513  new_path=`$CYGPATH -u "$path"`
50514
50515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50518  # "foo.exe" is OK but "foo" is an error.
50519  #
50520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50521  # It is also a way to make sure we got the proper file name for the real test later on.
50522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50523  if test "x$test_shortpath" = x; then
50524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50525$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50526    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50527  fi
50528
50529  # Call helper function which possibly converts this using DOS-style short mode.
50530  # If so, the updated path is stored in $new_path.
50531
50532  input_path="$new_path"
50533  # Check if we need to convert this using DOS-style short mode. If the path
50534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50535  # take no chances and rewrite it.
50536  # Note: m4 eats our [], so we need to use [ and ] instead.
50537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50538  if test "x$has_forbidden_chars" != x; then
50539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50543      # Going to short mode and back again did indeed matter. Since short mode is
50544      # case insensitive, let's make it lowercase to improve readability.
50545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50546      # Now convert it back to Unix-style (cygpath)
50547      input_path=`$CYGPATH -u "$shortmode_path"`
50548      new_path="$input_path"
50549    fi
50550  fi
50551
50552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50553  if test "x$test_cygdrive_prefix" = x; then
50554    # As a simple fix, exclude /usr/bin since it's not a real path.
50555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50557      # a path prefixed by /cygdrive for fixpath to work.
50558      new_path="$CYGWIN_ROOT_PATH$input_path"
50559    fi
50560  fi
50561
50562
50563  if test "x$path" != "x$new_path"; then
50564    MSVC_DLL="$new_path"
50565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50567  fi
50568
50569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50570
50571  path="$MSVC_DLL"
50572  has_colon=`$ECHO $path | $GREP ^.:`
50573  new_path="$path"
50574  if test "x$has_colon" = x; then
50575    # Not in mixed or Windows style, start by that.
50576    new_path=`cmd //c echo $path`
50577  fi
50578
50579
50580  input_path="$new_path"
50581  # Check if we need to convert this using DOS-style short mode. If the path
50582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50583  # take no chances and rewrite it.
50584  # Note: m4 eats our [], so we need to use [ and ] instead.
50585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50586  if test "x$has_forbidden_chars" != x; then
50587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50589  fi
50590
50591
50592  windows_path="$new_path"
50593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50594    unix_path=`$CYGPATH -u "$windows_path"`
50595    new_path="$unix_path"
50596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50598    new_path="$unix_path"
50599  fi
50600
50601  if test "x$path" != "x$new_path"; then
50602    MSVC_DLL="$new_path"
50603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50604$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50605  fi
50606
50607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50609
50610    else
50611      # We're on a unix platform. Hooray! :)
50612      path="$MSVC_DLL"
50613      has_space=`$ECHO "$path" | $GREP " "`
50614      if test "x$has_space" != x; then
50615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50616$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50618      fi
50619
50620      # Use eval to expand a potential ~
50621      eval path="$path"
50622      if test ! -f "$path" && test ! -d "$path"; then
50623        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50624      fi
50625
50626      if test -d "$path"; then
50627        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50628      else
50629        dir="`$DIRNAME "$path"`"
50630        base="`$BASENAME "$path"`"
50631        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50632      fi
50633    fi
50634  fi
50635
50636      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50637$as_echo_n "checking for $DLL_NAME... " >&6; }
50638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50639$as_echo "$MSVC_DLL" >&6; }
50640    else
50641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50642$as_echo "incorrect, ignoring" >&6; }
50643      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50644$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50645    fi
50646  fi
50647
50648    fi
50649  fi
50650
50651  if test "x$MSVC_DLL" = x; then
50652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50653$as_echo_n "checking for $DLL_NAME... " >&6; }
50654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50655$as_echo "no" >&6; }
50656    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50657  fi
50658
50659      MSVCP_DLL="$MSVC_DLL"
50660    fi
50661
50662  fi
50663
50664  fi
50665
50666
50667  if test "x$NEEDS_LIB_X11" = xfalse; then
50668    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50669      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50670$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50671    fi
50672    X_CFLAGS=
50673    X_LIBS=
50674  else
50675
50676    if test "x${with_x}" = xno; then
50677      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50678    fi
50679
50680    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50681      # The user has specified a X11 base directory. Use it for includes and
50682      # libraries, unless explicitely overridden.
50683      if test "x$x_includes" = xNONE; then
50684        x_includes="${with_x}/include"
50685      fi
50686      if test "x$x_libraries" = xNONE; then
50687        x_libraries="${with_x}/lib"
50688      fi
50689    else
50690      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50691      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50692      # --x-libraries for the sysroot, if that seems to be correct.
50693      if test "x$SYSROOT" != "x"; then
50694        if test "x$x_includes" = xNONE; then
50695          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50696            x_includes="$SYSROOT/usr/X11R6/include"
50697          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50698            x_includes="$SYSROOT/usr/include"
50699          fi
50700        fi
50701        if test "x$x_libraries" = xNONE; then
50702          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50703            x_libraries="$SYSROOT/usr/X11R6/lib"
50704          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50705            x_libraries="$SYSROOT/usr/lib64"
50706          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50707            x_libraries="$SYSROOT/usr/lib"
50708          fi
50709        fi
50710      fi
50711    fi
50712
50713    # Now let autoconf do it's magic
50714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50715$as_echo_n "checking for X... " >&6; }
50716
50717
50718# Check whether --with-x was given.
50719if test "${with_x+set}" = set; then :
50720  withval=$with_x;
50721fi
50722
50723# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50724if test "x$with_x" = xno; then
50725  # The user explicitly disabled X.
50726  have_x=disabled
50727else
50728  case $x_includes,$x_libraries in #(
50729    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50730    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50731  $as_echo_n "(cached) " >&6
50732else
50733  # One or both of the vars are not set, and there is no cached value.
50734ac_x_includes=no ac_x_libraries=no
50735rm -f -r conftest.dir
50736if mkdir conftest.dir; then
50737  cd conftest.dir
50738  cat >Imakefile <<'_ACEOF'
50739incroot:
50740	@echo incroot='${INCROOT}'
50741usrlibdir:
50742	@echo usrlibdir='${USRLIBDIR}'
50743libdir:
50744	@echo libdir='${LIBDIR}'
50745_ACEOF
50746  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50747    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50748    for ac_var in incroot usrlibdir libdir; do
50749      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50750    done
50751    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50752    for ac_extension in a so sl dylib la dll; do
50753      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50754	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50755	ac_im_usrlibdir=$ac_im_libdir; break
50756      fi
50757    done
50758    # Screen out bogus values from the imake configuration.  They are
50759    # bogus both because they are the default anyway, and because
50760    # using them would break gcc on systems where it needs fixed includes.
50761    case $ac_im_incroot in
50762	/usr/include) ac_x_includes= ;;
50763	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50764    esac
50765    case $ac_im_usrlibdir in
50766	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50767	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50768    esac
50769  fi
50770  cd ..
50771  rm -f -r conftest.dir
50772fi
50773
50774# Standard set of common directories for X headers.
50775# Check X11 before X11Rn because it is often a symlink to the current release.
50776ac_x_header_dirs='
50777/usr/X11/include
50778/usr/X11R7/include
50779/usr/X11R6/include
50780/usr/X11R5/include
50781/usr/X11R4/include
50782
50783/usr/include/X11
50784/usr/include/X11R7
50785/usr/include/X11R6
50786/usr/include/X11R5
50787/usr/include/X11R4
50788
50789/usr/local/X11/include
50790/usr/local/X11R7/include
50791/usr/local/X11R6/include
50792/usr/local/X11R5/include
50793/usr/local/X11R4/include
50794
50795/usr/local/include/X11
50796/usr/local/include/X11R7
50797/usr/local/include/X11R6
50798/usr/local/include/X11R5
50799/usr/local/include/X11R4
50800
50801/usr/X386/include
50802/usr/x386/include
50803/usr/XFree86/include/X11
50804
50805/usr/include
50806/usr/local/include
50807/usr/unsupported/include
50808/usr/athena/include
50809/usr/local/x11r5/include
50810/usr/lpp/Xamples/include
50811
50812/usr/openwin/include
50813/usr/openwin/share/include'
50814
50815if test "$ac_x_includes" = no; then
50816  # Guess where to find include files, by looking for Xlib.h.
50817  # First, try using that file with no special directory specified.
50818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50819/* end confdefs.h.  */
50820#include <X11/Xlib.h>
50821_ACEOF
50822if ac_fn_cxx_try_cpp "$LINENO"; then :
50823  # We can compile using X headers with no special include directory.
50824ac_x_includes=
50825else
50826  for ac_dir in $ac_x_header_dirs; do
50827  if test -r "$ac_dir/X11/Xlib.h"; then
50828    ac_x_includes=$ac_dir
50829    break
50830  fi
50831done
50832fi
50833rm -f conftest.err conftest.i conftest.$ac_ext
50834fi # $ac_x_includes = no
50835
50836if test "$ac_x_libraries" = no; then
50837  # Check for the libraries.
50838  # See if we find them without any special options.
50839  # Don't add to $LIBS permanently.
50840  ac_save_LIBS=$LIBS
50841  LIBS="-lX11 $LIBS"
50842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50843/* end confdefs.h.  */
50844#include <X11/Xlib.h>
50845int
50846main ()
50847{
50848XrmInitialize ()
50849  ;
50850  return 0;
50851}
50852_ACEOF
50853if ac_fn_cxx_try_link "$LINENO"; then :
50854  LIBS=$ac_save_LIBS
50855# We can link X programs with no special library path.
50856ac_x_libraries=
50857else
50858  LIBS=$ac_save_LIBS
50859for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50860do
50861  # Don't even attempt the hair of trying to link an X program!
50862  for ac_extension in a so sl dylib la dll; do
50863    if test -r "$ac_dir/libX11.$ac_extension"; then
50864      ac_x_libraries=$ac_dir
50865      break 2
50866    fi
50867  done
50868done
50869fi
50870rm -f core conftest.err conftest.$ac_objext \
50871    conftest$ac_exeext conftest.$ac_ext
50872fi # $ac_x_libraries = no
50873
50874case $ac_x_includes,$ac_x_libraries in #(
50875  no,* | *,no | *\'*)
50876    # Didn't find X, or a directory has "'" in its name.
50877    ac_cv_have_x="have_x=no";; #(
50878  *)
50879    # Record where we found X for the cache.
50880    ac_cv_have_x="have_x=yes\
50881	ac_x_includes='$ac_x_includes'\
50882	ac_x_libraries='$ac_x_libraries'"
50883esac
50884fi
50885;; #(
50886    *) have_x=yes;;
50887  esac
50888  eval "$ac_cv_have_x"
50889fi # $with_x != no
50890
50891if test "$have_x" != yes; then
50892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50893$as_echo "$have_x" >&6; }
50894  no_x=yes
50895else
50896  # If each of the values was on the command line, it overrides each guess.
50897  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50898  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50899  # Update the cache value to reflect the command line values.
50900  ac_cv_have_x="have_x=yes\
50901	ac_x_includes='$x_includes'\
50902	ac_x_libraries='$x_libraries'"
50903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50904$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50905fi
50906
50907    if test "$no_x" = yes; then
50908  # Not all programs may use this symbol, but it does not hurt to define it.
50909
50910$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50911
50912  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50913else
50914  if test -n "$x_includes"; then
50915    X_CFLAGS="$X_CFLAGS -I$x_includes"
50916  fi
50917
50918  # It would also be nice to do this for all -L options, not just this one.
50919  if test -n "$x_libraries"; then
50920    X_LIBS="$X_LIBS -L$x_libraries"
50921    # For Solaris; some versions of Sun CC require a space after -R and
50922    # others require no space.  Words are not sufficient . . . .
50923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50924$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50925    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50926    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50927    ac_cxx_werror_flag=yes
50928    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50929/* end confdefs.h.  */
50930
50931int
50932main ()
50933{
50934
50935  ;
50936  return 0;
50937}
50938_ACEOF
50939if ac_fn_cxx_try_link "$LINENO"; then :
50940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50941$as_echo "no" >&6; }
50942       X_LIBS="$X_LIBS -R$x_libraries"
50943else
50944  LIBS="$ac_xsave_LIBS -R $x_libraries"
50945       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50946/* end confdefs.h.  */
50947
50948int
50949main ()
50950{
50951
50952  ;
50953  return 0;
50954}
50955_ACEOF
50956if ac_fn_cxx_try_link "$LINENO"; then :
50957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50958$as_echo "yes" >&6; }
50959	  X_LIBS="$X_LIBS -R $x_libraries"
50960else
50961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50962$as_echo "neither works" >&6; }
50963fi
50964rm -f core conftest.err conftest.$ac_objext \
50965    conftest$ac_exeext conftest.$ac_ext
50966fi
50967rm -f core conftest.err conftest.$ac_objext \
50968    conftest$ac_exeext conftest.$ac_ext
50969    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50970    LIBS=$ac_xsave_LIBS
50971  fi
50972
50973  # Check for system-dependent libraries X programs must link with.
50974  # Do this before checking for the system-independent R6 libraries
50975  # (-lICE), since we may need -lsocket or whatever for X linking.
50976
50977  if test "$ISC" = yes; then
50978    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50979  else
50980    # Martyn Johnson says this is needed for Ultrix, if the X
50981    # libraries were built with DECnet support.  And Karl Berry says
50982    # the Alpha needs dnet_stub (dnet does not exist).
50983    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50984    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50985/* end confdefs.h.  */
50986
50987/* Override any GCC internal prototype to avoid an error.
50988   Use char because int might match the return type of a GCC
50989   builtin and then its argument prototype would still apply.  */
50990#ifdef __cplusplus
50991extern "C"
50992#endif
50993char XOpenDisplay ();
50994int
50995main ()
50996{
50997return XOpenDisplay ();
50998  ;
50999  return 0;
51000}
51001_ACEOF
51002if ac_fn_cxx_try_link "$LINENO"; then :
51003
51004else
51005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51006$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51007if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51008  $as_echo_n "(cached) " >&6
51009else
51010  ac_check_lib_save_LIBS=$LIBS
51011LIBS="-ldnet  $LIBS"
51012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51013/* end confdefs.h.  */
51014
51015/* Override any GCC internal prototype to avoid an error.
51016   Use char because int might match the return type of a GCC
51017   builtin and then its argument prototype would still apply.  */
51018#ifdef __cplusplus
51019extern "C"
51020#endif
51021char dnet_ntoa ();
51022int
51023main ()
51024{
51025return dnet_ntoa ();
51026  ;
51027  return 0;
51028}
51029_ACEOF
51030if ac_fn_cxx_try_link "$LINENO"; then :
51031  ac_cv_lib_dnet_dnet_ntoa=yes
51032else
51033  ac_cv_lib_dnet_dnet_ntoa=no
51034fi
51035rm -f core conftest.err conftest.$ac_objext \
51036    conftest$ac_exeext conftest.$ac_ext
51037LIBS=$ac_check_lib_save_LIBS
51038fi
51039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51040$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51041if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51042  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51043fi
51044
51045    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51046      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51047$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51048if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51049  $as_echo_n "(cached) " >&6
51050else
51051  ac_check_lib_save_LIBS=$LIBS
51052LIBS="-ldnet_stub  $LIBS"
51053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51054/* end confdefs.h.  */
51055
51056/* Override any GCC internal prototype to avoid an error.
51057   Use char because int might match the return type of a GCC
51058   builtin and then its argument prototype would still apply.  */
51059#ifdef __cplusplus
51060extern "C"
51061#endif
51062char dnet_ntoa ();
51063int
51064main ()
51065{
51066return dnet_ntoa ();
51067  ;
51068  return 0;
51069}
51070_ACEOF
51071if ac_fn_cxx_try_link "$LINENO"; then :
51072  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51073else
51074  ac_cv_lib_dnet_stub_dnet_ntoa=no
51075fi
51076rm -f core conftest.err conftest.$ac_objext \
51077    conftest$ac_exeext conftest.$ac_ext
51078LIBS=$ac_check_lib_save_LIBS
51079fi
51080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51081$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51082if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51083  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51084fi
51085
51086    fi
51087fi
51088rm -f core conftest.err conftest.$ac_objext \
51089    conftest$ac_exeext conftest.$ac_ext
51090    LIBS="$ac_xsave_LIBS"
51091
51092    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51093    # to get the SysV transport functions.
51094    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51095    # needs -lnsl.
51096    # The nsl library prevents programs from opening the X display
51097    # on Irix 5.2, according to T.E. Dickey.
51098    # The functions gethostbyname, getservbyname, and inet_addr are
51099    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51100    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51101if test "x$ac_cv_func_gethostbyname" = xyes; then :
51102
51103fi
51104
51105    if test $ac_cv_func_gethostbyname = no; then
51106      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51107$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51108if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51109  $as_echo_n "(cached) " >&6
51110else
51111  ac_check_lib_save_LIBS=$LIBS
51112LIBS="-lnsl  $LIBS"
51113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51114/* end confdefs.h.  */
51115
51116/* Override any GCC internal prototype to avoid an error.
51117   Use char because int might match the return type of a GCC
51118   builtin and then its argument prototype would still apply.  */
51119#ifdef __cplusplus
51120extern "C"
51121#endif
51122char gethostbyname ();
51123int
51124main ()
51125{
51126return gethostbyname ();
51127  ;
51128  return 0;
51129}
51130_ACEOF
51131if ac_fn_cxx_try_link "$LINENO"; then :
51132  ac_cv_lib_nsl_gethostbyname=yes
51133else
51134  ac_cv_lib_nsl_gethostbyname=no
51135fi
51136rm -f core conftest.err conftest.$ac_objext \
51137    conftest$ac_exeext conftest.$ac_ext
51138LIBS=$ac_check_lib_save_LIBS
51139fi
51140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51141$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51142if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51143  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51144fi
51145
51146      if test $ac_cv_lib_nsl_gethostbyname = no; then
51147	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51148$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51149if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51150  $as_echo_n "(cached) " >&6
51151else
51152  ac_check_lib_save_LIBS=$LIBS
51153LIBS="-lbsd  $LIBS"
51154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51155/* end confdefs.h.  */
51156
51157/* Override any GCC internal prototype to avoid an error.
51158   Use char because int might match the return type of a GCC
51159   builtin and then its argument prototype would still apply.  */
51160#ifdef __cplusplus
51161extern "C"
51162#endif
51163char gethostbyname ();
51164int
51165main ()
51166{
51167return gethostbyname ();
51168  ;
51169  return 0;
51170}
51171_ACEOF
51172if ac_fn_cxx_try_link "$LINENO"; then :
51173  ac_cv_lib_bsd_gethostbyname=yes
51174else
51175  ac_cv_lib_bsd_gethostbyname=no
51176fi
51177rm -f core conftest.err conftest.$ac_objext \
51178    conftest$ac_exeext conftest.$ac_ext
51179LIBS=$ac_check_lib_save_LIBS
51180fi
51181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51182$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51183if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51184  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51185fi
51186
51187      fi
51188    fi
51189
51190    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51191    # socket/setsockopt and other routines are undefined under SCO ODT
51192    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51193    # on later versions), says Simon Leinen: it contains gethostby*
51194    # variants that don't use the name server (or something).  -lsocket
51195    # must be given before -lnsl if both are needed.  We assume that
51196    # if connect needs -lnsl, so does gethostbyname.
51197    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51198if test "x$ac_cv_func_connect" = xyes; then :
51199
51200fi
51201
51202    if test $ac_cv_func_connect = no; then
51203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51204$as_echo_n "checking for connect in -lsocket... " >&6; }
51205if ${ac_cv_lib_socket_connect+:} false; then :
51206  $as_echo_n "(cached) " >&6
51207else
51208  ac_check_lib_save_LIBS=$LIBS
51209LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51211/* end confdefs.h.  */
51212
51213/* Override any GCC internal prototype to avoid an error.
51214   Use char because int might match the return type of a GCC
51215   builtin and then its argument prototype would still apply.  */
51216#ifdef __cplusplus
51217extern "C"
51218#endif
51219char connect ();
51220int
51221main ()
51222{
51223return connect ();
51224  ;
51225  return 0;
51226}
51227_ACEOF
51228if ac_fn_cxx_try_link "$LINENO"; then :
51229  ac_cv_lib_socket_connect=yes
51230else
51231  ac_cv_lib_socket_connect=no
51232fi
51233rm -f core conftest.err conftest.$ac_objext \
51234    conftest$ac_exeext conftest.$ac_ext
51235LIBS=$ac_check_lib_save_LIBS
51236fi
51237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51238$as_echo "$ac_cv_lib_socket_connect" >&6; }
51239if test "x$ac_cv_lib_socket_connect" = xyes; then :
51240  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51241fi
51242
51243    fi
51244
51245    # Guillermo Gomez says -lposix is necessary on A/UX.
51246    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51247if test "x$ac_cv_func_remove" = xyes; then :
51248
51249fi
51250
51251    if test $ac_cv_func_remove = no; then
51252      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51253$as_echo_n "checking for remove in -lposix... " >&6; }
51254if ${ac_cv_lib_posix_remove+:} false; then :
51255  $as_echo_n "(cached) " >&6
51256else
51257  ac_check_lib_save_LIBS=$LIBS
51258LIBS="-lposix  $LIBS"
51259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51260/* end confdefs.h.  */
51261
51262/* Override any GCC internal prototype to avoid an error.
51263   Use char because int might match the return type of a GCC
51264   builtin and then its argument prototype would still apply.  */
51265#ifdef __cplusplus
51266extern "C"
51267#endif
51268char remove ();
51269int
51270main ()
51271{
51272return remove ();
51273  ;
51274  return 0;
51275}
51276_ACEOF
51277if ac_fn_cxx_try_link "$LINENO"; then :
51278  ac_cv_lib_posix_remove=yes
51279else
51280  ac_cv_lib_posix_remove=no
51281fi
51282rm -f core conftest.err conftest.$ac_objext \
51283    conftest$ac_exeext conftest.$ac_ext
51284LIBS=$ac_check_lib_save_LIBS
51285fi
51286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51287$as_echo "$ac_cv_lib_posix_remove" >&6; }
51288if test "x$ac_cv_lib_posix_remove" = xyes; then :
51289  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51290fi
51291
51292    fi
51293
51294    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51295    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51296if test "x$ac_cv_func_shmat" = xyes; then :
51297
51298fi
51299
51300    if test $ac_cv_func_shmat = no; then
51301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51302$as_echo_n "checking for shmat in -lipc... " >&6; }
51303if ${ac_cv_lib_ipc_shmat+:} false; then :
51304  $as_echo_n "(cached) " >&6
51305else
51306  ac_check_lib_save_LIBS=$LIBS
51307LIBS="-lipc  $LIBS"
51308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51309/* end confdefs.h.  */
51310
51311/* Override any GCC internal prototype to avoid an error.
51312   Use char because int might match the return type of a GCC
51313   builtin and then its argument prototype would still apply.  */
51314#ifdef __cplusplus
51315extern "C"
51316#endif
51317char shmat ();
51318int
51319main ()
51320{
51321return shmat ();
51322  ;
51323  return 0;
51324}
51325_ACEOF
51326if ac_fn_cxx_try_link "$LINENO"; then :
51327  ac_cv_lib_ipc_shmat=yes
51328else
51329  ac_cv_lib_ipc_shmat=no
51330fi
51331rm -f core conftest.err conftest.$ac_objext \
51332    conftest$ac_exeext conftest.$ac_ext
51333LIBS=$ac_check_lib_save_LIBS
51334fi
51335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51336$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51337if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51338  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51339fi
51340
51341    fi
51342  fi
51343
51344  # Check for libraries that X11R6 Xt/Xaw programs need.
51345  ac_save_LDFLAGS=$LDFLAGS
51346  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51347  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51348  # check for ICE first), but we must link in the order -lSM -lICE or
51349  # we get undefined symbols.  So assume we have SM if we have ICE.
51350  # These have to be linked with before -lX11, unlike the other
51351  # libraries we check for below, so use a different variable.
51352  # John Interrante, Karl Berry
51353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51354$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51355if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51356  $as_echo_n "(cached) " >&6
51357else
51358  ac_check_lib_save_LIBS=$LIBS
51359LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51361/* end confdefs.h.  */
51362
51363/* Override any GCC internal prototype to avoid an error.
51364   Use char because int might match the return type of a GCC
51365   builtin and then its argument prototype would still apply.  */
51366#ifdef __cplusplus
51367extern "C"
51368#endif
51369char IceConnectionNumber ();
51370int
51371main ()
51372{
51373return IceConnectionNumber ();
51374  ;
51375  return 0;
51376}
51377_ACEOF
51378if ac_fn_cxx_try_link "$LINENO"; then :
51379  ac_cv_lib_ICE_IceConnectionNumber=yes
51380else
51381  ac_cv_lib_ICE_IceConnectionNumber=no
51382fi
51383rm -f core conftest.err conftest.$ac_objext \
51384    conftest$ac_exeext conftest.$ac_ext
51385LIBS=$ac_check_lib_save_LIBS
51386fi
51387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51388$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51389if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51390  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51391fi
51392
51393  LDFLAGS=$ac_save_LDFLAGS
51394
51395fi
51396
51397
51398    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51399    # this doesn't make sense so we remove it.
51400    if test "x$COMPILE_TYPE" = xcross; then
51401      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51402    fi
51403
51404    if test "x$no_x" = xyes; then
51405
51406  # Print a helpful message on how to acquire the necessary build dependency.
51407  # x11 is the help tag: freetype, cups, alsa etc
51408  MISSING_DEPENDENCY=x11
51409
51410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51411    cygwin_help $MISSING_DEPENDENCY
51412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51413    msys_help $MISSING_DEPENDENCY
51414  else
51415    PKGHANDLER_COMMAND=
51416
51417    case $PKGHANDLER in
51418      apt-get)
51419        apt_help     $MISSING_DEPENDENCY ;;
51420      yum)
51421        yum_help     $MISSING_DEPENDENCY ;;
51422      port)
51423        port_help    $MISSING_DEPENDENCY ;;
51424      pkgutil)
51425        pkgutil_help $MISSING_DEPENDENCY ;;
51426      pkgadd)
51427        pkgadd_help  $MISSING_DEPENDENCY ;;
51428    esac
51429
51430    if test "x$PKGHANDLER_COMMAND" != x; then
51431      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51432    fi
51433  fi
51434
51435      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51436    fi
51437
51438    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51439      OPENWIN_HOME="/usr/openwin"
51440      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51441      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51442          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51443          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51444          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51445    fi
51446
51447    ac_ext=c
51448ac_cpp='$CPP $CPPFLAGS'
51449ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51450ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51451ac_compiler_gnu=$ac_cv_c_compiler_gnu
51452
51453    OLD_CFLAGS="$CFLAGS"
51454    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51455
51456    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51457    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51458do :
51459  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51460ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51461          # include <X11/Xlib.h>
51462          # include <X11/Xutil.h>
51463
51464
51465"
51466if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51467  cat >>confdefs.h <<_ACEOF
51468#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51469_ACEOF
51470 X11_HEADERS_OK=yes
51471else
51472  X11_HEADERS_OK=no; break
51473fi
51474
51475done
51476
51477
51478    if test "x$X11_HEADERS_OK" = xno; then
51479
51480  # Print a helpful message on how to acquire the necessary build dependency.
51481  # x11 is the help tag: freetype, cups, alsa etc
51482  MISSING_DEPENDENCY=x11
51483
51484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51485    cygwin_help $MISSING_DEPENDENCY
51486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51487    msys_help $MISSING_DEPENDENCY
51488  else
51489    PKGHANDLER_COMMAND=
51490
51491    case $PKGHANDLER in
51492      apt-get)
51493        apt_help     $MISSING_DEPENDENCY ;;
51494      yum)
51495        yum_help     $MISSING_DEPENDENCY ;;
51496      port)
51497        port_help    $MISSING_DEPENDENCY ;;
51498      pkgutil)
51499        pkgutil_help $MISSING_DEPENDENCY ;;
51500      pkgadd)
51501        pkgadd_help  $MISSING_DEPENDENCY ;;
51502    esac
51503
51504    if test "x$PKGHANDLER_COMMAND" != x; then
51505      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51506    fi
51507  fi
51508
51509      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51510    fi
51511
51512    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51513    # defined in libawt_xawt.
51514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51515$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51516    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51517/* end confdefs.h.  */
51518#include <X11/extensions/Xrender.h>
51519int
51520main ()
51521{
51522XLinearGradient x;
51523  ;
51524  return 0;
51525}
51526_ACEOF
51527if ac_fn_c_try_compile "$LINENO"; then :
51528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51529$as_echo "yes" >&6; }
51530else
51531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51532$as_echo "no" >&6; }
51533         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51534fi
51535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51536
51537    CFLAGS="$OLD_CFLAGS"
51538    ac_ext=cpp
51539ac_cpp='$CXXCPP $CPPFLAGS'
51540ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51541ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51542ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51543
51544  fi # NEEDS_LIB_X11
51545
51546
51547
51548
51549
51550
51551# Check whether --with-cups was given.
51552if test "${with_cups+set}" = set; then :
51553  withval=$with_cups;
51554fi
51555
51556
51557# Check whether --with-cups-include was given.
51558if test "${with_cups_include+set}" = set; then :
51559  withval=$with_cups_include;
51560fi
51561
51562
51563  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51564    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51565        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51566      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51567$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51568    fi
51569    CUPS_CFLAGS=
51570  else
51571    CUPS_FOUND=no
51572
51573    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51574      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51575    fi
51576
51577    if test "x${with_cups}" != x; then
51578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51579$as_echo_n "checking for cups headers... " >&6; }
51580      if test -s "${with_cups}/include/cups/cups.h"; then
51581        CUPS_CFLAGS="-I${with_cups}/include"
51582        CUPS_FOUND=yes
51583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51584$as_echo "$CUPS_FOUND" >&6; }
51585      else
51586        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
51587      fi
51588    fi
51589    if test "x${with_cups_include}" != x; then
51590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51591$as_echo_n "checking for cups headers... " >&6; }
51592      if test -s "${with_cups_include}/cups/cups.h"; then
51593        CUPS_CFLAGS="-I${with_cups_include}"
51594        CUPS_FOUND=yes
51595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51596$as_echo "$CUPS_FOUND" >&6; }
51597      else
51598        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
51599      fi
51600    fi
51601    if test "x$CUPS_FOUND" = xno; then
51602      # Are the cups headers installed in the default /usr/include location?
51603      for ac_header in cups/cups.h cups/ppd.h
51604do :
51605  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51606ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51608  cat >>confdefs.h <<_ACEOF
51609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51610_ACEOF
51611
51612          CUPS_FOUND=yes
51613          CUPS_CFLAGS=
51614          DEFAULT_CUPS=yes
51615
51616fi
51617
51618done
51619
51620    fi
51621    if test "x$CUPS_FOUND" = xno; then
51622      # Getting nervous now? Lets poke around for standard Solaris third-party
51623      # package installation locations.
51624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51625$as_echo_n "checking for cups headers... " >&6; }
51626      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51627        # An SFW package seems to be installed!
51628        CUPS_FOUND=yes
51629        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51630      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51631        # A CSW package seems to be installed!
51632        CUPS_FOUND=yes
51633        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51634      fi
51635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51636$as_echo "$CUPS_FOUND" >&6; }
51637    fi
51638    if test "x$CUPS_FOUND" = xno; then
51639
51640  # Print a helpful message on how to acquire the necessary build dependency.
51641  # cups is the help tag: freetype, cups, alsa etc
51642  MISSING_DEPENDENCY=cups
51643
51644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51645    cygwin_help $MISSING_DEPENDENCY
51646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51647    msys_help $MISSING_DEPENDENCY
51648  else
51649    PKGHANDLER_COMMAND=
51650
51651    case $PKGHANDLER in
51652      apt-get)
51653        apt_help     $MISSING_DEPENDENCY ;;
51654      yum)
51655        yum_help     $MISSING_DEPENDENCY ;;
51656      port)
51657        port_help    $MISSING_DEPENDENCY ;;
51658      pkgutil)
51659        pkgutil_help $MISSING_DEPENDENCY ;;
51660      pkgadd)
51661        pkgadd_help  $MISSING_DEPENDENCY ;;
51662    esac
51663
51664    if test "x$PKGHANDLER_COMMAND" != x; then
51665      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51666    fi
51667  fi
51668
51669      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51670    fi
51671  fi
51672
51673
51674
51675
51676
51677# Check whether --with-freetype was given.
51678if test "${with_freetype+set}" = set; then :
51679  withval=$with_freetype;
51680fi
51681
51682
51683# Check whether --with-freetype-include was given.
51684if test "${with_freetype_include+set}" = set; then :
51685  withval=$with_freetype_include;
51686fi
51687
51688
51689# Check whether --with-freetype-lib was given.
51690if test "${with_freetype_lib+set}" = set; then :
51691  withval=$with_freetype_lib;
51692fi
51693
51694
51695# Check whether --with-freetype-src was given.
51696if test "${with_freetype_src+set}" = set; then :
51697  withval=$with_freetype_src;
51698fi
51699
51700  # Check whether --enable-freetype-bundling was given.
51701if test "${enable_freetype_bundling+set}" = set; then :
51702  enableval=$enable_freetype_bundling;
51703fi
51704
51705
51706  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51707  FREETYPE_BASE_NAME=freetype
51708  FREETYPE_CFLAGS=
51709  FREETYPE_LIBS=
51710  FREETYPE_BUNDLE_LIB_PATH=
51711
51712  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51713    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51714        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51715        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51716        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51717      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51718$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51719    fi
51720    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51721      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51722$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51723    fi
51724  else
51725    # freetype is needed to build; go get it!
51726
51727    BUNDLE_FREETYPE="$enable_freetype_bundling"
51728
51729    if  test "x$with_freetype_src" != x; then
51730      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51731        # Try to build freetype if --with-freetype-src was given on Windows
51732
51733  FREETYPE_SRC_PATH="$with_freetype_src"
51734  BUILD_FREETYPE=yes
51735
51736  # Check if the freetype sources are acessible..
51737  if ! test -d $FREETYPE_SRC_PATH; then
51738    { $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
51739$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51740    BUILD_FREETYPE=no
51741  fi
51742  # ..and contain a vc2010 project file
51743  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51744  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51745    { $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
51746$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51747    BUILD_FREETYPE=no
51748  fi
51749  # Now check if configure found a version of 'msbuild.exe'
51750  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51751    { $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
51752$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;}
51753    BUILD_FREETYPE=no
51754  fi
51755
51756  # Ready to go..
51757  if test "x$BUILD_FREETYPE" = xyes; then
51758    # msbuild requires trailing slashes for output directories
51759    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51760    freetype_lib_path_unix="$freetype_lib_path"
51761    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51762
51763  unix_path="$vcxproj_path"
51764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51765    windows_path=`$CYGPATH -m "$unix_path"`
51766    vcxproj_path="$windows_path"
51767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51768    windows_path=`cmd //c echo $unix_path`
51769    vcxproj_path="$windows_path"
51770  fi
51771
51772
51773  unix_path="$freetype_lib_path"
51774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51775    windows_path=`$CYGPATH -m "$unix_path"`
51776    freetype_lib_path="$windows_path"
51777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51778    windows_path=`cmd //c echo $unix_path`
51779    freetype_lib_path="$windows_path"
51780  fi
51781
51782
51783  unix_path="$freetype_obj_path"
51784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51785    windows_path=`$CYGPATH -m "$unix_path"`
51786    freetype_obj_path="$windows_path"
51787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51788    windows_path=`cmd //c echo $unix_path`
51789    freetype_obj_path="$windows_path"
51790  fi
51791
51792    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51793      freetype_platform=x64
51794    else
51795      freetype_platform=win32
51796    fi
51797
51798    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51799    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51800    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51801    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51802    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51803$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51804
51805    # First we try to build the freetype.dll
51806    $ECHO -e "@echo off\n"\
51807        "$MSBUILD $vcxproj_path "\
51808        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51809        "/p:Configuration=\"Release Multithreaded\" "\
51810        "/p:Platform=$freetype_platform "\
51811        "/p:ConfigurationType=DynamicLibrary "\
51812        "/p:TargetName=freetype "\
51813        "/p:OutDir=\"$freetype_lib_path\" "\
51814        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51815    cmd /c freetype.bat
51816
51817    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51818      # If that succeeds we also build freetype.lib
51819      $ECHO -e "@echo off\n"\
51820          "$MSBUILD $vcxproj_path "\
51821          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51822          "/p:Configuration=\"Release Multithreaded\" "\
51823          "/p:Platform=$freetype_platform "\
51824          "/p:ConfigurationType=StaticLibrary "\
51825          "/p:TargetName=freetype "\
51826          "/p:OutDir=\"$freetype_lib_path\" "\
51827          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51828      cmd /c freetype.bat
51829
51830      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51831        # Once we build both, lib and dll, set freetype lib and include path appropriately
51832        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51833        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51834        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51835$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51836      else
51837        BUILD_FREETYPE=no
51838      fi
51839    else
51840      BUILD_FREETYPE=no
51841    fi
51842  fi
51843
51844        if test "x$BUILD_FREETYPE" = xyes; then
51845          # Okay, we built it. Check that it works.
51846
51847  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51848  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51849  METHOD="--with-freetype-src"
51850
51851  # Let's start with an optimistic view of the world :-)
51852  FOUND_FREETYPE=yes
51853
51854  # First look for the canonical freetype main include file ft2build.h.
51855  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51856    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51857    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51858    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51859      # Fail.
51860      FOUND_FREETYPE=no
51861    fi
51862  fi
51863
51864  if test "x$FOUND_FREETYPE" = xyes; then
51865    # Include file found, let's continue the sanity check.
51866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51867$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51868
51869    # Reset to default value
51870    FREETYPE_BASE_NAME=freetype
51871    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51872    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51873      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51875        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51876        # for the .6 version explicitly.
51877        FREETYPE_BASE_NAME=freetype.6
51878        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51879        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51880$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51881      else
51882        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51883$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51884        FOUND_FREETYPE=no
51885      fi
51886    else
51887      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51888        # On Windows, we will need both .lib and .dll file.
51889        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51890          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51891$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51892          FOUND_FREETYPE=no
51893        fi
51894      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51895          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51896        # Found lib in isa dir, use that instead.
51897        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51898        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51899$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51900      fi
51901    fi
51902  fi
51903
51904  if test "x$FOUND_FREETYPE" = xyes; then
51905
51906  # Only process if variable expands to non-empty
51907
51908  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51910
51911  # Input might be given as Windows format, start by converting to
51912  # unix format.
51913  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51914  new_path=`$CYGPATH -u "$path"`
51915
51916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51919  # "foo.exe" is OK but "foo" is an error.
51920  #
51921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51922  # It is also a way to make sure we got the proper file name for the real test later on.
51923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51924  if test "x$test_shortpath" = x; then
51925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51927    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51928  fi
51929
51930  # Call helper function which possibly converts this using DOS-style short mode.
51931  # If so, the updated path is stored in $new_path.
51932
51933  input_path="$new_path"
51934  # Check if we need to convert this using DOS-style short mode. If the path
51935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51936  # take no chances and rewrite it.
51937  # Note: m4 eats our [], so we need to use [ and ] instead.
51938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51939  if test "x$has_forbidden_chars" != x; then
51940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51944      # Going to short mode and back again did indeed matter. Since short mode is
51945      # case insensitive, let's make it lowercase to improve readability.
51946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51947      # Now convert it back to Unix-style (cygpath)
51948      input_path=`$CYGPATH -u "$shortmode_path"`
51949      new_path="$input_path"
51950    fi
51951  fi
51952
51953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51954  if test "x$test_cygdrive_prefix" = x; then
51955    # As a simple fix, exclude /usr/bin since it's not a real path.
51956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51958      # a path prefixed by /cygdrive for fixpath to work.
51959      new_path="$CYGWIN_ROOT_PATH$input_path"
51960    fi
51961  fi
51962
51963
51964  if test "x$path" != "x$new_path"; then
51965    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51968  fi
51969
51970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51971
51972  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51973  has_colon=`$ECHO $path | $GREP ^.:`
51974  new_path="$path"
51975  if test "x$has_colon" = x; then
51976    # Not in mixed or Windows style, start by that.
51977    new_path=`cmd //c echo $path`
51978  fi
51979
51980
51981  input_path="$new_path"
51982  # Check if we need to convert this using DOS-style short mode. If the path
51983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51984  # take no chances and rewrite it.
51985  # Note: m4 eats our [], so we need to use [ and ] instead.
51986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51987  if test "x$has_forbidden_chars" != x; then
51988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51990  fi
51991
51992
51993  windows_path="$new_path"
51994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51995    unix_path=`$CYGPATH -u "$windows_path"`
51996    new_path="$unix_path"
51997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51999    new_path="$unix_path"
52000  fi
52001
52002  if test "x$path" != "x$new_path"; then
52003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52006  fi
52007
52008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52010
52011    else
52012      # We're on a unix platform. Hooray! :)
52013      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52014      has_space=`$ECHO "$path" | $GREP " "`
52015      if test "x$has_space" != x; then
52016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52018        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52019      fi
52020
52021      # Use eval to expand a potential ~
52022      eval path="$path"
52023      if test ! -f "$path" && test ! -d "$path"; then
52024        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52025      fi
52026
52027      if test -d "$path"; then
52028        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52029      else
52030        dir="`$DIRNAME "$path"`"
52031        base="`$BASENAME "$path"`"
52032        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52033      fi
52034    fi
52035  fi
52036
52037
52038  # Only process if variable expands to non-empty
52039
52040  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52042
52043  # Input might be given as Windows format, start by converting to
52044  # unix format.
52045  path="$POTENTIAL_FREETYPE_LIB_PATH"
52046  new_path=`$CYGPATH -u "$path"`
52047
52048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52051  # "foo.exe" is OK but "foo" is an error.
52052  #
52053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52054  # It is also a way to make sure we got the proper file name for the real test later on.
52055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52056  if test "x$test_shortpath" = x; then
52057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52059    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52060  fi
52061
52062  # Call helper function which possibly converts this using DOS-style short mode.
52063  # If so, the updated path is stored in $new_path.
52064
52065  input_path="$new_path"
52066  # Check if we need to convert this using DOS-style short mode. If the path
52067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52068  # take no chances and rewrite it.
52069  # Note: m4 eats our [], so we need to use [ and ] instead.
52070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52071  if test "x$has_forbidden_chars" != x; then
52072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52076      # Going to short mode and back again did indeed matter. Since short mode is
52077      # case insensitive, let's make it lowercase to improve readability.
52078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52079      # Now convert it back to Unix-style (cygpath)
52080      input_path=`$CYGPATH -u "$shortmode_path"`
52081      new_path="$input_path"
52082    fi
52083  fi
52084
52085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52086  if test "x$test_cygdrive_prefix" = x; then
52087    # As a simple fix, exclude /usr/bin since it's not a real path.
52088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52090      # a path prefixed by /cygdrive for fixpath to work.
52091      new_path="$CYGWIN_ROOT_PATH$input_path"
52092    fi
52093  fi
52094
52095
52096  if test "x$path" != "x$new_path"; then
52097    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52100  fi
52101
52102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52103
52104  path="$POTENTIAL_FREETYPE_LIB_PATH"
52105  has_colon=`$ECHO $path | $GREP ^.:`
52106  new_path="$path"
52107  if test "x$has_colon" = x; then
52108    # Not in mixed or Windows style, start by that.
52109    new_path=`cmd //c echo $path`
52110  fi
52111
52112
52113  input_path="$new_path"
52114  # Check if we need to convert this using DOS-style short mode. If the path
52115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52116  # take no chances and rewrite it.
52117  # Note: m4 eats our [], so we need to use [ and ] instead.
52118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52119  if test "x$has_forbidden_chars" != x; then
52120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52122  fi
52123
52124
52125  windows_path="$new_path"
52126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52127    unix_path=`$CYGPATH -u "$windows_path"`
52128    new_path="$unix_path"
52129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52131    new_path="$unix_path"
52132  fi
52133
52134  if test "x$path" != "x$new_path"; then
52135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52138  fi
52139
52140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52142
52143    else
52144      # We're on a unix platform. Hooray! :)
52145      path="$POTENTIAL_FREETYPE_LIB_PATH"
52146      has_space=`$ECHO "$path" | $GREP " "`
52147      if test "x$has_space" != x; then
52148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52151      fi
52152
52153      # Use eval to expand a potential ~
52154      eval path="$path"
52155      if test ! -f "$path" && test ! -d "$path"; then
52156        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52157      fi
52158
52159      if test -d "$path"; then
52160        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52161      else
52162        dir="`$DIRNAME "$path"`"
52163        base="`$BASENAME "$path"`"
52164        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52165      fi
52166    fi
52167  fi
52168
52169
52170    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52172$as_echo_n "checking for freetype includes... " >&6; }
52173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52174$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52175    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52177$as_echo_n "checking for freetype libraries... " >&6; }
52178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52179$as_echo "$FREETYPE_LIB_PATH" >&6; }
52180  fi
52181
52182          if test "x$FOUND_FREETYPE" != xyes; then
52183            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52184          fi
52185        else
52186          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52187$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52188          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52189        fi
52190      else
52191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52192$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52193      fi
52194    fi
52195
52196    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52197      # User has specified settings
52198
52199      if test "x$BUNDLE_FREETYPE" = x; then
52200        # If not specified, default is to bundle freetype
52201        BUNDLE_FREETYPE=yes
52202      fi
52203
52204      if test "x$with_freetype" != x; then
52205        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52206        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52207      fi
52208
52209      # Allow --with-freetype-lib and --with-freetype-include to override
52210      if test "x$with_freetype_include" != x; then
52211        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52212      fi
52213      if test "x$with_freetype_lib" != x; then
52214        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52215      fi
52216
52217      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52218        # Okay, we got it. Check that it works.
52219
52220  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52221  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52222  METHOD="--with-freetype"
52223
52224  # Let's start with an optimistic view of the world :-)
52225  FOUND_FREETYPE=yes
52226
52227  # First look for the canonical freetype main include file ft2build.h.
52228  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52229    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52230    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52231    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52232      # Fail.
52233      FOUND_FREETYPE=no
52234    fi
52235  fi
52236
52237  if test "x$FOUND_FREETYPE" = xyes; then
52238    # Include file found, let's continue the sanity check.
52239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52240$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52241
52242    # Reset to default value
52243    FREETYPE_BASE_NAME=freetype
52244    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52245    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52246      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52247          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52248        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52249        # for the .6 version explicitly.
52250        FREETYPE_BASE_NAME=freetype.6
52251        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52252        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52253$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52254      else
52255        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52256$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52257        FOUND_FREETYPE=no
52258      fi
52259    else
52260      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52261        # On Windows, we will need both .lib and .dll file.
52262        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52263          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52264$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52265          FOUND_FREETYPE=no
52266        fi
52267      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52268          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52269        # Found lib in isa dir, use that instead.
52270        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52271        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52272$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52273      fi
52274    fi
52275  fi
52276
52277  if test "x$FOUND_FREETYPE" = xyes; then
52278
52279  # Only process if variable expands to non-empty
52280
52281  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52283
52284  # Input might be given as Windows format, start by converting to
52285  # unix format.
52286  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52287  new_path=`$CYGPATH -u "$path"`
52288
52289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52292  # "foo.exe" is OK but "foo" is an error.
52293  #
52294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52295  # It is also a way to make sure we got the proper file name for the real test later on.
52296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52297  if test "x$test_shortpath" = x; then
52298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52300    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52301  fi
52302
52303  # Call helper function which possibly converts this using DOS-style short mode.
52304  # If so, the updated path is stored in $new_path.
52305
52306  input_path="$new_path"
52307  # Check if we need to convert this using DOS-style short mode. If the path
52308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52309  # take no chances and rewrite it.
52310  # Note: m4 eats our [], so we need to use [ and ] instead.
52311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52312  if test "x$has_forbidden_chars" != x; then
52313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52317      # Going to short mode and back again did indeed matter. Since short mode is
52318      # case insensitive, let's make it lowercase to improve readability.
52319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52320      # Now convert it back to Unix-style (cygpath)
52321      input_path=`$CYGPATH -u "$shortmode_path"`
52322      new_path="$input_path"
52323    fi
52324  fi
52325
52326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52327  if test "x$test_cygdrive_prefix" = x; then
52328    # As a simple fix, exclude /usr/bin since it's not a real path.
52329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52331      # a path prefixed by /cygdrive for fixpath to work.
52332      new_path="$CYGWIN_ROOT_PATH$input_path"
52333    fi
52334  fi
52335
52336
52337  if test "x$path" != "x$new_path"; then
52338    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52341  fi
52342
52343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52344
52345  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52346  has_colon=`$ECHO $path | $GREP ^.:`
52347  new_path="$path"
52348  if test "x$has_colon" = x; then
52349    # Not in mixed or Windows style, start by that.
52350    new_path=`cmd //c echo $path`
52351  fi
52352
52353
52354  input_path="$new_path"
52355  # Check if we need to convert this using DOS-style short mode. If the path
52356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52357  # take no chances and rewrite it.
52358  # Note: m4 eats our [], so we need to use [ and ] instead.
52359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52360  if test "x$has_forbidden_chars" != x; then
52361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52363  fi
52364
52365
52366  windows_path="$new_path"
52367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52368    unix_path=`$CYGPATH -u "$windows_path"`
52369    new_path="$unix_path"
52370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52372    new_path="$unix_path"
52373  fi
52374
52375  if test "x$path" != "x$new_path"; then
52376    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52379  fi
52380
52381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52383
52384    else
52385      # We're on a unix platform. Hooray! :)
52386      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52387      has_space=`$ECHO "$path" | $GREP " "`
52388      if test "x$has_space" != x; then
52389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52390$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52392      fi
52393
52394      # Use eval to expand a potential ~
52395      eval path="$path"
52396      if test ! -f "$path" && test ! -d "$path"; then
52397        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52398      fi
52399
52400      if test -d "$path"; then
52401        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52402      else
52403        dir="`$DIRNAME "$path"`"
52404        base="`$BASENAME "$path"`"
52405        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52406      fi
52407    fi
52408  fi
52409
52410
52411  # Only process if variable expands to non-empty
52412
52413  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52415
52416  # Input might be given as Windows format, start by converting to
52417  # unix format.
52418  path="$POTENTIAL_FREETYPE_LIB_PATH"
52419  new_path=`$CYGPATH -u "$path"`
52420
52421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52424  # "foo.exe" is OK but "foo" is an error.
52425  #
52426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52427  # It is also a way to make sure we got the proper file name for the real test later on.
52428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52429  if test "x$test_shortpath" = x; then
52430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52433  fi
52434
52435  # Call helper function which possibly converts this using DOS-style short mode.
52436  # If so, the updated path is stored in $new_path.
52437
52438  input_path="$new_path"
52439  # Check if we need to convert this using DOS-style short mode. If the path
52440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52441  # take no chances and rewrite it.
52442  # Note: m4 eats our [], so we need to use [ and ] instead.
52443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52444  if test "x$has_forbidden_chars" != x; then
52445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52449      # Going to short mode and back again did indeed matter. Since short mode is
52450      # case insensitive, let's make it lowercase to improve readability.
52451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52452      # Now convert it back to Unix-style (cygpath)
52453      input_path=`$CYGPATH -u "$shortmode_path"`
52454      new_path="$input_path"
52455    fi
52456  fi
52457
52458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52459  if test "x$test_cygdrive_prefix" = x; then
52460    # As a simple fix, exclude /usr/bin since it's not a real path.
52461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52463      # a path prefixed by /cygdrive for fixpath to work.
52464      new_path="$CYGWIN_ROOT_PATH$input_path"
52465    fi
52466  fi
52467
52468
52469  if test "x$path" != "x$new_path"; then
52470    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52473  fi
52474
52475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52476
52477  path="$POTENTIAL_FREETYPE_LIB_PATH"
52478  has_colon=`$ECHO $path | $GREP ^.:`
52479  new_path="$path"
52480  if test "x$has_colon" = x; then
52481    # Not in mixed or Windows style, start by that.
52482    new_path=`cmd //c echo $path`
52483  fi
52484
52485
52486  input_path="$new_path"
52487  # Check if we need to convert this using DOS-style short mode. If the path
52488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52489  # take no chances and rewrite it.
52490  # Note: m4 eats our [], so we need to use [ and ] instead.
52491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52492  if test "x$has_forbidden_chars" != x; then
52493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52495  fi
52496
52497
52498  windows_path="$new_path"
52499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52500    unix_path=`$CYGPATH -u "$windows_path"`
52501    new_path="$unix_path"
52502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52504    new_path="$unix_path"
52505  fi
52506
52507  if test "x$path" != "x$new_path"; then
52508    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52511  fi
52512
52513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52515
52516    else
52517      # We're on a unix platform. Hooray! :)
52518      path="$POTENTIAL_FREETYPE_LIB_PATH"
52519      has_space=`$ECHO "$path" | $GREP " "`
52520      if test "x$has_space" != x; then
52521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52524      fi
52525
52526      # Use eval to expand a potential ~
52527      eval path="$path"
52528      if test ! -f "$path" && test ! -d "$path"; then
52529        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52530      fi
52531
52532      if test -d "$path"; then
52533        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52534      else
52535        dir="`$DIRNAME "$path"`"
52536        base="`$BASENAME "$path"`"
52537        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52538      fi
52539    fi
52540  fi
52541
52542
52543    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52545$as_echo_n "checking for freetype includes... " >&6; }
52546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52547$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52548    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52550$as_echo_n "checking for freetype libraries... " >&6; }
52551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52552$as_echo "$FREETYPE_LIB_PATH" >&6; }
52553  fi
52554
52555        if test "x$FOUND_FREETYPE" != xyes; then
52556          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52557        fi
52558      else
52559        # User specified only one of lib or include. This is an error.
52560        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52561          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52562$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52563          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52564        else
52565          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52566$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52567          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52568        fi
52569      fi
52570    else
52571      # User did not specify settings, but we need freetype. Try to locate it.
52572
52573      if test "x$BUNDLE_FREETYPE" = x; then
52574        # If not specified, default is to bundle freetype only on windows
52575        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52576          BUNDLE_FREETYPE=yes
52577        else
52578          BUNDLE_FREETYPE=no
52579        fi
52580      fi
52581
52582      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52583      if test "x$SYSROOT" = x; then
52584        if test "x$FOUND_FREETYPE" != xyes; then
52585          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52586          if test "x$PKG_CONFIG" != x; then
52587
52588pkg_failed=no
52589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52590$as_echo_n "checking for FREETYPE... " >&6; }
52591
52592if test -n "$FREETYPE_CFLAGS"; then
52593    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52594 elif test -n "$PKG_CONFIG"; then
52595    if test -n "$PKG_CONFIG" && \
52596    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52597  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52598  ac_status=$?
52599  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52600  test $ac_status = 0; }; then
52601  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52602else
52603  pkg_failed=yes
52604fi
52605 else
52606    pkg_failed=untried
52607fi
52608if test -n "$FREETYPE_LIBS"; then
52609    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52610 elif test -n "$PKG_CONFIG"; then
52611    if test -n "$PKG_CONFIG" && \
52612    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52613  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52614  ac_status=$?
52615  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52616  test $ac_status = 0; }; then
52617  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52618else
52619  pkg_failed=yes
52620fi
52621 else
52622    pkg_failed=untried
52623fi
52624
52625
52626
52627if test $pkg_failed = yes; then
52628
52629if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52630        _pkg_short_errors_supported=yes
52631else
52632        _pkg_short_errors_supported=no
52633fi
52634        if test $_pkg_short_errors_supported = yes; then
52635	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52636        else
52637	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52638        fi
52639	# Put the nasty error message in config.log where it belongs
52640	echo "$FREETYPE_PKG_ERRORS" >&5
52641
52642	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52643$as_echo "no" >&6; }
52644                FOUND_FREETYPE=no
52645elif test $pkg_failed = untried; then
52646	FOUND_FREETYPE=no
52647else
52648	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52649	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52651$as_echo "yes" >&6; }
52652	FOUND_FREETYPE=yes
52653fi
52654            if test "x$FOUND_FREETYPE" = xyes; then
52655              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52656              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52657              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52658              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52659                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52660              fi
52661              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52662              if test "x$BUNDLE_FREETYPE" = xyes; then
52663                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52664$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52665                FOUND_FREETYPE=no
52666              else
52667                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52668$as_echo_n "checking for freetype... " >&6; }
52669                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52670$as_echo "yes (using pkg-config)" >&6; }
52671              fi
52672            fi
52673          fi
52674        fi
52675      fi
52676
52677      if test "x$FOUND_FREETYPE" != xyes; then
52678        # Check in well-known locations
52679        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52680          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52681
52682  windows_path="$FREETYPE_BASE_DIR"
52683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52684    unix_path=`$CYGPATH -u "$windows_path"`
52685    FREETYPE_BASE_DIR="$unix_path"
52686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52688    FREETYPE_BASE_DIR="$unix_path"
52689  fi
52690
52691
52692  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52693  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52694  METHOD="well-known location"
52695
52696  # Let's start with an optimistic view of the world :-)
52697  FOUND_FREETYPE=yes
52698
52699  # First look for the canonical freetype main include file ft2build.h.
52700  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52701    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52702    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52703    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52704      # Fail.
52705      FOUND_FREETYPE=no
52706    fi
52707  fi
52708
52709  if test "x$FOUND_FREETYPE" = xyes; then
52710    # Include file found, let's continue the sanity check.
52711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52712$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52713
52714    # Reset to default value
52715    FREETYPE_BASE_NAME=freetype
52716    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52717    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52718      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52720        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52721        # for the .6 version explicitly.
52722        FREETYPE_BASE_NAME=freetype.6
52723        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52724        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52725$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52726      else
52727        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52728$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52729        FOUND_FREETYPE=no
52730      fi
52731    else
52732      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52733        # On Windows, we will need both .lib and .dll file.
52734        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52735          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52736$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52737          FOUND_FREETYPE=no
52738        fi
52739      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52740          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52741        # Found lib in isa dir, use that instead.
52742        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52743        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52744$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52745      fi
52746    fi
52747  fi
52748
52749  if test "x$FOUND_FREETYPE" = xyes; then
52750
52751  # Only process if variable expands to non-empty
52752
52753  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52755
52756  # Input might be given as Windows format, start by converting to
52757  # unix format.
52758  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52759  new_path=`$CYGPATH -u "$path"`
52760
52761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52764  # "foo.exe" is OK but "foo" is an error.
52765  #
52766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52767  # It is also a way to make sure we got the proper file name for the real test later on.
52768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52769  if test "x$test_shortpath" = x; then
52770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52772    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52773  fi
52774
52775  # Call helper function which possibly converts this using DOS-style short mode.
52776  # If so, the updated path is stored in $new_path.
52777
52778  input_path="$new_path"
52779  # Check if we need to convert this using DOS-style short mode. If the path
52780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52781  # take no chances and rewrite it.
52782  # Note: m4 eats our [], so we need to use [ and ] instead.
52783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52784  if test "x$has_forbidden_chars" != x; then
52785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52789      # Going to short mode and back again did indeed matter. Since short mode is
52790      # case insensitive, let's make it lowercase to improve readability.
52791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52792      # Now convert it back to Unix-style (cygpath)
52793      input_path=`$CYGPATH -u "$shortmode_path"`
52794      new_path="$input_path"
52795    fi
52796  fi
52797
52798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52799  if test "x$test_cygdrive_prefix" = x; then
52800    # As a simple fix, exclude /usr/bin since it's not a real path.
52801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52803      # a path prefixed by /cygdrive for fixpath to work.
52804      new_path="$CYGWIN_ROOT_PATH$input_path"
52805    fi
52806  fi
52807
52808
52809  if test "x$path" != "x$new_path"; then
52810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52813  fi
52814
52815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52816
52817  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52818  has_colon=`$ECHO $path | $GREP ^.:`
52819  new_path="$path"
52820  if test "x$has_colon" = x; then
52821    # Not in mixed or Windows style, start by that.
52822    new_path=`cmd //c echo $path`
52823  fi
52824
52825
52826  input_path="$new_path"
52827  # Check if we need to convert this using DOS-style short mode. If the path
52828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52829  # take no chances and rewrite it.
52830  # Note: m4 eats our [], so we need to use [ and ] instead.
52831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52832  if test "x$has_forbidden_chars" != x; then
52833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52835  fi
52836
52837
52838  windows_path="$new_path"
52839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52840    unix_path=`$CYGPATH -u "$windows_path"`
52841    new_path="$unix_path"
52842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52844    new_path="$unix_path"
52845  fi
52846
52847  if test "x$path" != "x$new_path"; then
52848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52851  fi
52852
52853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52855
52856    else
52857      # We're on a unix platform. Hooray! :)
52858      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52859      has_space=`$ECHO "$path" | $GREP " "`
52860      if test "x$has_space" != x; then
52861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52863        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52864      fi
52865
52866      # Use eval to expand a potential ~
52867      eval path="$path"
52868      if test ! -f "$path" && test ! -d "$path"; then
52869        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52870      fi
52871
52872      if test -d "$path"; then
52873        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52874      else
52875        dir="`$DIRNAME "$path"`"
52876        base="`$BASENAME "$path"`"
52877        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52878      fi
52879    fi
52880  fi
52881
52882
52883  # Only process if variable expands to non-empty
52884
52885  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52887
52888  # Input might be given as Windows format, start by converting to
52889  # unix format.
52890  path="$POTENTIAL_FREETYPE_LIB_PATH"
52891  new_path=`$CYGPATH -u "$path"`
52892
52893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52896  # "foo.exe" is OK but "foo" is an error.
52897  #
52898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52899  # It is also a way to make sure we got the proper file name for the real test later on.
52900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52901  if test "x$test_shortpath" = x; then
52902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52904    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52905  fi
52906
52907  # Call helper function which possibly converts this using DOS-style short mode.
52908  # If so, the updated path is stored in $new_path.
52909
52910  input_path="$new_path"
52911  # Check if we need to convert this using DOS-style short mode. If the path
52912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52913  # take no chances and rewrite it.
52914  # Note: m4 eats our [], so we need to use [ and ] instead.
52915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52916  if test "x$has_forbidden_chars" != x; then
52917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52921      # Going to short mode and back again did indeed matter. Since short mode is
52922      # case insensitive, let's make it lowercase to improve readability.
52923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52924      # Now convert it back to Unix-style (cygpath)
52925      input_path=`$CYGPATH -u "$shortmode_path"`
52926      new_path="$input_path"
52927    fi
52928  fi
52929
52930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52931  if test "x$test_cygdrive_prefix" = x; then
52932    # As a simple fix, exclude /usr/bin since it's not a real path.
52933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52935      # a path prefixed by /cygdrive for fixpath to work.
52936      new_path="$CYGWIN_ROOT_PATH$input_path"
52937    fi
52938  fi
52939
52940
52941  if test "x$path" != "x$new_path"; then
52942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52945  fi
52946
52947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52948
52949  path="$POTENTIAL_FREETYPE_LIB_PATH"
52950  has_colon=`$ECHO $path | $GREP ^.:`
52951  new_path="$path"
52952  if test "x$has_colon" = x; then
52953    # Not in mixed or Windows style, start by that.
52954    new_path=`cmd //c echo $path`
52955  fi
52956
52957
52958  input_path="$new_path"
52959  # Check if we need to convert this using DOS-style short mode. If the path
52960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52961  # take no chances and rewrite it.
52962  # Note: m4 eats our [], so we need to use [ and ] instead.
52963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52964  if test "x$has_forbidden_chars" != x; then
52965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52967  fi
52968
52969
52970  windows_path="$new_path"
52971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52972    unix_path=`$CYGPATH -u "$windows_path"`
52973    new_path="$unix_path"
52974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52976    new_path="$unix_path"
52977  fi
52978
52979  if test "x$path" != "x$new_path"; then
52980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52983  fi
52984
52985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52987
52988    else
52989      # We're on a unix platform. Hooray! :)
52990      path="$POTENTIAL_FREETYPE_LIB_PATH"
52991      has_space=`$ECHO "$path" | $GREP " "`
52992      if test "x$has_space" != x; then
52993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52994$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52996      fi
52997
52998      # Use eval to expand a potential ~
52999      eval path="$path"
53000      if test ! -f "$path" && test ! -d "$path"; then
53001        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53002      fi
53003
53004      if test -d "$path"; then
53005        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53006      else
53007        dir="`$DIRNAME "$path"`"
53008        base="`$BASENAME "$path"`"
53009        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53010      fi
53011    fi
53012  fi
53013
53014
53015    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53017$as_echo_n "checking for freetype includes... " >&6; }
53018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53019$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53020    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53022$as_echo_n "checking for freetype libraries... " >&6; }
53023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53024$as_echo "$FREETYPE_LIB_PATH" >&6; }
53025  fi
53026
53027          if test "x$FOUND_FREETYPE" != xyes; then
53028            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53029
53030  windows_path="$FREETYPE_BASE_DIR"
53031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53032    unix_path=`$CYGPATH -u "$windows_path"`
53033    FREETYPE_BASE_DIR="$unix_path"
53034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53036    FREETYPE_BASE_DIR="$unix_path"
53037  fi
53038
53039
53040  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53041  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53042  METHOD="well-known location"
53043
53044  # Let's start with an optimistic view of the world :-)
53045  FOUND_FREETYPE=yes
53046
53047  # First look for the canonical freetype main include file ft2build.h.
53048  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53049    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53050    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53051    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53052      # Fail.
53053      FOUND_FREETYPE=no
53054    fi
53055  fi
53056
53057  if test "x$FOUND_FREETYPE" = xyes; then
53058    # Include file found, let's continue the sanity check.
53059    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53060$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53061
53062    # Reset to default value
53063    FREETYPE_BASE_NAME=freetype
53064    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53065    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53066      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53067          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53068        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53069        # for the .6 version explicitly.
53070        FREETYPE_BASE_NAME=freetype.6
53071        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53072        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53073$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53074      else
53075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53077        FOUND_FREETYPE=no
53078      fi
53079    else
53080      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53081        # On Windows, we will need both .lib and .dll file.
53082        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53083          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53085          FOUND_FREETYPE=no
53086        fi
53087      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53088          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53089        # Found lib in isa dir, use that instead.
53090        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53091        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53092$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53093      fi
53094    fi
53095  fi
53096
53097  if test "x$FOUND_FREETYPE" = xyes; then
53098
53099  # Only process if variable expands to non-empty
53100
53101  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53103
53104  # Input might be given as Windows format, start by converting to
53105  # unix format.
53106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53107  new_path=`$CYGPATH -u "$path"`
53108
53109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53112  # "foo.exe" is OK but "foo" is an error.
53113  #
53114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53115  # It is also a way to make sure we got the proper file name for the real test later on.
53116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53117  if test "x$test_shortpath" = x; then
53118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53120    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53121  fi
53122
53123  # Call helper function which possibly converts this using DOS-style short mode.
53124  # If so, the updated path is stored in $new_path.
53125
53126  input_path="$new_path"
53127  # Check if we need to convert this using DOS-style short mode. If the path
53128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53129  # take no chances and rewrite it.
53130  # Note: m4 eats our [], so we need to use [ and ] instead.
53131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53132  if test "x$has_forbidden_chars" != x; then
53133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53137      # Going to short mode and back again did indeed matter. Since short mode is
53138      # case insensitive, let's make it lowercase to improve readability.
53139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53140      # Now convert it back to Unix-style (cygpath)
53141      input_path=`$CYGPATH -u "$shortmode_path"`
53142      new_path="$input_path"
53143    fi
53144  fi
53145
53146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53147  if test "x$test_cygdrive_prefix" = x; then
53148    # As a simple fix, exclude /usr/bin since it's not a real path.
53149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53151      # a path prefixed by /cygdrive for fixpath to work.
53152      new_path="$CYGWIN_ROOT_PATH$input_path"
53153    fi
53154  fi
53155
53156
53157  if test "x$path" != "x$new_path"; then
53158    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53161  fi
53162
53163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53164
53165  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53166  has_colon=`$ECHO $path | $GREP ^.:`
53167  new_path="$path"
53168  if test "x$has_colon" = x; then
53169    # Not in mixed or Windows style, start by that.
53170    new_path=`cmd //c echo $path`
53171  fi
53172
53173
53174  input_path="$new_path"
53175  # Check if we need to convert this using DOS-style short mode. If the path
53176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53177  # take no chances and rewrite it.
53178  # Note: m4 eats our [], so we need to use [ and ] instead.
53179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53180  if test "x$has_forbidden_chars" != x; then
53181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53183  fi
53184
53185
53186  windows_path="$new_path"
53187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53188    unix_path=`$CYGPATH -u "$windows_path"`
53189    new_path="$unix_path"
53190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53192    new_path="$unix_path"
53193  fi
53194
53195  if test "x$path" != "x$new_path"; then
53196    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53199  fi
53200
53201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53203
53204    else
53205      # We're on a unix platform. Hooray! :)
53206      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53207      has_space=`$ECHO "$path" | $GREP " "`
53208      if test "x$has_space" != x; then
53209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53210$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53212      fi
53213
53214      # Use eval to expand a potential ~
53215      eval path="$path"
53216      if test ! -f "$path" && test ! -d "$path"; then
53217        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53218      fi
53219
53220      if test -d "$path"; then
53221        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53222      else
53223        dir="`$DIRNAME "$path"`"
53224        base="`$BASENAME "$path"`"
53225        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53226      fi
53227    fi
53228  fi
53229
53230
53231  # Only process if variable expands to non-empty
53232
53233  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53235
53236  # Input might be given as Windows format, start by converting to
53237  # unix format.
53238  path="$POTENTIAL_FREETYPE_LIB_PATH"
53239  new_path=`$CYGPATH -u "$path"`
53240
53241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53244  # "foo.exe" is OK but "foo" is an error.
53245  #
53246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53247  # It is also a way to make sure we got the proper file name for the real test later on.
53248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53249  if test "x$test_shortpath" = x; then
53250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53252    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53253  fi
53254
53255  # Call helper function which possibly converts this using DOS-style short mode.
53256  # If so, the updated path is stored in $new_path.
53257
53258  input_path="$new_path"
53259  # Check if we need to convert this using DOS-style short mode. If the path
53260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53261  # take no chances and rewrite it.
53262  # Note: m4 eats our [], so we need to use [ and ] instead.
53263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53264  if test "x$has_forbidden_chars" != x; then
53265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53269      # Going to short mode and back again did indeed matter. Since short mode is
53270      # case insensitive, let's make it lowercase to improve readability.
53271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53272      # Now convert it back to Unix-style (cygpath)
53273      input_path=`$CYGPATH -u "$shortmode_path"`
53274      new_path="$input_path"
53275    fi
53276  fi
53277
53278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53279  if test "x$test_cygdrive_prefix" = x; then
53280    # As a simple fix, exclude /usr/bin since it's not a real path.
53281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53283      # a path prefixed by /cygdrive for fixpath to work.
53284      new_path="$CYGWIN_ROOT_PATH$input_path"
53285    fi
53286  fi
53287
53288
53289  if test "x$path" != "x$new_path"; then
53290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53293  fi
53294
53295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53296
53297  path="$POTENTIAL_FREETYPE_LIB_PATH"
53298  has_colon=`$ECHO $path | $GREP ^.:`
53299  new_path="$path"
53300  if test "x$has_colon" = x; then
53301    # Not in mixed or Windows style, start by that.
53302    new_path=`cmd //c echo $path`
53303  fi
53304
53305
53306  input_path="$new_path"
53307  # Check if we need to convert this using DOS-style short mode. If the path
53308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53309  # take no chances and rewrite it.
53310  # Note: m4 eats our [], so we need to use [ and ] instead.
53311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53312  if test "x$has_forbidden_chars" != x; then
53313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53315  fi
53316
53317
53318  windows_path="$new_path"
53319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53320    unix_path=`$CYGPATH -u "$windows_path"`
53321    new_path="$unix_path"
53322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53324    new_path="$unix_path"
53325  fi
53326
53327  if test "x$path" != "x$new_path"; then
53328    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53331  fi
53332
53333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53335
53336    else
53337      # We're on a unix platform. Hooray! :)
53338      path="$POTENTIAL_FREETYPE_LIB_PATH"
53339      has_space=`$ECHO "$path" | $GREP " "`
53340      if test "x$has_space" != x; then
53341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53344      fi
53345
53346      # Use eval to expand a potential ~
53347      eval path="$path"
53348      if test ! -f "$path" && test ! -d "$path"; then
53349        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53350      fi
53351
53352      if test -d "$path"; then
53353        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53354      else
53355        dir="`$DIRNAME "$path"`"
53356        base="`$BASENAME "$path"`"
53357        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53358      fi
53359    fi
53360  fi
53361
53362
53363    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53365$as_echo_n "checking for freetype includes... " >&6; }
53366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53367$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53368    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53370$as_echo_n "checking for freetype libraries... " >&6; }
53371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53372$as_echo "$FREETYPE_LIB_PATH" >&6; }
53373  fi
53374
53375          fi
53376          if test "x$FOUND_FREETYPE" != xyes; then
53377            FREETYPE_BASE_DIR="$HOME/freetype"
53378
53379  windows_path="$FREETYPE_BASE_DIR"
53380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53381    unix_path=`$CYGPATH -u "$windows_path"`
53382    FREETYPE_BASE_DIR="$unix_path"
53383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53385    FREETYPE_BASE_DIR="$unix_path"
53386  fi
53387
53388            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53389
53390  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53391  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53392  METHOD="well-known location"
53393
53394  # Let's start with an optimistic view of the world :-)
53395  FOUND_FREETYPE=yes
53396
53397  # First look for the canonical freetype main include file ft2build.h.
53398  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53399    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53400    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53401    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53402      # Fail.
53403      FOUND_FREETYPE=no
53404    fi
53405  fi
53406
53407  if test "x$FOUND_FREETYPE" = xyes; then
53408    # Include file found, let's continue the sanity check.
53409    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53410$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53411
53412    # Reset to default value
53413    FREETYPE_BASE_NAME=freetype
53414    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53415    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53416      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53417          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53418        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53419        # for the .6 version explicitly.
53420        FREETYPE_BASE_NAME=freetype.6
53421        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53422        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53423$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53424      else
53425        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53426$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53427        FOUND_FREETYPE=no
53428      fi
53429    else
53430      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53431        # On Windows, we will need both .lib and .dll file.
53432        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53433          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53434$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53435          FOUND_FREETYPE=no
53436        fi
53437      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53438          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53439        # Found lib in isa dir, use that instead.
53440        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53441        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53442$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53443      fi
53444    fi
53445  fi
53446
53447  if test "x$FOUND_FREETYPE" = xyes; then
53448
53449  # Only process if variable expands to non-empty
53450
53451  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53452    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53453
53454  # Input might be given as Windows format, start by converting to
53455  # unix format.
53456  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53457  new_path=`$CYGPATH -u "$path"`
53458
53459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53462  # "foo.exe" is OK but "foo" is an error.
53463  #
53464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53465  # It is also a way to make sure we got the proper file name for the real test later on.
53466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53467  if test "x$test_shortpath" = x; then
53468    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53469$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53470    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53471  fi
53472
53473  # Call helper function which possibly converts this using DOS-style short mode.
53474  # If so, the updated path is stored in $new_path.
53475
53476  input_path="$new_path"
53477  # Check if we need to convert this using DOS-style short mode. If the path
53478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53479  # take no chances and rewrite it.
53480  # Note: m4 eats our [], so we need to use [ and ] instead.
53481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53482  if test "x$has_forbidden_chars" != x; then
53483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53487      # Going to short mode and back again did indeed matter. Since short mode is
53488      # case insensitive, let's make it lowercase to improve readability.
53489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53490      # Now convert it back to Unix-style (cygpath)
53491      input_path=`$CYGPATH -u "$shortmode_path"`
53492      new_path="$input_path"
53493    fi
53494  fi
53495
53496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53497  if test "x$test_cygdrive_prefix" = x; then
53498    # As a simple fix, exclude /usr/bin since it's not a real path.
53499    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53501      # a path prefixed by /cygdrive for fixpath to work.
53502      new_path="$CYGWIN_ROOT_PATH$input_path"
53503    fi
53504  fi
53505
53506
53507  if test "x$path" != "x$new_path"; then
53508    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53511  fi
53512
53513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53514
53515  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53516  has_colon=`$ECHO $path | $GREP ^.:`
53517  new_path="$path"
53518  if test "x$has_colon" = x; then
53519    # Not in mixed or Windows style, start by that.
53520    new_path=`cmd //c echo $path`
53521  fi
53522
53523
53524  input_path="$new_path"
53525  # Check if we need to convert this using DOS-style short mode. If the path
53526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53527  # take no chances and rewrite it.
53528  # Note: m4 eats our [], so we need to use [ and ] instead.
53529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53530  if test "x$has_forbidden_chars" != x; then
53531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53533  fi
53534
53535
53536  windows_path="$new_path"
53537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53538    unix_path=`$CYGPATH -u "$windows_path"`
53539    new_path="$unix_path"
53540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53542    new_path="$unix_path"
53543  fi
53544
53545  if test "x$path" != "x$new_path"; then
53546    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53548$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53549  fi
53550
53551  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53552  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53553
53554    else
53555      # We're on a unix platform. Hooray! :)
53556      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53557      has_space=`$ECHO "$path" | $GREP " "`
53558      if test "x$has_space" != x; then
53559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53560$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53561        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53562      fi
53563
53564      # Use eval to expand a potential ~
53565      eval path="$path"
53566      if test ! -f "$path" && test ! -d "$path"; then
53567        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53568      fi
53569
53570      if test -d "$path"; then
53571        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53572      else
53573        dir="`$DIRNAME "$path"`"
53574        base="`$BASENAME "$path"`"
53575        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53576      fi
53577    fi
53578  fi
53579
53580
53581  # Only process if variable expands to non-empty
53582
53583  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53585
53586  # Input might be given as Windows format, start by converting to
53587  # unix format.
53588  path="$POTENTIAL_FREETYPE_LIB_PATH"
53589  new_path=`$CYGPATH -u "$path"`
53590
53591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53594  # "foo.exe" is OK but "foo" is an error.
53595  #
53596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53597  # It is also a way to make sure we got the proper file name for the real test later on.
53598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53599  if test "x$test_shortpath" = x; then
53600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53602    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53603  fi
53604
53605  # Call helper function which possibly converts this using DOS-style short mode.
53606  # If so, the updated path is stored in $new_path.
53607
53608  input_path="$new_path"
53609  # Check if we need to convert this using DOS-style short mode. If the path
53610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53611  # take no chances and rewrite it.
53612  # Note: m4 eats our [], so we need to use [ and ] instead.
53613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53614  if test "x$has_forbidden_chars" != x; then
53615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53619      # Going to short mode and back again did indeed matter. Since short mode is
53620      # case insensitive, let's make it lowercase to improve readability.
53621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53622      # Now convert it back to Unix-style (cygpath)
53623      input_path=`$CYGPATH -u "$shortmode_path"`
53624      new_path="$input_path"
53625    fi
53626  fi
53627
53628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53629  if test "x$test_cygdrive_prefix" = x; then
53630    # As a simple fix, exclude /usr/bin since it's not a real path.
53631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53633      # a path prefixed by /cygdrive for fixpath to work.
53634      new_path="$CYGWIN_ROOT_PATH$input_path"
53635    fi
53636  fi
53637
53638
53639  if test "x$path" != "x$new_path"; then
53640    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53642$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53643  fi
53644
53645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53646
53647  path="$POTENTIAL_FREETYPE_LIB_PATH"
53648  has_colon=`$ECHO $path | $GREP ^.:`
53649  new_path="$path"
53650  if test "x$has_colon" = x; then
53651    # Not in mixed or Windows style, start by that.
53652    new_path=`cmd //c echo $path`
53653  fi
53654
53655
53656  input_path="$new_path"
53657  # Check if we need to convert this using DOS-style short mode. If the path
53658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53659  # take no chances and rewrite it.
53660  # Note: m4 eats our [], so we need to use [ and ] instead.
53661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53662  if test "x$has_forbidden_chars" != x; then
53663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53665  fi
53666
53667
53668  windows_path="$new_path"
53669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53670    unix_path=`$CYGPATH -u "$windows_path"`
53671    new_path="$unix_path"
53672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53674    new_path="$unix_path"
53675  fi
53676
53677  if test "x$path" != "x$new_path"; then
53678    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53680$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53681  fi
53682
53683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53685
53686    else
53687      # We're on a unix platform. Hooray! :)
53688      path="$POTENTIAL_FREETYPE_LIB_PATH"
53689      has_space=`$ECHO "$path" | $GREP " "`
53690      if test "x$has_space" != x; then
53691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53692$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53694      fi
53695
53696      # Use eval to expand a potential ~
53697      eval path="$path"
53698      if test ! -f "$path" && test ! -d "$path"; then
53699        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53700      fi
53701
53702      if test -d "$path"; then
53703        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53704      else
53705        dir="`$DIRNAME "$path"`"
53706        base="`$BASENAME "$path"`"
53707        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53708      fi
53709    fi
53710  fi
53711
53712
53713    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53715$as_echo_n "checking for freetype includes... " >&6; }
53716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53717$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53718    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53720$as_echo_n "checking for freetype libraries... " >&6; }
53721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53722$as_echo "$FREETYPE_LIB_PATH" >&6; }
53723  fi
53724
53725            else
53726
53727  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53728  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53729  METHOD="well-known location"
53730
53731  # Let's start with an optimistic view of the world :-)
53732  FOUND_FREETYPE=yes
53733
53734  # First look for the canonical freetype main include file ft2build.h.
53735  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53736    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53737    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53738    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53739      # Fail.
53740      FOUND_FREETYPE=no
53741    fi
53742  fi
53743
53744  if test "x$FOUND_FREETYPE" = xyes; then
53745    # Include file found, let's continue the sanity check.
53746    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53747$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53748
53749    # Reset to default value
53750    FREETYPE_BASE_NAME=freetype
53751    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53752    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53753      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53754          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53755        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53756        # for the .6 version explicitly.
53757        FREETYPE_BASE_NAME=freetype.6
53758        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53759        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53760$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53761      else
53762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53763$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53764        FOUND_FREETYPE=no
53765      fi
53766    else
53767      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53768        # On Windows, we will need both .lib and .dll file.
53769        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53770          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53771$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53772          FOUND_FREETYPE=no
53773        fi
53774      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53775          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53776        # Found lib in isa dir, use that instead.
53777        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53778        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53779$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53780      fi
53781    fi
53782  fi
53783
53784  if test "x$FOUND_FREETYPE" = xyes; then
53785
53786  # Only process if variable expands to non-empty
53787
53788  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53790
53791  # Input might be given as Windows format, start by converting to
53792  # unix format.
53793  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53794  new_path=`$CYGPATH -u "$path"`
53795
53796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53799  # "foo.exe" is OK but "foo" is an error.
53800  #
53801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53802  # It is also a way to make sure we got the proper file name for the real test later on.
53803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53804  if test "x$test_shortpath" = x; then
53805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53807    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53808  fi
53809
53810  # Call helper function which possibly converts this using DOS-style short mode.
53811  # If so, the updated path is stored in $new_path.
53812
53813  input_path="$new_path"
53814  # Check if we need to convert this using DOS-style short mode. If the path
53815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53816  # take no chances and rewrite it.
53817  # Note: m4 eats our [], so we need to use [ and ] instead.
53818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53819  if test "x$has_forbidden_chars" != x; then
53820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53824      # Going to short mode and back again did indeed matter. Since short mode is
53825      # case insensitive, let's make it lowercase to improve readability.
53826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53827      # Now convert it back to Unix-style (cygpath)
53828      input_path=`$CYGPATH -u "$shortmode_path"`
53829      new_path="$input_path"
53830    fi
53831  fi
53832
53833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53834  if test "x$test_cygdrive_prefix" = x; then
53835    # As a simple fix, exclude /usr/bin since it's not a real path.
53836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53838      # a path prefixed by /cygdrive for fixpath to work.
53839      new_path="$CYGWIN_ROOT_PATH$input_path"
53840    fi
53841  fi
53842
53843
53844  if test "x$path" != "x$new_path"; then
53845    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53848  fi
53849
53850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53851
53852  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53853  has_colon=`$ECHO $path | $GREP ^.:`
53854  new_path="$path"
53855  if test "x$has_colon" = x; then
53856    # Not in mixed or Windows style, start by that.
53857    new_path=`cmd //c echo $path`
53858  fi
53859
53860
53861  input_path="$new_path"
53862  # Check if we need to convert this using DOS-style short mode. If the path
53863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53864  # take no chances and rewrite it.
53865  # Note: m4 eats our [], so we need to use [ and ] instead.
53866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53867  if test "x$has_forbidden_chars" != x; then
53868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53870  fi
53871
53872
53873  windows_path="$new_path"
53874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53875    unix_path=`$CYGPATH -u "$windows_path"`
53876    new_path="$unix_path"
53877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53879    new_path="$unix_path"
53880  fi
53881
53882  if test "x$path" != "x$new_path"; then
53883    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53886  fi
53887
53888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53890
53891    else
53892      # We're on a unix platform. Hooray! :)
53893      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53894      has_space=`$ECHO "$path" | $GREP " "`
53895      if test "x$has_space" != x; then
53896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53899      fi
53900
53901      # Use eval to expand a potential ~
53902      eval path="$path"
53903      if test ! -f "$path" && test ! -d "$path"; then
53904        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53905      fi
53906
53907      if test -d "$path"; then
53908        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53909      else
53910        dir="`$DIRNAME "$path"`"
53911        base="`$BASENAME "$path"`"
53912        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53913      fi
53914    fi
53915  fi
53916
53917
53918  # Only process if variable expands to non-empty
53919
53920  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53922
53923  # Input might be given as Windows format, start by converting to
53924  # unix format.
53925  path="$POTENTIAL_FREETYPE_LIB_PATH"
53926  new_path=`$CYGPATH -u "$path"`
53927
53928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53931  # "foo.exe" is OK but "foo" is an error.
53932  #
53933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53934  # It is also a way to make sure we got the proper file name for the real test later on.
53935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53936  if test "x$test_shortpath" = x; then
53937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53939    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53940  fi
53941
53942  # Call helper function which possibly converts this using DOS-style short mode.
53943  # If so, the updated path is stored in $new_path.
53944
53945  input_path="$new_path"
53946  # Check if we need to convert this using DOS-style short mode. If the path
53947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53948  # take no chances and rewrite it.
53949  # Note: m4 eats our [], so we need to use [ and ] instead.
53950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53951  if test "x$has_forbidden_chars" != x; then
53952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53956      # Going to short mode and back again did indeed matter. Since short mode is
53957      # case insensitive, let's make it lowercase to improve readability.
53958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53959      # Now convert it back to Unix-style (cygpath)
53960      input_path=`$CYGPATH -u "$shortmode_path"`
53961      new_path="$input_path"
53962    fi
53963  fi
53964
53965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53966  if test "x$test_cygdrive_prefix" = x; then
53967    # As a simple fix, exclude /usr/bin since it's not a real path.
53968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53970      # a path prefixed by /cygdrive for fixpath to work.
53971      new_path="$CYGWIN_ROOT_PATH$input_path"
53972    fi
53973  fi
53974
53975
53976  if test "x$path" != "x$new_path"; then
53977    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53979$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53980  fi
53981
53982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53983
53984  path="$POTENTIAL_FREETYPE_LIB_PATH"
53985  has_colon=`$ECHO $path | $GREP ^.:`
53986  new_path="$path"
53987  if test "x$has_colon" = x; then
53988    # Not in mixed or Windows style, start by that.
53989    new_path=`cmd //c echo $path`
53990  fi
53991
53992
53993  input_path="$new_path"
53994  # Check if we need to convert this using DOS-style short mode. If the path
53995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53996  # take no chances and rewrite it.
53997  # Note: m4 eats our [], so we need to use [ and ] instead.
53998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53999  if test "x$has_forbidden_chars" != x; then
54000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54002  fi
54003
54004
54005  windows_path="$new_path"
54006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54007    unix_path=`$CYGPATH -u "$windows_path"`
54008    new_path="$unix_path"
54009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54011    new_path="$unix_path"
54012  fi
54013
54014  if test "x$path" != "x$new_path"; then
54015    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54018  fi
54019
54020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54022
54023    else
54024      # We're on a unix platform. Hooray! :)
54025      path="$POTENTIAL_FREETYPE_LIB_PATH"
54026      has_space=`$ECHO "$path" | $GREP " "`
54027      if test "x$has_space" != x; then
54028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54031      fi
54032
54033      # Use eval to expand a potential ~
54034      eval path="$path"
54035      if test ! -f "$path" && test ! -d "$path"; then
54036        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54037      fi
54038
54039      if test -d "$path"; then
54040        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54041      else
54042        dir="`$DIRNAME "$path"`"
54043        base="`$BASENAME "$path"`"
54044        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54045      fi
54046    fi
54047  fi
54048
54049
54050    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54052$as_echo_n "checking for freetype includes... " >&6; }
54053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54054$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54055    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54057$as_echo_n "checking for freetype libraries... " >&6; }
54058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54059$as_echo "$FREETYPE_LIB_PATH" >&6; }
54060  fi
54061
54062            fi
54063            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54064                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54065              # Source is available, as a last resort try to build freetype in default location
54066
54067  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54068  BUILD_FREETYPE=yes
54069
54070  # Check if the freetype sources are acessible..
54071  if ! test -d $FREETYPE_SRC_PATH; then
54072    { $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
54073$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54074    BUILD_FREETYPE=no
54075  fi
54076  # ..and contain a vc2010 project file
54077  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54078  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54079    { $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
54080$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54081    BUILD_FREETYPE=no
54082  fi
54083  # Now check if configure found a version of 'msbuild.exe'
54084  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54085    { $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
54086$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;}
54087    BUILD_FREETYPE=no
54088  fi
54089
54090  # Ready to go..
54091  if test "x$BUILD_FREETYPE" = xyes; then
54092    # msbuild requires trailing slashes for output directories
54093    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54094    freetype_lib_path_unix="$freetype_lib_path"
54095    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54096
54097  unix_path="$vcxproj_path"
54098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54099    windows_path=`$CYGPATH -m "$unix_path"`
54100    vcxproj_path="$windows_path"
54101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54102    windows_path=`cmd //c echo $unix_path`
54103    vcxproj_path="$windows_path"
54104  fi
54105
54106
54107  unix_path="$freetype_lib_path"
54108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54109    windows_path=`$CYGPATH -m "$unix_path"`
54110    freetype_lib_path="$windows_path"
54111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54112    windows_path=`cmd //c echo $unix_path`
54113    freetype_lib_path="$windows_path"
54114  fi
54115
54116
54117  unix_path="$freetype_obj_path"
54118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54119    windows_path=`$CYGPATH -m "$unix_path"`
54120    freetype_obj_path="$windows_path"
54121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54122    windows_path=`cmd //c echo $unix_path`
54123    freetype_obj_path="$windows_path"
54124  fi
54125
54126    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54127      freetype_platform=x64
54128    else
54129      freetype_platform=win32
54130    fi
54131
54132    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54133    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54134    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54135    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54136    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54137$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54138
54139    # First we try to build the freetype.dll
54140    $ECHO -e "@echo off\n"\
54141        "$MSBUILD $vcxproj_path "\
54142        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54143        "/p:Configuration=\"Release Multithreaded\" "\
54144        "/p:Platform=$freetype_platform "\
54145        "/p:ConfigurationType=DynamicLibrary "\
54146        "/p:TargetName=freetype "\
54147        "/p:OutDir=\"$freetype_lib_path\" "\
54148        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54149    cmd /c freetype.bat
54150
54151    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54152      # If that succeeds we also build freetype.lib
54153      $ECHO -e "@echo off\n"\
54154          "$MSBUILD $vcxproj_path "\
54155          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54156          "/p:Configuration=\"Release Multithreaded\" "\
54157          "/p:Platform=$freetype_platform "\
54158          "/p:ConfigurationType=StaticLibrary "\
54159          "/p:TargetName=freetype "\
54160          "/p:OutDir=\"$freetype_lib_path\" "\
54161          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54162      cmd /c freetype.bat
54163
54164      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54165        # Once we build both, lib and dll, set freetype lib and include path appropriately
54166        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54167        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54168        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54169$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54170      else
54171        BUILD_FREETYPE=no
54172      fi
54173    else
54174      BUILD_FREETYPE=no
54175    fi
54176  fi
54177
54178              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54179
54180  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54181  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54182  METHOD="well-known location"
54183
54184  # Let's start with an optimistic view of the world :-)
54185  FOUND_FREETYPE=yes
54186
54187  # First look for the canonical freetype main include file ft2build.h.
54188  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54189    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54190    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54191    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54192      # Fail.
54193      FOUND_FREETYPE=no
54194    fi
54195  fi
54196
54197  if test "x$FOUND_FREETYPE" = xyes; then
54198    # Include file found, let's continue the sanity check.
54199    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54200$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54201
54202    # Reset to default value
54203    FREETYPE_BASE_NAME=freetype
54204    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54205    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54206      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54207          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54208        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54209        # for the .6 version explicitly.
54210        FREETYPE_BASE_NAME=freetype.6
54211        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54212        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54213$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54214      else
54215        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54216$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54217        FOUND_FREETYPE=no
54218      fi
54219    else
54220      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54221        # On Windows, we will need both .lib and .dll file.
54222        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54223          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54224$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54225          FOUND_FREETYPE=no
54226        fi
54227      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54228          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54229        # Found lib in isa dir, use that instead.
54230        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54231        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54232$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54233      fi
54234    fi
54235  fi
54236
54237  if test "x$FOUND_FREETYPE" = xyes; then
54238
54239  # Only process if variable expands to non-empty
54240
54241  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54243
54244  # Input might be given as Windows format, start by converting to
54245  # unix format.
54246  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54247  new_path=`$CYGPATH -u "$path"`
54248
54249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54252  # "foo.exe" is OK but "foo" is an error.
54253  #
54254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54255  # It is also a way to make sure we got the proper file name for the real test later on.
54256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54257  if test "x$test_shortpath" = x; then
54258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54260    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54261  fi
54262
54263  # Call helper function which possibly converts this using DOS-style short mode.
54264  # If so, the updated path is stored in $new_path.
54265
54266  input_path="$new_path"
54267  # Check if we need to convert this using DOS-style short mode. If the path
54268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54269  # take no chances and rewrite it.
54270  # Note: m4 eats our [], so we need to use [ and ] instead.
54271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54272  if test "x$has_forbidden_chars" != x; then
54273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54277      # Going to short mode and back again did indeed matter. Since short mode is
54278      # case insensitive, let's make it lowercase to improve readability.
54279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54280      # Now convert it back to Unix-style (cygpath)
54281      input_path=`$CYGPATH -u "$shortmode_path"`
54282      new_path="$input_path"
54283    fi
54284  fi
54285
54286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54287  if test "x$test_cygdrive_prefix" = x; then
54288    # As a simple fix, exclude /usr/bin since it's not a real path.
54289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54291      # a path prefixed by /cygdrive for fixpath to work.
54292      new_path="$CYGWIN_ROOT_PATH$input_path"
54293    fi
54294  fi
54295
54296
54297  if test "x$path" != "x$new_path"; then
54298    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54301  fi
54302
54303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54304
54305  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54306  has_colon=`$ECHO $path | $GREP ^.:`
54307  new_path="$path"
54308  if test "x$has_colon" = x; then
54309    # Not in mixed or Windows style, start by that.
54310    new_path=`cmd //c echo $path`
54311  fi
54312
54313
54314  input_path="$new_path"
54315  # Check if we need to convert this using DOS-style short mode. If the path
54316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54317  # take no chances and rewrite it.
54318  # Note: m4 eats our [], so we need to use [ and ] instead.
54319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54320  if test "x$has_forbidden_chars" != x; then
54321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54323  fi
54324
54325
54326  windows_path="$new_path"
54327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54328    unix_path=`$CYGPATH -u "$windows_path"`
54329    new_path="$unix_path"
54330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54332    new_path="$unix_path"
54333  fi
54334
54335  if test "x$path" != "x$new_path"; then
54336    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54339  fi
54340
54341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54343
54344    else
54345      # We're on a unix platform. Hooray! :)
54346      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54347      has_space=`$ECHO "$path" | $GREP " "`
54348      if test "x$has_space" != x; then
54349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54352      fi
54353
54354      # Use eval to expand a potential ~
54355      eval path="$path"
54356      if test ! -f "$path" && test ! -d "$path"; then
54357        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54358      fi
54359
54360      if test -d "$path"; then
54361        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54362      else
54363        dir="`$DIRNAME "$path"`"
54364        base="`$BASENAME "$path"`"
54365        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54366      fi
54367    fi
54368  fi
54369
54370
54371  # Only process if variable expands to non-empty
54372
54373  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54375
54376  # Input might be given as Windows format, start by converting to
54377  # unix format.
54378  path="$POTENTIAL_FREETYPE_LIB_PATH"
54379  new_path=`$CYGPATH -u "$path"`
54380
54381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54384  # "foo.exe" is OK but "foo" is an error.
54385  #
54386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54387  # It is also a way to make sure we got the proper file name for the real test later on.
54388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54389  if test "x$test_shortpath" = x; then
54390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54392    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54393  fi
54394
54395  # Call helper function which possibly converts this using DOS-style short mode.
54396  # If so, the updated path is stored in $new_path.
54397
54398  input_path="$new_path"
54399  # Check if we need to convert this using DOS-style short mode. If the path
54400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54401  # take no chances and rewrite it.
54402  # Note: m4 eats our [], so we need to use [ and ] instead.
54403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54404  if test "x$has_forbidden_chars" != x; then
54405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54409      # Going to short mode and back again did indeed matter. Since short mode is
54410      # case insensitive, let's make it lowercase to improve readability.
54411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54412      # Now convert it back to Unix-style (cygpath)
54413      input_path=`$CYGPATH -u "$shortmode_path"`
54414      new_path="$input_path"
54415    fi
54416  fi
54417
54418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54419  if test "x$test_cygdrive_prefix" = x; then
54420    # As a simple fix, exclude /usr/bin since it's not a real path.
54421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54423      # a path prefixed by /cygdrive for fixpath to work.
54424      new_path="$CYGWIN_ROOT_PATH$input_path"
54425    fi
54426  fi
54427
54428
54429  if test "x$path" != "x$new_path"; then
54430    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54433  fi
54434
54435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54436
54437  path="$POTENTIAL_FREETYPE_LIB_PATH"
54438  has_colon=`$ECHO $path | $GREP ^.:`
54439  new_path="$path"
54440  if test "x$has_colon" = x; then
54441    # Not in mixed or Windows style, start by that.
54442    new_path=`cmd //c echo $path`
54443  fi
54444
54445
54446  input_path="$new_path"
54447  # Check if we need to convert this using DOS-style short mode. If the path
54448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54449  # take no chances and rewrite it.
54450  # Note: m4 eats our [], so we need to use [ and ] instead.
54451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54452  if test "x$has_forbidden_chars" != x; then
54453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54455  fi
54456
54457
54458  windows_path="$new_path"
54459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54460    unix_path=`$CYGPATH -u "$windows_path"`
54461    new_path="$unix_path"
54462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54464    new_path="$unix_path"
54465  fi
54466
54467  if test "x$path" != "x$new_path"; then
54468    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54470$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54471  fi
54472
54473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54475
54476    else
54477      # We're on a unix platform. Hooray! :)
54478      path="$POTENTIAL_FREETYPE_LIB_PATH"
54479      has_space=`$ECHO "$path" | $GREP " "`
54480      if test "x$has_space" != x; then
54481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54482$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54483        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54484      fi
54485
54486      # Use eval to expand a potential ~
54487      eval path="$path"
54488      if test ! -f "$path" && test ! -d "$path"; then
54489        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54490      fi
54491
54492      if test -d "$path"; then
54493        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54494      else
54495        dir="`$DIRNAME "$path"`"
54496        base="`$BASENAME "$path"`"
54497        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54498      fi
54499    fi
54500  fi
54501
54502
54503    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54505$as_echo_n "checking for freetype includes... " >&6; }
54506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54507$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54508    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54510$as_echo_n "checking for freetype libraries... " >&6; }
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54512$as_echo "$FREETYPE_LIB_PATH" >&6; }
54513  fi
54514
54515              else
54516
54517  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54518  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54519  METHOD="well-known location"
54520
54521  # Let's start with an optimistic view of the world :-)
54522  FOUND_FREETYPE=yes
54523
54524  # First look for the canonical freetype main include file ft2build.h.
54525  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54526    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54527    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54528    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54529      # Fail.
54530      FOUND_FREETYPE=no
54531    fi
54532  fi
54533
54534  if test "x$FOUND_FREETYPE" = xyes; then
54535    # Include file found, let's continue the sanity check.
54536    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54537$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54538
54539    # Reset to default value
54540    FREETYPE_BASE_NAME=freetype
54541    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54542    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54543      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54544          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54545        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54546        # for the .6 version explicitly.
54547        FREETYPE_BASE_NAME=freetype.6
54548        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54549        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54550$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54551      else
54552        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54553$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54554        FOUND_FREETYPE=no
54555      fi
54556    else
54557      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54558        # On Windows, we will need both .lib and .dll file.
54559        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54560          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54561$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54562          FOUND_FREETYPE=no
54563        fi
54564      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54565          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54566        # Found lib in isa dir, use that instead.
54567        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54568        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54569$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54570      fi
54571    fi
54572  fi
54573
54574  if test "x$FOUND_FREETYPE" = xyes; then
54575
54576  # Only process if variable expands to non-empty
54577
54578  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54580
54581  # Input might be given as Windows format, start by converting to
54582  # unix format.
54583  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54584  new_path=`$CYGPATH -u "$path"`
54585
54586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54589  # "foo.exe" is OK but "foo" is an error.
54590  #
54591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54592  # It is also a way to make sure we got the proper file name for the real test later on.
54593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54594  if test "x$test_shortpath" = x; then
54595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54597    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54598  fi
54599
54600  # Call helper function which possibly converts this using DOS-style short mode.
54601  # If so, the updated path is stored in $new_path.
54602
54603  input_path="$new_path"
54604  # Check if we need to convert this using DOS-style short mode. If the path
54605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54606  # take no chances and rewrite it.
54607  # Note: m4 eats our [], so we need to use [ and ] instead.
54608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54609  if test "x$has_forbidden_chars" != x; then
54610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54614      # Going to short mode and back again did indeed matter. Since short mode is
54615      # case insensitive, let's make it lowercase to improve readability.
54616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54617      # Now convert it back to Unix-style (cygpath)
54618      input_path=`$CYGPATH -u "$shortmode_path"`
54619      new_path="$input_path"
54620    fi
54621  fi
54622
54623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54624  if test "x$test_cygdrive_prefix" = x; then
54625    # As a simple fix, exclude /usr/bin since it's not a real path.
54626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54628      # a path prefixed by /cygdrive for fixpath to work.
54629      new_path="$CYGWIN_ROOT_PATH$input_path"
54630    fi
54631  fi
54632
54633
54634  if test "x$path" != "x$new_path"; then
54635    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54638  fi
54639
54640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54641
54642  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54643  has_colon=`$ECHO $path | $GREP ^.:`
54644  new_path="$path"
54645  if test "x$has_colon" = x; then
54646    # Not in mixed or Windows style, start by that.
54647    new_path=`cmd //c echo $path`
54648  fi
54649
54650
54651  input_path="$new_path"
54652  # Check if we need to convert this using DOS-style short mode. If the path
54653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54654  # take no chances and rewrite it.
54655  # Note: m4 eats our [], so we need to use [ and ] instead.
54656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54657  if test "x$has_forbidden_chars" != x; then
54658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54660  fi
54661
54662
54663  windows_path="$new_path"
54664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54665    unix_path=`$CYGPATH -u "$windows_path"`
54666    new_path="$unix_path"
54667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54669    new_path="$unix_path"
54670  fi
54671
54672  if test "x$path" != "x$new_path"; then
54673    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54676  fi
54677
54678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54680
54681    else
54682      # We're on a unix platform. Hooray! :)
54683      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54684      has_space=`$ECHO "$path" | $GREP " "`
54685      if test "x$has_space" != x; then
54686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54689      fi
54690
54691      # Use eval to expand a potential ~
54692      eval path="$path"
54693      if test ! -f "$path" && test ! -d "$path"; then
54694        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54695      fi
54696
54697      if test -d "$path"; then
54698        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54699      else
54700        dir="`$DIRNAME "$path"`"
54701        base="`$BASENAME "$path"`"
54702        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54703      fi
54704    fi
54705  fi
54706
54707
54708  # Only process if variable expands to non-empty
54709
54710  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54712
54713  # Input might be given as Windows format, start by converting to
54714  # unix format.
54715  path="$POTENTIAL_FREETYPE_LIB_PATH"
54716  new_path=`$CYGPATH -u "$path"`
54717
54718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54721  # "foo.exe" is OK but "foo" is an error.
54722  #
54723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54724  # It is also a way to make sure we got the proper file name for the real test later on.
54725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54726  if test "x$test_shortpath" = x; then
54727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54729    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54730  fi
54731
54732  # Call helper function which possibly converts this using DOS-style short mode.
54733  # If so, the updated path is stored in $new_path.
54734
54735  input_path="$new_path"
54736  # Check if we need to convert this using DOS-style short mode. If the path
54737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54738  # take no chances and rewrite it.
54739  # Note: m4 eats our [], so we need to use [ and ] instead.
54740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54741  if test "x$has_forbidden_chars" != x; then
54742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54746      # Going to short mode and back again did indeed matter. Since short mode is
54747      # case insensitive, let's make it lowercase to improve readability.
54748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54749      # Now convert it back to Unix-style (cygpath)
54750      input_path=`$CYGPATH -u "$shortmode_path"`
54751      new_path="$input_path"
54752    fi
54753  fi
54754
54755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54756  if test "x$test_cygdrive_prefix" = x; then
54757    # As a simple fix, exclude /usr/bin since it's not a real path.
54758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54760      # a path prefixed by /cygdrive for fixpath to work.
54761      new_path="$CYGWIN_ROOT_PATH$input_path"
54762    fi
54763  fi
54764
54765
54766  if test "x$path" != "x$new_path"; then
54767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54770  fi
54771
54772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54773
54774  path="$POTENTIAL_FREETYPE_LIB_PATH"
54775  has_colon=`$ECHO $path | $GREP ^.:`
54776  new_path="$path"
54777  if test "x$has_colon" = x; then
54778    # Not in mixed or Windows style, start by that.
54779    new_path=`cmd //c echo $path`
54780  fi
54781
54782
54783  input_path="$new_path"
54784  # Check if we need to convert this using DOS-style short mode. If the path
54785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54786  # take no chances and rewrite it.
54787  # Note: m4 eats our [], so we need to use [ and ] instead.
54788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54789  if test "x$has_forbidden_chars" != x; then
54790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54792  fi
54793
54794
54795  windows_path="$new_path"
54796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54797    unix_path=`$CYGPATH -u "$windows_path"`
54798    new_path="$unix_path"
54799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54801    new_path="$unix_path"
54802  fi
54803
54804  if test "x$path" != "x$new_path"; then
54805    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54808  fi
54809
54810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54812
54813    else
54814      # We're on a unix platform. Hooray! :)
54815      path="$POTENTIAL_FREETYPE_LIB_PATH"
54816      has_space=`$ECHO "$path" | $GREP " "`
54817      if test "x$has_space" != x; then
54818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54819$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54821      fi
54822
54823      # Use eval to expand a potential ~
54824      eval path="$path"
54825      if test ! -f "$path" && test ! -d "$path"; then
54826        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54827      fi
54828
54829      if test -d "$path"; then
54830        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54831      else
54832        dir="`$DIRNAME "$path"`"
54833        base="`$BASENAME "$path"`"
54834        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54835      fi
54836    fi
54837  fi
54838
54839
54840    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54842$as_echo_n "checking for freetype includes... " >&6; }
54843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54844$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54845    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54847$as_echo_n "checking for freetype libraries... " >&6; }
54848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54849$as_echo "$FREETYPE_LIB_PATH" >&6; }
54850  fi
54851
54852              fi
54853            fi
54854          fi
54855        else
54856          FREETYPE_BASE_DIR="$SYSROOT/usr"
54857
54858  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54859  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54860  METHOD="well-known location"
54861
54862  # Let's start with an optimistic view of the world :-)
54863  FOUND_FREETYPE=yes
54864
54865  # First look for the canonical freetype main include file ft2build.h.
54866  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54867    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54868    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54869    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54870      # Fail.
54871      FOUND_FREETYPE=no
54872    fi
54873  fi
54874
54875  if test "x$FOUND_FREETYPE" = xyes; then
54876    # Include file found, let's continue the sanity check.
54877    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54878$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54879
54880    # Reset to default value
54881    FREETYPE_BASE_NAME=freetype
54882    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54883    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54884      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54885          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54886        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54887        # for the .6 version explicitly.
54888        FREETYPE_BASE_NAME=freetype.6
54889        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54890        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54891$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54892      else
54893        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54894$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54895        FOUND_FREETYPE=no
54896      fi
54897    else
54898      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54899        # On Windows, we will need both .lib and .dll file.
54900        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54901          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54902$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54903          FOUND_FREETYPE=no
54904        fi
54905      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54906          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54907        # Found lib in isa dir, use that instead.
54908        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54909        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54910$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54911      fi
54912    fi
54913  fi
54914
54915  if test "x$FOUND_FREETYPE" = xyes; then
54916
54917  # Only process if variable expands to non-empty
54918
54919  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54921
54922  # Input might be given as Windows format, start by converting to
54923  # unix format.
54924  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54925  new_path=`$CYGPATH -u "$path"`
54926
54927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54930  # "foo.exe" is OK but "foo" is an error.
54931  #
54932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54933  # It is also a way to make sure we got the proper file name for the real test later on.
54934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54935  if test "x$test_shortpath" = x; then
54936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54937$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54938    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54939  fi
54940
54941  # Call helper function which possibly converts this using DOS-style short mode.
54942  # If so, the updated path is stored in $new_path.
54943
54944  input_path="$new_path"
54945  # Check if we need to convert this using DOS-style short mode. If the path
54946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54947  # take no chances and rewrite it.
54948  # Note: m4 eats our [], so we need to use [ and ] instead.
54949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54950  if test "x$has_forbidden_chars" != x; then
54951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54955      # Going to short mode and back again did indeed matter. Since short mode is
54956      # case insensitive, let's make it lowercase to improve readability.
54957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54958      # Now convert it back to Unix-style (cygpath)
54959      input_path=`$CYGPATH -u "$shortmode_path"`
54960      new_path="$input_path"
54961    fi
54962  fi
54963
54964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54965  if test "x$test_cygdrive_prefix" = x; then
54966    # As a simple fix, exclude /usr/bin since it's not a real path.
54967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54969      # a path prefixed by /cygdrive for fixpath to work.
54970      new_path="$CYGWIN_ROOT_PATH$input_path"
54971    fi
54972  fi
54973
54974
54975  if test "x$path" != "x$new_path"; then
54976    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54978$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54979  fi
54980
54981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54982
54983  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54984  has_colon=`$ECHO $path | $GREP ^.:`
54985  new_path="$path"
54986  if test "x$has_colon" = x; then
54987    # Not in mixed or Windows style, start by that.
54988    new_path=`cmd //c echo $path`
54989  fi
54990
54991
54992  input_path="$new_path"
54993  # Check if we need to convert this using DOS-style short mode. If the path
54994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54995  # take no chances and rewrite it.
54996  # Note: m4 eats our [], so we need to use [ and ] instead.
54997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54998  if test "x$has_forbidden_chars" != x; then
54999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55001  fi
55002
55003
55004  windows_path="$new_path"
55005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55006    unix_path=`$CYGPATH -u "$windows_path"`
55007    new_path="$unix_path"
55008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55010    new_path="$unix_path"
55011  fi
55012
55013  if test "x$path" != "x$new_path"; then
55014    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55016$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55017  fi
55018
55019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55021
55022    else
55023      # We're on a unix platform. Hooray! :)
55024      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55025      has_space=`$ECHO "$path" | $GREP " "`
55026      if test "x$has_space" != x; then
55027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55030      fi
55031
55032      # Use eval to expand a potential ~
55033      eval path="$path"
55034      if test ! -f "$path" && test ! -d "$path"; then
55035        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55036      fi
55037
55038      if test -d "$path"; then
55039        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55040      else
55041        dir="`$DIRNAME "$path"`"
55042        base="`$BASENAME "$path"`"
55043        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55044      fi
55045    fi
55046  fi
55047
55048
55049  # Only process if variable expands to non-empty
55050
55051  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55053
55054  # Input might be given as Windows format, start by converting to
55055  # unix format.
55056  path="$POTENTIAL_FREETYPE_LIB_PATH"
55057  new_path=`$CYGPATH -u "$path"`
55058
55059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55062  # "foo.exe" is OK but "foo" is an error.
55063  #
55064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55065  # It is also a way to make sure we got the proper file name for the real test later on.
55066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55067  if test "x$test_shortpath" = x; then
55068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55070    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55071  fi
55072
55073  # Call helper function which possibly converts this using DOS-style short mode.
55074  # If so, the updated path is stored in $new_path.
55075
55076  input_path="$new_path"
55077  # Check if we need to convert this using DOS-style short mode. If the path
55078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55079  # take no chances and rewrite it.
55080  # Note: m4 eats our [], so we need to use [ and ] instead.
55081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55082  if test "x$has_forbidden_chars" != x; then
55083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55087      # Going to short mode and back again did indeed matter. Since short mode is
55088      # case insensitive, let's make it lowercase to improve readability.
55089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55090      # Now convert it back to Unix-style (cygpath)
55091      input_path=`$CYGPATH -u "$shortmode_path"`
55092      new_path="$input_path"
55093    fi
55094  fi
55095
55096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55097  if test "x$test_cygdrive_prefix" = x; then
55098    # As a simple fix, exclude /usr/bin since it's not a real path.
55099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55101      # a path prefixed by /cygdrive for fixpath to work.
55102      new_path="$CYGWIN_ROOT_PATH$input_path"
55103    fi
55104  fi
55105
55106
55107  if test "x$path" != "x$new_path"; then
55108    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55111  fi
55112
55113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55114
55115  path="$POTENTIAL_FREETYPE_LIB_PATH"
55116  has_colon=`$ECHO $path | $GREP ^.:`
55117  new_path="$path"
55118  if test "x$has_colon" = x; then
55119    # Not in mixed or Windows style, start by that.
55120    new_path=`cmd //c echo $path`
55121  fi
55122
55123
55124  input_path="$new_path"
55125  # Check if we need to convert this using DOS-style short mode. If the path
55126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55127  # take no chances and rewrite it.
55128  # Note: m4 eats our [], so we need to use [ and ] instead.
55129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55130  if test "x$has_forbidden_chars" != x; then
55131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55133  fi
55134
55135
55136  windows_path="$new_path"
55137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55138    unix_path=`$CYGPATH -u "$windows_path"`
55139    new_path="$unix_path"
55140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55142    new_path="$unix_path"
55143  fi
55144
55145  if test "x$path" != "x$new_path"; then
55146    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55149  fi
55150
55151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55153
55154    else
55155      # We're on a unix platform. Hooray! :)
55156      path="$POTENTIAL_FREETYPE_LIB_PATH"
55157      has_space=`$ECHO "$path" | $GREP " "`
55158      if test "x$has_space" != x; then
55159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55162      fi
55163
55164      # Use eval to expand a potential ~
55165      eval path="$path"
55166      if test ! -f "$path" && test ! -d "$path"; then
55167        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55168      fi
55169
55170      if test -d "$path"; then
55171        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55172      else
55173        dir="`$DIRNAME "$path"`"
55174        base="`$BASENAME "$path"`"
55175        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55176      fi
55177    fi
55178  fi
55179
55180
55181    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55183$as_echo_n "checking for freetype includes... " >&6; }
55184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55185$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55186    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55188$as_echo_n "checking for freetype libraries... " >&6; }
55189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55190$as_echo "$FREETYPE_LIB_PATH" >&6; }
55191  fi
55192
55193
55194          if test "x$FOUND_FREETYPE" != xyes; then
55195            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55196
55197  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55198  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55199  METHOD="well-known location"
55200
55201  # Let's start with an optimistic view of the world :-)
55202  FOUND_FREETYPE=yes
55203
55204  # First look for the canonical freetype main include file ft2build.h.
55205  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55206    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55207    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55208    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55209      # Fail.
55210      FOUND_FREETYPE=no
55211    fi
55212  fi
55213
55214  if test "x$FOUND_FREETYPE" = xyes; then
55215    # Include file found, let's continue the sanity check.
55216    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55217$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55218
55219    # Reset to default value
55220    FREETYPE_BASE_NAME=freetype
55221    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55222    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55223      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55224          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55225        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55226        # for the .6 version explicitly.
55227        FREETYPE_BASE_NAME=freetype.6
55228        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55229        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55230$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55231      else
55232        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55233$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55234        FOUND_FREETYPE=no
55235      fi
55236    else
55237      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55238        # On Windows, we will need both .lib and .dll file.
55239        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55240          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55241$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55242          FOUND_FREETYPE=no
55243        fi
55244      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55245          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55246        # Found lib in isa dir, use that instead.
55247        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55248        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55249$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55250      fi
55251    fi
55252  fi
55253
55254  if test "x$FOUND_FREETYPE" = xyes; then
55255
55256  # Only process if variable expands to non-empty
55257
55258  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55260
55261  # Input might be given as Windows format, start by converting to
55262  # unix format.
55263  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55264  new_path=`$CYGPATH -u "$path"`
55265
55266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55269  # "foo.exe" is OK but "foo" is an error.
55270  #
55271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55272  # It is also a way to make sure we got the proper file name for the real test later on.
55273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55274  if test "x$test_shortpath" = x; then
55275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55277    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55278  fi
55279
55280  # Call helper function which possibly converts this using DOS-style short mode.
55281  # If so, the updated path is stored in $new_path.
55282
55283  input_path="$new_path"
55284  # Check if we need to convert this using DOS-style short mode. If the path
55285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55286  # take no chances and rewrite it.
55287  # Note: m4 eats our [], so we need to use [ and ] instead.
55288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55289  if test "x$has_forbidden_chars" != x; then
55290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55294      # Going to short mode and back again did indeed matter. Since short mode is
55295      # case insensitive, let's make it lowercase to improve readability.
55296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55297      # Now convert it back to Unix-style (cygpath)
55298      input_path=`$CYGPATH -u "$shortmode_path"`
55299      new_path="$input_path"
55300    fi
55301  fi
55302
55303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55304  if test "x$test_cygdrive_prefix" = x; then
55305    # As a simple fix, exclude /usr/bin since it's not a real path.
55306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55308      # a path prefixed by /cygdrive for fixpath to work.
55309      new_path="$CYGWIN_ROOT_PATH$input_path"
55310    fi
55311  fi
55312
55313
55314  if test "x$path" != "x$new_path"; then
55315    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55318  fi
55319
55320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55321
55322  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55323  has_colon=`$ECHO $path | $GREP ^.:`
55324  new_path="$path"
55325  if test "x$has_colon" = x; then
55326    # Not in mixed or Windows style, start by that.
55327    new_path=`cmd //c echo $path`
55328  fi
55329
55330
55331  input_path="$new_path"
55332  # Check if we need to convert this using DOS-style short mode. If the path
55333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55334  # take no chances and rewrite it.
55335  # Note: m4 eats our [], so we need to use [ and ] instead.
55336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55337  if test "x$has_forbidden_chars" != x; then
55338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55340  fi
55341
55342
55343  windows_path="$new_path"
55344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55345    unix_path=`$CYGPATH -u "$windows_path"`
55346    new_path="$unix_path"
55347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55349    new_path="$unix_path"
55350  fi
55351
55352  if test "x$path" != "x$new_path"; then
55353    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55355$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55356  fi
55357
55358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55360
55361    else
55362      # We're on a unix platform. Hooray! :)
55363      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55364      has_space=`$ECHO "$path" | $GREP " "`
55365      if test "x$has_space" != x; then
55366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55369      fi
55370
55371      # Use eval to expand a potential ~
55372      eval path="$path"
55373      if test ! -f "$path" && test ! -d "$path"; then
55374        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55375      fi
55376
55377      if test -d "$path"; then
55378        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55379      else
55380        dir="`$DIRNAME "$path"`"
55381        base="`$BASENAME "$path"`"
55382        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55383      fi
55384    fi
55385  fi
55386
55387
55388  # Only process if variable expands to non-empty
55389
55390  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55392
55393  # Input might be given as Windows format, start by converting to
55394  # unix format.
55395  path="$POTENTIAL_FREETYPE_LIB_PATH"
55396  new_path=`$CYGPATH -u "$path"`
55397
55398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55401  # "foo.exe" is OK but "foo" is an error.
55402  #
55403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55404  # It is also a way to make sure we got the proper file name for the real test later on.
55405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55406  if test "x$test_shortpath" = x; then
55407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55409    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55410  fi
55411
55412  # Call helper function which possibly converts this using DOS-style short mode.
55413  # If so, the updated path is stored in $new_path.
55414
55415  input_path="$new_path"
55416  # Check if we need to convert this using DOS-style short mode. If the path
55417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55418  # take no chances and rewrite it.
55419  # Note: m4 eats our [], so we need to use [ and ] instead.
55420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55421  if test "x$has_forbidden_chars" != x; then
55422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55426      # Going to short mode and back again did indeed matter. Since short mode is
55427      # case insensitive, let's make it lowercase to improve readability.
55428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55429      # Now convert it back to Unix-style (cygpath)
55430      input_path=`$CYGPATH -u "$shortmode_path"`
55431      new_path="$input_path"
55432    fi
55433  fi
55434
55435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55436  if test "x$test_cygdrive_prefix" = x; then
55437    # As a simple fix, exclude /usr/bin since it's not a real path.
55438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55440      # a path prefixed by /cygdrive for fixpath to work.
55441      new_path="$CYGWIN_ROOT_PATH$input_path"
55442    fi
55443  fi
55444
55445
55446  if test "x$path" != "x$new_path"; then
55447    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55450  fi
55451
55452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55453
55454  path="$POTENTIAL_FREETYPE_LIB_PATH"
55455  has_colon=`$ECHO $path | $GREP ^.:`
55456  new_path="$path"
55457  if test "x$has_colon" = x; then
55458    # Not in mixed or Windows style, start by that.
55459    new_path=`cmd //c echo $path`
55460  fi
55461
55462
55463  input_path="$new_path"
55464  # Check if we need to convert this using DOS-style short mode. If the path
55465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55466  # take no chances and rewrite it.
55467  # Note: m4 eats our [], so we need to use [ and ] instead.
55468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55469  if test "x$has_forbidden_chars" != x; then
55470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55472  fi
55473
55474
55475  windows_path="$new_path"
55476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55477    unix_path=`$CYGPATH -u "$windows_path"`
55478    new_path="$unix_path"
55479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55481    new_path="$unix_path"
55482  fi
55483
55484  if test "x$path" != "x$new_path"; then
55485    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55487$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55488  fi
55489
55490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55492
55493    else
55494      # We're on a unix platform. Hooray! :)
55495      path="$POTENTIAL_FREETYPE_LIB_PATH"
55496      has_space=`$ECHO "$path" | $GREP " "`
55497      if test "x$has_space" != x; then
55498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55501      fi
55502
55503      # Use eval to expand a potential ~
55504      eval path="$path"
55505      if test ! -f "$path" && test ! -d "$path"; then
55506        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55507      fi
55508
55509      if test -d "$path"; then
55510        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55511      else
55512        dir="`$DIRNAME "$path"`"
55513        base="`$BASENAME "$path"`"
55514        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55515      fi
55516    fi
55517  fi
55518
55519
55520    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55522$as_echo_n "checking for freetype includes... " >&6; }
55523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55524$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55525    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55527$as_echo_n "checking for freetype libraries... " >&6; }
55528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55529$as_echo "$FREETYPE_LIB_PATH" >&6; }
55530  fi
55531
55532          fi
55533
55534          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55535            if test "x$FOUND_FREETYPE" != xyes; then
55536              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
55537              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
55538
55539  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55540  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55541  METHOD="well-known location"
55542
55543  # Let's start with an optimistic view of the world :-)
55544  FOUND_FREETYPE=yes
55545
55546  # First look for the canonical freetype main include file ft2build.h.
55547  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55548    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55549    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55550    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55551      # Fail.
55552      FOUND_FREETYPE=no
55553    fi
55554  fi
55555
55556  if test "x$FOUND_FREETYPE" = xyes; then
55557    # Include file found, let's continue the sanity check.
55558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55559$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55560
55561    # Reset to default value
55562    FREETYPE_BASE_NAME=freetype
55563    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55564    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55565      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55566          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55567        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55568        # for the .6 version explicitly.
55569        FREETYPE_BASE_NAME=freetype.6
55570        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55571        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55572$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55573      else
55574        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55575$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55576        FOUND_FREETYPE=no
55577      fi
55578    else
55579      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55580        # On Windows, we will need both .lib and .dll file.
55581        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55582          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55583$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55584          FOUND_FREETYPE=no
55585        fi
55586      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55587          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55588        # Found lib in isa dir, use that instead.
55589        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55590        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55591$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55592      fi
55593    fi
55594  fi
55595
55596  if test "x$FOUND_FREETYPE" = xyes; then
55597
55598  # Only process if variable expands to non-empty
55599
55600  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55602
55603  # Input might be given as Windows format, start by converting to
55604  # unix format.
55605  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55606  new_path=`$CYGPATH -u "$path"`
55607
55608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55611  # "foo.exe" is OK but "foo" is an error.
55612  #
55613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55614  # It is also a way to make sure we got the proper file name for the real test later on.
55615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55616  if test "x$test_shortpath" = x; then
55617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55619    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55620  fi
55621
55622  # Call helper function which possibly converts this using DOS-style short mode.
55623  # If so, the updated path is stored in $new_path.
55624
55625  input_path="$new_path"
55626  # Check if we need to convert this using DOS-style short mode. If the path
55627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55628  # take no chances and rewrite it.
55629  # Note: m4 eats our [], so we need to use [ and ] instead.
55630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55631  if test "x$has_forbidden_chars" != x; then
55632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55636      # Going to short mode and back again did indeed matter. Since short mode is
55637      # case insensitive, let's make it lowercase to improve readability.
55638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55639      # Now convert it back to Unix-style (cygpath)
55640      input_path=`$CYGPATH -u "$shortmode_path"`
55641      new_path="$input_path"
55642    fi
55643  fi
55644
55645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55646  if test "x$test_cygdrive_prefix" = x; then
55647    # As a simple fix, exclude /usr/bin since it's not a real path.
55648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55650      # a path prefixed by /cygdrive for fixpath to work.
55651      new_path="$CYGWIN_ROOT_PATH$input_path"
55652    fi
55653  fi
55654
55655
55656  if test "x$path" != "x$new_path"; then
55657    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55659$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55660  fi
55661
55662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55663
55664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55665  has_colon=`$ECHO $path | $GREP ^.:`
55666  new_path="$path"
55667  if test "x$has_colon" = x; then
55668    # Not in mixed or Windows style, start by that.
55669    new_path=`cmd //c echo $path`
55670  fi
55671
55672
55673  input_path="$new_path"
55674  # Check if we need to convert this using DOS-style short mode. If the path
55675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55676  # take no chances and rewrite it.
55677  # Note: m4 eats our [], so we need to use [ and ] instead.
55678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55679  if test "x$has_forbidden_chars" != x; then
55680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55682  fi
55683
55684
55685  windows_path="$new_path"
55686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55687    unix_path=`$CYGPATH -u "$windows_path"`
55688    new_path="$unix_path"
55689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55691    new_path="$unix_path"
55692  fi
55693
55694  if test "x$path" != "x$new_path"; then
55695    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55697$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55698  fi
55699
55700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55702
55703    else
55704      # We're on a unix platform. Hooray! :)
55705      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55706      has_space=`$ECHO "$path" | $GREP " "`
55707      if test "x$has_space" != x; then
55708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55711      fi
55712
55713      # Use eval to expand a potential ~
55714      eval path="$path"
55715      if test ! -f "$path" && test ! -d "$path"; then
55716        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55717      fi
55718
55719      if test -d "$path"; then
55720        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55721      else
55722        dir="`$DIRNAME "$path"`"
55723        base="`$BASENAME "$path"`"
55724        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55725      fi
55726    fi
55727  fi
55728
55729
55730  # Only process if variable expands to non-empty
55731
55732  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55734
55735  # Input might be given as Windows format, start by converting to
55736  # unix format.
55737  path="$POTENTIAL_FREETYPE_LIB_PATH"
55738  new_path=`$CYGPATH -u "$path"`
55739
55740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55743  # "foo.exe" is OK but "foo" is an error.
55744  #
55745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55746  # It is also a way to make sure we got the proper file name for the real test later on.
55747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55748  if test "x$test_shortpath" = x; then
55749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55752  fi
55753
55754  # Call helper function which possibly converts this using DOS-style short mode.
55755  # If so, the updated path is stored in $new_path.
55756
55757  input_path="$new_path"
55758  # Check if we need to convert this using DOS-style short mode. If the path
55759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55760  # take no chances and rewrite it.
55761  # Note: m4 eats our [], so we need to use [ and ] instead.
55762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55763  if test "x$has_forbidden_chars" != x; then
55764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55768      # Going to short mode and back again did indeed matter. Since short mode is
55769      # case insensitive, let's make it lowercase to improve readability.
55770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55771      # Now convert it back to Unix-style (cygpath)
55772      input_path=`$CYGPATH -u "$shortmode_path"`
55773      new_path="$input_path"
55774    fi
55775  fi
55776
55777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55778  if test "x$test_cygdrive_prefix" = x; then
55779    # As a simple fix, exclude /usr/bin since it's not a real path.
55780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55782      # a path prefixed by /cygdrive for fixpath to work.
55783      new_path="$CYGWIN_ROOT_PATH$input_path"
55784    fi
55785  fi
55786
55787
55788  if test "x$path" != "x$new_path"; then
55789    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55792  fi
55793
55794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55795
55796  path="$POTENTIAL_FREETYPE_LIB_PATH"
55797  has_colon=`$ECHO $path | $GREP ^.:`
55798  new_path="$path"
55799  if test "x$has_colon" = x; then
55800    # Not in mixed or Windows style, start by that.
55801    new_path=`cmd //c echo $path`
55802  fi
55803
55804
55805  input_path="$new_path"
55806  # Check if we need to convert this using DOS-style short mode. If the path
55807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55808  # take no chances and rewrite it.
55809  # Note: m4 eats our [], so we need to use [ and ] instead.
55810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55811  if test "x$has_forbidden_chars" != x; then
55812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55814  fi
55815
55816
55817  windows_path="$new_path"
55818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55819    unix_path=`$CYGPATH -u "$windows_path"`
55820    new_path="$unix_path"
55821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55823    new_path="$unix_path"
55824  fi
55825
55826  if test "x$path" != "x$new_path"; then
55827    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55830  fi
55831
55832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55834
55835    else
55836      # We're on a unix platform. Hooray! :)
55837      path="$POTENTIAL_FREETYPE_LIB_PATH"
55838      has_space=`$ECHO "$path" | $GREP " "`
55839      if test "x$has_space" != x; then
55840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55843      fi
55844
55845      # Use eval to expand a potential ~
55846      eval path="$path"
55847      if test ! -f "$path" && test ! -d "$path"; then
55848        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55849      fi
55850
55851      if test -d "$path"; then
55852        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55853      else
55854        dir="`$DIRNAME "$path"`"
55855        base="`$BASENAME "$path"`"
55856        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55857      fi
55858    fi
55859  fi
55860
55861
55862    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55864$as_echo_n "checking for freetype includes... " >&6; }
55865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55866$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55867    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55869$as_echo_n "checking for freetype libraries... " >&6; }
55870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55871$as_echo "$FREETYPE_LIB_PATH" >&6; }
55872  fi
55873
55874            fi
55875          fi
55876
55877          if test "x$FOUND_FREETYPE" != xyes; then
55878            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55879
55880  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55881  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55882  METHOD="well-known location"
55883
55884  # Let's start with an optimistic view of the world :-)
55885  FOUND_FREETYPE=yes
55886
55887  # First look for the canonical freetype main include file ft2build.h.
55888  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55889    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55890    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55891    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55892      # Fail.
55893      FOUND_FREETYPE=no
55894    fi
55895  fi
55896
55897  if test "x$FOUND_FREETYPE" = xyes; then
55898    # Include file found, let's continue the sanity check.
55899    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55900$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55901
55902    # Reset to default value
55903    FREETYPE_BASE_NAME=freetype
55904    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55905    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55906      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55907          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55908        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55909        # for the .6 version explicitly.
55910        FREETYPE_BASE_NAME=freetype.6
55911        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55912        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55913$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55914      else
55915        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55916$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55917        FOUND_FREETYPE=no
55918      fi
55919    else
55920      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55921        # On Windows, we will need both .lib and .dll file.
55922        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55923          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55924$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55925          FOUND_FREETYPE=no
55926        fi
55927      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55928          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55929        # Found lib in isa dir, use that instead.
55930        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55931        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55932$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55933      fi
55934    fi
55935  fi
55936
55937  if test "x$FOUND_FREETYPE" = xyes; then
55938
55939  # Only process if variable expands to non-empty
55940
55941  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55943
55944  # Input might be given as Windows format, start by converting to
55945  # unix format.
55946  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55947  new_path=`$CYGPATH -u "$path"`
55948
55949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55952  # "foo.exe" is OK but "foo" is an error.
55953  #
55954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55955  # It is also a way to make sure we got the proper file name for the real test later on.
55956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55957  if test "x$test_shortpath" = x; then
55958    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55960    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55961  fi
55962
55963  # Call helper function which possibly converts this using DOS-style short mode.
55964  # If so, the updated path is stored in $new_path.
55965
55966  input_path="$new_path"
55967  # Check if we need to convert this using DOS-style short mode. If the path
55968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55969  # take no chances and rewrite it.
55970  # Note: m4 eats our [], so we need to use [ and ] instead.
55971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55972  if test "x$has_forbidden_chars" != x; then
55973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55977      # Going to short mode and back again did indeed matter. Since short mode is
55978      # case insensitive, let's make it lowercase to improve readability.
55979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55980      # Now convert it back to Unix-style (cygpath)
55981      input_path=`$CYGPATH -u "$shortmode_path"`
55982      new_path="$input_path"
55983    fi
55984  fi
55985
55986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55987  if test "x$test_cygdrive_prefix" = x; then
55988    # As a simple fix, exclude /usr/bin since it's not a real path.
55989    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55991      # a path prefixed by /cygdrive for fixpath to work.
55992      new_path="$CYGWIN_ROOT_PATH$input_path"
55993    fi
55994  fi
55995
55996
55997  if test "x$path" != "x$new_path"; then
55998    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56000$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56001  fi
56002
56003    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56004
56005  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56006  has_colon=`$ECHO $path | $GREP ^.:`
56007  new_path="$path"
56008  if test "x$has_colon" = x; then
56009    # Not in mixed or Windows style, start by that.
56010    new_path=`cmd //c echo $path`
56011  fi
56012
56013
56014  input_path="$new_path"
56015  # Check if we need to convert this using DOS-style short mode. If the path
56016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56017  # take no chances and rewrite it.
56018  # Note: m4 eats our [], so we need to use [ and ] instead.
56019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56020  if test "x$has_forbidden_chars" != x; then
56021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56023  fi
56024
56025
56026  windows_path="$new_path"
56027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56028    unix_path=`$CYGPATH -u "$windows_path"`
56029    new_path="$unix_path"
56030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56032    new_path="$unix_path"
56033  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56042  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56043
56044    else
56045      # We're on a unix platform. Hooray! :)
56046      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56047      has_space=`$ECHO "$path" | $GREP " "`
56048      if test "x$has_space" != x; then
56049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56050$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56051        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56052      fi
56053
56054      # Use eval to expand a potential ~
56055      eval path="$path"
56056      if test ! -f "$path" && test ! -d "$path"; then
56057        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56058      fi
56059
56060      if test -d "$path"; then
56061        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56062      else
56063        dir="`$DIRNAME "$path"`"
56064        base="`$BASENAME "$path"`"
56065        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56066      fi
56067    fi
56068  fi
56069
56070
56071  # Only process if variable expands to non-empty
56072
56073  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56075
56076  # Input might be given as Windows format, start by converting to
56077  # unix format.
56078  path="$POTENTIAL_FREETYPE_LIB_PATH"
56079  new_path=`$CYGPATH -u "$path"`
56080
56081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56084  # "foo.exe" is OK but "foo" is an error.
56085  #
56086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56087  # It is also a way to make sure we got the proper file name for the real test later on.
56088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56089  if test "x$test_shortpath" = x; then
56090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56093  fi
56094
56095  # Call helper function which possibly converts this using DOS-style short mode.
56096  # If so, the updated path is stored in $new_path.
56097
56098  input_path="$new_path"
56099  # Check if we need to convert this using DOS-style short mode. If the path
56100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56101  # take no chances and rewrite it.
56102  # Note: m4 eats our [], so we need to use [ and ] instead.
56103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56104  if test "x$has_forbidden_chars" != x; then
56105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56109      # Going to short mode and back again did indeed matter. Since short mode is
56110      # case insensitive, let's make it lowercase to improve readability.
56111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56112      # Now convert it back to Unix-style (cygpath)
56113      input_path=`$CYGPATH -u "$shortmode_path"`
56114      new_path="$input_path"
56115    fi
56116  fi
56117
56118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56119  if test "x$test_cygdrive_prefix" = x; then
56120    # As a simple fix, exclude /usr/bin since it's not a real path.
56121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56123      # a path prefixed by /cygdrive for fixpath to work.
56124      new_path="$CYGWIN_ROOT_PATH$input_path"
56125    fi
56126  fi
56127
56128
56129  if test "x$path" != "x$new_path"; then
56130    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56133  fi
56134
56135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56136
56137  path="$POTENTIAL_FREETYPE_LIB_PATH"
56138  has_colon=`$ECHO $path | $GREP ^.:`
56139  new_path="$path"
56140  if test "x$has_colon" = x; then
56141    # Not in mixed or Windows style, start by that.
56142    new_path=`cmd //c echo $path`
56143  fi
56144
56145
56146  input_path="$new_path"
56147  # Check if we need to convert this using DOS-style short mode. If the path
56148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56149  # take no chances and rewrite it.
56150  # Note: m4 eats our [], so we need to use [ and ] instead.
56151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56152  if test "x$has_forbidden_chars" != x; then
56153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56155  fi
56156
56157
56158  windows_path="$new_path"
56159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56160    unix_path=`$CYGPATH -u "$windows_path"`
56161    new_path="$unix_path"
56162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56164    new_path="$unix_path"
56165  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56175
56176    else
56177      # We're on a unix platform. Hooray! :)
56178      path="$POTENTIAL_FREETYPE_LIB_PATH"
56179      has_space=`$ECHO "$path" | $GREP " "`
56180      if test "x$has_space" != x; then
56181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56184      fi
56185
56186      # Use eval to expand a potential ~
56187      eval path="$path"
56188      if test ! -f "$path" && test ! -d "$path"; then
56189        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56190      fi
56191
56192      if test -d "$path"; then
56193        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56194      else
56195        dir="`$DIRNAME "$path"`"
56196        base="`$BASENAME "$path"`"
56197        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56198      fi
56199    fi
56200  fi
56201
56202
56203    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56205$as_echo_n "checking for freetype includes... " >&6; }
56206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56207$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56208    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56210$as_echo_n "checking for freetype libraries... " >&6; }
56211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56212$as_echo "$FREETYPE_LIB_PATH" >&6; }
56213  fi
56214
56215          fi
56216
56217          if test "x$FOUND_FREETYPE" != xyes; then
56218            FREETYPE_BASE_DIR="$SYSROOT/usr"
56219            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56220
56221  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56222  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56223  METHOD="well-known location"
56224
56225  # Let's start with an optimistic view of the world :-)
56226  FOUND_FREETYPE=yes
56227
56228  # First look for the canonical freetype main include file ft2build.h.
56229  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56230    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56231    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56232    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56233      # Fail.
56234      FOUND_FREETYPE=no
56235    fi
56236  fi
56237
56238  if test "x$FOUND_FREETYPE" = xyes; then
56239    # Include file found, let's continue the sanity check.
56240    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56241$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56242
56243    # Reset to default value
56244    FREETYPE_BASE_NAME=freetype
56245    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56246    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56247      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56248          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56249        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56250        # for the .6 version explicitly.
56251        FREETYPE_BASE_NAME=freetype.6
56252        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56253        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56254$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56255      else
56256        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56257$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56258        FOUND_FREETYPE=no
56259      fi
56260    else
56261      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56262        # On Windows, we will need both .lib and .dll file.
56263        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56264          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56265$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56266          FOUND_FREETYPE=no
56267        fi
56268      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56269          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56270        # Found lib in isa dir, use that instead.
56271        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56272        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56273$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56274      fi
56275    fi
56276  fi
56277
56278  if test "x$FOUND_FREETYPE" = xyes; then
56279
56280  # Only process if variable expands to non-empty
56281
56282  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56284
56285  # Input might be given as Windows format, start by converting to
56286  # unix format.
56287  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56288  new_path=`$CYGPATH -u "$path"`
56289
56290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56293  # "foo.exe" is OK but "foo" is an error.
56294  #
56295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56296  # It is also a way to make sure we got the proper file name for the real test later on.
56297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56298  if test "x$test_shortpath" = x; then
56299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56301    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56302  fi
56303
56304  # Call helper function which possibly converts this using DOS-style short mode.
56305  # If so, the updated path is stored in $new_path.
56306
56307  input_path="$new_path"
56308  # Check if we need to convert this using DOS-style short mode. If the path
56309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56310  # take no chances and rewrite it.
56311  # Note: m4 eats our [], so we need to use [ and ] instead.
56312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56313  if test "x$has_forbidden_chars" != x; then
56314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56318      # Going to short mode and back again did indeed matter. Since short mode is
56319      # case insensitive, let's make it lowercase to improve readability.
56320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56321      # Now convert it back to Unix-style (cygpath)
56322      input_path=`$CYGPATH -u "$shortmode_path"`
56323      new_path="$input_path"
56324    fi
56325  fi
56326
56327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56328  if test "x$test_cygdrive_prefix" = x; then
56329    # As a simple fix, exclude /usr/bin since it's not a real path.
56330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56332      # a path prefixed by /cygdrive for fixpath to work.
56333      new_path="$CYGWIN_ROOT_PATH$input_path"
56334    fi
56335  fi
56336
56337
56338  if test "x$path" != "x$new_path"; then
56339    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56342  fi
56343
56344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56345
56346  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56347  has_colon=`$ECHO $path | $GREP ^.:`
56348  new_path="$path"
56349  if test "x$has_colon" = x; then
56350    # Not in mixed or Windows style, start by that.
56351    new_path=`cmd //c echo $path`
56352  fi
56353
56354
56355  input_path="$new_path"
56356  # Check if we need to convert this using DOS-style short mode. If the path
56357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56358  # take no chances and rewrite it.
56359  # Note: m4 eats our [], so we need to use [ and ] instead.
56360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56361  if test "x$has_forbidden_chars" != x; then
56362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56364  fi
56365
56366
56367  windows_path="$new_path"
56368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56369    unix_path=`$CYGPATH -u "$windows_path"`
56370    new_path="$unix_path"
56371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56373    new_path="$unix_path"
56374  fi
56375
56376  if test "x$path" != "x$new_path"; then
56377    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56380  fi
56381
56382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56384
56385    else
56386      # We're on a unix platform. Hooray! :)
56387      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56388      has_space=`$ECHO "$path" | $GREP " "`
56389      if test "x$has_space" != x; then
56390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56393      fi
56394
56395      # Use eval to expand a potential ~
56396      eval path="$path"
56397      if test ! -f "$path" && test ! -d "$path"; then
56398        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56399      fi
56400
56401      if test -d "$path"; then
56402        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56403      else
56404        dir="`$DIRNAME "$path"`"
56405        base="`$BASENAME "$path"`"
56406        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56407      fi
56408    fi
56409  fi
56410
56411
56412  # Only process if variable expands to non-empty
56413
56414  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56416
56417  # Input might be given as Windows format, start by converting to
56418  # unix format.
56419  path="$POTENTIAL_FREETYPE_LIB_PATH"
56420  new_path=`$CYGPATH -u "$path"`
56421
56422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56425  # "foo.exe" is OK but "foo" is an error.
56426  #
56427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56428  # It is also a way to make sure we got the proper file name for the real test later on.
56429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56430  if test "x$test_shortpath" = x; then
56431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56433    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56434  fi
56435
56436  # Call helper function which possibly converts this using DOS-style short mode.
56437  # If so, the updated path is stored in $new_path.
56438
56439  input_path="$new_path"
56440  # Check if we need to convert this using DOS-style short mode. If the path
56441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56442  # take no chances and rewrite it.
56443  # Note: m4 eats our [], so we need to use [ and ] instead.
56444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56445  if test "x$has_forbidden_chars" != x; then
56446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56450      # Going to short mode and back again did indeed matter. Since short mode is
56451      # case insensitive, let's make it lowercase to improve readability.
56452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56453      # Now convert it back to Unix-style (cygpath)
56454      input_path=`$CYGPATH -u "$shortmode_path"`
56455      new_path="$input_path"
56456    fi
56457  fi
56458
56459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56460  if test "x$test_cygdrive_prefix" = x; then
56461    # As a simple fix, exclude /usr/bin since it's not a real path.
56462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56464      # a path prefixed by /cygdrive for fixpath to work.
56465      new_path="$CYGWIN_ROOT_PATH$input_path"
56466    fi
56467  fi
56468
56469
56470  if test "x$path" != "x$new_path"; then
56471    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56474  fi
56475
56476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56477
56478  path="$POTENTIAL_FREETYPE_LIB_PATH"
56479  has_colon=`$ECHO $path | $GREP ^.:`
56480  new_path="$path"
56481  if test "x$has_colon" = x; then
56482    # Not in mixed or Windows style, start by that.
56483    new_path=`cmd //c echo $path`
56484  fi
56485
56486
56487  input_path="$new_path"
56488  # Check if we need to convert this using DOS-style short mode. If the path
56489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56490  # take no chances and rewrite it.
56491  # Note: m4 eats our [], so we need to use [ and ] instead.
56492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56493  if test "x$has_forbidden_chars" != x; then
56494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56496  fi
56497
56498
56499  windows_path="$new_path"
56500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56501    unix_path=`$CYGPATH -u "$windows_path"`
56502    new_path="$unix_path"
56503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56505    new_path="$unix_path"
56506  fi
56507
56508  if test "x$path" != "x$new_path"; then
56509    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56512  fi
56513
56514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56516
56517    else
56518      # We're on a unix platform. Hooray! :)
56519      path="$POTENTIAL_FREETYPE_LIB_PATH"
56520      has_space=`$ECHO "$path" | $GREP " "`
56521      if test "x$has_space" != x; then
56522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56525      fi
56526
56527      # Use eval to expand a potential ~
56528      eval path="$path"
56529      if test ! -f "$path" && test ! -d "$path"; then
56530        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56531      fi
56532
56533      if test -d "$path"; then
56534        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56535      else
56536        dir="`$DIRNAME "$path"`"
56537        base="`$BASENAME "$path"`"
56538        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56539      fi
56540    fi
56541  fi
56542
56543
56544    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56546$as_echo_n "checking for freetype includes... " >&6; }
56547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56548$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56549    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56551$as_echo_n "checking for freetype libraries... " >&6; }
56552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56553$as_echo "$FREETYPE_LIB_PATH" >&6; }
56554  fi
56555
56556            else
56557
56558  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56559  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56560  METHOD="well-known location"
56561
56562  # Let's start with an optimistic view of the world :-)
56563  FOUND_FREETYPE=yes
56564
56565  # First look for the canonical freetype main include file ft2build.h.
56566  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56567    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56568    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56569    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56570      # Fail.
56571      FOUND_FREETYPE=no
56572    fi
56573  fi
56574
56575  if test "x$FOUND_FREETYPE" = xyes; then
56576    # Include file found, let's continue the sanity check.
56577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56578$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56579
56580    # Reset to default value
56581    FREETYPE_BASE_NAME=freetype
56582    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56583    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56584      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56585          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56586        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56587        # for the .6 version explicitly.
56588        FREETYPE_BASE_NAME=freetype.6
56589        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56590        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56591$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56592      else
56593        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56594$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56595        FOUND_FREETYPE=no
56596      fi
56597    else
56598      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56599        # On Windows, we will need both .lib and .dll file.
56600        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56601          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56602$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56603          FOUND_FREETYPE=no
56604        fi
56605      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56606          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56607        # Found lib in isa dir, use that instead.
56608        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56609        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56610$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56611      fi
56612    fi
56613  fi
56614
56615  if test "x$FOUND_FREETYPE" = xyes; then
56616
56617  # Only process if variable expands to non-empty
56618
56619  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56621
56622  # Input might be given as Windows format, start by converting to
56623  # unix format.
56624  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56625  new_path=`$CYGPATH -u "$path"`
56626
56627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56630  # "foo.exe" is OK but "foo" is an error.
56631  #
56632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56633  # It is also a way to make sure we got the proper file name for the real test later on.
56634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56635  if test "x$test_shortpath" = x; then
56636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56638    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56639  fi
56640
56641  # Call helper function which possibly converts this using DOS-style short mode.
56642  # If so, the updated path is stored in $new_path.
56643
56644  input_path="$new_path"
56645  # Check if we need to convert this using DOS-style short mode. If the path
56646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56647  # take no chances and rewrite it.
56648  # Note: m4 eats our [], so we need to use [ and ] instead.
56649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56650  if test "x$has_forbidden_chars" != x; then
56651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56655      # Going to short mode and back again did indeed matter. Since short mode is
56656      # case insensitive, let's make it lowercase to improve readability.
56657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56658      # Now convert it back to Unix-style (cygpath)
56659      input_path=`$CYGPATH -u "$shortmode_path"`
56660      new_path="$input_path"
56661    fi
56662  fi
56663
56664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56665  if test "x$test_cygdrive_prefix" = x; then
56666    # As a simple fix, exclude /usr/bin since it's not a real path.
56667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56669      # a path prefixed by /cygdrive for fixpath to work.
56670      new_path="$CYGWIN_ROOT_PATH$input_path"
56671    fi
56672  fi
56673
56674
56675  if test "x$path" != "x$new_path"; then
56676    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56678$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56679  fi
56680
56681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56682
56683  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56684  has_colon=`$ECHO $path | $GREP ^.:`
56685  new_path="$path"
56686  if test "x$has_colon" = x; then
56687    # Not in mixed or Windows style, start by that.
56688    new_path=`cmd //c echo $path`
56689  fi
56690
56691
56692  input_path="$new_path"
56693  # Check if we need to convert this using DOS-style short mode. If the path
56694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56695  # take no chances and rewrite it.
56696  # Note: m4 eats our [], so we need to use [ and ] instead.
56697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56698  if test "x$has_forbidden_chars" != x; then
56699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56701  fi
56702
56703
56704  windows_path="$new_path"
56705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56706    unix_path=`$CYGPATH -u "$windows_path"`
56707    new_path="$unix_path"
56708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56710    new_path="$unix_path"
56711  fi
56712
56713  if test "x$path" != "x$new_path"; then
56714    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56717  fi
56718
56719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56721
56722    else
56723      # We're on a unix platform. Hooray! :)
56724      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56725      has_space=`$ECHO "$path" | $GREP " "`
56726      if test "x$has_space" != x; then
56727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56730      fi
56731
56732      # Use eval to expand a potential ~
56733      eval path="$path"
56734      if test ! -f "$path" && test ! -d "$path"; then
56735        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56736      fi
56737
56738      if test -d "$path"; then
56739        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56740      else
56741        dir="`$DIRNAME "$path"`"
56742        base="`$BASENAME "$path"`"
56743        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56744      fi
56745    fi
56746  fi
56747
56748
56749  # Only process if variable expands to non-empty
56750
56751  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56753
56754  # Input might be given as Windows format, start by converting to
56755  # unix format.
56756  path="$POTENTIAL_FREETYPE_LIB_PATH"
56757  new_path=`$CYGPATH -u "$path"`
56758
56759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56762  # "foo.exe" is OK but "foo" is an error.
56763  #
56764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56765  # It is also a way to make sure we got the proper file name for the real test later on.
56766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56767  if test "x$test_shortpath" = x; then
56768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56770    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56771  fi
56772
56773  # Call helper function which possibly converts this using DOS-style short mode.
56774  # If so, the updated path is stored in $new_path.
56775
56776  input_path="$new_path"
56777  # Check if we need to convert this using DOS-style short mode. If the path
56778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56779  # take no chances and rewrite it.
56780  # Note: m4 eats our [], so we need to use [ and ] instead.
56781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56782  if test "x$has_forbidden_chars" != x; then
56783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56787      # Going to short mode and back again did indeed matter. Since short mode is
56788      # case insensitive, let's make it lowercase to improve readability.
56789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56790      # Now convert it back to Unix-style (cygpath)
56791      input_path=`$CYGPATH -u "$shortmode_path"`
56792      new_path="$input_path"
56793    fi
56794  fi
56795
56796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56797  if test "x$test_cygdrive_prefix" = x; then
56798    # As a simple fix, exclude /usr/bin since it's not a real path.
56799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56801      # a path prefixed by /cygdrive for fixpath to work.
56802      new_path="$CYGWIN_ROOT_PATH$input_path"
56803    fi
56804  fi
56805
56806
56807  if test "x$path" != "x$new_path"; then
56808    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56811  fi
56812
56813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56814
56815  path="$POTENTIAL_FREETYPE_LIB_PATH"
56816  has_colon=`$ECHO $path | $GREP ^.:`
56817  new_path="$path"
56818  if test "x$has_colon" = x; then
56819    # Not in mixed or Windows style, start by that.
56820    new_path=`cmd //c echo $path`
56821  fi
56822
56823
56824  input_path="$new_path"
56825  # Check if we need to convert this using DOS-style short mode. If the path
56826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56827  # take no chances and rewrite it.
56828  # Note: m4 eats our [], so we need to use [ and ] instead.
56829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56830  if test "x$has_forbidden_chars" != x; then
56831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56833  fi
56834
56835
56836  windows_path="$new_path"
56837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56838    unix_path=`$CYGPATH -u "$windows_path"`
56839    new_path="$unix_path"
56840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56842    new_path="$unix_path"
56843  fi
56844
56845  if test "x$path" != "x$new_path"; then
56846    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56849  fi
56850
56851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56853
56854    else
56855      # We're on a unix platform. Hooray! :)
56856      path="$POTENTIAL_FREETYPE_LIB_PATH"
56857      has_space=`$ECHO "$path" | $GREP " "`
56858      if test "x$has_space" != x; then
56859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56862      fi
56863
56864      # Use eval to expand a potential ~
56865      eval path="$path"
56866      if test ! -f "$path" && test ! -d "$path"; then
56867        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56868      fi
56869
56870      if test -d "$path"; then
56871        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56872      else
56873        dir="`$DIRNAME "$path"`"
56874        base="`$BASENAME "$path"`"
56875        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56876      fi
56877    fi
56878  fi
56879
56880
56881    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56883$as_echo_n "checking for freetype includes... " >&6; }
56884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56885$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56886    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56888$as_echo_n "checking for freetype libraries... " >&6; }
56889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56890$as_echo "$FREETYPE_LIB_PATH" >&6; }
56891  fi
56892
56893              if test "x$FOUND_FREETYPE" != xyes; then
56894
56895  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56896  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56897  METHOD="well-known location"
56898
56899  # Let's start with an optimistic view of the world :-)
56900  FOUND_FREETYPE=yes
56901
56902  # First look for the canonical freetype main include file ft2build.h.
56903  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56904    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56905    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56906    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56907      # Fail.
56908      FOUND_FREETYPE=no
56909    fi
56910  fi
56911
56912  if test "x$FOUND_FREETYPE" = xyes; then
56913    # Include file found, let's continue the sanity check.
56914    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56915$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56916
56917    # Reset to default value
56918    FREETYPE_BASE_NAME=freetype
56919    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56920    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56921      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56922          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56923        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56924        # for the .6 version explicitly.
56925        FREETYPE_BASE_NAME=freetype.6
56926        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56927        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56928$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56929      else
56930        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56931$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56932        FOUND_FREETYPE=no
56933      fi
56934    else
56935      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56936        # On Windows, we will need both .lib and .dll file.
56937        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56938          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56939$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56940          FOUND_FREETYPE=no
56941        fi
56942      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56943          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56944        # Found lib in isa dir, use that instead.
56945        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56946        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56947$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56948      fi
56949    fi
56950  fi
56951
56952  if test "x$FOUND_FREETYPE" = xyes; then
56953
56954  # Only process if variable expands to non-empty
56955
56956  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56958
56959  # Input might be given as Windows format, start by converting to
56960  # unix format.
56961  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56962  new_path=`$CYGPATH -u "$path"`
56963
56964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56967  # "foo.exe" is OK but "foo" is an error.
56968  #
56969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56970  # It is also a way to make sure we got the proper file name for the real test later on.
56971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56972  if test "x$test_shortpath" = x; then
56973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56975    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56976  fi
56977
56978  # Call helper function which possibly converts this using DOS-style short mode.
56979  # If so, the updated path is stored in $new_path.
56980
56981  input_path="$new_path"
56982  # Check if we need to convert this using DOS-style short mode. If the path
56983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56984  # take no chances and rewrite it.
56985  # Note: m4 eats our [], so we need to use [ and ] instead.
56986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56987  if test "x$has_forbidden_chars" != x; then
56988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56992      # Going to short mode and back again did indeed matter. Since short mode is
56993      # case insensitive, let's make it lowercase to improve readability.
56994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56995      # Now convert it back to Unix-style (cygpath)
56996      input_path=`$CYGPATH -u "$shortmode_path"`
56997      new_path="$input_path"
56998    fi
56999  fi
57000
57001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57002  if test "x$test_cygdrive_prefix" = x; then
57003    # As a simple fix, exclude /usr/bin since it's not a real path.
57004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57006      # a path prefixed by /cygdrive for fixpath to work.
57007      new_path="$CYGWIN_ROOT_PATH$input_path"
57008    fi
57009  fi
57010
57011
57012  if test "x$path" != "x$new_path"; then
57013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57016  fi
57017
57018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57019
57020  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57021  has_colon=`$ECHO $path | $GREP ^.:`
57022  new_path="$path"
57023  if test "x$has_colon" = x; then
57024    # Not in mixed or Windows style, start by that.
57025    new_path=`cmd //c echo $path`
57026  fi
57027
57028
57029  input_path="$new_path"
57030  # Check if we need to convert this using DOS-style short mode. If the path
57031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57032  # take no chances and rewrite it.
57033  # Note: m4 eats our [], so we need to use [ and ] instead.
57034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57035  if test "x$has_forbidden_chars" != x; then
57036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57038  fi
57039
57040
57041  windows_path="$new_path"
57042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57043    unix_path=`$CYGPATH -u "$windows_path"`
57044    new_path="$unix_path"
57045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57047    new_path="$unix_path"
57048  fi
57049
57050  if test "x$path" != "x$new_path"; then
57051    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57054  fi
57055
57056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57058
57059    else
57060      # We're on a unix platform. Hooray! :)
57061      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57062      has_space=`$ECHO "$path" | $GREP " "`
57063      if test "x$has_space" != x; then
57064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57067      fi
57068
57069      # Use eval to expand a potential ~
57070      eval path="$path"
57071      if test ! -f "$path" && test ! -d "$path"; then
57072        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57073      fi
57074
57075      if test -d "$path"; then
57076        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57077      else
57078        dir="`$DIRNAME "$path"`"
57079        base="`$BASENAME "$path"`"
57080        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57081      fi
57082    fi
57083  fi
57084
57085
57086  # Only process if variable expands to non-empty
57087
57088  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57090
57091  # Input might be given as Windows format, start by converting to
57092  # unix format.
57093  path="$POTENTIAL_FREETYPE_LIB_PATH"
57094  new_path=`$CYGPATH -u "$path"`
57095
57096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57099  # "foo.exe" is OK but "foo" is an error.
57100  #
57101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57102  # It is also a way to make sure we got the proper file name for the real test later on.
57103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57104  if test "x$test_shortpath" = x; then
57105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57107    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57108  fi
57109
57110  # Call helper function which possibly converts this using DOS-style short mode.
57111  # If so, the updated path is stored in $new_path.
57112
57113  input_path="$new_path"
57114  # Check if we need to convert this using DOS-style short mode. If the path
57115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57116  # take no chances and rewrite it.
57117  # Note: m4 eats our [], so we need to use [ and ] instead.
57118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57119  if test "x$has_forbidden_chars" != x; then
57120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57124      # Going to short mode and back again did indeed matter. Since short mode is
57125      # case insensitive, let's make it lowercase to improve readability.
57126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57127      # Now convert it back to Unix-style (cygpath)
57128      input_path=`$CYGPATH -u "$shortmode_path"`
57129      new_path="$input_path"
57130    fi
57131  fi
57132
57133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57134  if test "x$test_cygdrive_prefix" = x; then
57135    # As a simple fix, exclude /usr/bin since it's not a real path.
57136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57138      # a path prefixed by /cygdrive for fixpath to work.
57139      new_path="$CYGWIN_ROOT_PATH$input_path"
57140    fi
57141  fi
57142
57143
57144  if test "x$path" != "x$new_path"; then
57145    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57148  fi
57149
57150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57151
57152  path="$POTENTIAL_FREETYPE_LIB_PATH"
57153  has_colon=`$ECHO $path | $GREP ^.:`
57154  new_path="$path"
57155  if test "x$has_colon" = x; then
57156    # Not in mixed or Windows style, start by that.
57157    new_path=`cmd //c echo $path`
57158  fi
57159
57160
57161  input_path="$new_path"
57162  # Check if we need to convert this using DOS-style short mode. If the path
57163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57164  # take no chances and rewrite it.
57165  # Note: m4 eats our [], so we need to use [ and ] instead.
57166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57167  if test "x$has_forbidden_chars" != x; then
57168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57170  fi
57171
57172
57173  windows_path="$new_path"
57174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57175    unix_path=`$CYGPATH -u "$windows_path"`
57176    new_path="$unix_path"
57177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57179    new_path="$unix_path"
57180  fi
57181
57182  if test "x$path" != "x$new_path"; then
57183    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57185$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57186  fi
57187
57188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57190
57191    else
57192      # We're on a unix platform. Hooray! :)
57193      path="$POTENTIAL_FREETYPE_LIB_PATH"
57194      has_space=`$ECHO "$path" | $GREP " "`
57195      if test "x$has_space" != x; then
57196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57199      fi
57200
57201      # Use eval to expand a potential ~
57202      eval path="$path"
57203      if test ! -f "$path" && test ! -d "$path"; then
57204        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57205      fi
57206
57207      if test -d "$path"; then
57208        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57209      else
57210        dir="`$DIRNAME "$path"`"
57211        base="`$BASENAME "$path"`"
57212        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57213      fi
57214    fi
57215  fi
57216
57217
57218    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57220$as_echo_n "checking for freetype includes... " >&6; }
57221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57222$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57223    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57225$as_echo_n "checking for freetype libraries... " >&6; }
57226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57227$as_echo "$FREETYPE_LIB_PATH" >&6; }
57228  fi
57229
57230              fi
57231            fi
57232          fi
57233        fi
57234      fi # end check in well-known locations
57235
57236      if test "x$FOUND_FREETYPE" != xyes; then
57237
57238  # Print a helpful message on how to acquire the necessary build dependency.
57239  # freetype is the help tag: freetype, cups, alsa etc
57240  MISSING_DEPENDENCY=freetype
57241
57242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57243    cygwin_help $MISSING_DEPENDENCY
57244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57245    msys_help $MISSING_DEPENDENCY
57246  else
57247    PKGHANDLER_COMMAND=
57248
57249    case $PKGHANDLER in
57250      apt-get)
57251        apt_help     $MISSING_DEPENDENCY ;;
57252      yum)
57253        yum_help     $MISSING_DEPENDENCY ;;
57254      port)
57255        port_help    $MISSING_DEPENDENCY ;;
57256      pkgutil)
57257        pkgutil_help $MISSING_DEPENDENCY ;;
57258      pkgadd)
57259        pkgadd_help  $MISSING_DEPENDENCY ;;
57260    esac
57261
57262    if test "x$PKGHANDLER_COMMAND" != x; then
57263      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57264    fi
57265  fi
57266
57267        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57268      fi
57269    fi # end user specified settings
57270
57271    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57272    if test "x$FREETYPE_CFLAGS" = x; then
57273
57274  # Only process if variable expands to non-empty
57275
57276  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57278
57279  # Input might be given as Windows format, start by converting to
57280  # unix format.
57281  path="$FREETYPE_INCLUDE_PATH"
57282  new_path=`$CYGPATH -u "$path"`
57283
57284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57287  # "foo.exe" is OK but "foo" is an error.
57288  #
57289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57290  # It is also a way to make sure we got the proper file name for the real test later on.
57291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57292  if test "x$test_shortpath" = x; then
57293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57294$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57295    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57296  fi
57297
57298  # Call helper function which possibly converts this using DOS-style short mode.
57299  # If so, the updated path is stored in $new_path.
57300
57301  input_path="$new_path"
57302  # Check if we need to convert this using DOS-style short mode. If the path
57303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57304  # take no chances and rewrite it.
57305  # Note: m4 eats our [], so we need to use [ and ] instead.
57306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57307  if test "x$has_forbidden_chars" != x; then
57308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57312      # Going to short mode and back again did indeed matter. Since short mode is
57313      # case insensitive, let's make it lowercase to improve readability.
57314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57315      # Now convert it back to Unix-style (cygpath)
57316      input_path=`$CYGPATH -u "$shortmode_path"`
57317      new_path="$input_path"
57318    fi
57319  fi
57320
57321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57322  if test "x$test_cygdrive_prefix" = x; then
57323    # As a simple fix, exclude /usr/bin since it's not a real path.
57324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57326      # a path prefixed by /cygdrive for fixpath to work.
57327      new_path="$CYGWIN_ROOT_PATH$input_path"
57328    fi
57329  fi
57330
57331
57332  if test "x$path" != "x$new_path"; then
57333    FREETYPE_INCLUDE_PATH="$new_path"
57334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57335$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57336  fi
57337
57338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57339
57340  path="$FREETYPE_INCLUDE_PATH"
57341  has_colon=`$ECHO $path | $GREP ^.:`
57342  new_path="$path"
57343  if test "x$has_colon" = x; then
57344    # Not in mixed or Windows style, start by that.
57345    new_path=`cmd //c echo $path`
57346  fi
57347
57348
57349  input_path="$new_path"
57350  # Check if we need to convert this using DOS-style short mode. If the path
57351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57352  # take no chances and rewrite it.
57353  # Note: m4 eats our [], so we need to use [ and ] instead.
57354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57355  if test "x$has_forbidden_chars" != x; then
57356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57358  fi
57359
57360
57361  windows_path="$new_path"
57362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57363    unix_path=`$CYGPATH -u "$windows_path"`
57364    new_path="$unix_path"
57365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57367    new_path="$unix_path"
57368  fi
57369
57370  if test "x$path" != "x$new_path"; then
57371    FREETYPE_INCLUDE_PATH="$new_path"
57372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57373$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57374  fi
57375
57376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57378
57379    else
57380      # We're on a unix platform. Hooray! :)
57381      path="$FREETYPE_INCLUDE_PATH"
57382      has_space=`$ECHO "$path" | $GREP " "`
57383      if test "x$has_space" != x; then
57384        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57385$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57386        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57387      fi
57388
57389      # Use eval to expand a potential ~
57390      eval path="$path"
57391      if test ! -f "$path" && test ! -d "$path"; then
57392        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57393      fi
57394
57395      if test -d "$path"; then
57396        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57397      else
57398        dir="`$DIRNAME "$path"`"
57399        base="`$BASENAME "$path"`"
57400        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57401      fi
57402    fi
57403  fi
57404
57405      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57406        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57407      else
57408        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57409      fi
57410    fi
57411
57412    if test "x$FREETYPE_LIBS" = x; then
57413
57414  # Only process if variable expands to non-empty
57415
57416  if test "x$FREETYPE_LIB_PATH" != x; then
57417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57418
57419  # Input might be given as Windows format, start by converting to
57420  # unix format.
57421  path="$FREETYPE_LIB_PATH"
57422  new_path=`$CYGPATH -u "$path"`
57423
57424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57427  # "foo.exe" is OK but "foo" is an error.
57428  #
57429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57430  # It is also a way to make sure we got the proper file name for the real test later on.
57431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57432  if test "x$test_shortpath" = x; then
57433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57434$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57435    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57436  fi
57437
57438  # Call helper function which possibly converts this using DOS-style short mode.
57439  # If so, the updated path is stored in $new_path.
57440
57441  input_path="$new_path"
57442  # Check if we need to convert this using DOS-style short mode. If the path
57443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57444  # take no chances and rewrite it.
57445  # Note: m4 eats our [], so we need to use [ and ] instead.
57446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57447  if test "x$has_forbidden_chars" != x; then
57448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57452      # Going to short mode and back again did indeed matter. Since short mode is
57453      # case insensitive, let's make it lowercase to improve readability.
57454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57455      # Now convert it back to Unix-style (cygpath)
57456      input_path=`$CYGPATH -u "$shortmode_path"`
57457      new_path="$input_path"
57458    fi
57459  fi
57460
57461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57462  if test "x$test_cygdrive_prefix" = x; then
57463    # As a simple fix, exclude /usr/bin since it's not a real path.
57464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57466      # a path prefixed by /cygdrive for fixpath to work.
57467      new_path="$CYGWIN_ROOT_PATH$input_path"
57468    fi
57469  fi
57470
57471
57472  if test "x$path" != "x$new_path"; then
57473    FREETYPE_LIB_PATH="$new_path"
57474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57475$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57476  fi
57477
57478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57479
57480  path="$FREETYPE_LIB_PATH"
57481  has_colon=`$ECHO $path | $GREP ^.:`
57482  new_path="$path"
57483  if test "x$has_colon" = x; then
57484    # Not in mixed or Windows style, start by that.
57485    new_path=`cmd //c echo $path`
57486  fi
57487
57488
57489  input_path="$new_path"
57490  # Check if we need to convert this using DOS-style short mode. If the path
57491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57492  # take no chances and rewrite it.
57493  # Note: m4 eats our [], so we need to use [ and ] instead.
57494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57495  if test "x$has_forbidden_chars" != x; then
57496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57498  fi
57499
57500
57501  windows_path="$new_path"
57502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57503    unix_path=`$CYGPATH -u "$windows_path"`
57504    new_path="$unix_path"
57505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57507    new_path="$unix_path"
57508  fi
57509
57510  if test "x$path" != "x$new_path"; then
57511    FREETYPE_LIB_PATH="$new_path"
57512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57513$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57514  fi
57515
57516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57518
57519    else
57520      # We're on a unix platform. Hooray! :)
57521      path="$FREETYPE_LIB_PATH"
57522      has_space=`$ECHO "$path" | $GREP " "`
57523      if test "x$has_space" != x; then
57524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57525$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57527      fi
57528
57529      # Use eval to expand a potential ~
57530      eval path="$path"
57531      if test ! -f "$path" && test ! -d "$path"; then
57532        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57533      fi
57534
57535      if test -d "$path"; then
57536        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57537      else
57538        dir="`$DIRNAME "$path"`"
57539        base="`$BASENAME "$path"`"
57540        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57541      fi
57542    fi
57543  fi
57544
57545      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57546        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57547      else
57548        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57549      fi
57550    fi
57551
57552    # Try to compile it
57553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57554$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57555    ac_ext=cpp
57556ac_cpp='$CXXCPP $CPPFLAGS'
57557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57560
57561    PREV_CXXCFLAGS="$CXXFLAGS"
57562    PREV_LIBS="$LIBS"
57563    PREV_CXX="$CXX"
57564    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57565    LIBS="$LIBS $FREETYPE_LIBS"
57566    CXX="$FIXPATH $CXX"
57567    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57568/* end confdefs.h.  */
57569
57570          #include<ft2build.h>
57571          #include FT_FREETYPE_H
57572          int main () {
57573            FT_Init_FreeType(NULL);
57574            return 0;
57575          }
57576
57577_ACEOF
57578if ac_fn_cxx_try_link "$LINENO"; then :
57579
57580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57581$as_echo "yes" >&6; }
57582
57583else
57584
57585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57586$as_echo "no" >&6; }
57587          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57588$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57589          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57590$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57591
57592
57593  # Print a helpful message on how to acquire the necessary build dependency.
57594  # freetype is the help tag: freetype, cups, alsa etc
57595  MISSING_DEPENDENCY=freetype
57596
57597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57598    cygwin_help $MISSING_DEPENDENCY
57599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57600    msys_help $MISSING_DEPENDENCY
57601  else
57602    PKGHANDLER_COMMAND=
57603
57604    case $PKGHANDLER in
57605      apt-get)
57606        apt_help     $MISSING_DEPENDENCY ;;
57607      yum)
57608        yum_help     $MISSING_DEPENDENCY ;;
57609      port)
57610        port_help    $MISSING_DEPENDENCY ;;
57611      pkgutil)
57612        pkgutil_help $MISSING_DEPENDENCY ;;
57613      pkgadd)
57614        pkgadd_help  $MISSING_DEPENDENCY ;;
57615    esac
57616
57617    if test "x$PKGHANDLER_COMMAND" != x; then
57618      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57619    fi
57620  fi
57621
57622
57623          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57624
57625
57626fi
57627rm -f core conftest.err conftest.$ac_objext \
57628    conftest$ac_exeext conftest.$ac_ext
57629    CXXCFLAGS="$PREV_CXXFLAGS"
57630    LIBS="$PREV_LIBS"
57631    CXX="$PREV_CXX"
57632    ac_ext=cpp
57633ac_cpp='$CXXCPP $CPPFLAGS'
57634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57637
57638
57639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57640$as_echo_n "checking if we should bundle freetype... " >&6; }
57641    if test "x$BUNDLE_FREETYPE" = xyes; then
57642      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57643    fi
57644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57645$as_echo "$BUNDLE_FREETYPE" >&6; }
57646
57647  fi # end freetype needed
57648
57649
57650
57651
57652
57653
57654
57655# Check whether --with-alsa was given.
57656if test "${with_alsa+set}" = set; then :
57657  withval=$with_alsa;
57658fi
57659
57660
57661# Check whether --with-alsa-include was given.
57662if test "${with_alsa_include+set}" = set; then :
57663  withval=$with_alsa_include;
57664fi
57665
57666
57667# Check whether --with-alsa-lib was given.
57668if test "${with_alsa_lib+set}" = set; then :
57669  withval=$with_alsa_lib;
57670fi
57671
57672
57673  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57674    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57675        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57676        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57677      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57678$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57679    fi
57680    ALSA_CFLAGS=
57681    ALSA_LIBS=
57682  else
57683    ALSA_FOUND=no
57684
57685    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57686      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57687    fi
57688
57689    if test "x${with_alsa}" != x; then
57690      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57691      ALSA_CFLAGS="-I${with_alsa}/include"
57692      ALSA_FOUND=yes
57693    fi
57694    if test "x${with_alsa_include}" != x; then
57695      ALSA_CFLAGS="-I${with_alsa_include}"
57696      ALSA_FOUND=yes
57697    fi
57698    if test "x${with_alsa_lib}" != x; then
57699      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57700      ALSA_FOUND=yes
57701    fi
57702    # Do not try pkg-config if we have a sysroot set.
57703    if test "x$SYSROOT" = x; then
57704      if test "x$ALSA_FOUND" = xno; then
57705
57706pkg_failed=no
57707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57708$as_echo_n "checking for ALSA... " >&6; }
57709
57710if test -n "$ALSA_CFLAGS"; then
57711    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57712 elif test -n "$PKG_CONFIG"; then
57713    if test -n "$PKG_CONFIG" && \
57714    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57715  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57716  ac_status=$?
57717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57718  test $ac_status = 0; }; then
57719  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57720else
57721  pkg_failed=yes
57722fi
57723 else
57724    pkg_failed=untried
57725fi
57726if test -n "$ALSA_LIBS"; then
57727    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57728 elif test -n "$PKG_CONFIG"; then
57729    if test -n "$PKG_CONFIG" && \
57730    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57731  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57732  ac_status=$?
57733  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57734  test $ac_status = 0; }; then
57735  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57736else
57737  pkg_failed=yes
57738fi
57739 else
57740    pkg_failed=untried
57741fi
57742
57743
57744
57745if test $pkg_failed = yes; then
57746
57747if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57748        _pkg_short_errors_supported=yes
57749else
57750        _pkg_short_errors_supported=no
57751fi
57752        if test $_pkg_short_errors_supported = yes; then
57753	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57754        else
57755	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57756        fi
57757	# Put the nasty error message in config.log where it belongs
57758	echo "$ALSA_PKG_ERRORS" >&5
57759
57760	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57761$as_echo "no" >&6; }
57762                ALSA_FOUND=no
57763elif test $pkg_failed = untried; then
57764	ALSA_FOUND=no
57765else
57766	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57767	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57769$as_echo "yes" >&6; }
57770	ALSA_FOUND=yes
57771fi
57772      fi
57773    fi
57774    if test "x$ALSA_FOUND" = xno; then
57775      for ac_header in alsa/asoundlib.h
57776do :
57777  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57778if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57779  cat >>confdefs.h <<_ACEOF
57780#define HAVE_ALSA_ASOUNDLIB_H 1
57781_ACEOF
57782
57783            ALSA_FOUND=yes
57784            ALSA_CFLAGS=-Iignoreme
57785            ALSA_LIBS=-lasound
57786            DEFAULT_ALSA=yes
57787
57788else
57789  ALSA_FOUND=no
57790
57791fi
57792
57793done
57794
57795    fi
57796    if test "x$ALSA_FOUND" = xno; then
57797
57798  # Print a helpful message on how to acquire the necessary build dependency.
57799  # alsa is the help tag: freetype, cups, alsa etc
57800  MISSING_DEPENDENCY=alsa
57801
57802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57803    cygwin_help $MISSING_DEPENDENCY
57804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57805    msys_help $MISSING_DEPENDENCY
57806  else
57807    PKGHANDLER_COMMAND=
57808
57809    case $PKGHANDLER in
57810      apt-get)
57811        apt_help     $MISSING_DEPENDENCY ;;
57812      yum)
57813        yum_help     $MISSING_DEPENDENCY ;;
57814      port)
57815        port_help    $MISSING_DEPENDENCY ;;
57816      pkgutil)
57817        pkgutil_help $MISSING_DEPENDENCY ;;
57818      pkgadd)
57819        pkgadd_help  $MISSING_DEPENDENCY ;;
57820    esac
57821
57822    if test "x$PKGHANDLER_COMMAND" != x; then
57823      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57824    fi
57825  fi
57826
57827      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57828    fi
57829  fi
57830
57831
57832
57833
57834
57835
57836# Check whether --with-libffi was given.
57837if test "${with_libffi+set}" = set; then :
57838  withval=$with_libffi;
57839fi
57840
57841
57842# Check whether --with-libffi-include was given.
57843if test "${with_libffi_include+set}" = set; then :
57844  withval=$with_libffi_include;
57845fi
57846
57847
57848# Check whether --with-libffi-lib was given.
57849if test "${with_libffi_lib+set}" = set; then :
57850  withval=$with_libffi_lib;
57851fi
57852
57853
57854  if test "x$NEEDS_LIB_FFI" = xfalse; then
57855    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57856        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57857        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57858      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57859$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57860    fi
57861    LIBFFI_CFLAGS=
57862    LIBFFI_LIBS=
57863  else
57864    LIBFFI_FOUND=no
57865
57866    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57867      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57868    fi
57869
57870    if test "x${with_libffi}" != x; then
57871      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57872      LIBFFI_CFLAGS="-I${with_libffi}/include"
57873      LIBFFI_FOUND=yes
57874    fi
57875    if test "x${with_libffi_include}" != x; then
57876      LIBFFI_CFLAGS="-I${with_libffi_include}"
57877      LIBFFI_FOUND=yes
57878    fi
57879    if test "x${with_libffi_lib}" != x; then
57880      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57881      LIBFFI_FOUND=yes
57882    fi
57883    # Do not try pkg-config if we have a sysroot set.
57884    if test "x$SYSROOT" = x; then
57885      if test "x$LIBFFI_FOUND" = xno; then
57886        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57887
57888pkg_failed=no
57889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57890$as_echo_n "checking for LIBFFI... " >&6; }
57891
57892if test -n "$LIBFFI_CFLAGS"; then
57893    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57894 elif test -n "$PKG_CONFIG"; then
57895    if test -n "$PKG_CONFIG" && \
57896    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57897  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57898  ac_status=$?
57899  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57900  test $ac_status = 0; }; then
57901  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57902else
57903  pkg_failed=yes
57904fi
57905 else
57906    pkg_failed=untried
57907fi
57908if test -n "$LIBFFI_LIBS"; then
57909    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57910 elif test -n "$PKG_CONFIG"; then
57911    if test -n "$PKG_CONFIG" && \
57912    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57913  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57914  ac_status=$?
57915  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57916  test $ac_status = 0; }; then
57917  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57918else
57919  pkg_failed=yes
57920fi
57921 else
57922    pkg_failed=untried
57923fi
57924
57925
57926
57927if test $pkg_failed = yes; then
57928
57929if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57930        _pkg_short_errors_supported=yes
57931else
57932        _pkg_short_errors_supported=no
57933fi
57934        if test $_pkg_short_errors_supported = yes; then
57935	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57936        else
57937	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57938        fi
57939	# Put the nasty error message in config.log where it belongs
57940	echo "$LIBFFI_PKG_ERRORS" >&5
57941
57942	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57943$as_echo "no" >&6; }
57944                LIBFFI_FOUND=no
57945elif test $pkg_failed = untried; then
57946	LIBFFI_FOUND=no
57947else
57948	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57949	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57951$as_echo "yes" >&6; }
57952	LIBFFI_FOUND=yes
57953fi
57954      fi
57955    fi
57956    if test "x$LIBFFI_FOUND" = xno; then
57957      for ac_header in ffi.h
57958do :
57959  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57960if test "x$ac_cv_header_ffi_h" = xyes; then :
57961  cat >>confdefs.h <<_ACEOF
57962#define HAVE_FFI_H 1
57963_ACEOF
57964
57965            LIBFFI_FOUND=yes
57966            LIBFFI_CFLAGS=
57967            LIBFFI_LIBS=-lffi
57968
57969else
57970  LIBFFI_FOUND=no
57971
57972fi
57973
57974done
57975
57976    fi
57977    if test "x$LIBFFI_FOUND" = xno; then
57978
57979  # Print a helpful message on how to acquire the necessary build dependency.
57980  # ffi is the help tag: freetype, cups, alsa etc
57981  MISSING_DEPENDENCY=ffi
57982
57983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57984    cygwin_help $MISSING_DEPENDENCY
57985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57986    msys_help $MISSING_DEPENDENCY
57987  else
57988    PKGHANDLER_COMMAND=
57989
57990    case $PKGHANDLER in
57991      apt-get)
57992        apt_help     $MISSING_DEPENDENCY ;;
57993      yum)
57994        yum_help     $MISSING_DEPENDENCY ;;
57995      port)
57996        port_help    $MISSING_DEPENDENCY ;;
57997      pkgutil)
57998        pkgutil_help $MISSING_DEPENDENCY ;;
57999      pkgadd)
58000        pkgadd_help  $MISSING_DEPENDENCY ;;
58001    esac
58002
58003    if test "x$PKGHANDLER_COMMAND" != x; then
58004      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58005    fi
58006  fi
58007
58008      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
58009    fi
58010
58011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
58012$as_echo_n "checking if libffi works... " >&6; }
58013    ac_ext=c
58014ac_cpp='$CPP $CPPFLAGS'
58015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58017ac_compiler_gnu=$ac_cv_c_compiler_gnu
58018
58019    OLD_CFLAGS="$CFLAGS"
58020    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
58021    OLD_LIBS="$LIBS"
58022    LIBS="$LIBS $LIBFFI_LIBS"
58023    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58024/* end confdefs.h.  */
58025#include <ffi.h>
58026int
58027main ()
58028{
58029
58030          ffi_call(NULL, NULL, NULL, NULL);
58031          return 0;
58032
58033  ;
58034  return 0;
58035}
58036_ACEOF
58037if ac_fn_c_try_link "$LINENO"; then :
58038  LIBFFI_WORKS=yes
58039else
58040  LIBFFI_WORKS=no
58041
58042fi
58043rm -f core conftest.err conftest.$ac_objext \
58044    conftest$ac_exeext conftest.$ac_ext
58045    CFLAGS="$OLD_CFLAGS"
58046    LIBS="$OLD_LIBS"
58047    ac_ext=cpp
58048ac_cpp='$CXXCPP $CPPFLAGS'
58049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58052
58053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
58054$as_echo "$LIBFFI_WORKS" >&6; }
58055
58056    if test "x$LIBFFI_WORKS" = xno; then
58057
58058  # Print a helpful message on how to acquire the necessary build dependency.
58059  # ffi is the help tag: freetype, cups, alsa etc
58060  MISSING_DEPENDENCY=ffi
58061
58062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58063    cygwin_help $MISSING_DEPENDENCY
58064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58065    msys_help $MISSING_DEPENDENCY
58066  else
58067    PKGHANDLER_COMMAND=
58068
58069    case $PKGHANDLER in
58070      apt-get)
58071        apt_help     $MISSING_DEPENDENCY ;;
58072      yum)
58073        yum_help     $MISSING_DEPENDENCY ;;
58074      port)
58075        port_help    $MISSING_DEPENDENCY ;;
58076      pkgutil)
58077        pkgutil_help $MISSING_DEPENDENCY ;;
58078      pkgadd)
58079        pkgadd_help  $MISSING_DEPENDENCY ;;
58080    esac
58081
58082    if test "x$PKGHANDLER_COMMAND" != x; then
58083      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58084    fi
58085  fi
58086
58087      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
58088    fi
58089  fi
58090
58091
58092
58093
58094
58095  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
58096    # Extract the first word of "llvm-config", so it can be a program name with args.
58097set dummy llvm-config; ac_word=$2
58098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58099$as_echo_n "checking for $ac_word... " >&6; }
58100if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
58101  $as_echo_n "(cached) " >&6
58102else
58103  if test -n "$LLVM_CONFIG"; then
58104  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
58105else
58106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58107for as_dir in $PATH
58108do
58109  IFS=$as_save_IFS
58110  test -z "$as_dir" && as_dir=.
58111    for ac_exec_ext in '' $ac_executable_extensions; do
58112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58113    ac_cv_prog_LLVM_CONFIG="llvm-config"
58114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58115    break 2
58116  fi
58117done
58118  done
58119IFS=$as_save_IFS
58120
58121fi
58122fi
58123LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
58124if test -n "$LLVM_CONFIG"; then
58125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
58126$as_echo "$LLVM_CONFIG" >&6; }
58127else
58128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58129$as_echo "no" >&6; }
58130fi
58131
58132
58133
58134    if test "x$LLVM_CONFIG" != xllvm-config; then
58135      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
58136    fi
58137
58138    llvm_components="jit mcjit engine nativecodegen native"
58139    unset LLVM_CFLAGS
58140    for flag in $("$LLVM_CONFIG" --cxxflags); do
58141      if echo "${flag}" | grep -q '^-[ID]'; then
58142        if test "${flag}" != "-D_DEBUG" ; then
58143          if test "${LLVM_CFLAGS}" != "" ; then
58144            LLVM_CFLAGS="${LLVM_CFLAGS} "
58145          fi
58146          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
58147        fi
58148      fi
58149    done
58150    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
58151    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
58152
58153    unset LLVM_LDFLAGS
58154    for flag in $("${LLVM_CONFIG}" --ldflags); do
58155      if echo "${flag}" | grep -q '^-L'; then
58156        if test "${LLVM_LDFLAGS}" != ""; then
58157          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
58158        fi
58159        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
58160      fi
58161    done
58162
58163    unset LLVM_LIBS
58164    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
58165      if echo "${flag}" | grep -q '^-l'; then
58166        if test "${LLVM_LIBS}" != ""; then
58167          LLVM_LIBS="${LLVM_LIBS} "
58168        fi
58169        LLVM_LIBS="${LLVM_LIBS}${flag}"
58170      fi
58171    done
58172
58173    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
58174    # always properly detect -ltinfo
58175    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
58176
58177
58178
58179
58180  fi
58181
58182
58183
58184# Check whether --with-libjpeg was given.
58185if test "${with_libjpeg+set}" = set; then :
58186  withval=$with_libjpeg;
58187fi
58188
58189
58190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58191$as_echo_n "checking for which libjpeg to use... " >&6; }
58192  # default is bundled
58193  DEFAULT_LIBJPEG=bundled
58194  # if user didn't specify, use DEFAULT_LIBJPEG
58195  if test "x${with_libjpeg}" = "x"; then
58196    with_libjpeg=${DEFAULT_LIBJPEG}
58197  fi
58198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58199$as_echo "${with_libjpeg}" >&6; }
58200
58201  if test "x${with_libjpeg}" = "xbundled"; then
58202    USE_EXTERNAL_LIBJPEG=false
58203  elif test "x${with_libjpeg}" = "xsystem"; then
58204    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58205if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58206
58207else
58208   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58209fi
58210
58211
58212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58213$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58214if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58215  $as_echo_n "(cached) " >&6
58216else
58217  ac_check_lib_save_LIBS=$LIBS
58218LIBS="-ljpeg  $LIBS"
58219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58220/* end confdefs.h.  */
58221
58222/* Override any GCC internal prototype to avoid an error.
58223   Use char because int might match the return type of a GCC
58224   builtin and then its argument prototype would still apply.  */
58225#ifdef __cplusplus
58226extern "C"
58227#endif
58228char jpeg_CreateDecompress ();
58229int
58230main ()
58231{
58232return jpeg_CreateDecompress ();
58233  ;
58234  return 0;
58235}
58236_ACEOF
58237if ac_fn_cxx_try_link "$LINENO"; then :
58238  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58239else
58240  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58241fi
58242rm -f core conftest.err conftest.$ac_objext \
58243    conftest$ac_exeext conftest.$ac_ext
58244LIBS=$ac_check_lib_save_LIBS
58245fi
58246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58247$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58248if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58249  cat >>confdefs.h <<_ACEOF
58250#define HAVE_LIBJPEG 1
58251_ACEOF
58252
58253  LIBS="-ljpeg $LIBS"
58254
58255else
58256   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58257fi
58258
58259
58260    USE_EXTERNAL_LIBJPEG=true
58261  else
58262    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58263  fi
58264
58265
58266
58267
58268
58269# Check whether --with-giflib was given.
58270if test "${with_giflib+set}" = set; then :
58271  withval=$with_giflib;
58272fi
58273
58274
58275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58276$as_echo_n "checking for which giflib to use... " >&6; }
58277  # default is bundled
58278  DEFAULT_GIFLIB=bundled
58279  # if user didn't specify, use DEFAULT_GIFLIB
58280  if test "x${with_giflib}" = "x"; then
58281    with_giflib=${DEFAULT_GIFLIB}
58282  fi
58283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58284$as_echo "${with_giflib}" >&6; }
58285
58286  if test "x${with_giflib}" = "xbundled"; then
58287    USE_EXTERNAL_LIBGIF=false
58288  elif test "x${with_giflib}" = "xsystem"; then
58289    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58290if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58291
58292else
58293   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58294fi
58295
58296
58297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58298$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58299if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58300  $as_echo_n "(cached) " >&6
58301else
58302  ac_check_lib_save_LIBS=$LIBS
58303LIBS="-lgif  $LIBS"
58304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58305/* end confdefs.h.  */
58306
58307/* Override any GCC internal prototype to avoid an error.
58308   Use char because int might match the return type of a GCC
58309   builtin and then its argument prototype would still apply.  */
58310#ifdef __cplusplus
58311extern "C"
58312#endif
58313char DGifGetCode ();
58314int
58315main ()
58316{
58317return DGifGetCode ();
58318  ;
58319  return 0;
58320}
58321_ACEOF
58322if ac_fn_cxx_try_link "$LINENO"; then :
58323  ac_cv_lib_gif_DGifGetCode=yes
58324else
58325  ac_cv_lib_gif_DGifGetCode=no
58326fi
58327rm -f core conftest.err conftest.$ac_objext \
58328    conftest$ac_exeext conftest.$ac_ext
58329LIBS=$ac_check_lib_save_LIBS
58330fi
58331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58332$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58333if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58334  cat >>confdefs.h <<_ACEOF
58335#define HAVE_LIBGIF 1
58336_ACEOF
58337
58338  LIBS="-lgif $LIBS"
58339
58340else
58341   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58342fi
58343
58344
58345    USE_EXTERNAL_LIBGIF=true
58346  else
58347    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58348  fi
58349
58350
58351
58352
58353
58354# Check whether --with-libpng was given.
58355if test "${with_libpng+set}" = set; then :
58356  withval=$with_libpng;
58357fi
58358
58359
58360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58361$as_echo_n "checking for which libpng to use... " >&6; }
58362
58363  # default is bundled
58364  DEFAULT_LIBPNG=bundled
58365  # if user didn't specify, use DEFAULT_LIBPNG
58366  if test "x${with_libpng}" = "x"; then
58367      with_libpng=${DEFAULT_LIBPNG}
58368  fi
58369
58370  if test "x${with_libpng}" = "xbundled"; then
58371      USE_EXTERNAL_LIBPNG=false
58372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58373$as_echo "bundled" >&6; }
58374  elif test "x${with_libpng}" = "xsystem"; then
58375
58376pkg_failed=no
58377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58378$as_echo_n "checking for PNG... " >&6; }
58379
58380if test -n "$PNG_CFLAGS"; then
58381    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58382 elif test -n "$PKG_CONFIG"; then
58383    if test -n "$PKG_CONFIG" && \
58384    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58385  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58386  ac_status=$?
58387  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58388  test $ac_status = 0; }; then
58389  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58390else
58391  pkg_failed=yes
58392fi
58393 else
58394    pkg_failed=untried
58395fi
58396if test -n "$PNG_LIBS"; then
58397    pkg_cv_PNG_LIBS="$PNG_LIBS"
58398 elif test -n "$PKG_CONFIG"; then
58399    if test -n "$PKG_CONFIG" && \
58400    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58401  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58402  ac_status=$?
58403  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58404  test $ac_status = 0; }; then
58405  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58406else
58407  pkg_failed=yes
58408fi
58409 else
58410    pkg_failed=untried
58411fi
58412
58413
58414
58415if test $pkg_failed = yes; then
58416
58417if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58418        _pkg_short_errors_supported=yes
58419else
58420        _pkg_short_errors_supported=no
58421fi
58422        if test $_pkg_short_errors_supported = yes; then
58423	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58424        else
58425	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58426        fi
58427	# Put the nasty error message in config.log where it belongs
58428	echo "$PNG_PKG_ERRORS" >&5
58429
58430	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58431$as_echo "no" >&6; }
58432                 LIBPNG_FOUND=no
58433elif test $pkg_failed = untried; then
58434	 LIBPNG_FOUND=no
58435else
58436	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58437	PNG_LIBS=$pkg_cv_PNG_LIBS
58438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58439$as_echo "yes" >&6; }
58440	 LIBPNG_FOUND=yes
58441fi
58442      if test "x${LIBPNG_FOUND}" = "xyes"; then
58443          USE_EXTERNAL_LIBPNG=true
58444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58445$as_echo "system" >&6; }
58446      else
58447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58448$as_echo "system not found" >&6; }
58449          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58450      fi
58451  else
58452      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58453  fi
58454
58455
58456
58457
58458
58459# Check whether --with-zlib was given.
58460if test "${with_zlib+set}" = set; then :
58461  withval=$with_zlib;
58462fi
58463
58464
58465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58466$as_echo_n "checking for compress in -lz... " >&6; }
58467if ${ac_cv_lib_z_compress+:} false; then :
58468  $as_echo_n "(cached) " >&6
58469else
58470  ac_check_lib_save_LIBS=$LIBS
58471LIBS="-lz  $LIBS"
58472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58473/* end confdefs.h.  */
58474
58475/* Override any GCC internal prototype to avoid an error.
58476   Use char because int might match the return type of a GCC
58477   builtin and then its argument prototype would still apply.  */
58478#ifdef __cplusplus
58479extern "C"
58480#endif
58481char compress ();
58482int
58483main ()
58484{
58485return compress ();
58486  ;
58487  return 0;
58488}
58489_ACEOF
58490if ac_fn_cxx_try_link "$LINENO"; then :
58491  ac_cv_lib_z_compress=yes
58492else
58493  ac_cv_lib_z_compress=no
58494fi
58495rm -f core conftest.err conftest.$ac_objext \
58496    conftest$ac_exeext conftest.$ac_ext
58497LIBS=$ac_check_lib_save_LIBS
58498fi
58499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58500$as_echo "$ac_cv_lib_z_compress" >&6; }
58501if test "x$ac_cv_lib_z_compress" = xyes; then :
58502   ZLIB_FOUND=yes
58503else
58504   ZLIB_FOUND=no
58505fi
58506
58507
58508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58509$as_echo_n "checking for which zlib to use... " >&6; }
58510
58511  DEFAULT_ZLIB=bundled
58512  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58513    # On macosx default is system...on others default is bundled
58514    DEFAULT_ZLIB=system
58515  fi
58516
58517  if test "x${ZLIB_FOUND}" != "xyes"; then
58518    # If we don't find any system...set default to bundled
58519    DEFAULT_ZLIB=bundled
58520  fi
58521
58522  # If user didn't specify, use DEFAULT_ZLIB
58523  if test "x${with_zlib}" = "x"; then
58524    with_zlib=${DEFAULT_ZLIB}
58525  fi
58526
58527  if test "x${with_zlib}" = "xbundled"; then
58528    USE_EXTERNAL_LIBZ=false
58529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58530$as_echo "bundled" >&6; }
58531  elif test "x${with_zlib}" = "xsystem"; then
58532    if test "x${ZLIB_FOUND}" = "xyes"; then
58533      USE_EXTERNAL_LIBZ=true
58534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58535$as_echo "system" >&6; }
58536    else
58537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58538$as_echo "system not found" >&6; }
58539      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58540    fi
58541  else
58542    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58543  fi
58544
58545
58546
58547
58548
58549# Check whether --with-lcms was given.
58550if test "${with_lcms+set}" = set; then :
58551  withval=$with_lcms;
58552fi
58553
58554
58555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58556$as_echo_n "checking for which lcms to use... " >&6; }
58557
58558  DEFAULT_LCMS=bundled
58559  # If user didn't specify, use DEFAULT_LCMS
58560  if test "x${with_lcms}" = "x"; then
58561      with_lcms=${DEFAULT_LCMS}
58562  fi
58563
58564  if test "x${with_lcms}" = "xbundled"; then
58565    USE_EXTERNAL_LCMS=false
58566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58567$as_echo "bundled" >&6; }
58568  elif test "x${with_lcms}" = "xsystem"; then
58569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58570$as_echo "system" >&6; }
58571
58572pkg_failed=no
58573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58574$as_echo_n "checking for LCMS... " >&6; }
58575
58576if test -n "$LCMS_CFLAGS"; then
58577    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58578 elif test -n "$PKG_CONFIG"; then
58579    if test -n "$PKG_CONFIG" && \
58580    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58581  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58582  ac_status=$?
58583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58584  test $ac_status = 0; }; then
58585  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58586else
58587  pkg_failed=yes
58588fi
58589 else
58590    pkg_failed=untried
58591fi
58592if test -n "$LCMS_LIBS"; then
58593    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58594 elif test -n "$PKG_CONFIG"; then
58595    if test -n "$PKG_CONFIG" && \
58596    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58597  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58598  ac_status=$?
58599  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58600  test $ac_status = 0; }; then
58601  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58602else
58603  pkg_failed=yes
58604fi
58605 else
58606    pkg_failed=untried
58607fi
58608
58609
58610
58611if test $pkg_failed = yes; then
58612
58613if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58614        _pkg_short_errors_supported=yes
58615else
58616        _pkg_short_errors_supported=no
58617fi
58618        if test $_pkg_short_errors_supported = yes; then
58619	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58620        else
58621	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58622        fi
58623	# Put the nasty error message in config.log where it belongs
58624	echo "$LCMS_PKG_ERRORS" >&5
58625
58626	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58627$as_echo "no" >&6; }
58628                LCMS_FOUND=no
58629elif test $pkg_failed = untried; then
58630	LCMS_FOUND=no
58631else
58632	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58633	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58635$as_echo "yes" >&6; }
58636	LCMS_FOUND=yes
58637fi
58638    if test "x${LCMS_FOUND}" = "xyes"; then
58639      USE_EXTERNAL_LCMS=true
58640    else
58641      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58642    fi
58643  else
58644    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58645  fi
58646
58647
58648
58649
58650
58651
58652
58653
58654
58655
58656
58657  # Setup libm (the maths library)
58658  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
58659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58660$as_echo_n "checking for cos in -lm... " >&6; }
58661if ${ac_cv_lib_m_cos+:} false; then :
58662  $as_echo_n "(cached) " >&6
58663else
58664  ac_check_lib_save_LIBS=$LIBS
58665LIBS="-lm  $LIBS"
58666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58667/* end confdefs.h.  */
58668
58669/* Override any GCC internal prototype to avoid an error.
58670   Use char because int might match the return type of a GCC
58671   builtin and then its argument prototype would still apply.  */
58672#ifdef __cplusplus
58673extern "C"
58674#endif
58675char cos ();
58676int
58677main ()
58678{
58679return cos ();
58680  ;
58681  return 0;
58682}
58683_ACEOF
58684if ac_fn_cxx_try_link "$LINENO"; then :
58685  ac_cv_lib_m_cos=yes
58686else
58687  ac_cv_lib_m_cos=no
58688fi
58689rm -f core conftest.err conftest.$ac_objext \
58690    conftest$ac_exeext conftest.$ac_ext
58691LIBS=$ac_check_lib_save_LIBS
58692fi
58693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58694$as_echo "$ac_cv_lib_m_cos" >&6; }
58695if test "x$ac_cv_lib_m_cos" = xyes; then :
58696  cat >>confdefs.h <<_ACEOF
58697#define HAVE_LIBM 1
58698_ACEOF
58699
58700  LIBS="-lm $LIBS"
58701
58702else
58703
58704        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58705$as_echo "$as_me: Maths library was not found" >&6;}
58706
58707fi
58708
58709    LIBM="-lm"
58710  else
58711    LIBM=""
58712  fi
58713
58714
58715  # Setup libdl (for dynamic library loading)
58716  save_LIBS="$LIBS"
58717  LIBS=""
58718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58719$as_echo_n "checking for dlopen in -ldl... " >&6; }
58720if ${ac_cv_lib_dl_dlopen+:} false; then :
58721  $as_echo_n "(cached) " >&6
58722else
58723  ac_check_lib_save_LIBS=$LIBS
58724LIBS="-ldl  $LIBS"
58725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58726/* end confdefs.h.  */
58727
58728/* Override any GCC internal prototype to avoid an error.
58729   Use char because int might match the return type of a GCC
58730   builtin and then its argument prototype would still apply.  */
58731#ifdef __cplusplus
58732extern "C"
58733#endif
58734char dlopen ();
58735int
58736main ()
58737{
58738return dlopen ();
58739  ;
58740  return 0;
58741}
58742_ACEOF
58743if ac_fn_cxx_try_link "$LINENO"; then :
58744  ac_cv_lib_dl_dlopen=yes
58745else
58746  ac_cv_lib_dl_dlopen=no
58747fi
58748rm -f core conftest.err conftest.$ac_objext \
58749    conftest$ac_exeext conftest.$ac_ext
58750LIBS=$ac_check_lib_save_LIBS
58751fi
58752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58753$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58754if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58755  cat >>confdefs.h <<_ACEOF
58756#define HAVE_LIBDL 1
58757_ACEOF
58758
58759  LIBS="-ldl $LIBS"
58760
58761fi
58762
58763  LIBDL="$LIBS"
58764
58765  LIBS="$save_LIBS"
58766
58767  # Deprecated libraries, keep the flags for backwards compatibility
58768  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58769
58770
58771# Check whether --with-dxsdk was given.
58772if test "${with_dxsdk+set}" = set; then :
58773  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58774$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58775fi
58776
58777
58778
58779
58780# Check whether --with-dxsdk-lib was given.
58781if test "${with_dxsdk_lib+set}" = set; then :
58782  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58783$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58784fi
58785
58786
58787
58788
58789# Check whether --with-dxsdk-include was given.
58790if test "${with_dxsdk_include+set}" = set; then :
58791  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58792$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58793fi
58794
58795
58796  fi
58797
58798  # Control if libzip can use mmap. Available for purposes of overriding.
58799  LIBZIP_CAN_USE_MMAP=true
58800
58801
58802
58803
58804
58805
58806
58807
58808
58809
58810
58811
58812
58813
58814###############################################################################
58815#
58816# We need to do some final tweaking, when everything else is done.
58817#
58818###############################################################################
58819
58820
58821  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58822
58823
58824
58825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58826$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58827
58828  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58829    ENABLE_INTREE_EC=yes
58830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58831$as_echo "yes" >&6; }
58832  else
58833    ENABLE_INTREE_EC=no
58834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58835$as_echo "no" >&6; }
58836  fi
58837
58838
58839
58840
58841###############################################################################
58842#
58843# Configure parts of the build that only affect the build performance,
58844# not the result.
58845#
58846###############################################################################
58847
58848
58849  # How many cores do we have on this build system?
58850
58851# Check whether --with-num-cores was given.
58852if test "${with_num_cores+set}" = set; then :
58853  withval=$with_num_cores;
58854fi
58855
58856  if test "x$with_num_cores" = x; then
58857    # The number of cores were not specified, try to probe them.
58858
58859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58860$as_echo_n "checking for number of cores... " >&6; }
58861  NUM_CORES=1
58862  FOUND_CORES=no
58863
58864  if test -f /proc/cpuinfo; then
58865    # Looks like a Linux (or cygwin) system
58866    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58867    FOUND_CORES=yes
58868  elif test -x /usr/sbin/psrinfo; then
58869    # Looks like a Solaris system
58870    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58871    FOUND_CORES=yes
58872  elif test -x /usr/sbin/sysctl; then
58873    # Looks like a MacOSX system
58874    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
58875    FOUND_CORES=yes
58876  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58877    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58878    FOUND_CORES=yes
58879  elif test -n "$NUMBER_OF_PROCESSORS"; then
58880    # On windows, look in the env
58881    NUM_CORES=$NUMBER_OF_PROCESSORS
58882    FOUND_CORES=yes
58883  fi
58884
58885  if test "x$FOUND_CORES" = xyes; then
58886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58887$as_echo "$NUM_CORES" >&6; }
58888  else
58889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58890$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58891    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58892$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58893  fi
58894
58895  else
58896    NUM_CORES=$with_num_cores
58897  fi
58898
58899
58900
58901  # How much memory do we have on this build system?
58902
58903# Check whether --with-memory-size was given.
58904if test "${with_memory_size+set}" = set; then :
58905  withval=$with_memory_size;
58906fi
58907
58908  if test "x$with_memory_size" = x; then
58909    # The memory size was not specified, try to probe it.
58910
58911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58912$as_echo_n "checking for memory size... " >&6; }
58913  # Default to 1024 MB
58914  MEMORY_SIZE=1024
58915  FOUND_MEM=no
58916
58917  if test -f /proc/meminfo; then
58918    # Looks like a Linux (or cygwin) system
58919    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58920    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58921    FOUND_MEM=yes
58922  elif test -x /usr/sbin/prtconf; then
58923    # Looks like a Solaris or AIX system
58924    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58925    FOUND_MEM=yes
58926  elif test -x /usr/sbin/sysctl; then
58927    # Looks like a MacOSX system
58928    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
58929    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58930    FOUND_MEM=yes
58931  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58932    # Windows, but without cygwin
58933    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58934    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58935    FOUND_MEM=yes
58936  fi
58937
58938  if test "x$FOUND_MEM" = xyes; then
58939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58940$as_echo "$MEMORY_SIZE MB" >&6; }
58941  else
58942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58943$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58944    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58945$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58946  fi
58947
58948  else
58949    MEMORY_SIZE=$with_memory_size
58950  fi
58951
58952
58953
58954  # Provide a decent default number of parallel jobs for make depending on
58955  # number of cores, amount of memory and machine architecture.
58956
58957# Check whether --with-jobs was given.
58958if test "${with_jobs+set}" = set; then :
58959  withval=$with_jobs;
58960fi
58961
58962  if test "x$with_jobs" = x; then
58963    # Number of jobs was not specified, calculate.
58964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58965$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58966    # Approximate memory in GB.
58967    memory_gb=`expr $MEMORY_SIZE / 1024`
58968    # Pick the lowest of memory in gb and number of cores.
58969    if test "$memory_gb" -lt "$NUM_CORES"; then
58970      JOBS="$memory_gb"
58971    else
58972      JOBS="$NUM_CORES"
58973    fi
58974    if test "$JOBS" -eq "0"; then
58975      JOBS=1
58976    fi
58977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58978$as_echo "$JOBS" >&6; }
58979  else
58980    JOBS=$with_jobs
58981  fi
58982
58983
58984
58985  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58986
58987# Check whether --with-test-jobs was given.
58988if test "${with_test_jobs+set}" = set; then :
58989  withval=$with_test_jobs;
58990fi
58991
58992  if test "x$with_test_jobs" = x; then
58993      TEST_JOBS=0
58994  else
58995      TEST_JOBS=$with_test_jobs
58996  fi
58997
58998
58999
59000# Setup arguments for the boot jdk (after cores and memory have been setup)
59001
59002  ##############################################################################
59003  #
59004  # Specify jvm options for anything that is run with the Boot JDK.
59005  # Not all JVM:s accept the same arguments on the command line.
59006  #
59007
59008# Check whether --with-boot-jdk-jvmargs was given.
59009if test "${with_boot_jdk_jvmargs+set}" = set; then :
59010  withval=$with_boot_jdk_jvmargs;
59011fi
59012
59013
59014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
59015$as_echo_n "checking flags for boot jdk java command ... " >&6; }
59016
59017  # Disable special log output when a debug build is used as Boot JDK...
59018
59019  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
59020  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
59021  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
59022  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59023  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59024  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59025    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
59026    JVM_ARG_OK=true
59027  else
59028    $ECHO "Arg failed:" >&5
59029    $ECHO "$OUTPUT" >&5
59030    JVM_ARG_OK=false
59031  fi
59032
59033
59034  # Apply user provided options.
59035
59036  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
59037  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
59038  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
59039  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59040  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59041  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59042    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
59043    JVM_ARG_OK=true
59044  else
59045    $ECHO "Arg failed:" >&5
59046    $ECHO "$OUTPUT" >&5
59047    JVM_ARG_OK=false
59048  fi
59049
59050
59051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
59052$as_echo "$boot_jdk_jvmargs" >&6; }
59053
59054  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
59055  JAVA_FLAGS=$boot_jdk_jvmargs
59056
59057
59058
59059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
59060$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
59061
59062  # Starting amount of heap memory.
59063
59064  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
59065  $ECHO "Command: $JAVA -Xms64M -version" >&5
59066  OUTPUT=`$JAVA -Xms64M -version 2>&1`
59067  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59068  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59069  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59070    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
59071    JVM_ARG_OK=true
59072  else
59073    $ECHO "Arg failed:" >&5
59074    $ECHO "$OUTPUT" >&5
59075    JVM_ARG_OK=false
59076  fi
59077
59078
59079  # Maximum amount of heap memory.
59080  # Maximum stack size.
59081  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
59082  if test "x$BOOT_JDK_BITS" = "x32"; then
59083    if test "$JVM_MAX_HEAP" -gt "1100"; then
59084      JVM_MAX_HEAP=1100
59085    elif test "$JVM_MAX_HEAP" -lt "512"; then
59086      JVM_MAX_HEAP=512
59087    fi
59088    STACK_SIZE=768
59089  else
59090    # Running a 64 bit JVM allows for and requires a bigger heap
59091    if test "$JVM_MAX_HEAP" -gt "1600"; then
59092      JVM_MAX_HEAP=1600
59093    elif test "$JVM_MAX_HEAP" -lt "512"; then
59094      JVM_MAX_HEAP=512
59095    fi
59096    STACK_SIZE=1536
59097  fi
59098
59099  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
59100  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
59101  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
59102  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59103  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59104  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59105    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
59106    JVM_ARG_OK=true
59107  else
59108    $ECHO "Arg failed:" >&5
59109    $ECHO "$OUTPUT" >&5
59110    JVM_ARG_OK=false
59111  fi
59112
59113
59114  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
59115  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
59116  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
59117  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59118  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59119  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59120    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
59121    JVM_ARG_OK=true
59122  else
59123    $ECHO "Arg failed:" >&5
59124    $ECHO "$OUTPUT" >&5
59125    JVM_ARG_OK=false
59126  fi
59127
59128
59129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
59130$as_echo "$boot_jdk_jvmargs_big" >&6; }
59131
59132  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
59133
59134
59135  # By default, the main javac compilations use big
59136  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
59137
59138
59139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
59140$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
59141
59142  # Use serial gc for small short lived tools if possible
59143
59144  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
59145  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
59146  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
59147  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59148  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59149  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59150    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
59151    JVM_ARG_OK=true
59152  else
59153    $ECHO "Arg failed:" >&5
59154    $ECHO "$OUTPUT" >&5
59155    JVM_ARG_OK=false
59156  fi
59157
59158
59159  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
59160  $ECHO "Command: $JAVA -Xms32M -version" >&5
59161  OUTPUT=`$JAVA -Xms32M -version 2>&1`
59162  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59163  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59164  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59165    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
59166    JVM_ARG_OK=true
59167  else
59168    $ECHO "Arg failed:" >&5
59169    $ECHO "$OUTPUT" >&5
59170    JVM_ARG_OK=false
59171  fi
59172
59173
59174  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
59175  $ECHO "Command: $JAVA -Xmx512M -version" >&5
59176  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
59177  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59178  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59179  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59180    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
59181    JVM_ARG_OK=true
59182  else
59183    $ECHO "Arg failed:" >&5
59184    $ECHO "$OUTPUT" >&5
59185    JVM_ARG_OK=false
59186  fi
59187
59188
59189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59190$as_echo "$boot_jdk_jvmargs_small" >&6; }
59191
59192  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59193
59194
59195  JAVA_TOOL_FLAGS_SMALL=""
59196  for f in $JAVA_FLAGS_SMALL; do
59197    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59198  done
59199
59200
59201
59202# Setup smart javac (after cores and memory have been setup)
59203
59204
59205# Check whether --with-sjavac-server-java was given.
59206if test "${with_sjavac_server_java+set}" = set; then :
59207  withval=$with_sjavac_server_java;
59208fi
59209
59210
59211  if test "x$with_sjavac_server_java" != x; then
59212    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59213    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59214    if test "x$FOUND_VERSION" = x; then
59215      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59216    fi
59217  else
59218    SJAVAC_SERVER_JAVA="$JAVA"
59219  fi
59220
59221
59222  if test "$MEMORY_SIZE" -gt "3000"; then
59223
59224  $ECHO "Check if jvm arg is ok: -d64" >&5
59225  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59226  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59227  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59228  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59229  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59230    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59231    JVM_ARG_OK=true
59232  else
59233    $ECHO "Arg failed:" >&5
59234    $ECHO "$OUTPUT" >&5
59235    JVM_ARG_OK=false
59236  fi
59237
59238    if test "$JVM_ARG_OK" = true; then
59239      JVM_64BIT=true
59240      JVM_ARG_OK=false
59241    fi
59242  fi
59243
59244  MX_VALUE=`expr $MEMORY_SIZE / 2`
59245  if test "$JVM_64BIT" = true; then
59246    # Set ms lower than mx since more than one instance of the server might
59247    # get launched at the same time before they figure out which instance won.
59248    MS_VALUE=512
59249    if test "$MX_VALUE" -gt "2048"; then
59250      MX_VALUE=2048
59251    fi
59252  else
59253    MS_VALUE=256
59254    if test "$MX_VALUE" -gt "1500"; then
59255      MX_VALUE=1500
59256    fi
59257  fi
59258  if test "$MX_VALUE" -lt "512"; then
59259    MX_VALUE=512
59260  fi
59261
59262  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59263  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59264  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59265  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59266  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59267  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59268    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59269    JVM_ARG_OK=true
59270  else
59271    $ECHO "Arg failed:" >&5
59272    $ECHO "$OUTPUT" >&5
59273    JVM_ARG_OK=false
59274  fi
59275
59276
59277
59278  # Check whether --enable-sjavac was given.
59279if test "${enable_sjavac+set}" = set; then :
59280  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59281else
59282  ENABLE_SJAVAC="no"
59283fi
59284
59285  if test "x$JVM_ARG_OK" = "xfalse"; then
59286    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59287$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59288    ENABLE_SJAVAC="no"
59289  fi
59290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59291$as_echo_n "checking whether to use sjavac... " >&6; }
59292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59293$as_echo "$ENABLE_SJAVAC" >&6; }
59294
59295
59296  # Check whether --enable-javac-server was given.
59297if test "${enable_javac_server+set}" = set; then :
59298  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59299else
59300  ENABLE_JAVAC_SERVER="yes"
59301fi
59302
59303  if test "x$JVM_ARG_OK" = "xfalse"; then
59304    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59305$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59306    ENABLE_JAVAC_SERVER="no"
59307  fi
59308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59309$as_echo_n "checking whether to use javac server... " >&6; }
59310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59311$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59312
59313
59314  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59315    # When using a server javac, the small client instances do not need much
59316    # resources.
59317    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59318  fi
59319
59320
59321# Setup use of icecc if requested
59322
59323  # Check whether --enable-icecc was given.
59324if test "${enable_icecc+set}" = set; then :
59325  enableval=$enable_icecc;
59326fi
59327
59328
59329  if test "x${enable_icecc}" = "xyes"; then
59330
59331
59332
59333  # Publish this variable in the help.
59334
59335
59336  if [ -z "${ICECC_CMD+x}" ]; then
59337    # The variable is not set by user, try to locate tool using the code snippet
59338    for ac_prog in icecc
59339do
59340  # Extract the first word of "$ac_prog", so it can be a program name with args.
59341set dummy $ac_prog; ac_word=$2
59342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59343$as_echo_n "checking for $ac_word... " >&6; }
59344if ${ac_cv_path_ICECC_CMD+:} false; then :
59345  $as_echo_n "(cached) " >&6
59346else
59347  case $ICECC_CMD in
59348  [\\/]* | ?:[\\/]*)
59349  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59350  ;;
59351  *)
59352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59353for as_dir in $PATH
59354do
59355  IFS=$as_save_IFS
59356  test -z "$as_dir" && as_dir=.
59357    for ac_exec_ext in '' $ac_executable_extensions; do
59358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59359    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59361    break 2
59362  fi
59363done
59364  done
59365IFS=$as_save_IFS
59366
59367  ;;
59368esac
59369fi
59370ICECC_CMD=$ac_cv_path_ICECC_CMD
59371if test -n "$ICECC_CMD"; then
59372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59373$as_echo "$ICECC_CMD" >&6; }
59374else
59375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59376$as_echo "no" >&6; }
59377fi
59378
59379
59380  test -n "$ICECC_CMD" && break
59381done
59382
59383  else
59384    # The variable is set, but is it from the command line or the environment?
59385
59386    # Try to remove the string !ICECC_CMD! from our list.
59387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59389      # If it failed, the variable was not from the command line. Ignore it,
59390      # but warn the user (except for BASH, which is always set by the calling BASH).
59391      if test "xICECC_CMD" != xBASH; then
59392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59393$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59394      fi
59395      # Try to locate tool using the code snippet
59396      for ac_prog in icecc
59397do
59398  # Extract the first word of "$ac_prog", so it can be a program name with args.
59399set dummy $ac_prog; ac_word=$2
59400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59401$as_echo_n "checking for $ac_word... " >&6; }
59402if ${ac_cv_path_ICECC_CMD+:} false; then :
59403  $as_echo_n "(cached) " >&6
59404else
59405  case $ICECC_CMD in
59406  [\\/]* | ?:[\\/]*)
59407  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59408  ;;
59409  *)
59410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59411for as_dir in $PATH
59412do
59413  IFS=$as_save_IFS
59414  test -z "$as_dir" && as_dir=.
59415    for ac_exec_ext in '' $ac_executable_extensions; do
59416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59417    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59419    break 2
59420  fi
59421done
59422  done
59423IFS=$as_save_IFS
59424
59425  ;;
59426esac
59427fi
59428ICECC_CMD=$ac_cv_path_ICECC_CMD
59429if test -n "$ICECC_CMD"; then
59430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59431$as_echo "$ICECC_CMD" >&6; }
59432else
59433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59434$as_echo "no" >&6; }
59435fi
59436
59437
59438  test -n "$ICECC_CMD" && break
59439done
59440
59441    else
59442      # If it succeeded, then it was overridden by the user. We will use it
59443      # for the tool.
59444
59445      # First remove it from the list of overridden variables, so we can test
59446      # for unknown variables in the end.
59447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59448
59449      # Check if we try to supply an empty value
59450      if test "x$ICECC_CMD" = x; then
59451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59452$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59454$as_echo_n "checking for ICECC_CMD... " >&6; }
59455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59456$as_echo "disabled" >&6; }
59457      else
59458        # Check if the provided tool contains a complete path.
59459        tool_specified="$ICECC_CMD"
59460        tool_basename="${tool_specified##*/}"
59461        if test "x$tool_basename" = "x$tool_specified"; then
59462          # A command without a complete path is provided, search $PATH.
59463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59464$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59465          # Extract the first word of "$tool_basename", so it can be a program name with args.
59466set dummy $tool_basename; ac_word=$2
59467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59468$as_echo_n "checking for $ac_word... " >&6; }
59469if ${ac_cv_path_ICECC_CMD+:} false; then :
59470  $as_echo_n "(cached) " >&6
59471else
59472  case $ICECC_CMD in
59473  [\\/]* | ?:[\\/]*)
59474  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59475  ;;
59476  *)
59477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59478for as_dir in $PATH
59479do
59480  IFS=$as_save_IFS
59481  test -z "$as_dir" && as_dir=.
59482    for ac_exec_ext in '' $ac_executable_extensions; do
59483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59484    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59486    break 2
59487  fi
59488done
59489  done
59490IFS=$as_save_IFS
59491
59492  ;;
59493esac
59494fi
59495ICECC_CMD=$ac_cv_path_ICECC_CMD
59496if test -n "$ICECC_CMD"; then
59497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59498$as_echo "$ICECC_CMD" >&6; }
59499else
59500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59501$as_echo "no" >&6; }
59502fi
59503
59504
59505          if test "x$ICECC_CMD" = x; then
59506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59507          fi
59508        else
59509          # Otherwise we believe it is a complete path. Use it as it is.
59510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59511$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59513$as_echo_n "checking for ICECC_CMD... " >&6; }
59514          if test ! -x "$tool_specified"; then
59515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59516$as_echo "not found" >&6; }
59517            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59518          fi
59519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59520$as_echo "$tool_specified" >&6; }
59521        fi
59522      fi
59523    fi
59524
59525  fi
59526
59527
59528
59529  if test "x$ICECC_CMD" = x; then
59530    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59531  fi
59532
59533
59534    old_path="$PATH"
59535
59536    # Look for icecc-create-env in some known places
59537    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59538
59539
59540
59541  # Publish this variable in the help.
59542
59543
59544  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59545    # The variable is not set by user, try to locate tool using the code snippet
59546    for ac_prog in icecc-create-env
59547do
59548  # Extract the first word of "$ac_prog", so it can be a program name with args.
59549set dummy $ac_prog; ac_word=$2
59550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59551$as_echo_n "checking for $ac_word... " >&6; }
59552if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59553  $as_echo_n "(cached) " >&6
59554else
59555  case $ICECC_CREATE_ENV in
59556  [\\/]* | ?:[\\/]*)
59557  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59558  ;;
59559  *)
59560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59561for as_dir in $PATH
59562do
59563  IFS=$as_save_IFS
59564  test -z "$as_dir" && as_dir=.
59565    for ac_exec_ext in '' $ac_executable_extensions; do
59566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59567    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59569    break 2
59570  fi
59571done
59572  done
59573IFS=$as_save_IFS
59574
59575  ;;
59576esac
59577fi
59578ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59579if test -n "$ICECC_CREATE_ENV"; then
59580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59581$as_echo "$ICECC_CREATE_ENV" >&6; }
59582else
59583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59584$as_echo "no" >&6; }
59585fi
59586
59587
59588  test -n "$ICECC_CREATE_ENV" && break
59589done
59590
59591  else
59592    # The variable is set, but is it from the command line or the environment?
59593
59594    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59597      # If it failed, the variable was not from the command line. Ignore it,
59598      # but warn the user (except for BASH, which is always set by the calling BASH).
59599      if test "xICECC_CREATE_ENV" != xBASH; then
59600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59601$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59602      fi
59603      # Try to locate tool using the code snippet
59604      for ac_prog in icecc-create-env
59605do
59606  # Extract the first word of "$ac_prog", so it can be a program name with args.
59607set dummy $ac_prog; ac_word=$2
59608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59609$as_echo_n "checking for $ac_word... " >&6; }
59610if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59611  $as_echo_n "(cached) " >&6
59612else
59613  case $ICECC_CREATE_ENV in
59614  [\\/]* | ?:[\\/]*)
59615  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59616  ;;
59617  *)
59618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59619for as_dir in $PATH
59620do
59621  IFS=$as_save_IFS
59622  test -z "$as_dir" && as_dir=.
59623    for ac_exec_ext in '' $ac_executable_extensions; do
59624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59625    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59627    break 2
59628  fi
59629done
59630  done
59631IFS=$as_save_IFS
59632
59633  ;;
59634esac
59635fi
59636ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59637if test -n "$ICECC_CREATE_ENV"; then
59638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59639$as_echo "$ICECC_CREATE_ENV" >&6; }
59640else
59641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59642$as_echo "no" >&6; }
59643fi
59644
59645
59646  test -n "$ICECC_CREATE_ENV" && break
59647done
59648
59649    else
59650      # If it succeeded, then it was overridden by the user. We will use it
59651      # for the tool.
59652
59653      # First remove it from the list of overridden variables, so we can test
59654      # for unknown variables in the end.
59655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59656
59657      # Check if we try to supply an empty value
59658      if test "x$ICECC_CREATE_ENV" = x; then
59659        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59660$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59661        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59662$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59664$as_echo "disabled" >&6; }
59665      else
59666        # Check if the provided tool contains a complete path.
59667        tool_specified="$ICECC_CREATE_ENV"
59668        tool_basename="${tool_specified##*/}"
59669        if test "x$tool_basename" = "x$tool_specified"; then
59670          # A command without a complete path is provided, search $PATH.
59671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59672$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59673          # Extract the first word of "$tool_basename", so it can be a program name with args.
59674set dummy $tool_basename; ac_word=$2
59675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59676$as_echo_n "checking for $ac_word... " >&6; }
59677if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59678  $as_echo_n "(cached) " >&6
59679else
59680  case $ICECC_CREATE_ENV in
59681  [\\/]* | ?:[\\/]*)
59682  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59683  ;;
59684  *)
59685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59686for as_dir in $PATH
59687do
59688  IFS=$as_save_IFS
59689  test -z "$as_dir" && as_dir=.
59690    for ac_exec_ext in '' $ac_executable_extensions; do
59691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59692    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59694    break 2
59695  fi
59696done
59697  done
59698IFS=$as_save_IFS
59699
59700  ;;
59701esac
59702fi
59703ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59704if test -n "$ICECC_CREATE_ENV"; then
59705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59706$as_echo "$ICECC_CREATE_ENV" >&6; }
59707else
59708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59709$as_echo "no" >&6; }
59710fi
59711
59712
59713          if test "x$ICECC_CREATE_ENV" = x; then
59714            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59715          fi
59716        else
59717          # Otherwise we believe it is a complete path. Use it as it is.
59718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59719$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59720          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59721$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59722          if test ! -x "$tool_specified"; then
59723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59724$as_echo "not found" >&6; }
59725            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59726          fi
59727          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59728$as_echo "$tool_specified" >&6; }
59729        fi
59730      fi
59731    fi
59732
59733  fi
59734
59735
59736
59737  if test "x$ICECC_CREATE_ENV" = x; then
59738    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59739  fi
59740
59741
59742    # Use icecc-create-env to create a minimal compilation environment that can
59743    # be sent to the other hosts in the icecream cluster.
59744    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59745    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59746    # Older versions of icecc does not have the --gcc parameter
59747    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
59748      icecc_gcc_arg="--gcc"
59749    fi
59750    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59751
59752  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59753      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
59754          ${icecc_create_env_log} 2>&1 )
59755  if test "$?" != "0"; then
59756    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59757$as_echo "$as_me: icecc-create-env output:" >&6;}
59758    cat \
59759          ${icecc_create_env_log}
59760    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59761  fi
59762
59763    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59764      # For clang, the icecc compilerwrapper is needed. It usually resides next
59765      # to icecc-create-env.
59766
59767
59768
59769  # Publish this variable in the help.
59770
59771
59772  if [ -z "${ICECC_WRAPPER+x}" ]; then
59773    # The variable is not set by user, try to locate tool using the code snippet
59774    for ac_prog in compilerwrapper
59775do
59776  # Extract the first word of "$ac_prog", so it can be a program name with args.
59777set dummy $ac_prog; ac_word=$2
59778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59779$as_echo_n "checking for $ac_word... " >&6; }
59780if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59781  $as_echo_n "(cached) " >&6
59782else
59783  case $ICECC_WRAPPER in
59784  [\\/]* | ?:[\\/]*)
59785  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59786  ;;
59787  *)
59788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59789for as_dir in $PATH
59790do
59791  IFS=$as_save_IFS
59792  test -z "$as_dir" && as_dir=.
59793    for ac_exec_ext in '' $ac_executable_extensions; do
59794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59795    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59797    break 2
59798  fi
59799done
59800  done
59801IFS=$as_save_IFS
59802
59803  ;;
59804esac
59805fi
59806ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59807if test -n "$ICECC_WRAPPER"; then
59808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59809$as_echo "$ICECC_WRAPPER" >&6; }
59810else
59811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59812$as_echo "no" >&6; }
59813fi
59814
59815
59816  test -n "$ICECC_WRAPPER" && break
59817done
59818
59819  else
59820    # The variable is set, but is it from the command line or the environment?
59821
59822    # Try to remove the string !ICECC_WRAPPER! from our list.
59823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59825      # If it failed, the variable was not from the command line. Ignore it,
59826      # but warn the user (except for BASH, which is always set by the calling BASH).
59827      if test "xICECC_WRAPPER" != xBASH; then
59828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59829$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59830      fi
59831      # Try to locate tool using the code snippet
59832      for ac_prog in compilerwrapper
59833do
59834  # Extract the first word of "$ac_prog", so it can be a program name with args.
59835set dummy $ac_prog; ac_word=$2
59836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59837$as_echo_n "checking for $ac_word... " >&6; }
59838if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59839  $as_echo_n "(cached) " >&6
59840else
59841  case $ICECC_WRAPPER in
59842  [\\/]* | ?:[\\/]*)
59843  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59844  ;;
59845  *)
59846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59847for as_dir in $PATH
59848do
59849  IFS=$as_save_IFS
59850  test -z "$as_dir" && as_dir=.
59851    for ac_exec_ext in '' $ac_executable_extensions; do
59852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59853    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59855    break 2
59856  fi
59857done
59858  done
59859IFS=$as_save_IFS
59860
59861  ;;
59862esac
59863fi
59864ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59865if test -n "$ICECC_WRAPPER"; then
59866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59867$as_echo "$ICECC_WRAPPER" >&6; }
59868else
59869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59870$as_echo "no" >&6; }
59871fi
59872
59873
59874  test -n "$ICECC_WRAPPER" && break
59875done
59876
59877    else
59878      # If it succeeded, then it was overridden by the user. We will use it
59879      # for the tool.
59880
59881      # First remove it from the list of overridden variables, so we can test
59882      # for unknown variables in the end.
59883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59884
59885      # Check if we try to supply an empty value
59886      if test "x$ICECC_WRAPPER" = x; then
59887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59888$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59890$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59892$as_echo "disabled" >&6; }
59893      else
59894        # Check if the provided tool contains a complete path.
59895        tool_specified="$ICECC_WRAPPER"
59896        tool_basename="${tool_specified##*/}"
59897        if test "x$tool_basename" = "x$tool_specified"; then
59898          # A command without a complete path is provided, search $PATH.
59899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59900$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59901          # Extract the first word of "$tool_basename", so it can be a program name with args.
59902set dummy $tool_basename; ac_word=$2
59903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59904$as_echo_n "checking for $ac_word... " >&6; }
59905if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59906  $as_echo_n "(cached) " >&6
59907else
59908  case $ICECC_WRAPPER in
59909  [\\/]* | ?:[\\/]*)
59910  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59911  ;;
59912  *)
59913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59914for as_dir in $PATH
59915do
59916  IFS=$as_save_IFS
59917  test -z "$as_dir" && as_dir=.
59918    for ac_exec_ext in '' $ac_executable_extensions; do
59919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59920    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59922    break 2
59923  fi
59924done
59925  done
59926IFS=$as_save_IFS
59927
59928  ;;
59929esac
59930fi
59931ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59932if test -n "$ICECC_WRAPPER"; then
59933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59934$as_echo "$ICECC_WRAPPER" >&6; }
59935else
59936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59937$as_echo "no" >&6; }
59938fi
59939
59940
59941          if test "x$ICECC_WRAPPER" = x; then
59942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59943          fi
59944        else
59945          # Otherwise we believe it is a complete path. Use it as it is.
59946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59947$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59949$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59950          if test ! -x "$tool_specified"; then
59951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59952$as_echo "not found" >&6; }
59953            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59954          fi
59955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59956$as_echo "$tool_specified" >&6; }
59957        fi
59958      fi
59959    fi
59960
59961  fi
59962
59963
59964
59965  if test "x$ICECC_WRAPPER" = x; then
59966    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59967  fi
59968
59969
59970
59971  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59972      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
59973  if test "$?" != "0"; then
59974    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59975$as_echo "$as_me: icecc-create-env output:" >&6;}
59976    cat ${icecc_create_env_log}
59977    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59978  fi
59979
59980    else
59981      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59982    fi
59983    PATH="$old_path"
59984    # The bundle with the compiler gets a name based on checksums. Parse log file
59985    # to find it.
59986    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59987    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59988    if test ! -f ${ICECC_ENV_BUNDLE}; then
59989      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59990    fi
59991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59992$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59994$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59995    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59996
59997    if test "x${COMPILE_TYPE}" = "xcross"; then
59998      # If cross compiling, create a separate env package for the build compiler
59999      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
60000      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
60001      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
60002
60003  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60004      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
60005            ${icecc_create_env_log_build} 2>&1 )
60006  if test "$?" != "0"; then
60007    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60008$as_echo "$as_me: icecc-create-env output:" >&6;}
60009    cat \
60010            ${icecc_create_env_log_build}
60011    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60012  fi
60013
60014      elif test "x${BUILD_CC##*/}" = "xclang"; then
60015
60016  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60017      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
60018  if test "$?" != "0"; then
60019    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60020$as_echo "$as_me: icecc-create-env output:" >&6;}
60021    cat ${icecc_create_env_log_build}
60022    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60023  fi
60024
60025      else
60026        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
60027      fi
60028      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
60029      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60030      if test ! -f ${ICECC_ENV_BUNDLE}; then
60031        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60032      fi
60033      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
60034$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
60035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60036$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60037      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
60038          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
60039    else
60040      BUILD_ICECC="${ICECC}"
60041    fi
60042
60043
60044  fi
60045
60046
60047# Can the C/C++ compiler use precompiled headers?
60048
60049
60050  ###############################################################################
60051  #
60052  # Can the C/C++ compiler use precompiled headers?
60053  #
60054  # Check whether --enable-precompiled-headers was given.
60055if test "${enable_precompiled_headers+set}" = set; then :
60056  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
60057else
60058  ENABLE_PRECOMPH=yes
60059fi
60060
60061
60062  USE_PRECOMPILED_HEADER=1
60063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
60064$as_echo_n "checking If precompiled header is enabled... " >&6; }
60065  if test "x$ENABLE_PRECOMPH" = xno; then
60066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
60067$as_echo "no, forced" >&6; }
60068    USE_PRECOMPILED_HEADER=0
60069  elif test "x$ICECC" != "x"; then
60070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
60071$as_echo "no, does not work effectively with icecc" >&6; }
60072    USE_PRECOMPILED_HEADER=0
60073  else
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60075$as_echo "yes" >&6; }
60076  fi
60077
60078  if test "x$ENABLE_PRECOMPH" = xyes; then
60079    # Check that the compiler actually supports precomp headers.
60080    if test "x$TOOLCHAIN_TYPE" = xgcc; then
60081      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
60082$as_echo_n "checking that precompiled headers work... " >&6; }
60083      echo "int alfa();" > conftest.h
60084      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
60085      if test ! -f conftest.hpp.gch; then
60086        USE_PRECOMPILED_HEADER=0
60087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60088$as_echo "no" >&6; }
60089      else
60090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60091$as_echo "yes" >&6; }
60092      fi
60093      rm -f conftest.h conftest.hpp.gch
60094    fi
60095  fi
60096
60097
60098
60099
60100# Setup use of ccache, if available
60101
60102  # Check whether --enable-ccache was given.
60103if test "${enable_ccache+set}" = set; then :
60104  enableval=$enable_ccache;
60105fi
60106
60107
60108  CCACHE=
60109  CCACHE_STATUS=
60110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
60111$as_echo_n "checking is ccache enabled... " >&6; }
60112  if test "x$enable_ccache" = xyes; then
60113    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
60114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60115$as_echo "yes" >&6; }
60116      OLD_PATH="$PATH"
60117      if test "x$TOOLCHAIN_PATH" != x; then
60118        PATH=$TOOLCHAIN_PATH:$PATH
60119      fi
60120
60121
60122
60123  # Publish this variable in the help.
60124
60125
60126  if [ -z "${CCACHE+x}" ]; then
60127    # The variable is not set by user, try to locate tool using the code snippet
60128    for ac_prog in ccache
60129do
60130  # Extract the first word of "$ac_prog", so it can be a program name with args.
60131set dummy $ac_prog; ac_word=$2
60132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60133$as_echo_n "checking for $ac_word... " >&6; }
60134if ${ac_cv_path_CCACHE+:} false; then :
60135  $as_echo_n "(cached) " >&6
60136else
60137  case $CCACHE in
60138  [\\/]* | ?:[\\/]*)
60139  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60140  ;;
60141  *)
60142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60143for as_dir in $PATH
60144do
60145  IFS=$as_save_IFS
60146  test -z "$as_dir" && as_dir=.
60147    for ac_exec_ext in '' $ac_executable_extensions; do
60148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60149    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60151    break 2
60152  fi
60153done
60154  done
60155IFS=$as_save_IFS
60156
60157  ;;
60158esac
60159fi
60160CCACHE=$ac_cv_path_CCACHE
60161if test -n "$CCACHE"; then
60162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60163$as_echo "$CCACHE" >&6; }
60164else
60165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60166$as_echo "no" >&6; }
60167fi
60168
60169
60170  test -n "$CCACHE" && break
60171done
60172
60173  else
60174    # The variable is set, but is it from the command line or the environment?
60175
60176    # Try to remove the string !CCACHE! from our list.
60177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
60178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60179      # If it failed, the variable was not from the command line. Ignore it,
60180      # but warn the user (except for BASH, which is always set by the calling BASH).
60181      if test "xCCACHE" != xBASH; then
60182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
60183$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
60184      fi
60185      # Try to locate tool using the code snippet
60186      for ac_prog in ccache
60187do
60188  # Extract the first word of "$ac_prog", so it can be a program name with args.
60189set dummy $ac_prog; ac_word=$2
60190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60191$as_echo_n "checking for $ac_word... " >&6; }
60192if ${ac_cv_path_CCACHE+:} false; then :
60193  $as_echo_n "(cached) " >&6
60194else
60195  case $CCACHE in
60196  [\\/]* | ?:[\\/]*)
60197  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60198  ;;
60199  *)
60200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60201for as_dir in $PATH
60202do
60203  IFS=$as_save_IFS
60204  test -z "$as_dir" && as_dir=.
60205    for ac_exec_ext in '' $ac_executable_extensions; do
60206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60207    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60209    break 2
60210  fi
60211done
60212  done
60213IFS=$as_save_IFS
60214
60215  ;;
60216esac
60217fi
60218CCACHE=$ac_cv_path_CCACHE
60219if test -n "$CCACHE"; then
60220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60221$as_echo "$CCACHE" >&6; }
60222else
60223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60224$as_echo "no" >&6; }
60225fi
60226
60227
60228  test -n "$CCACHE" && break
60229done
60230
60231    else
60232      # If it succeeded, then it was overridden by the user. We will use it
60233      # for the tool.
60234
60235      # First remove it from the list of overridden variables, so we can test
60236      # for unknown variables in the end.
60237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60238
60239      # Check if we try to supply an empty value
60240      if test "x$CCACHE" = x; then
60241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60242$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60244$as_echo_n "checking for CCACHE... " >&6; }
60245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60246$as_echo "disabled" >&6; }
60247      else
60248        # Check if the provided tool contains a complete path.
60249        tool_specified="$CCACHE"
60250        tool_basename="${tool_specified##*/}"
60251        if test "x$tool_basename" = "x$tool_specified"; then
60252          # A command without a complete path is provided, search $PATH.
60253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60254$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60255          # Extract the first word of "$tool_basename", so it can be a program name with args.
60256set dummy $tool_basename; ac_word=$2
60257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60258$as_echo_n "checking for $ac_word... " >&6; }
60259if ${ac_cv_path_CCACHE+:} false; then :
60260  $as_echo_n "(cached) " >&6
60261else
60262  case $CCACHE in
60263  [\\/]* | ?:[\\/]*)
60264  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60265  ;;
60266  *)
60267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60268for as_dir in $PATH
60269do
60270  IFS=$as_save_IFS
60271  test -z "$as_dir" && as_dir=.
60272    for ac_exec_ext in '' $ac_executable_extensions; do
60273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60274    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60276    break 2
60277  fi
60278done
60279  done
60280IFS=$as_save_IFS
60281
60282  ;;
60283esac
60284fi
60285CCACHE=$ac_cv_path_CCACHE
60286if test -n "$CCACHE"; then
60287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60288$as_echo "$CCACHE" >&6; }
60289else
60290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60291$as_echo "no" >&6; }
60292fi
60293
60294
60295          if test "x$CCACHE" = x; then
60296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60297          fi
60298        else
60299          # Otherwise we believe it is a complete path. Use it as it is.
60300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60301$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60303$as_echo_n "checking for CCACHE... " >&6; }
60304          if test ! -x "$tool_specified"; then
60305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60306$as_echo "not found" >&6; }
60307            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60308          fi
60309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60310$as_echo "$tool_specified" >&6; }
60311        fi
60312      fi
60313    fi
60314
60315  fi
60316
60317
60318
60319  if test "x$CCACHE" = x; then
60320    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60321  fi
60322
60323
60324      PATH="$OLD_PATH"
60325      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60326      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60327    else
60328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60329$as_echo "no" >&6; }
60330      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60331$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60332    fi
60333  elif test "x$enable_ccache" = xno; then
60334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60335$as_echo "no, explicitly disabled" >&6; }
60336    CCACHE_STATUS="Disabled"
60337  elif test "x$enable_ccache" = x; then
60338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60339$as_echo "no" >&6; }
60340  else
60341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60342$as_echo "unknown" >&6; }
60343    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60344  fi
60345
60346
60347
60348# Check whether --with-ccache-dir was given.
60349if test "${with_ccache_dir+set}" = set; then :
60350  withval=$with_ccache_dir;
60351fi
60352
60353
60354  if test "x$with_ccache_dir" != x; then
60355    # When using a non home ccache directory, assume the use is to share ccache files
60356    # with other users. Thus change the umask.
60357    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60358    if test "x$CCACHE" = x; then
60359      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60360$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60361    fi
60362  fi
60363
60364  if test "x$CCACHE" != x; then
60365
60366  if test "x$CCACHE" != x; then
60367    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60368      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60369          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60370      if test "x$HAS_BAD_CCACHE" != "x"; then
60371        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60372      fi
60373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60374$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60375      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60376      PUSHED_FLAGS="$CXXFLAGS"
60377      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60378      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60379/* end confdefs.h.  */
60380
60381int
60382main ()
60383{
60384
60385  ;
60386  return 0;
60387}
60388_ACEOF
60389if ac_fn_cxx_try_compile "$LINENO"; then :
60390  CC_KNOWS_CCACHE_TRICK=yes
60391else
60392  CC_KNOWS_CCACHE_TRICK=no
60393fi
60394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60395      CXXFLAGS="$PUSHED_FLAGS"
60396      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60398$as_echo "yes" >&6; }
60399        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60400
60401        CCACHE_SLOPPINESS=pch_defines,time_macros
60402      else
60403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60404$as_echo "no" >&6; }
60405        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60406      fi
60407    fi
60408
60409    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60410        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60411
60412    if test "x$SET_CCACHE_DIR" != x; then
60413      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60414      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60415    fi
60416  fi
60417
60418  fi
60419
60420
60421###############################################################################
60422#
60423# And now the finish...
60424#
60425###############################################################################
60426
60427# Check for some common pitfalls
60428
60429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60430    file_to_test="$SRC_ROOT/LICENSE"
60431    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60432      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
60433    fi
60434  fi
60435
60436
60437  # Did user specify any unknown variables?
60438
60439  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60440    # Replace the separating ! with spaces before presenting for end user.
60441    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60443$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60444  fi
60445
60446
60447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60448$as_echo_n "checking if build directory is on local disk... " >&6; }
60449
60450  # df -l lists only local disks; if the given directory is not found then
60451  # a non-zero exit code is given
60452  if test "x$DF" = x; then
60453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60454      # msys does not have df; use Windows "net use" instead.
60455      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60456      if test "x$IS_NETWORK_DISK" = x; then
60457        OUTPUT_DIR_IS_LOCAL="yes"
60458      else
60459        OUTPUT_DIR_IS_LOCAL="no"
60460      fi
60461    else
60462      # No df here, say it's local
60463      OUTPUT_DIR_IS_LOCAL="yes"
60464    fi
60465  else
60466    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60467      OUTPUT_DIR_IS_LOCAL="yes"
60468    else
60469      OUTPUT_DIR_IS_LOCAL="no"
60470    fi
60471  fi
60472
60473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60474$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60475
60476
60477
60478  # Check if the user has any old-style ALT_ variables set.
60479  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60480
60481  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60482  # Since we can't properly handle the dependencies for this, warn the user about the situation
60483  if test -e $OUTPUT_ROOT/spec.gmk; then
60484    IS_RECONFIGURE=yes
60485  else
60486    IS_RECONFIGURE=no
60487  fi
60488
60489
60490# At the end, call the custom hook. (Dummy macro if no custom sources available)
60491
60492
60493# We're messing a bit with internal autoconf variables to put the config.status
60494# in the output directory instead of the current directory.
60495CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60496
60497# Create the actual output files. Now the main work of configure is done.
60498cat >confcache <<\_ACEOF
60499# This file is a shell script that caches the results of configure
60500# tests run on this system so they can be shared between configure
60501# scripts and configure runs, see configure's option --config-cache.
60502# It is not useful on other systems.  If it contains results you don't
60503# want to keep, you may remove or edit it.
60504#
60505# config.status only pays attention to the cache file if you give it
60506# the --recheck option to rerun configure.
60507#
60508# `ac_cv_env_foo' variables (set or unset) will be overridden when
60509# loading this file, other *unset* `ac_cv_foo' will be assigned the
60510# following values.
60511
60512_ACEOF
60513
60514# The following way of writing the cache mishandles newlines in values,
60515# but we know of no workaround that is simple, portable, and efficient.
60516# So, we kill variables containing newlines.
60517# Ultrix sh set writes to stderr and can't be redirected directly,
60518# and sets the high bit in the cache file unless we assign to the vars.
60519(
60520  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60521    eval ac_val=\$$ac_var
60522    case $ac_val in #(
60523    *${as_nl}*)
60524      case $ac_var in #(
60525      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60526$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60527      esac
60528      case $ac_var in #(
60529      _ | IFS | as_nl) ;; #(
60530      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60531      *) { eval $ac_var=; unset $ac_var;} ;;
60532      esac ;;
60533    esac
60534  done
60535
60536  (set) 2>&1 |
60537    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60538    *${as_nl}ac_space=\ *)
60539      # `set' does not quote correctly, so add quotes: double-quote
60540      # substitution turns \\\\ into \\, and sed turns \\ into \.
60541      sed -n \
60542	"s/'/'\\\\''/g;
60543	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60544      ;; #(
60545    *)
60546      # `set' quotes correctly as required by POSIX, so do not add quotes.
60547      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60548      ;;
60549    esac |
60550    sort
60551) |
60552  sed '
60553     /^ac_cv_env_/b end
60554     t clear
60555     :clear
60556     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60557     t end
60558     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60559     :end' >>confcache
60560if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60561  if test -w "$cache_file"; then
60562    if test "x$cache_file" != "x/dev/null"; then
60563      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60564$as_echo "$as_me: updating cache $cache_file" >&6;}
60565      if test ! -f "$cache_file" || test -h "$cache_file"; then
60566	cat confcache >"$cache_file"
60567      else
60568        case $cache_file in #(
60569        */* | ?:*)
60570	  mv -f confcache "$cache_file"$$ &&
60571	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60572        *)
60573	  mv -f confcache "$cache_file" ;;
60574	esac
60575      fi
60576    fi
60577  else
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60579$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60580  fi
60581fi
60582rm -f confcache
60583
60584test "x$prefix" = xNONE && prefix=$ac_default_prefix
60585# Let make expand exec_prefix.
60586test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60587
60588# Transform confdefs.h into DEFS.
60589# Protect against shell expansion while executing Makefile rules.
60590# Protect against Makefile macro expansion.
60591#
60592# If the first sed substitution is executed (which looks for macros that
60593# take arguments), then branch to the quote section.  Otherwise,
60594# look for a macro that doesn't take arguments.
60595ac_script='
60596:mline
60597/\\$/{
60598 N
60599 s,\\\n,,
60600 b mline
60601}
60602t clear
60603:clear
60604s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60605t quote
60606s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60607t quote
60608b any
60609:quote
60610s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60611s/\[/\\&/g
60612s/\]/\\&/g
60613s/\$/$$/g
60614H
60615:any
60616${
60617	g
60618	s/^\n//
60619	s/\n/ /g
60620	p
60621}
60622'
60623DEFS=`sed -n "$ac_script" confdefs.h`
60624
60625
60626ac_libobjs=
60627ac_ltlibobjs=
60628U=
60629for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60630  # 1. Remove the extension, and $U if already installed.
60631  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60632  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60633  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60634  #    will be set to the directory where LIBOBJS objects are built.
60635  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60636  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60637done
60638LIBOBJS=$ac_libobjs
60639
60640LTLIBOBJS=$ac_ltlibobjs
60641
60642
60643
60644: "${CONFIG_STATUS=./config.status}"
60645ac_write_fail=0
60646ac_clean_files_save=$ac_clean_files
60647ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60648{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60649$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60650as_write_fail=0
60651cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60652#! $SHELL
60653# Generated by $as_me.
60654# Run this file to recreate the current configuration.
60655# Compiler output produced by configure, useful for debugging
60656# configure, is in config.log if it exists.
60657
60658debug=false
60659ac_cs_recheck=false
60660ac_cs_silent=false
60661
60662SHELL=\${CONFIG_SHELL-$SHELL}
60663export SHELL
60664_ASEOF
60665cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60666## -------------------- ##
60667## M4sh Initialization. ##
60668## -------------------- ##
60669
60670# Be more Bourne compatible
60671DUALCASE=1; export DUALCASE # for MKS sh
60672if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60673  emulate sh
60674  NULLCMD=:
60675  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60676  # is contrary to our usage.  Disable this feature.
60677  alias -g '${1+"$@"}'='"$@"'
60678  setopt NO_GLOB_SUBST
60679else
60680  case `(set -o) 2>/dev/null` in #(
60681  *posix*) :
60682    set -o posix ;; #(
60683  *) :
60684     ;;
60685esac
60686fi
60687
60688
60689as_nl='
60690'
60691export as_nl
60692# Printing a long string crashes Solaris 7 /usr/bin/printf.
60693as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60694as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60695as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60696# Prefer a ksh shell builtin over an external printf program on Solaris,
60697# but without wasting forks for bash or zsh.
60698if test -z "$BASH_VERSION$ZSH_VERSION" \
60699    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60700  as_echo='print -r --'
60701  as_echo_n='print -rn --'
60702elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60703  as_echo='printf %s\n'
60704  as_echo_n='printf %s'
60705else
60706  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60707    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60708    as_echo_n='/usr/ucb/echo -n'
60709  else
60710    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60711    as_echo_n_body='eval
60712      arg=$1;
60713      case $arg in #(
60714      *"$as_nl"*)
60715	expr "X$arg" : "X\\(.*\\)$as_nl";
60716	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60717      esac;
60718      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60719    '
60720    export as_echo_n_body
60721    as_echo_n='sh -c $as_echo_n_body as_echo'
60722  fi
60723  export as_echo_body
60724  as_echo='sh -c $as_echo_body as_echo'
60725fi
60726
60727# The user is always right.
60728if test "${PATH_SEPARATOR+set}" != set; then
60729  PATH_SEPARATOR=:
60730  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60731    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60732      PATH_SEPARATOR=';'
60733  }
60734fi
60735
60736
60737# IFS
60738# We need space, tab and new line, in precisely that order.  Quoting is
60739# there to prevent editors from complaining about space-tab.
60740# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60741# splitting by setting IFS to empty value.)
60742IFS=" ""	$as_nl"
60743
60744# Find who we are.  Look in the path if we contain no directory separator.
60745as_myself=
60746case $0 in #((
60747  *[\\/]* ) as_myself=$0 ;;
60748  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60749for as_dir in $PATH
60750do
60751  IFS=$as_save_IFS
60752  test -z "$as_dir" && as_dir=.
60753    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60754  done
60755IFS=$as_save_IFS
60756
60757     ;;
60758esac
60759# We did not find ourselves, most probably we were run as `sh COMMAND'
60760# in which case we are not to be found in the path.
60761if test "x$as_myself" = x; then
60762  as_myself=$0
60763fi
60764if test ! -f "$as_myself"; then
60765  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60766  exit 1
60767fi
60768
60769# Unset variables that we do not need and which cause bugs (e.g. in
60770# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60771# suppresses any "Segmentation fault" message there.  '((' could
60772# trigger a bug in pdksh 5.2.14.
60773for as_var in BASH_ENV ENV MAIL MAILPATH
60774do eval test x\${$as_var+set} = xset \
60775  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60776done
60777PS1='$ '
60778PS2='> '
60779PS4='+ '
60780
60781# NLS nuisances.
60782LC_ALL=C
60783export LC_ALL
60784LANGUAGE=C
60785export LANGUAGE
60786
60787# CDPATH.
60788(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60789
60790
60791# as_fn_error STATUS ERROR [LINENO LOG_FD]
60792# ----------------------------------------
60793# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60794# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60795# script with STATUS, using 1 if that was 0.
60796as_fn_error ()
60797{
60798  as_status=$1; test $as_status -eq 0 && as_status=1
60799  if test "$4"; then
60800    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60801    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60802  fi
60803  $as_echo "$as_me: error: $2" >&2
60804  as_fn_exit $as_status
60805} # as_fn_error
60806
60807
60808# as_fn_set_status STATUS
60809# -----------------------
60810# Set $? to STATUS, without forking.
60811as_fn_set_status ()
60812{
60813  return $1
60814} # as_fn_set_status
60815
60816# as_fn_exit STATUS
60817# -----------------
60818# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60819as_fn_exit ()
60820{
60821  set +e
60822  as_fn_set_status $1
60823  exit $1
60824} # as_fn_exit
60825
60826# as_fn_unset VAR
60827# ---------------
60828# Portably unset VAR.
60829as_fn_unset ()
60830{
60831  { eval $1=; unset $1;}
60832}
60833as_unset=as_fn_unset
60834# as_fn_append VAR VALUE
60835# ----------------------
60836# Append the text in VALUE to the end of the definition contained in VAR. Take
60837# advantage of any shell optimizations that allow amortized linear growth over
60838# repeated appends, instead of the typical quadratic growth present in naive
60839# implementations.
60840if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60841  eval 'as_fn_append ()
60842  {
60843    eval $1+=\$2
60844  }'
60845else
60846  as_fn_append ()
60847  {
60848    eval $1=\$$1\$2
60849  }
60850fi # as_fn_append
60851
60852# as_fn_arith ARG...
60853# ------------------
60854# Perform arithmetic evaluation on the ARGs, and store the result in the
60855# global $as_val. Take advantage of shells that can avoid forks. The arguments
60856# must be portable across $(()) and expr.
60857if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60858  eval 'as_fn_arith ()
60859  {
60860    as_val=$(( $* ))
60861  }'
60862else
60863  as_fn_arith ()
60864  {
60865    as_val=`expr "$@" || test $? -eq 1`
60866  }
60867fi # as_fn_arith
60868
60869
60870if expr a : '\(a\)' >/dev/null 2>&1 &&
60871   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60872  as_expr=expr
60873else
60874  as_expr=false
60875fi
60876
60877if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60878  as_basename=basename
60879else
60880  as_basename=false
60881fi
60882
60883if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60884  as_dirname=dirname
60885else
60886  as_dirname=false
60887fi
60888
60889as_me=`$as_basename -- "$0" ||
60890$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60891	 X"$0" : 'X\(//\)$' \| \
60892	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60893$as_echo X/"$0" |
60894    sed '/^.*\/\([^/][^/]*\)\/*$/{
60895	    s//\1/
60896	    q
60897	  }
60898	  /^X\/\(\/\/\)$/{
60899	    s//\1/
60900	    q
60901	  }
60902	  /^X\/\(\/\).*/{
60903	    s//\1/
60904	    q
60905	  }
60906	  s/.*/./; q'`
60907
60908# Avoid depending upon Character Ranges.
60909as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60910as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60911as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60912as_cr_digits='0123456789'
60913as_cr_alnum=$as_cr_Letters$as_cr_digits
60914
60915ECHO_C= ECHO_N= ECHO_T=
60916case `echo -n x` in #(((((
60917-n*)
60918  case `echo 'xy\c'` in
60919  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60920  xy)  ECHO_C='\c';;
60921  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60922       ECHO_T='	';;
60923  esac;;
60924*)
60925  ECHO_N='-n';;
60926esac
60927
60928rm -f conf$$ conf$$.exe conf$$.file
60929if test -d conf$$.dir; then
60930  rm -f conf$$.dir/conf$$.file
60931else
60932  rm -f conf$$.dir
60933  mkdir conf$$.dir 2>/dev/null
60934fi
60935if (echo >conf$$.file) 2>/dev/null; then
60936  if ln -s conf$$.file conf$$ 2>/dev/null; then
60937    as_ln_s='ln -s'
60938    # ... but there are two gotchas:
60939    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60940    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60941    # In both cases, we have to default to `cp -pR'.
60942    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60943      as_ln_s='cp -pR'
60944  elif ln conf$$.file conf$$ 2>/dev/null; then
60945    as_ln_s=ln
60946  else
60947    as_ln_s='cp -pR'
60948  fi
60949else
60950  as_ln_s='cp -pR'
60951fi
60952rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60953rmdir conf$$.dir 2>/dev/null
60954
60955
60956# as_fn_mkdir_p
60957# -------------
60958# Create "$as_dir" as a directory, including parents if necessary.
60959as_fn_mkdir_p ()
60960{
60961
60962  case $as_dir in #(
60963  -*) as_dir=./$as_dir;;
60964  esac
60965  test -d "$as_dir" || eval $as_mkdir_p || {
60966    as_dirs=
60967    while :; do
60968      case $as_dir in #(
60969      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60970      *) as_qdir=$as_dir;;
60971      esac
60972      as_dirs="'$as_qdir' $as_dirs"
60973      as_dir=`$as_dirname -- "$as_dir" ||
60974$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60975	 X"$as_dir" : 'X\(//\)[^/]' \| \
60976	 X"$as_dir" : 'X\(//\)$' \| \
60977	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60978$as_echo X"$as_dir" |
60979    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60980	    s//\1/
60981	    q
60982	  }
60983	  /^X\(\/\/\)[^/].*/{
60984	    s//\1/
60985	    q
60986	  }
60987	  /^X\(\/\/\)$/{
60988	    s//\1/
60989	    q
60990	  }
60991	  /^X\(\/\).*/{
60992	    s//\1/
60993	    q
60994	  }
60995	  s/.*/./; q'`
60996      test -d "$as_dir" && break
60997    done
60998    test -z "$as_dirs" || eval "mkdir $as_dirs"
60999  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
61000
61001
61002} # as_fn_mkdir_p
61003if mkdir -p . 2>/dev/null; then
61004  as_mkdir_p='mkdir -p "$as_dir"'
61005else
61006  test -d ./-p && rmdir ./-p
61007  as_mkdir_p=false
61008fi
61009
61010
61011# as_fn_executable_p FILE
61012# -----------------------
61013# Test if FILE is an executable regular file.
61014as_fn_executable_p ()
61015{
61016  test -f "$1" && test -x "$1"
61017} # as_fn_executable_p
61018as_test_x='test -x'
61019as_executable_p=as_fn_executable_p
61020
61021# Sed expression to map a string onto a valid CPP name.
61022as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
61023
61024# Sed expression to map a string onto a valid variable name.
61025as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
61026
61027
61028exec 6>&1
61029## ----------------------------------- ##
61030## Main body of $CONFIG_STATUS script. ##
61031## ----------------------------------- ##
61032_ASEOF
61033test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61034
61035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61036# Save the log message, to keep $0 and so on meaningful, and to
61037# report actual input values of CONFIG_FILES etc. instead of their
61038# values after options handling.
61039ac_log="
61040This file was extended by OpenJDK $as_me jdk9, which was
61041generated by GNU Autoconf 2.69.  Invocation command line was
61042
61043  CONFIG_FILES    = $CONFIG_FILES
61044  CONFIG_HEADERS  = $CONFIG_HEADERS
61045  CONFIG_LINKS    = $CONFIG_LINKS
61046  CONFIG_COMMANDS = $CONFIG_COMMANDS
61047  $ $0 $@
61048
61049on `(hostname || uname -n) 2>/dev/null | sed 1q`
61050"
61051
61052_ACEOF
61053
61054case $ac_config_files in *"
61055"*) set x $ac_config_files; shift; ac_config_files=$*;;
61056esac
61057
61058
61059
61060cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61061# Files that config.status was made for.
61062config_files="$ac_config_files"
61063
61064_ACEOF
61065
61066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61067ac_cs_usage="\
61068\`$as_me' instantiates files and other configuration actions
61069from templates according to the current configuration.  Unless the files
61070and actions are specified as TAGs, all are instantiated by default.
61071
61072Usage: $0 [OPTION]... [TAG]...
61073
61074  -h, --help       print this help, then exit
61075  -V, --version    print version number and configuration settings, then exit
61076      --config     print configuration, then exit
61077  -q, --quiet, --silent
61078                   do not print progress messages
61079  -d, --debug      don't remove temporary files
61080      --recheck    update $as_me by reconfiguring in the same conditions
61081      --file=FILE[:TEMPLATE]
61082                   instantiate the configuration file FILE
61083
61084Configuration files:
61085$config_files
61086
61087Report bugs to <build-dev@openjdk.java.net>.
61088OpenJDK home page: <http://openjdk.java.net>."
61089
61090_ACEOF
61091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61092ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
61093ac_cs_version="\\
61094OpenJDK config.status jdk9
61095configured by $0, generated by GNU Autoconf 2.69,
61096  with options \\"\$ac_cs_config\\"
61097
61098Copyright (C) 2012 Free Software Foundation, Inc.
61099This config.status script is free software; the Free Software Foundation
61100gives unlimited permission to copy, distribute and modify it."
61101
61102ac_pwd='$ac_pwd'
61103srcdir='$srcdir'
61104AWK='$AWK'
61105test -n "\$AWK" || AWK=awk
61106_ACEOF
61107
61108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61109# The default lists apply if the user does not specify any file.
61110ac_need_defaults=:
61111while test $# != 0
61112do
61113  case $1 in
61114  --*=?*)
61115    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61116    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61117    ac_shift=:
61118    ;;
61119  --*=)
61120    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61121    ac_optarg=
61122    ac_shift=:
61123    ;;
61124  *)
61125    ac_option=$1
61126    ac_optarg=$2
61127    ac_shift=shift
61128    ;;
61129  esac
61130
61131  case $ac_option in
61132  # Handling of the options.
61133  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61134    ac_cs_recheck=: ;;
61135  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61136    $as_echo "$ac_cs_version"; exit ;;
61137  --config | --confi | --conf | --con | --co | --c )
61138    $as_echo "$ac_cs_config"; exit ;;
61139  --debug | --debu | --deb | --de | --d | -d )
61140    debug=: ;;
61141  --file | --fil | --fi | --f )
61142    $ac_shift
61143    case $ac_optarg in
61144    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61145    '') as_fn_error $? "missing file argument" ;;
61146    esac
61147    as_fn_append CONFIG_FILES " '$ac_optarg'"
61148    ac_need_defaults=false;;
61149  --he | --h |  --help | --hel | -h )
61150    $as_echo "$ac_cs_usage"; exit ;;
61151  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61152  | -silent | --silent | --silen | --sile | --sil | --si | --s)
61153    ac_cs_silent=: ;;
61154
61155  # This is an error.
61156  -*) as_fn_error $? "unrecognized option: \`$1'
61157Try \`$0 --help' for more information." ;;
61158
61159  *) as_fn_append ac_config_targets " $1"
61160     ac_need_defaults=false ;;
61161
61162  esac
61163  shift
61164done
61165
61166ac_configure_extra_args=
61167
61168if $ac_cs_silent; then
61169  exec 6>/dev/null
61170  ac_configure_extra_args="$ac_configure_extra_args --silent"
61171fi
61172
61173_ACEOF
61174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61175if \$ac_cs_recheck; then
61176  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
61177  shift
61178  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
61179  CONFIG_SHELL='$SHELL'
61180  export CONFIG_SHELL
61181  exec "\$@"
61182fi
61183
61184_ACEOF
61185cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61186exec 5>>config.log
61187{
61188  echo
61189  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
61190## Running $as_me. ##
61191_ASBOX
61192  $as_echo "$ac_log"
61193} >&5
61194
61195_ACEOF
61196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61197_ACEOF
61198
61199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61200
61201# Handling of arguments.
61202for ac_config_target in $ac_config_targets
61203do
61204  case $ac_config_target in
61205    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
61206    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
61207    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
61208    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
61209    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
61210
61211  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61212  esac
61213done
61214
61215
61216# If the user did not use the arguments to specify the items to instantiate,
61217# then the envvar interface is used.  Set only those that are not.
61218# We use the long form for the default assignment because of an extremely
61219# bizarre bug on SunOS 4.1.3.
61220if $ac_need_defaults; then
61221  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
61222fi
61223
61224# Have a temporary directory for convenience.  Make it in the build tree
61225# simply because there is no reason against having it here, and in addition,
61226# creating and moving files from /tmp can sometimes cause problems.
61227# Hook for its removal unless debugging.
61228# Note that there is a small window in which the directory will not be cleaned:
61229# after its creation but before its name has been assigned to `$tmp'.
61230$debug ||
61231{
61232  tmp= ac_tmp=
61233  trap 'exit_status=$?
61234  : "${ac_tmp:=$tmp}"
61235  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61236' 0
61237  trap 'as_fn_exit 1' 1 2 13 15
61238}
61239# Create a (secure) tmp directory for tmp files.
61240
61241{
61242  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61243  test -d "$tmp"
61244}  ||
61245{
61246  tmp=./conf$$-$RANDOM
61247  (umask 077 && mkdir "$tmp")
61248} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61249ac_tmp=$tmp
61250
61251# Set up the scripts for CONFIG_FILES section.
61252# No need to generate them if there are no CONFIG_FILES.
61253# This happens for instance with `./config.status config.h'.
61254if test -n "$CONFIG_FILES"; then
61255
61256
61257ac_cr=`echo X | tr X '\015'`
61258# On cygwin, bash can eat \r inside `` if the user requested igncr.
61259# But we know of no other shell where ac_cr would be empty at this
61260# point, so we can use a bashism as a fallback.
61261if test "x$ac_cr" = x; then
61262  eval ac_cr=\$\'\\r\'
61263fi
61264ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61265if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61266  ac_cs_awk_cr='\\r'
61267else
61268  ac_cs_awk_cr=$ac_cr
61269fi
61270
61271echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61272_ACEOF
61273
61274
61275{
61276  echo "cat >conf$$subs.awk <<_ACEOF" &&
61277  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61278  echo "_ACEOF"
61279} >conf$$subs.sh ||
61280  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61281ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61282ac_delim='%!_!# '
61283for ac_last_try in false false false false false :; do
61284  . ./conf$$subs.sh ||
61285    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61286
61287  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61288  if test $ac_delim_n = $ac_delim_num; then
61289    break
61290  elif $ac_last_try; then
61291    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61292  else
61293    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61294  fi
61295done
61296rm -f conf$$subs.sh
61297
61298cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61299cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61300_ACEOF
61301sed -n '
61302h
61303s/^/S["/; s/!.*/"]=/
61304p
61305g
61306s/^[^!]*!//
61307:repl
61308t repl
61309s/'"$ac_delim"'$//
61310t delim
61311:nl
61312h
61313s/\(.\{148\}\)..*/\1/
61314t more1
61315s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61316p
61317n
61318b repl
61319:more1
61320s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61321p
61322g
61323s/.\{148\}//
61324t nl
61325:delim
61326h
61327s/\(.\{148\}\)..*/\1/
61328t more2
61329s/["\\]/\\&/g; s/^/"/; s/$/"/
61330p
61331b
61332:more2
61333s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61334p
61335g
61336s/.\{148\}//
61337t delim
61338' <conf$$subs.awk | sed '
61339/^[^""]/{
61340  N
61341  s/\n//
61342}
61343' >>$CONFIG_STATUS || ac_write_fail=1
61344rm -f conf$$subs.awk
61345cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61346_ACAWK
61347cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61348  for (key in S) S_is_set[key] = 1
61349  FS = ""
61350
61351}
61352{
61353  line = $ 0
61354  nfields = split(line, field, "@")
61355  substed = 0
61356  len = length(field[1])
61357  for (i = 2; i < nfields; i++) {
61358    key = field[i]
61359    keylen = length(key)
61360    if (S_is_set[key]) {
61361      value = S[key]
61362      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61363      len += length(value) + length(field[++i])
61364      substed = 1
61365    } else
61366      len += 1 + keylen
61367  }
61368
61369  print line
61370}
61371
61372_ACAWK
61373_ACEOF
61374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61375if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61376  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61377else
61378  cat
61379fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61380  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61381_ACEOF
61382
61383# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61384# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61385# trailing colons and then remove the whole line if VPATH becomes empty
61386# (actually we leave an empty line to preserve line numbers).
61387if test "x$srcdir" = x.; then
61388  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61389h
61390s///
61391s/^/:/
61392s/[	 ]*$/:/
61393s/:\$(srcdir):/:/g
61394s/:\${srcdir}:/:/g
61395s/:@srcdir@:/:/g
61396s/^:*//
61397s/:*$//
61398x
61399s/\(=[	 ]*\).*/\1/
61400G
61401s/\n//
61402s/^[^=]*=[	 ]*$//
61403}'
61404fi
61405
61406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61407fi # test -n "$CONFIG_FILES"
61408
61409
61410eval set X "  :F $CONFIG_FILES      "
61411shift
61412for ac_tag
61413do
61414  case $ac_tag in
61415  :[FHLC]) ac_mode=$ac_tag; continue;;
61416  esac
61417  case $ac_mode$ac_tag in
61418  :[FHL]*:*);;
61419  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61420  :[FH]-) ac_tag=-:-;;
61421  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61422  esac
61423  ac_save_IFS=$IFS
61424  IFS=:
61425  set x $ac_tag
61426  IFS=$ac_save_IFS
61427  shift
61428  ac_file=$1
61429  shift
61430
61431  case $ac_mode in
61432  :L) ac_source=$1;;
61433  :[FH])
61434    ac_file_inputs=
61435    for ac_f
61436    do
61437      case $ac_f in
61438      -) ac_f="$ac_tmp/stdin";;
61439      *) # Look for the file first in the build tree, then in the source tree
61440	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61441	 # because $ac_f cannot contain `:'.
61442	 test -f "$ac_f" ||
61443	   case $ac_f in
61444	   [\\/$]*) false;;
61445	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61446	   esac ||
61447	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61448      esac
61449      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61450      as_fn_append ac_file_inputs " '$ac_f'"
61451    done
61452
61453    # Let's still pretend it is `configure' which instantiates (i.e., don't
61454    # use $as_me), people would be surprised to read:
61455    #    /* config.h.  Generated by config.status.  */
61456    configure_input='Generated from '`
61457	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61458	`' by configure.'
61459    if test x"$ac_file" != x-; then
61460      configure_input="$ac_file.  $configure_input"
61461      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61462$as_echo "$as_me: creating $ac_file" >&6;}
61463    fi
61464    # Neutralize special characters interpreted by sed in replacement strings.
61465    case $configure_input in #(
61466    *\&* | *\|* | *\\* )
61467       ac_sed_conf_input=`$as_echo "$configure_input" |
61468       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61469    *) ac_sed_conf_input=$configure_input;;
61470    esac
61471
61472    case $ac_tag in
61473    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61474      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61475    esac
61476    ;;
61477  esac
61478
61479  ac_dir=`$as_dirname -- "$ac_file" ||
61480$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61481	 X"$ac_file" : 'X\(//\)[^/]' \| \
61482	 X"$ac_file" : 'X\(//\)$' \| \
61483	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61484$as_echo X"$ac_file" |
61485    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61486	    s//\1/
61487	    q
61488	  }
61489	  /^X\(\/\/\)[^/].*/{
61490	    s//\1/
61491	    q
61492	  }
61493	  /^X\(\/\/\)$/{
61494	    s//\1/
61495	    q
61496	  }
61497	  /^X\(\/\).*/{
61498	    s//\1/
61499	    q
61500	  }
61501	  s/.*/./; q'`
61502  as_dir="$ac_dir"; as_fn_mkdir_p
61503  ac_builddir=.
61504
61505case "$ac_dir" in
61506.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61507*)
61508  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61509  # A ".." for each directory in $ac_dir_suffix.
61510  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61511  case $ac_top_builddir_sub in
61512  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61513  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61514  esac ;;
61515esac
61516ac_abs_top_builddir=$ac_pwd
61517ac_abs_builddir=$ac_pwd$ac_dir_suffix
61518# for backward compatibility:
61519ac_top_builddir=$ac_top_build_prefix
61520
61521case $srcdir in
61522  .)  # We are building in place.
61523    ac_srcdir=.
61524    ac_top_srcdir=$ac_top_builddir_sub
61525    ac_abs_top_srcdir=$ac_pwd ;;
61526  [\\/]* | ?:[\\/]* )  # Absolute name.
61527    ac_srcdir=$srcdir$ac_dir_suffix;
61528    ac_top_srcdir=$srcdir
61529    ac_abs_top_srcdir=$srcdir ;;
61530  *) # Relative name.
61531    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61532    ac_top_srcdir=$ac_top_build_prefix$srcdir
61533    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61534esac
61535ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61536
61537
61538  case $ac_mode in
61539  :F)
61540  #
61541  # CONFIG_FILE
61542  #
61543
61544_ACEOF
61545
61546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61547# If the template does not know about datarootdir, expand it.
61548# FIXME: This hack should be removed a few years after 2.60.
61549ac_datarootdir_hack=; ac_datarootdir_seen=
61550ac_sed_dataroot='
61551/datarootdir/ {
61552  p
61553  q
61554}
61555/@datadir@/p
61556/@docdir@/p
61557/@infodir@/p
61558/@localedir@/p
61559/@mandir@/p'
61560case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61561*datarootdir*) ac_datarootdir_seen=yes;;
61562*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61563  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61564$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61565_ACEOF
61566cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61567  ac_datarootdir_hack='
61568  s&@datadir@&$datadir&g
61569  s&@docdir@&$docdir&g
61570  s&@infodir@&$infodir&g
61571  s&@localedir@&$localedir&g
61572  s&@mandir@&$mandir&g
61573  s&\\\${datarootdir}&$datarootdir&g' ;;
61574esac
61575_ACEOF
61576
61577# Neutralize VPATH when `$srcdir' = `.'.
61578# Shell code in configure.ac might set extrasub.
61579# FIXME: do we really want to maintain this feature?
61580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61581ac_sed_extra="$ac_vpsub
61582$extrasub
61583_ACEOF
61584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61585:t
61586/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61587s|@configure_input@|$ac_sed_conf_input|;t t
61588s&@top_builddir@&$ac_top_builddir_sub&;t t
61589s&@top_build_prefix@&$ac_top_build_prefix&;t t
61590s&@srcdir@&$ac_srcdir&;t t
61591s&@abs_srcdir@&$ac_abs_srcdir&;t t
61592s&@top_srcdir@&$ac_top_srcdir&;t t
61593s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61594s&@builddir@&$ac_builddir&;t t
61595s&@abs_builddir@&$ac_abs_builddir&;t t
61596s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61597$ac_datarootdir_hack
61598"
61599eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61600  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61601
61602test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61603  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61604  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61605      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61606  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61607which seems to be undefined.  Please make sure it is defined" >&5
61608$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61609which seems to be undefined.  Please make sure it is defined" >&2;}
61610
61611  rm -f "$ac_tmp/stdin"
61612  case $ac_file in
61613  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61614  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61615  esac \
61616  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61617 ;;
61618
61619
61620
61621  esac
61622
61623done # for ac_tag
61624
61625
61626as_fn_exit 0
61627_ACEOF
61628ac_clean_files=$ac_clean_files_save
61629
61630test $ac_write_fail = 0 ||
61631  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61632
61633
61634# configure is writing to config.log, and then calls config.status.
61635# config.status does its own redirection, appending to config.log.
61636# Unfortunately, on DOS this fails, as config.log is still kept open
61637# by configure, so config.status won't be able to write to it; its
61638# output is simply discarded.  So we exec the FD to /dev/null,
61639# effectively closing config.log, so it can be properly (re)opened and
61640# appended to by config.status.  When coming back to configure, we
61641# need to make the FD available again.
61642if test "$no_create" != yes; then
61643  ac_cs_success=:
61644  ac_config_status_args=
61645  test "$silent" = yes &&
61646    ac_config_status_args="$ac_config_status_args --quiet"
61647  exec 5>/dev/null
61648  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61649  exec 5>>config.log
61650  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61651  # would make configure fail if this is the last instruction.
61652  $ac_cs_success || as_fn_exit 1
61653fi
61654if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61655  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61656$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61657fi
61658
61659
61660# After AC_OUTPUT, we need to do final work
61661
61662
61663  # Try to move config.log (generated by autoconf) to the configure-support directory.
61664  if test -e ./config.log; then
61665    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61666  fi
61667
61668  # Rotate our log file (configure.log)
61669  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61670    $RM -f "$OUTPUT_ROOT/configure.log.old"
61671  fi
61672  if test -e "$OUTPUT_ROOT/configure.log"; then
61673    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61674  fi
61675
61676  # Move configure.log from current directory to the build output root
61677  if test -e ./configure.log; then
61678    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61679  fi
61680
61681  # Make the compare script executable
61682  $CHMOD +x $OUTPUT_ROOT/compare.sh
61683
61684
61685# Finally output some useful information to the user
61686
61687  # Finally output some useful information to the user
61688
61689  printf "\n"
61690  printf "====================================================\n"
61691  if test "x$no_create" != "xyes"; then
61692    if test "x$IS_RECONFIGURE" != "xyes"; then
61693      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61694    else
61695      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61696    fi
61697  else
61698    if test "x$IS_RECONFIGURE" != "xyes"; then
61699      printf "A configuration has been successfully checked but not created\n"
61700    else
61701      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61702    fi
61703  fi
61704  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61705    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61706  else
61707    printf "using default settings.\n"
61708  fi
61709
61710  printf "\n"
61711  printf "Configuration summary:\n"
61712  printf "* Debug level:    $DEBUG_LEVEL\n"
61713  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61714  printf "* JDK variant:    $JDK_VARIANT\n"
61715  printf "* JVM variants:   $with_jvm_variants\n"
61716  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61717  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61718
61719  printf "\n"
61720  printf "Tools summary:\n"
61721  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61722    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61723  fi
61724  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61725  if test "x$TOOLCHAIN_VERSION" != "x"; then
61726    print_version=" $TOOLCHAIN_VERSION"
61727  fi
61728  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61729  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61730  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61731
61732  printf "\n"
61733  printf "Build performance summary:\n"
61734  printf "* Cores to use:   $JOBS\n"
61735  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61736  if test "x$CCACHE_STATUS" != "x"; then
61737    printf "* ccache status:  $CCACHE_STATUS\n"
61738  fi
61739  printf "\n"
61740
61741  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61742    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61743    printf "will result in longer build times.\n"
61744    printf "\n"
61745  fi
61746
61747  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61748    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61749    printf "These are not respected, and will be ignored. It is recommended\n"
61750    printf "that you clean your environment. The following variables are set:\n"
61751    printf "$FOUND_ALT_VARIABLES\n"
61752    printf "\n"
61753  fi
61754
61755  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61756    printf "WARNING: Your build output directory is not on a local disk.\n"
61757    printf "This will severely degrade build performance!\n"
61758    printf "It is recommended that you create an output directory on a local disk,\n"
61759    printf "and run the configure script again from that directory.\n"
61760    printf "\n"
61761  fi
61762
61763  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61764    printf "WARNING: The result of this configuration has overridden an older\n"
61765    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61766    printf "proper build. Failure to do so might result in strange build problems.\n"
61767    printf "\n"
61768  fi
61769
61770  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61771    printf "WARNING: The result of this configuration was not saved.\n"
61772    printf "You should run without '--no-create | -n' to create the configuration.\n"
61773    printf "\n"
61774  fi
61775
61776
61777
61778  # Locate config.log.
61779  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61780    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61781  elif test -e "./config.log"; then
61782    CONFIG_LOG_PATH="."
61783  fi
61784
61785  if test -e "$CONFIG_LOG_PATH/config.log"; then
61786    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61787    if test $? -eq 0; then
61788      printf "The following warnings were produced. Repeated here for convenience:\n"
61789      # We must quote sed expression (using []) to stop m4 from eating the [].
61790      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61791      printf "\n"
61792    fi
61793  fi
61794
61795