generated-configure.sh revision 2396:c14f9a7b4cab
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
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794USE_CLANG
795HOTSPOT_LD
796HOTSPOT_CXX
797HOTSPOT_RC
798HOTSPOT_MT
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_CONF
872IMPORT_MODULES_LIBS
873IMPORT_MODULES_CMDS
874IMPORT_MODULES_CLASSES
875BUILD_OUTPUT
876JDK_TOPDIR
877NASHORN_TOPDIR
878HOTSPOT_TOPDIR
879JAXWS_TOPDIR
880JAXP_TOPDIR
881CORBA_TOPDIR
882LANGTOOLS_TOPDIR
883EXTERNAL_BUILDJDK
884BUILD_JDK
885CREATE_BUILDJDK
886JLINK
887JMOD
888BOOT_JDK_BITS
889JAVAC_FLAGS
890BOOT_JDK_MODULAR
891BOOT_JDK_SOURCETARGET
892JARSIGNER
893JAR
894JAVAH
895JAVAC
896JAVA
897BOOT_JDK
898JAVA_CHECK
899JAVAC_CHECK
900VERSION_IS_GA
901VERSION_SHORT
902VERSION_STRING
903VERSION_NUMBER_FOUR_POSITIONS
904VERSION_NUMBER
905VERSION_OPT
906VERSION_BUILD
907VERSION_PRE
908VERSION_PATCH
909VERSION_SECURITY
910VERSION_MINOR
911VERSION_MAJOR
912MACOSX_BUNDLE_ID_BASE
913MACOSX_BUNDLE_NAME_BASE
914HOTSPOT_VM_DISTRO
915COMPANY_NAME
916JDK_RC_PLATFORM_NAME
917PRODUCT_SUFFIX
918PRODUCT_NAME
919LAUNCHER_NAME
920JLINK_KEEP_PACKAGED_MODULES
921COPYRIGHT_YEAR
922COMPRESS_JARS
923INCLUDE_SA
924UNLIMITED_CRYPTO
925CACERTS_FILE
926ENABLE_HEADLESS_ONLY
927DEFAULT_MAKE_TARGET
928OS_VERSION_MICRO
929OS_VERSION_MINOR
930OS_VERSION_MAJOR
931PKG_CONFIG
932BASH_ARGS
933SETFILE
934CODESIGN
935XATTR
936DSYMUTIL
937IS_GNU_TIME
938PATCH
939DTRACE
940TIME
941STAT
942HG
943READELF
944OTOOL
945LDD
946ZIP
947UNZIP
948TAR_SUPPORTS_TRANSFORM
949TAR_INCLUDE_PARAM
950TAR_CREATE_EXTRA_PARAM
951TAR_TYPE
952FIND_DELETE
953OUTPUT_SYNC
954OUTPUT_SYNC_SUPPORTED
955CHECK_TOOLSDIR_MAKE
956CHECK_TOOLSDIR_GMAKE
957CHECK_MAKE
958CHECK_GMAKE
959MAKE
960PKGHANDLER
961CONFIGURESUPPORT_OUTPUTDIR
962OUTPUT_ROOT
963CONF_NAME
964SPEC
965SDKROOT
966XCODEBUILD
967JVM_VARIANT_MAIN
968VALID_JVM_VARIANTS
969JVM_VARIANTS
970DEBUG_LEVEL
971HOTSPOT_DEBUG_LEVEL
972JDK_VARIANT
973USERNAME
974CANONICAL_TOPDIR
975ORIGINAL_TOPDIR
976TOPDIR
977PATH_SEP
978ZERO_ARCHDEF
979HOTSPOT_BUILD_CPU_DEFINE
980HOTSPOT_BUILD_CPU_ARCH
981HOTSPOT_BUILD_CPU
982HOTSPOT_BUILD_OS_TYPE
983HOTSPOT_BUILD_OS
984OPENJDK_BUILD_BUNDLE_PLATFORM
985OPENJDK_BUILD_CPU_BUNDLE
986OPENJDK_BUILD_OS_BUNDLE
987OPENJDK_BUILD_OS_EXPORT_DIR
988OPENJDK_BUILD_CPU_OSARCH
989OPENJDK_BUILD_CPU_ISADIR
990OPENJDK_BUILD_CPU_LEGACY_LIB
991OPENJDK_BUILD_CPU_LEGACY
992HOTSPOT_TARGET_CPU_DEFINE
993HOTSPOT_TARGET_CPU_ARCH
994HOTSPOT_TARGET_CPU
995HOTSPOT_TARGET_OS_TYPE
996HOTSPOT_TARGET_OS
997DEFINE_CROSS_COMPILE_ARCH
998LP64
999OPENJDK_TARGET_BUNDLE_PLATFORM
1000OPENJDK_TARGET_CPU_BUNDLE
1001OPENJDK_TARGET_OS_BUNDLE
1002OPENJDK_TARGET_OS_EXPORT_DIR
1003OPENJDK_TARGET_CPU_OSARCH
1004OPENJDK_TARGET_CPU_ISADIR
1005OPENJDK_TARGET_CPU_LEGACY_LIB
1006OPENJDK_TARGET_CPU_LEGACY
1007REQUIRED_OS_VERSION
1008REQUIRED_OS_NAME
1009COMPILE_TYPE
1010OPENJDK_TARGET_CPU_ENDIAN
1011OPENJDK_TARGET_CPU_BITS
1012OPENJDK_TARGET_CPU_ARCH
1013OPENJDK_TARGET_CPU
1014OPENJDK_TARGET_OS_ENV
1015OPENJDK_TARGET_OS_TYPE
1016OPENJDK_TARGET_OS
1017OPENJDK_BUILD_CPU_ENDIAN
1018OPENJDK_BUILD_CPU_BITS
1019OPENJDK_BUILD_CPU_ARCH
1020OPENJDK_BUILD_CPU
1021OPENJDK_BUILD_OS_ENV
1022OPENJDK_BUILD_OS_TYPE
1023OPENJDK_BUILD_OS
1024OPENJDK_BUILD_AUTOCONF_NAME
1025OPENJDK_TARGET_AUTOCONF_NAME
1026target_os
1027target_vendor
1028target_cpu
1029target
1030host_os
1031host_vendor
1032host_cpu
1033host
1034build_os
1035build_vendor
1036build_cpu
1037build
1038NICE
1039CPIO
1040DF
1041READLINK
1042CYGPATH
1043SED
1044FGREP
1045EGREP
1046GREP
1047AWK
1048XARGS
1049WHICH
1050WC
1051UNIQ
1052UNAME
1053TR
1054TOUCH
1055TEE
1056TAR
1057TAIL
1058SORT
1059SH
1060RMDIR
1061RM
1062PRINTF
1063NAWK
1064MV
1065MKTEMP
1066MKDIR
1067LS
1068LN
1069GZIP
1070GUNZIP
1071HEAD
1072FIND
1073FILE
1074EXPR
1075ECHO
1076DIRNAME
1077DIFF
1078DATE
1079CUT
1080CP
1081COMM
1082CMP
1083CHMOD
1084CAT
1085BASH
1086BASENAME
1087DATE_WHEN_CONFIGURED
1088ORIGINAL_PATH
1089CONFIGURE_COMMAND_LINE
1090target_alias
1091host_alias
1092build_alias
1093LIBS
1094ECHO_T
1095ECHO_N
1096ECHO_C
1097DEFS
1098mandir
1099localedir
1100libdir
1101psdir
1102pdfdir
1103dvidir
1104htmldir
1105infodir
1106docdir
1107oldincludedir
1108includedir
1109localstatedir
1110sharedstatedir
1111sysconfdir
1112datadir
1113datarootdir
1114libexecdir
1115sbindir
1116bindir
1117program_transform_name
1118prefix
1119exec_prefix
1120PACKAGE_URL
1121PACKAGE_BUGREPORT
1122PACKAGE_STRING
1123PACKAGE_VERSION
1124PACKAGE_TARNAME
1125PACKAGE_NAME
1126PATH_SEPARATOR
1127SHELL'
1128ac_subst_files=''
1129ac_user_opts='
1130enable_option_checking
1131with_target_bits
1132enable_openjdk_only
1133with_custom_make_dir
1134with_jdk_variant
1135enable_debug
1136with_debug_level
1137with_jvm_variants
1138with_devkit
1139with_sys_root
1140with_sysroot
1141with_tools_dir
1142with_toolchain_path
1143with_extra_path
1144with_sdk_name
1145with_conf_name
1146with_output_sync
1147with_default_make_target
1148enable_headless_only
1149with_cacerts_file
1150enable_unlimited_crypto
1151with_copyright_year
1152enable_keep_packaged_modules
1153with_milestone
1154with_update_version
1155with_user_release_suffix
1156with_build_number
1157with_version_string
1158with_version_pre
1159with_version_opt
1160with_version_build
1161with_version_major
1162with_version_minor
1163with_version_security
1164with_version_patch
1165with_boot_jdk
1166with_build_jdk
1167with_add_source_root
1168with_override_source_root
1169with_adds_and_overrides
1170with_override_langtools
1171with_override_corba
1172with_override_jaxp
1173with_override_jaxws
1174with_override_hotspot
1175with_override_nashorn
1176with_override_jdk
1177with_import_hotspot
1178with_import_modules
1179enable_static_build
1180with_toolchain_type
1181with_extra_cflags
1182with_extra_cxxflags
1183with_extra_ldflags
1184with_toolchain_version
1185with_build_devkit
1186with_jtreg
1187enable_warnings_as_errors
1188with_native_debug_symbols
1189enable_debug_symbols
1190enable_zip_debug_info
1191enable_native_coverage
1192enable_dtrace
1193with_jvm_features
1194with_jvm_interpreter
1195enable_hotspot_gtest
1196with_stdc__lib
1197with_msvcr_dll
1198with_msvcp_dll
1199with_x
1200with_cups
1201with_cups_include
1202with_freetype
1203with_freetype_include
1204with_freetype_lib
1205with_freetype_src
1206enable_freetype_bundling
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213with_libjpeg
1214with_giflib
1215with_libpng
1216with_zlib
1217with_lcms
1218with_dxsdk
1219with_dxsdk_lib
1220with_dxsdk_include
1221enable_jtreg_failure_handler
1222enable_generate_classlist
1223with_num_cores
1224with_memory_size
1225with_jobs
1226with_test_jobs
1227with_boot_jdk_jvmargs
1228with_sjavac_server_java
1229enable_sjavac
1230enable_javac_server
1231enable_icecc
1232enable_precompiled_headers
1233enable_ccache
1234with_ccache_dir
1235'
1236      ac_precious_vars='build_alias
1237host_alias
1238target_alias
1239BASENAME
1240BASH
1241CAT
1242CHMOD
1243CMP
1244COMM
1245CP
1246CUT
1247DATE
1248DIFF
1249DIRNAME
1250ECHO
1251EXPR
1252FILE
1253FIND
1254HEAD
1255GUNZIP
1256GZIP
1257LN
1258LS
1259MKDIR
1260MKTEMP
1261MV
1262NAWK
1263PRINTF
1264RM
1265RMDIR
1266SH
1267SORT
1268TAIL
1269TAR
1270TEE
1271TOUCH
1272TR
1273UNAME
1274UNIQ
1275WC
1276WHICH
1277XARGS
1278AWK
1279GREP
1280EGREP
1281FGREP
1282SED
1283CYGPATH
1284READLINK
1285DF
1286CPIO
1287NICE
1288MAKE
1289UNZIP
1290ZIP
1291LDD
1292OTOOL
1293READELF
1294HG
1295STAT
1296TIME
1297DTRACE
1298PATCH
1299DSYMUTIL
1300XATTR
1301CODESIGN
1302SETFILE
1303PKG_CONFIG
1304JAVA
1305JAVAC
1306JAVAH
1307JAR
1308JARSIGNER
1309CC
1310CFLAGS
1311LDFLAGS
1312LIBS
1313CPPFLAGS
1314CXX
1315CXXFLAGS
1316CCC
1317CPP
1318CXXCPP
1319AS
1320AR
1321LIPO
1322STRIP
1323NM
1324GNM
1325OBJCOPY
1326OBJDUMP
1327BUILD_CC
1328BUILD_CXX
1329BUILD_NM
1330BUILD_AR
1331BUILD_OBJCOPY
1332BUILD_STRIP
1333JTREGEXE
1334XMKMF
1335FREETYPE_CFLAGS
1336FREETYPE_LIBS
1337ALSA_CFLAGS
1338ALSA_LIBS
1339LIBFFI_CFLAGS
1340LIBFFI_LIBS
1341PNG_CFLAGS
1342PNG_LIBS
1343LCMS_CFLAGS
1344LCMS_LIBS
1345ICECC_CMD
1346ICECC_CREATE_ENV
1347ICECC_WRAPPER
1348CCACHE'
1349
1350
1351# Initialize some variables set by options.
1352ac_init_help=
1353ac_init_version=false
1354ac_unrecognized_opts=
1355ac_unrecognized_sep=
1356# The variables have the same names as the options, with
1357# dashes changed to underlines.
1358cache_file=/dev/null
1359exec_prefix=NONE
1360no_create=
1361no_recursion=
1362prefix=NONE
1363program_prefix=NONE
1364program_suffix=NONE
1365program_transform_name=s,x,x,
1366silent=
1367site=
1368srcdir=
1369verbose=
1370x_includes=NONE
1371x_libraries=NONE
1372
1373# Installation directory options.
1374# These are left unexpanded so users can "make install exec_prefix=/foo"
1375# and all the variables that are supposed to be based on exec_prefix
1376# by default will actually change.
1377# Use braces instead of parens because sh, perl, etc. also accept them.
1378# (The list follows the same order as the GNU Coding Standards.)
1379bindir='${exec_prefix}/bin'
1380sbindir='${exec_prefix}/sbin'
1381libexecdir='${exec_prefix}/libexec'
1382datarootdir='${prefix}/share'
1383datadir='${datarootdir}'
1384sysconfdir='${prefix}/etc'
1385sharedstatedir='${prefix}/com'
1386localstatedir='${prefix}/var'
1387includedir='${prefix}/include'
1388oldincludedir='/usr/include'
1389docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1390infodir='${datarootdir}/info'
1391htmldir='${docdir}'
1392dvidir='${docdir}'
1393pdfdir='${docdir}'
1394psdir='${docdir}'
1395libdir='${exec_prefix}/lib'
1396localedir='${datarootdir}/locale'
1397mandir='${datarootdir}/man'
1398
1399ac_prev=
1400ac_dashdash=
1401for ac_option
1402do
1403  # If the previous option needs an argument, assign it.
1404  if test -n "$ac_prev"; then
1405    eval $ac_prev=\$ac_option
1406    ac_prev=
1407    continue
1408  fi
1409
1410  case $ac_option in
1411  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1412  *=)   ac_optarg= ;;
1413  *)    ac_optarg=yes ;;
1414  esac
1415
1416  # Accept the important Cygnus configure options, so we can diagnose typos.
1417
1418  case $ac_dashdash$ac_option in
1419  --)
1420    ac_dashdash=yes ;;
1421
1422  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1423    ac_prev=bindir ;;
1424  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1425    bindir=$ac_optarg ;;
1426
1427  -build | --build | --buil | --bui | --bu)
1428    ac_prev=build_alias ;;
1429  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1430    build_alias=$ac_optarg ;;
1431
1432  -cache-file | --cache-file | --cache-fil | --cache-fi \
1433  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1434    ac_prev=cache_file ;;
1435  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1436  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1437    cache_file=$ac_optarg ;;
1438
1439  --config-cache | -C)
1440    cache_file=config.cache ;;
1441
1442  -datadir | --datadir | --datadi | --datad)
1443    ac_prev=datadir ;;
1444  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1445    datadir=$ac_optarg ;;
1446
1447  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1448  | --dataroo | --dataro | --datar)
1449    ac_prev=datarootdir ;;
1450  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1451  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1452    datarootdir=$ac_optarg ;;
1453
1454  -disable-* | --disable-*)
1455    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1456    # Reject names that are not valid shell variable names.
1457    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1458      as_fn_error $? "invalid feature name: $ac_useropt"
1459    ac_useropt_orig=$ac_useropt
1460    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1461    case $ac_user_opts in
1462      *"
1463"enable_$ac_useropt"
1464"*) ;;
1465      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1466	 ac_unrecognized_sep=', ';;
1467    esac
1468    eval enable_$ac_useropt=no ;;
1469
1470  -docdir | --docdir | --docdi | --doc | --do)
1471    ac_prev=docdir ;;
1472  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1473    docdir=$ac_optarg ;;
1474
1475  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1476    ac_prev=dvidir ;;
1477  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1478    dvidir=$ac_optarg ;;
1479
1480  -enable-* | --enable-*)
1481    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1482    # Reject names that are not valid shell variable names.
1483    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1484      as_fn_error $? "invalid feature name: $ac_useropt"
1485    ac_useropt_orig=$ac_useropt
1486    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1487    case $ac_user_opts in
1488      *"
1489"enable_$ac_useropt"
1490"*) ;;
1491      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1492	 ac_unrecognized_sep=', ';;
1493    esac
1494    eval enable_$ac_useropt=\$ac_optarg ;;
1495
1496  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1497  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1498  | --exec | --exe | --ex)
1499    ac_prev=exec_prefix ;;
1500  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1501  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1502  | --exec=* | --exe=* | --ex=*)
1503    exec_prefix=$ac_optarg ;;
1504
1505  -gas | --gas | --ga | --g)
1506    # Obsolete; use --with-gas.
1507    with_gas=yes ;;
1508
1509  -help | --help | --hel | --he | -h)
1510    ac_init_help=long ;;
1511  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1512    ac_init_help=recursive ;;
1513  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1514    ac_init_help=short ;;
1515
1516  -host | --host | --hos | --ho)
1517    ac_prev=host_alias ;;
1518  -host=* | --host=* | --hos=* | --ho=*)
1519    host_alias=$ac_optarg ;;
1520
1521  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1522    ac_prev=htmldir ;;
1523  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1524  | --ht=*)
1525    htmldir=$ac_optarg ;;
1526
1527  -includedir | --includedir | --includedi | --included | --include \
1528  | --includ | --inclu | --incl | --inc)
1529    ac_prev=includedir ;;
1530  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1531  | --includ=* | --inclu=* | --incl=* | --inc=*)
1532    includedir=$ac_optarg ;;
1533
1534  -infodir | --infodir | --infodi | --infod | --info | --inf)
1535    ac_prev=infodir ;;
1536  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1537    infodir=$ac_optarg ;;
1538
1539  -libdir | --libdir | --libdi | --libd)
1540    ac_prev=libdir ;;
1541  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1542    libdir=$ac_optarg ;;
1543
1544  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1545  | --libexe | --libex | --libe)
1546    ac_prev=libexecdir ;;
1547  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1548  | --libexe=* | --libex=* | --libe=*)
1549    libexecdir=$ac_optarg ;;
1550
1551  -localedir | --localedir | --localedi | --localed | --locale)
1552    ac_prev=localedir ;;
1553  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1554    localedir=$ac_optarg ;;
1555
1556  -localstatedir | --localstatedir | --localstatedi | --localstated \
1557  | --localstate | --localstat | --localsta | --localst | --locals)
1558    ac_prev=localstatedir ;;
1559  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1560  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1561    localstatedir=$ac_optarg ;;
1562
1563  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1564    ac_prev=mandir ;;
1565  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1566    mandir=$ac_optarg ;;
1567
1568  -nfp | --nfp | --nf)
1569    # Obsolete; use --without-fp.
1570    with_fp=no ;;
1571
1572  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1573  | --no-cr | --no-c | -n)
1574    no_create=yes ;;
1575
1576  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1577  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1578    no_recursion=yes ;;
1579
1580  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1581  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1582  | --oldin | --oldi | --old | --ol | --o)
1583    ac_prev=oldincludedir ;;
1584  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1585  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1586  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1587    oldincludedir=$ac_optarg ;;
1588
1589  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1590    ac_prev=prefix ;;
1591  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1592    prefix=$ac_optarg ;;
1593
1594  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1595  | --program-pre | --program-pr | --program-p)
1596    ac_prev=program_prefix ;;
1597  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1598  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1599    program_prefix=$ac_optarg ;;
1600
1601  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1602  | --program-suf | --program-su | --program-s)
1603    ac_prev=program_suffix ;;
1604  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1605  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1606    program_suffix=$ac_optarg ;;
1607
1608  -program-transform-name | --program-transform-name \
1609  | --program-transform-nam | --program-transform-na \
1610  | --program-transform-n | --program-transform- \
1611  | --program-transform | --program-transfor \
1612  | --program-transfo | --program-transf \
1613  | --program-trans | --program-tran \
1614  | --progr-tra | --program-tr | --program-t)
1615    ac_prev=program_transform_name ;;
1616  -program-transform-name=* | --program-transform-name=* \
1617  | --program-transform-nam=* | --program-transform-na=* \
1618  | --program-transform-n=* | --program-transform-=* \
1619  | --program-transform=* | --program-transfor=* \
1620  | --program-transfo=* | --program-transf=* \
1621  | --program-trans=* | --program-tran=* \
1622  | --progr-tra=* | --program-tr=* | --program-t=*)
1623    program_transform_name=$ac_optarg ;;
1624
1625  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1626    ac_prev=pdfdir ;;
1627  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1628    pdfdir=$ac_optarg ;;
1629
1630  -psdir | --psdir | --psdi | --psd | --ps)
1631    ac_prev=psdir ;;
1632  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1633    psdir=$ac_optarg ;;
1634
1635  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1636  | -silent | --silent | --silen | --sile | --sil)
1637    silent=yes ;;
1638
1639  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1640    ac_prev=sbindir ;;
1641  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1642  | --sbi=* | --sb=*)
1643    sbindir=$ac_optarg ;;
1644
1645  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1646  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1647  | --sharedst | --shareds | --shared | --share | --shar \
1648  | --sha | --sh)
1649    ac_prev=sharedstatedir ;;
1650  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1651  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1652  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1653  | --sha=* | --sh=*)
1654    sharedstatedir=$ac_optarg ;;
1655
1656  -site | --site | --sit)
1657    ac_prev=site ;;
1658  -site=* | --site=* | --sit=*)
1659    site=$ac_optarg ;;
1660
1661  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1662    ac_prev=srcdir ;;
1663  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1664    srcdir=$ac_optarg ;;
1665
1666  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1667  | --syscon | --sysco | --sysc | --sys | --sy)
1668    ac_prev=sysconfdir ;;
1669  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1670  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1671    sysconfdir=$ac_optarg ;;
1672
1673  -target | --target | --targe | --targ | --tar | --ta | --t)
1674    ac_prev=target_alias ;;
1675  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1676    target_alias=$ac_optarg ;;
1677
1678  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1679    verbose=yes ;;
1680
1681  -version | --version | --versio | --versi | --vers | -V)
1682    ac_init_version=: ;;
1683
1684  -with-* | --with-*)
1685    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1686    # Reject names that are not valid shell variable names.
1687    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1688      as_fn_error $? "invalid package name: $ac_useropt"
1689    ac_useropt_orig=$ac_useropt
1690    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1691    case $ac_user_opts in
1692      *"
1693"with_$ac_useropt"
1694"*) ;;
1695      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1696	 ac_unrecognized_sep=', ';;
1697    esac
1698    eval with_$ac_useropt=\$ac_optarg ;;
1699
1700  -without-* | --without-*)
1701    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1702    # Reject names that are not valid shell variable names.
1703    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1704      as_fn_error $? "invalid package name: $ac_useropt"
1705    ac_useropt_orig=$ac_useropt
1706    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1707    case $ac_user_opts in
1708      *"
1709"with_$ac_useropt"
1710"*) ;;
1711      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1712	 ac_unrecognized_sep=', ';;
1713    esac
1714    eval with_$ac_useropt=no ;;
1715
1716  --x)
1717    # Obsolete; use --with-x.
1718    with_x=yes ;;
1719
1720  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1721  | --x-incl | --x-inc | --x-in | --x-i)
1722    ac_prev=x_includes ;;
1723  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1724  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1725    x_includes=$ac_optarg ;;
1726
1727  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1728  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1729    ac_prev=x_libraries ;;
1730  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1731  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1732    x_libraries=$ac_optarg ;;
1733
1734  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1735Try \`$0 --help' for more information"
1736    ;;
1737
1738  *=*)
1739    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1740    # Reject names that are not valid shell variable names.
1741    case $ac_envvar in #(
1742      '' | [0-9]* | *[!_$as_cr_alnum]* )
1743      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1744    esac
1745    eval $ac_envvar=\$ac_optarg
1746    export $ac_envvar ;;
1747
1748  *)
1749    # FIXME: should be removed in autoconf 3.0.
1750    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1751    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1752      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1753    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1754    ;;
1755
1756  esac
1757done
1758
1759if test -n "$ac_prev"; then
1760  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1761  as_fn_error $? "missing argument to $ac_option"
1762fi
1763
1764if test -n "$ac_unrecognized_opts"; then
1765  case $enable_option_checking in
1766    no) ;;
1767    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1768    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1769  esac
1770fi
1771
1772# Check all directory arguments for consistency.
1773for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1774		datadir sysconfdir sharedstatedir localstatedir includedir \
1775		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1776		libdir localedir mandir
1777do
1778  eval ac_val=\$$ac_var
1779  # Remove trailing slashes.
1780  case $ac_val in
1781    */ )
1782      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1783      eval $ac_var=\$ac_val;;
1784  esac
1785  # Be sure to have absolute directory names.
1786  case $ac_val in
1787    [\\/$]* | ?:[\\/]* )  continue;;
1788    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1789  esac
1790  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1791done
1792
1793# There might be people who depend on the old broken behavior: `$host'
1794# used to hold the argument of --host etc.
1795# FIXME: To remove some day.
1796build=$build_alias
1797host=$host_alias
1798target=$target_alias
1799
1800# FIXME: To remove some day.
1801if test "x$host_alias" != x; then
1802  if test "x$build_alias" = x; then
1803    cross_compiling=maybe
1804  elif test "x$build_alias" != "x$host_alias"; then
1805    cross_compiling=yes
1806  fi
1807fi
1808
1809ac_tool_prefix=
1810test -n "$host_alias" && ac_tool_prefix=$host_alias-
1811
1812test "$silent" = yes && exec 6>/dev/null
1813
1814
1815ac_pwd=`pwd` && test -n "$ac_pwd" &&
1816ac_ls_di=`ls -di .` &&
1817ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1818  as_fn_error $? "working directory cannot be determined"
1819test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1820  as_fn_error $? "pwd does not report name of working directory"
1821
1822
1823# Find the source files, if location was not specified.
1824if test -z "$srcdir"; then
1825  ac_srcdir_defaulted=yes
1826  # Try the directory containing this script, then the parent directory.
1827  ac_confdir=`$as_dirname -- "$as_myself" ||
1828$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1829	 X"$as_myself" : 'X\(//\)[^/]' \| \
1830	 X"$as_myself" : 'X\(//\)$' \| \
1831	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1832$as_echo X"$as_myself" |
1833    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1834	    s//\1/
1835	    q
1836	  }
1837	  /^X\(\/\/\)[^/].*/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\).*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  s/.*/./; q'`
1850  srcdir=$ac_confdir
1851  if test ! -r "$srcdir/$ac_unique_file"; then
1852    srcdir=..
1853  fi
1854else
1855  ac_srcdir_defaulted=no
1856fi
1857if test ! -r "$srcdir/$ac_unique_file"; then
1858  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1859  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1860fi
1861ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1862ac_abs_confdir=`(
1863	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1864	pwd)`
1865# When building in place, set srcdir=.
1866if test "$ac_abs_confdir" = "$ac_pwd"; then
1867  srcdir=.
1868fi
1869# Remove unnecessary trailing slashes from srcdir.
1870# Double slashes in file names in object file debugging info
1871# mess up M-x gdb in Emacs.
1872case $srcdir in
1873*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1874esac
1875for ac_var in $ac_precious_vars; do
1876  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_env_${ac_var}_value=\$${ac_var}
1878  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1880done
1881
1882#
1883# Report the --help message.
1884#
1885if test "$ac_init_help" = "long"; then
1886  # Omit some internal or obsolete options to make the list less imposing.
1887  # This message is too long to be a string in the A/UX 3.1 sh.
1888  cat <<_ACEOF
1889\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1890
1891Usage: $0 [OPTION]... [VAR=VALUE]...
1892
1893To assign environment variables (e.g., CC, CFLAGS...), specify them as
1894VAR=VALUE.  See below for descriptions of some of the useful variables.
1895
1896Defaults for the options are specified in brackets.
1897
1898Configuration:
1899  -h, --help              display this help and exit
1900      --help=short        display options specific to this package
1901      --help=recursive    display the short help of all the included packages
1902  -V, --version           display version information and exit
1903  -q, --quiet, --silent   do not print \`checking ...' messages
1904      --cache-file=FILE   cache test results in FILE [disabled]
1905  -C, --config-cache      alias for \`--cache-file=config.cache'
1906  -n, --no-create         do not create output files
1907      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1908
1909Installation directories:
1910  --prefix=PREFIX         install architecture-independent files in PREFIX
1911                          [$ac_default_prefix]
1912  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1913                          [PREFIX]
1914
1915By default, \`make install' will install all the files in
1916\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1917an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1918for instance \`--prefix=\$HOME'.
1919
1920For better control, use the options below.
1921
1922Fine tuning of the installation directories:
1923  --bindir=DIR            user executables [EPREFIX/bin]
1924  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1925  --libexecdir=DIR        program executables [EPREFIX/libexec]
1926  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1927  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1928  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1929  --libdir=DIR            object code libraries [EPREFIX/lib]
1930  --includedir=DIR        C header files [PREFIX/include]
1931  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1932  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1933  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1934  --infodir=DIR           info documentation [DATAROOTDIR/info]
1935  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1936  --mandir=DIR            man documentation [DATAROOTDIR/man]
1937  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1938  --htmldir=DIR           html documentation [DOCDIR]
1939  --dvidir=DIR            dvi documentation [DOCDIR]
1940  --pdfdir=DIR            pdf documentation [DOCDIR]
1941  --psdir=DIR             ps documentation [DOCDIR]
1942_ACEOF
1943
1944  cat <<\_ACEOF
1945
1946X features:
1947  --x-includes=DIR    X include files are in DIR
1948  --x-libraries=DIR   X library files are in DIR
1949
1950System types:
1951  --build=BUILD     configure for building on BUILD [guessed]
1952  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1953  --target=TARGET   configure for building compilers for TARGET [HOST]
1954_ACEOF
1955fi
1956
1957if test -n "$ac_init_help"; then
1958  case $ac_init_help in
1959     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1960   esac
1961  cat <<\_ACEOF
1962
1963Optional Features:
1964  --disable-option-checking  ignore unrecognized --enable/--with options
1965  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1966  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1967  --enable-openjdk-only   suppress building custom source even if present
1968                          [disabled]
1969  --enable-debug          set the debug level to fastdebug (shorthand for
1970                          --with-debug-level=fastdebug) [disabled]
1971  --enable-headless-only  only build headless (no GUI) support [disabled]
1972  --enable-unlimited-crypto
1973                          Enable unlimited crypto policy [disabled]
1974  --disable-keep-packaged-modules
1975                          Do not keep packaged modules in jdk image [enable]
1976  --enable-static-build   enable static library build [disabled]
1977  --disable-warnings-as-errors
1978                          do not consider native warnings to be an error
1979                          [enabled]
1980  --enable-debug-symbols  Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-zip-debug-info Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --enable-native-coverage
1985                          enable native compilation with code coverage
1986                          data[disabled]
1987  --enable-dtrace[=yes/no/auto]
1988                          enable dtrace. Default is auto, where dtrace is
1989                          enabled if all dependencies are present.
1990  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1991  --disable-freetype-bundling
1992                          disable bundling of the freetype library with the
1993                          build result [enabled on Windows or when using
1994                          --with-freetype, disabled otherwise]
1995  --enable-jtreg-failure-handler
1996                          forces build of the jtreg failure handler to be
1997                          enabled, missing dependencies become fatal errors.
1998                          Default is auto, where the failure handler is built
1999                          if all dependencies are present and otherwise just
2000                          disabled.
2001  --disable-generate-classlist
2002                          forces enabling or disabling of the generation of a
2003                          CDS classlist at build time. Default is to generate
2004                          it when either the server or client JVMs are built.
2005  --enable-sjavac         use sjavac to do fast incremental compiles
2006                          [disabled]
2007  --disable-javac-server  disable javac server [enabled]
2008  --enable-icecc          enable distribted compilation of native code using
2009                          icecc/icecream [disabled]
2010  --disable-precompiled-headers
2011                          disable using precompiled headers when compiling C++
2012                          [enabled]
2013  --enable-ccache         enable using ccache to speed up recompilations
2014                          [disabled]
2015
2016Optional Packages:
2017  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2018  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2019  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2020                          support it), e.g. --with-target-bits=32 [guessed]
2021  --with-custom-make-dir  Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-jdk-variant      JDK variant to build (normal) [normal]
2024  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2025                          optimized) [release]
2026  --with-jvm-variants     JVM variants (separated by commas) to build
2027                          (server,client,minimal,core,zero,zeroshark,custom)
2028                          [server]
2029  --with-devkit           use this devkit for compilers, tools and resources
2030  --with-sys-root         alias for --with-sysroot for backwards compatability
2031  --with-sysroot          use this directory as sysroot
2032  --with-tools-dir        alias for --with-toolchain-path for backwards
2033                          compatibility
2034  --with-toolchain-path   prepend these directories when searching for
2035                          toolchain binaries (compilers etc)
2036  --with-extra-path       prepend these directories to the default path
2037  --with-sdk-name         use the platform SDK of the given name. [macosx]
2038  --with-conf-name        use this as the name of the configuration [generated
2039                          from important configuration options]
2040  --with-output-sync      set make output sync type if supported by make.
2041                          [recurse]
2042  --with-default-make-target
2043                          set the default make target [exploded-image]
2044  --with-cacerts-file     specify alternative cacerts file
2045  --with-copyright-year   Set copyright year value for build [current year]
2046  --with-milestone        Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-update-version   Deprecated. Option is kept for backwards
2049                          compatibility and is ignored
2050  --with-user-release-suffix
2051                          Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-build-number     Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-version-string   Set version string [calculated]
2056  --with-version-pre      Set the base part of the version 'PRE' field
2057                          (pre-release identifier) ['internal']
2058  --with-version-opt      Set version 'OPT' field (build metadata)
2059                          [<timestamp>.<user>.<dirname>]
2060  --with-version-build    Set version 'BUILD' field (build number) [not
2061                          specified]
2062  --with-version-major    Set version 'MAJOR' field (first number) [current
2063                          source value]
2064  --with-version-minor    Set version 'MINOR' field (second number) [current
2065                          source value]
2066  --with-version-security Set version 'SECURITY' field (third number) [current
2067                          source value]
2068  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2069                          specified]
2070  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2071  --with-build-jdk        path to JDK of same version as is being built[the
2072                          newly built JDK]
2073  --with-add-source-root  Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-override-source-root
2076                          Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-adds-and-overrides
2079                          Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-override-langtools
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-corba   Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxp    Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-jaxws   Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-hotspot Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-nashorn Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-jdk     Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-import_hotspot   Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-import-modules   import a set of prebuilt modules either as a zip
2099                          file or an exploded directory
2100  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2101                          to show possible values [platform dependent]
2102  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2103  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2104  --with-extra-ldflags    extra flags to be used when linking jdk
2105  --with-toolchain-version
2106                          the version of the toolchain to look for, use
2107                          '--help' to show possible values [platform
2108                          dependent]
2109  --with-build-devkit     Devkit to use for the build platform toolchain
2110  --with-jtreg            Regression Test Harness [probed]
2111  --with-native-debug-symbols
2112                          set the native debug symbol configuration (none,
2113                          internal, external, zipped) [varying]
2114  --with-jvm-features     additional JVM features to enable (separated by
2115                          comma), use '--help' to show possible values [none]
2116  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2117                          compatibility and is ignored
2118  --with-stdc++lib=<static>,<dynamic>,<default>
2119                          force linking of the C++ runtime on Linux to either
2120                          static or dynamic, default is static with dynamic as
2121                          fallback
2122  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2123                          (Windows only) [probed]
2124  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2125                          (Windows only) [probed]
2126  --with-x                use the X Window System
2127  --with-cups             specify prefix directory for the cups package
2128                          (expecting the headers under PATH/include)
2129  --with-cups-include     specify directory for the cups include files
2130  --with-freetype         specify prefix directory for the freetype package
2131                          (expecting the libraries under PATH/lib and the
2132                          headers under PATH/include)
2133  --with-freetype-include specify directory for the freetype include files
2134  --with-freetype-lib     specify directory for the freetype library
2135  --with-freetype-src     specify directory with freetype sources to
2136                          automatically build the library (experimental,
2137                          Windows-only)
2138  --with-alsa             specify prefix directory for the alsa package
2139                          (expecting the libraries under PATH/lib and the
2140                          headers under PATH/include)
2141  --with-alsa-include     specify directory for the alsa include files
2142  --with-alsa-lib         specify directory for the alsa library
2143  --with-libffi           specify prefix directory for the libffi package
2144                          (expecting the libraries under PATH/lib and the
2145                          headers under PATH/include)
2146  --with-libffi-include   specify directory for the libffi include files
2147  --with-libffi-lib       specify directory for the libffi library
2148  --with-libjpeg          use libjpeg from build system or OpenJDK source
2149                          (system, bundled) [bundled]
2150  --with-giflib           use giflib from build system or OpenJDK source
2151                          (system, bundled) [bundled]
2152  --with-libpng           use libpng from build system or OpenJDK source
2153                          (system, bundled) [bundled]
2154  --with-zlib             use zlib from build system or OpenJDK source
2155                          (system, bundled) [bundled]
2156  --with-lcms             use lcms2 from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-dxsdk            Deprecated. Option is kept for backwards
2159                          compatibility and is ignored
2160  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2161                          compatibility and is ignored
2162  --with-dxsdk-include    Deprecated. Option is kept for backwards
2163                          compatibility and is ignored
2164  --with-num-cores        number of cores in the build system, e.g.
2165                          --with-num-cores=8 [probed]
2166  --with-memory-size      memory (in MB) available in the build system, e.g.
2167                          --with-memory-size=1024 [probed]
2168  --with-jobs             number of parallel jobs to let make run [calculated
2169                          based on cores and memory]
2170  --with-test-jobs        number of parallel tests jobs to run [based on build
2171                          jobs]
2172  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2173                          invocations of boot JDK, overriding the default
2174                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2175                          -enableassertions"
2176  --with-sjavac-server-java
2177                          use this java binary for running the sjavac
2178                          background server [Boot JDK java]
2179  --with-ccache-dir       where to store ccache files [~/.ccache]
2180
2181Some influential environment variables:
2182  BASENAME    Override default value for BASENAME
2183  BASH        Override default value for BASH
2184  CAT         Override default value for CAT
2185  CHMOD       Override default value for CHMOD
2186  CMP         Override default value for CMP
2187  COMM        Override default value for COMM
2188  CP          Override default value for CP
2189  CUT         Override default value for CUT
2190  DATE        Override default value for DATE
2191  DIFF        Override default value for DIFF
2192  DIRNAME     Override default value for DIRNAME
2193  ECHO        Override default value for ECHO
2194  EXPR        Override default value for EXPR
2195  FILE        Override default value for FILE
2196  FIND        Override default value for FIND
2197  HEAD        Override default value for HEAD
2198  GUNZIP      Override default value for GUNZIP
2199  GZIP        Override default value for GZIP
2200  LN          Override default value for LN
2201  LS          Override default value for LS
2202  MKDIR       Override default value for MKDIR
2203  MKTEMP      Override default value for MKTEMP
2204  MV          Override default value for MV
2205  NAWK        Override default value for NAWK
2206  PRINTF      Override default value for PRINTF
2207  RM          Override default value for RM
2208  RMDIR       Override default value for RMDIR
2209  SH          Override default value for SH
2210  SORT        Override default value for SORT
2211  TAIL        Override default value for TAIL
2212  TAR         Override default value for TAR
2213  TEE         Override default value for TEE
2214  TOUCH       Override default value for TOUCH
2215  TR          Override default value for TR
2216  UNAME       Override default value for UNAME
2217  UNIQ        Override default value for UNIQ
2218  WC          Override default value for WC
2219  WHICH       Override default value for WHICH
2220  XARGS       Override default value for XARGS
2221  AWK         Override default value for AWK
2222  GREP        Override default value for GREP
2223  EGREP       Override default value for EGREP
2224  FGREP       Override default value for FGREP
2225  SED         Override default value for SED
2226  CYGPATH     Override default value for CYGPATH
2227  READLINK    Override default value for READLINK
2228  DF          Override default value for DF
2229  CPIO        Override default value for CPIO
2230  NICE        Override default value for NICE
2231  MAKE        Override default value for MAKE
2232  UNZIP       Override default value for UNZIP
2233  ZIP         Override default value for ZIP
2234  LDD         Override default value for LDD
2235  OTOOL       Override default value for OTOOL
2236  READELF     Override default value for READELF
2237  HG          Override default value for HG
2238  STAT        Override default value for STAT
2239  TIME        Override default value for TIME
2240  DTRACE      Override default value for DTRACE
2241  PATCH       Override default value for PATCH
2242  DSYMUTIL    Override default value for DSYMUTIL
2243  XATTR       Override default value for XATTR
2244  CODESIGN    Override default value for CODESIGN
2245  SETFILE     Override default value for SETFILE
2246  PKG_CONFIG  path to pkg-config utility
2247  JAVA        Override default value for JAVA
2248  JAVAC       Override default value for JAVAC
2249  JAVAH       Override default value for JAVAH
2250  JAR         Override default value for JAR
2251  JARSIGNER   Override default value for JARSIGNER
2252  CC          C compiler command
2253  CFLAGS      C compiler flags
2254  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2255              nonstandard directory <lib dir>
2256  LIBS        libraries to pass to the linker, e.g. -l<library>
2257  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2258              you have headers in a nonstandard directory <include dir>
2259  CXX         C++ compiler command
2260  CXXFLAGS    C++ compiler flags
2261  CPP         C preprocessor
2262  CXXCPP      C++ preprocessor
2263  AS          Override default value for AS
2264  AR          Override default value for AR
2265  LIPO        Override default value for LIPO
2266  STRIP       Override default value for STRIP
2267  NM          Override default value for NM
2268  GNM         Override default value for GNM
2269  OBJCOPY     Override default value for OBJCOPY
2270  OBJDUMP     Override default value for OBJDUMP
2271  BUILD_CC    Override default value for BUILD_CC
2272  BUILD_CXX   Override default value for BUILD_CXX
2273  BUILD_NM    Override default value for BUILD_NM
2274  BUILD_AR    Override default value for BUILD_AR
2275  BUILD_OBJCOPY
2276              Override default value for BUILD_OBJCOPY
2277  BUILD_STRIP Override default value for BUILD_STRIP
2278  JTREGEXE    Override default value for JTREGEXE
2279  XMKMF       Path to xmkmf, Makefile generator for X Window System
2280  FREETYPE_CFLAGS
2281              C compiler flags for FREETYPE, overriding pkg-config
2282  FREETYPE_LIBS
2283              linker flags for FREETYPE, overriding pkg-config
2284  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2285  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2286  LIBFFI_CFLAGS
2287              C compiler flags for LIBFFI, overriding pkg-config
2288  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2289  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2290  PNG_LIBS    linker flags for PNG, overriding pkg-config
2291  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2292  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2293  ICECC_CMD   Override default value for ICECC_CMD
2294  ICECC_CREATE_ENV
2295              Override default value for ICECC_CREATE_ENV
2296  ICECC_WRAPPER
2297              Override default value for ICECC_WRAPPER
2298  CCACHE      Override default value for CCACHE
2299
2300Use these variables to override the choices made by `configure' or to help
2301it to find libraries and programs with nonstandard names/locations.
2302
2303Report bugs to <build-dev@openjdk.java.net>.
2304OpenJDK home page: <http://openjdk.java.net>.
2305_ACEOF
2306ac_status=$?
2307fi
2308
2309if test "$ac_init_help" = "recursive"; then
2310  # If there are subdirs, report their specific --help.
2311  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2312    test -d "$ac_dir" ||
2313      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2314      continue
2315    ac_builddir=.
2316
2317case "$ac_dir" in
2318.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2319*)
2320  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2321  # A ".." for each directory in $ac_dir_suffix.
2322  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2323  case $ac_top_builddir_sub in
2324  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2326  esac ;;
2327esac
2328ac_abs_top_builddir=$ac_pwd
2329ac_abs_builddir=$ac_pwd$ac_dir_suffix
2330# for backward compatibility:
2331ac_top_builddir=$ac_top_build_prefix
2332
2333case $srcdir in
2334  .)  # We are building in place.
2335    ac_srcdir=.
2336    ac_top_srcdir=$ac_top_builddir_sub
2337    ac_abs_top_srcdir=$ac_pwd ;;
2338  [\\/]* | ?:[\\/]* )  # Absolute name.
2339    ac_srcdir=$srcdir$ac_dir_suffix;
2340    ac_top_srcdir=$srcdir
2341    ac_abs_top_srcdir=$srcdir ;;
2342  *) # Relative name.
2343    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2344    ac_top_srcdir=$ac_top_build_prefix$srcdir
2345    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2346esac
2347ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2348
2349    cd "$ac_dir" || { ac_status=$?; continue; }
2350    # Check for guested configure.
2351    if test -f "$ac_srcdir/configure.gnu"; then
2352      echo &&
2353      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2354    elif test -f "$ac_srcdir/configure"; then
2355      echo &&
2356      $SHELL "$ac_srcdir/configure" --help=recursive
2357    else
2358      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2359    fi || ac_status=$?
2360    cd "$ac_pwd" || { ac_status=$?; break; }
2361  done
2362fi
2363
2364test -n "$ac_init_help" && exit $ac_status
2365if $ac_init_version; then
2366  cat <<\_ACEOF
2367OpenJDK configure jdk9
2368generated by GNU Autoconf 2.69
2369
2370Copyright (C) 2012 Free Software Foundation, Inc.
2371This configure script is free software; the Free Software Foundation
2372gives unlimited permission to copy, distribute and modify it.
2373_ACEOF
2374  exit
2375fi
2376
2377## ------------------------ ##
2378## Autoconf initialization. ##
2379## ------------------------ ##
2380
2381# ac_fn_c_try_compile LINENO
2382# --------------------------
2383# Try to compile conftest.$ac_ext, and return whether this succeeded.
2384ac_fn_c_try_compile ()
2385{
2386  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2387  rm -f conftest.$ac_objext
2388  if { { ac_try="$ac_compile"
2389case "(($ac_try" in
2390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391  *) ac_try_echo=$ac_try;;
2392esac
2393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394$as_echo "$ac_try_echo"; } >&5
2395  (eval "$ac_compile") 2>conftest.err
2396  ac_status=$?
2397  if test -s conftest.err; then
2398    grep -v '^ *+' conftest.err >conftest.er1
2399    cat conftest.er1 >&5
2400    mv -f conftest.er1 conftest.err
2401  fi
2402  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2403  test $ac_status = 0; } && {
2404	 test -z "$ac_c_werror_flag" ||
2405	 test ! -s conftest.err
2406       } && test -s conftest.$ac_objext; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: failed program was:" >&5
2410sed 's/^/| /' conftest.$ac_ext >&5
2411
2412	ac_retval=1
2413fi
2414  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415  as_fn_set_status $ac_retval
2416
2417} # ac_fn_c_try_compile
2418
2419# ac_fn_cxx_try_compile LINENO
2420# ----------------------------
2421# Try to compile conftest.$ac_ext, and return whether this succeeded.
2422ac_fn_cxx_try_compile ()
2423{
2424  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2425  rm -f conftest.$ac_objext
2426  if { { ac_try="$ac_compile"
2427case "(($ac_try" in
2428  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2429  *) ac_try_echo=$ac_try;;
2430esac
2431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2432$as_echo "$ac_try_echo"; } >&5
2433  (eval "$ac_compile") 2>conftest.err
2434  ac_status=$?
2435  if test -s conftest.err; then
2436    grep -v '^ *+' conftest.err >conftest.er1
2437    cat conftest.er1 >&5
2438    mv -f conftest.er1 conftest.err
2439  fi
2440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2441  test $ac_status = 0; } && {
2442	 test -z "$ac_cxx_werror_flag" ||
2443	 test ! -s conftest.err
2444       } && test -s conftest.$ac_objext; then :
2445  ac_retval=0
2446else
2447  $as_echo "$as_me: failed program was:" >&5
2448sed 's/^/| /' conftest.$ac_ext >&5
2449
2450	ac_retval=1
2451fi
2452  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2453  as_fn_set_status $ac_retval
2454
2455} # ac_fn_cxx_try_compile
2456
2457# ac_fn_c_try_cpp LINENO
2458# ----------------------
2459# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2460ac_fn_c_try_cpp ()
2461{
2462  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2463  if { { ac_try="$ac_cpp conftest.$ac_ext"
2464case "(($ac_try" in
2465  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2466  *) ac_try_echo=$ac_try;;
2467esac
2468eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2469$as_echo "$ac_try_echo"; } >&5
2470  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2471  ac_status=$?
2472  if test -s conftest.err; then
2473    grep -v '^ *+' conftest.err >conftest.er1
2474    cat conftest.er1 >&5
2475    mv -f conftest.er1 conftest.err
2476  fi
2477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2478  test $ac_status = 0; } > conftest.i && {
2479	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2480	 test ! -s conftest.err
2481       }; then :
2482  ac_retval=0
2483else
2484  $as_echo "$as_me: failed program was:" >&5
2485sed 's/^/| /' conftest.$ac_ext >&5
2486
2487    ac_retval=1
2488fi
2489  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2490  as_fn_set_status $ac_retval
2491
2492} # ac_fn_c_try_cpp
2493
2494# ac_fn_cxx_try_cpp LINENO
2495# ------------------------
2496# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2497ac_fn_cxx_try_cpp ()
2498{
2499  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500  if { { ac_try="$ac_cpp conftest.$ac_ext"
2501case "(($ac_try" in
2502  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2503  *) ac_try_echo=$ac_try;;
2504esac
2505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2506$as_echo "$ac_try_echo"; } >&5
2507  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2508  ac_status=$?
2509  if test -s conftest.err; then
2510    grep -v '^ *+' conftest.err >conftest.er1
2511    cat conftest.er1 >&5
2512    mv -f conftest.er1 conftest.err
2513  fi
2514  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2515  test $ac_status = 0; } > conftest.i && {
2516	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2517	 test ! -s conftest.err
2518       }; then :
2519  ac_retval=0
2520else
2521  $as_echo "$as_me: failed program was:" >&5
2522sed 's/^/| /' conftest.$ac_ext >&5
2523
2524    ac_retval=1
2525fi
2526  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2527  as_fn_set_status $ac_retval
2528
2529} # ac_fn_cxx_try_cpp
2530
2531# ac_fn_c_try_link LINENO
2532# -----------------------
2533# Try to link conftest.$ac_ext, and return whether this succeeded.
2534ac_fn_c_try_link ()
2535{
2536  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2537  rm -f conftest.$ac_objext conftest$ac_exeext
2538  if { { ac_try="$ac_link"
2539case "(($ac_try" in
2540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2541  *) ac_try_echo=$ac_try;;
2542esac
2543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2544$as_echo "$ac_try_echo"; } >&5
2545  (eval "$ac_link") 2>conftest.err
2546  ac_status=$?
2547  if test -s conftest.err; then
2548    grep -v '^ *+' conftest.err >conftest.er1
2549    cat conftest.er1 >&5
2550    mv -f conftest.er1 conftest.err
2551  fi
2552  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2553  test $ac_status = 0; } && {
2554	 test -z "$ac_c_werror_flag" ||
2555	 test ! -s conftest.err
2556       } && test -s conftest$ac_exeext && {
2557	 test "$cross_compiling" = yes ||
2558	 test -x conftest$ac_exeext
2559       }; then :
2560  ac_retval=0
2561else
2562  $as_echo "$as_me: failed program was:" >&5
2563sed 's/^/| /' conftest.$ac_ext >&5
2564
2565	ac_retval=1
2566fi
2567  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2568  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2569  # interfere with the next link command; also delete a directory that is
2570  # left behind by Apple's compiler.  We do this before executing the actions.
2571  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2572  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2573  as_fn_set_status $ac_retval
2574
2575} # ac_fn_c_try_link
2576
2577# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2578# ---------------------------------------------------------
2579# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2580# the include files in INCLUDES and setting the cache variable VAR
2581# accordingly.
2582ac_fn_cxx_check_header_mongrel ()
2583{
2584  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2585  if eval \${$3+:} false; then :
2586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2587$as_echo_n "checking for $2... " >&6; }
2588if eval \${$3+:} false; then :
2589  $as_echo_n "(cached) " >&6
2590fi
2591eval ac_res=\$$3
2592	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2593$as_echo "$ac_res" >&6; }
2594else
2595  # Is the header compilable?
2596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2597$as_echo_n "checking $2 usability... " >&6; }
2598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599/* end confdefs.h.  */
2600$4
2601#include <$2>
2602_ACEOF
2603if ac_fn_cxx_try_compile "$LINENO"; then :
2604  ac_header_compiler=yes
2605else
2606  ac_header_compiler=no
2607fi
2608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2610$as_echo "$ac_header_compiler" >&6; }
2611
2612# Is the header present?
2613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2614$as_echo_n "checking $2 presence... " >&6; }
2615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616/* end confdefs.h.  */
2617#include <$2>
2618_ACEOF
2619if ac_fn_cxx_try_cpp "$LINENO"; then :
2620  ac_header_preproc=yes
2621else
2622  ac_header_preproc=no
2623fi
2624rm -f conftest.err conftest.i conftest.$ac_ext
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2626$as_echo "$ac_header_preproc" >&6; }
2627
2628# So?  What about this header?
2629case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2630  yes:no: )
2631    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2632$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2633    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2634$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2635    ;;
2636  no:yes:* )
2637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2638$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2640$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2642$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2644$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2646$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2647( $as_echo "## ----------------------------------------- ##
2648## Report this to build-dev@openjdk.java.net ##
2649## ----------------------------------------- ##"
2650     ) | sed "s/^/$as_me: WARNING:     /" >&2
2651    ;;
2652esac
2653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2654$as_echo_n "checking for $2... " >&6; }
2655if eval \${$3+:} false; then :
2656  $as_echo_n "(cached) " >&6
2657else
2658  eval "$3=\$ac_header_compiler"
2659fi
2660eval ac_res=\$$3
2661	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2662$as_echo "$ac_res" >&6; }
2663fi
2664  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2665
2666} # ac_fn_cxx_check_header_mongrel
2667
2668# ac_fn_cxx_try_run LINENO
2669# ------------------------
2670# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2671# that executables *can* be run.
2672ac_fn_cxx_try_run ()
2673{
2674  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2675  if { { ac_try="$ac_link"
2676case "(($ac_try" in
2677  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2678  *) ac_try_echo=$ac_try;;
2679esac
2680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2681$as_echo "$ac_try_echo"; } >&5
2682  (eval "$ac_link") 2>&5
2683  ac_status=$?
2684  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2685  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2686  { { case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_try") 2>&5
2693  ac_status=$?
2694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695  test $ac_status = 0; }; }; then :
2696  ac_retval=0
2697else
2698  $as_echo "$as_me: program exited with status $ac_status" >&5
2699       $as_echo "$as_me: failed program was:" >&5
2700sed 's/^/| /' conftest.$ac_ext >&5
2701
2702       ac_retval=$ac_status
2703fi
2704  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2705  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2706  as_fn_set_status $ac_retval
2707
2708} # ac_fn_cxx_try_run
2709
2710# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2711# ---------------------------------------------------------
2712# Tests whether HEADER exists and can be compiled using the include files in
2713# INCLUDES, setting the cache variable VAR accordingly.
2714ac_fn_cxx_check_header_compile ()
2715{
2716  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2718$as_echo_n "checking for $2... " >&6; }
2719if eval \${$3+:} false; then :
2720  $as_echo_n "(cached) " >&6
2721else
2722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2723/* end confdefs.h.  */
2724$4
2725#include <$2>
2726_ACEOF
2727if ac_fn_cxx_try_compile "$LINENO"; then :
2728  eval "$3=yes"
2729else
2730  eval "$3=no"
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734eval ac_res=\$$3
2735	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2736$as_echo "$ac_res" >&6; }
2737  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738
2739} # ac_fn_cxx_check_header_compile
2740
2741# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2742# ----------------------------------------------
2743# Tries to find the compile-time value of EXPR in a program that includes
2744# INCLUDES, setting VAR accordingly. Returns whether the value could be
2745# computed
2746ac_fn_cxx_compute_int ()
2747{
2748  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2749  if test "$cross_compiling" = yes; then
2750    # Depending upon the size, compute the lo and hi bounds.
2751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h.  */
2753$4
2754int
2755main ()
2756{
2757static int test_array [1 - 2 * !(($2) >= 0)];
2758test_array [0] = 0;
2759return test_array [0];
2760
2761  ;
2762  return 0;
2763}
2764_ACEOF
2765if ac_fn_cxx_try_compile "$LINENO"; then :
2766  ac_lo=0 ac_mid=0
2767  while :; do
2768    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2769/* end confdefs.h.  */
2770$4
2771int
2772main ()
2773{
2774static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2775test_array [0] = 0;
2776return test_array [0];
2777
2778  ;
2779  return 0;
2780}
2781_ACEOF
2782if ac_fn_cxx_try_compile "$LINENO"; then :
2783  ac_hi=$ac_mid; break
2784else
2785  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2786			if test $ac_lo -le $ac_mid; then
2787			  ac_lo= ac_hi=
2788			  break
2789			fi
2790			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2791fi
2792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2793  done
2794else
2795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2796/* end confdefs.h.  */
2797$4
2798int
2799main ()
2800{
2801static int test_array [1 - 2 * !(($2) < 0)];
2802test_array [0] = 0;
2803return test_array [0];
2804
2805  ;
2806  return 0;
2807}
2808_ACEOF
2809if ac_fn_cxx_try_compile "$LINENO"; then :
2810  ac_hi=-1 ac_mid=-1
2811  while :; do
2812    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2813/* end confdefs.h.  */
2814$4
2815int
2816main ()
2817{
2818static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2819test_array [0] = 0;
2820return test_array [0];
2821
2822  ;
2823  return 0;
2824}
2825_ACEOF
2826if ac_fn_cxx_try_compile "$LINENO"; then :
2827  ac_lo=$ac_mid; break
2828else
2829  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2830			if test $ac_mid -le $ac_hi; then
2831			  ac_lo= ac_hi=
2832			  break
2833			fi
2834			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2835fi
2836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2837  done
2838else
2839  ac_lo= ac_hi=
2840fi
2841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842fi
2843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2844# Binary search between lo and hi bounds.
2845while test "x$ac_lo" != "x$ac_hi"; do
2846  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2848/* end confdefs.h.  */
2849$4
2850int
2851main ()
2852{
2853static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2854test_array [0] = 0;
2855return test_array [0];
2856
2857  ;
2858  return 0;
2859}
2860_ACEOF
2861if ac_fn_cxx_try_compile "$LINENO"; then :
2862  ac_hi=$ac_mid
2863else
2864  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2865fi
2866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2867done
2868case $ac_lo in #((
2869?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2870'') ac_retval=1 ;;
2871esac
2872  else
2873    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2874/* end confdefs.h.  */
2875$4
2876static long int longval () { return $2; }
2877static unsigned long int ulongval () { return $2; }
2878#include <stdio.h>
2879#include <stdlib.h>
2880int
2881main ()
2882{
2883
2884  FILE *f = fopen ("conftest.val", "w");
2885  if (! f)
2886    return 1;
2887  if (($2) < 0)
2888    {
2889      long int i = longval ();
2890      if (i != ($2))
2891	return 1;
2892      fprintf (f, "%ld", i);
2893    }
2894  else
2895    {
2896      unsigned long int i = ulongval ();
2897      if (i != ($2))
2898	return 1;
2899      fprintf (f, "%lu", i);
2900    }
2901  /* Do not output a trailing newline, as this causes \r\n confusion
2902     on some platforms.  */
2903  return ferror (f) || fclose (f) != 0;
2904
2905  ;
2906  return 0;
2907}
2908_ACEOF
2909if ac_fn_cxx_try_run "$LINENO"; then :
2910  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2911else
2912  ac_retval=1
2913fi
2914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2915  conftest.$ac_objext conftest.beam conftest.$ac_ext
2916rm -f conftest.val
2917
2918  fi
2919  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2920  as_fn_set_status $ac_retval
2921
2922} # ac_fn_cxx_compute_int
2923
2924# ac_fn_cxx_try_link LINENO
2925# -------------------------
2926# Try to link conftest.$ac_ext, and return whether this succeeded.
2927ac_fn_cxx_try_link ()
2928{
2929  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2930  rm -f conftest.$ac_objext conftest$ac_exeext
2931  if { { ac_try="$ac_link"
2932case "(($ac_try" in
2933  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2934  *) ac_try_echo=$ac_try;;
2935esac
2936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2937$as_echo "$ac_try_echo"; } >&5
2938  (eval "$ac_link") 2>conftest.err
2939  ac_status=$?
2940  if test -s conftest.err; then
2941    grep -v '^ *+' conftest.err >conftest.er1
2942    cat conftest.er1 >&5
2943    mv -f conftest.er1 conftest.err
2944  fi
2945  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2946  test $ac_status = 0; } && {
2947	 test -z "$ac_cxx_werror_flag" ||
2948	 test ! -s conftest.err
2949       } && test -s conftest$ac_exeext && {
2950	 test "$cross_compiling" = yes ||
2951	 test -x conftest$ac_exeext
2952       }; then :
2953  ac_retval=0
2954else
2955  $as_echo "$as_me: failed program was:" >&5
2956sed 's/^/| /' conftest.$ac_ext >&5
2957
2958	ac_retval=1
2959fi
2960  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2961  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2962  # interfere with the next link command; also delete a directory that is
2963  # left behind by Apple's compiler.  We do this before executing the actions.
2964  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2965  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2966  as_fn_set_status $ac_retval
2967
2968} # ac_fn_cxx_try_link
2969
2970# ac_fn_cxx_check_func LINENO FUNC VAR
2971# ------------------------------------
2972# Tests whether FUNC exists, setting the cache variable VAR accordingly
2973ac_fn_cxx_check_func ()
2974{
2975  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2977$as_echo_n "checking for $2... " >&6; }
2978if eval \${$3+:} false; then :
2979  $as_echo_n "(cached) " >&6
2980else
2981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2982/* end confdefs.h.  */
2983/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2984   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2985#define $2 innocuous_$2
2986
2987/* System header to define __stub macros and hopefully few prototypes,
2988    which can conflict with char $2 (); below.
2989    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2990    <limits.h> exists even on freestanding compilers.  */
2991
2992#ifdef __STDC__
2993# include <limits.h>
2994#else
2995# include <assert.h>
2996#endif
2997
2998#undef $2
2999
3000/* Override any GCC internal prototype to avoid an error.
3001   Use char because int might match the return type of a GCC
3002   builtin and then its argument prototype would still apply.  */
3003#ifdef __cplusplus
3004extern "C"
3005#endif
3006char $2 ();
3007/* The GNU C library defines this for functions which it implements
3008    to always fail with ENOSYS.  Some functions are actually named
3009    something starting with __ and the normal name is an alias.  */
3010#if defined __stub_$2 || defined __stub___$2
3011choke me
3012#endif
3013
3014int
3015main ()
3016{
3017return $2 ();
3018  ;
3019  return 0;
3020}
3021_ACEOF
3022if ac_fn_cxx_try_link "$LINENO"; then :
3023  eval "$3=yes"
3024else
3025  eval "$3=no"
3026fi
3027rm -f core conftest.err conftest.$ac_objext \
3028    conftest$ac_exeext conftest.$ac_ext
3029fi
3030eval ac_res=\$$3
3031	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3032$as_echo "$ac_res" >&6; }
3033  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3034
3035} # ac_fn_cxx_check_func
3036
3037# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3038# -------------------------------------------------------
3039# Tests whether HEADER exists and can be compiled using the include files in
3040# INCLUDES, setting the cache variable VAR accordingly.
3041ac_fn_c_check_header_compile ()
3042{
3043  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3045$as_echo_n "checking for $2... " >&6; }
3046if eval \${$3+:} false; then :
3047  $as_echo_n "(cached) " >&6
3048else
3049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3050/* end confdefs.h.  */
3051$4
3052#include <$2>
3053_ACEOF
3054if ac_fn_c_try_compile "$LINENO"; then :
3055  eval "$3=yes"
3056else
3057  eval "$3=no"
3058fi
3059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3060fi
3061eval ac_res=\$$3
3062	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3063$as_echo "$ac_res" >&6; }
3064  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3065
3066} # ac_fn_c_check_header_compile
3067cat >config.log <<_ACEOF
3068This file contains any messages produced by compilers while
3069running configure, to aid debugging if configure makes a mistake.
3070
3071It was created by OpenJDK $as_me jdk9, which was
3072generated by GNU Autoconf 2.69.  Invocation command line was
3073
3074  $ $0 $@
3075
3076_ACEOF
3077exec 5>>config.log
3078{
3079cat <<_ASUNAME
3080## --------- ##
3081## Platform. ##
3082## --------- ##
3083
3084hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3085uname -m = `(uname -m) 2>/dev/null || echo unknown`
3086uname -r = `(uname -r) 2>/dev/null || echo unknown`
3087uname -s = `(uname -s) 2>/dev/null || echo unknown`
3088uname -v = `(uname -v) 2>/dev/null || echo unknown`
3089
3090/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3091/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3092
3093/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3094/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3095/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3096/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3097/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3098/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3099/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3100
3101_ASUNAME
3102
3103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3104for as_dir in $PATH
3105do
3106  IFS=$as_save_IFS
3107  test -z "$as_dir" && as_dir=.
3108    $as_echo "PATH: $as_dir"
3109  done
3110IFS=$as_save_IFS
3111
3112} >&5
3113
3114cat >&5 <<_ACEOF
3115
3116
3117## ----------- ##
3118## Core tests. ##
3119## ----------- ##
3120
3121_ACEOF
3122
3123
3124# Keep a trace of the command line.
3125# Strip out --no-create and --no-recursion so they do not pile up.
3126# Strip out --silent because we don't want to record it for future runs.
3127# Also quote any args containing shell meta-characters.
3128# Make two passes to allow for proper duplicate-argument suppression.
3129ac_configure_args=
3130ac_configure_args0=
3131ac_configure_args1=
3132ac_must_keep_next=false
3133for ac_pass in 1 2
3134do
3135  for ac_arg
3136  do
3137    case $ac_arg in
3138    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3139    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3140    | -silent | --silent | --silen | --sile | --sil)
3141      continue ;;
3142    *\'*)
3143      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3144    esac
3145    case $ac_pass in
3146    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3147    2)
3148      as_fn_append ac_configure_args1 " '$ac_arg'"
3149      if test $ac_must_keep_next = true; then
3150	ac_must_keep_next=false # Got value, back to normal.
3151      else
3152	case $ac_arg in
3153	  *=* | --config-cache | -C | -disable-* | --disable-* \
3154	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3155	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3156	  | -with-* | --with-* | -without-* | --without-* | --x)
3157	    case "$ac_configure_args0 " in
3158	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3159	    esac
3160	    ;;
3161	  -* ) ac_must_keep_next=true ;;
3162	esac
3163      fi
3164      as_fn_append ac_configure_args " '$ac_arg'"
3165      ;;
3166    esac
3167  done
3168done
3169{ ac_configure_args0=; unset ac_configure_args0;}
3170{ ac_configure_args1=; unset ac_configure_args1;}
3171
3172# When interrupted or exit'd, cleanup temporary files, and complete
3173# config.log.  We remove comments because anyway the quotes in there
3174# would cause problems or look ugly.
3175# WARNING: Use '\'' to represent an apostrophe within the trap.
3176# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3177trap 'exit_status=$?
3178  # Save into config.log some information that might help in debugging.
3179  {
3180    echo
3181
3182    $as_echo "## ---------------- ##
3183## Cache variables. ##
3184## ---------------- ##"
3185    echo
3186    # The following way of writing the cache mishandles newlines in values,
3187(
3188  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3189    eval ac_val=\$$ac_var
3190    case $ac_val in #(
3191    *${as_nl}*)
3192      case $ac_var in #(
3193      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3194$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3195      esac
3196      case $ac_var in #(
3197      _ | IFS | as_nl) ;; #(
3198      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3199      *) { eval $ac_var=; unset $ac_var;} ;;
3200      esac ;;
3201    esac
3202  done
3203  (set) 2>&1 |
3204    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3205    *${as_nl}ac_space=\ *)
3206      sed -n \
3207	"s/'\''/'\''\\\\'\'''\''/g;
3208	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3209      ;; #(
3210    *)
3211      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3212      ;;
3213    esac |
3214    sort
3215)
3216    echo
3217
3218    $as_echo "## ----------------- ##
3219## Output variables. ##
3220## ----------------- ##"
3221    echo
3222    for ac_var in $ac_subst_vars
3223    do
3224      eval ac_val=\$$ac_var
3225      case $ac_val in
3226      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3227      esac
3228      $as_echo "$ac_var='\''$ac_val'\''"
3229    done | sort
3230    echo
3231
3232    if test -n "$ac_subst_files"; then
3233      $as_echo "## ------------------- ##
3234## File substitutions. ##
3235## ------------------- ##"
3236      echo
3237      for ac_var in $ac_subst_files
3238      do
3239	eval ac_val=\$$ac_var
3240	case $ac_val in
3241	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3242	esac
3243	$as_echo "$ac_var='\''$ac_val'\''"
3244      done | sort
3245      echo
3246    fi
3247
3248    if test -s confdefs.h; then
3249      $as_echo "## ----------- ##
3250## confdefs.h. ##
3251## ----------- ##"
3252      echo
3253      cat confdefs.h
3254      echo
3255    fi
3256    test "$ac_signal" != 0 &&
3257      $as_echo "$as_me: caught signal $ac_signal"
3258    $as_echo "$as_me: exit $exit_status"
3259  } >&5
3260  rm -f core *.core core.conftest.* &&
3261    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3262    exit $exit_status
3263' 0
3264for ac_signal in 1 2 13 15; do
3265  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3266done
3267ac_signal=0
3268
3269# confdefs.h avoids OS command line length limits that DEFS can exceed.
3270rm -f -r conftest* confdefs.h
3271
3272$as_echo "/* confdefs.h */" > confdefs.h
3273
3274# Predefined preprocessor variables.
3275
3276cat >>confdefs.h <<_ACEOF
3277#define PACKAGE_NAME "$PACKAGE_NAME"
3278_ACEOF
3279
3280cat >>confdefs.h <<_ACEOF
3281#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3282_ACEOF
3283
3284cat >>confdefs.h <<_ACEOF
3285#define PACKAGE_VERSION "$PACKAGE_VERSION"
3286_ACEOF
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_STRING "$PACKAGE_STRING"
3290_ACEOF
3291
3292cat >>confdefs.h <<_ACEOF
3293#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3294_ACEOF
3295
3296cat >>confdefs.h <<_ACEOF
3297#define PACKAGE_URL "$PACKAGE_URL"
3298_ACEOF
3299
3300
3301# Let the site file select an alternate cache file if it wants to.
3302# Prefer an explicitly selected file to automatically selected ones.
3303ac_site_file1=NONE
3304ac_site_file2=NONE
3305if test -n "$CONFIG_SITE"; then
3306  # We do not want a PATH search for config.site.
3307  case $CONFIG_SITE in #((
3308    -*)  ac_site_file1=./$CONFIG_SITE;;
3309    */*) ac_site_file1=$CONFIG_SITE;;
3310    *)   ac_site_file1=./$CONFIG_SITE;;
3311  esac
3312elif test "x$prefix" != xNONE; then
3313  ac_site_file1=$prefix/share/config.site
3314  ac_site_file2=$prefix/etc/config.site
3315else
3316  ac_site_file1=$ac_default_prefix/share/config.site
3317  ac_site_file2=$ac_default_prefix/etc/config.site
3318fi
3319for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3320do
3321  test "x$ac_site_file" = xNONE && continue
3322  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3323    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3324$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3325    sed 's/^/| /' "$ac_site_file" >&5
3326    . "$ac_site_file" \
3327      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3329as_fn_error $? "failed to load site script $ac_site_file
3330See \`config.log' for more details" "$LINENO" 5; }
3331  fi
3332done
3333
3334if test -r "$cache_file"; then
3335  # Some versions of bash will fail to source /dev/null (special files
3336  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3337  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3338    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3339$as_echo "$as_me: loading cache $cache_file" >&6;}
3340    case $cache_file in
3341      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3342      *)                      . "./$cache_file";;
3343    esac
3344  fi
3345else
3346  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3347$as_echo "$as_me: creating cache $cache_file" >&6;}
3348  >$cache_file
3349fi
3350
3351# Check that the precious variables saved in the cache have kept the same
3352# value.
3353ac_cache_corrupted=false
3354for ac_var in $ac_precious_vars; do
3355  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3356  eval ac_new_set=\$ac_env_${ac_var}_set
3357  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3358  eval ac_new_val=\$ac_env_${ac_var}_value
3359  case $ac_old_set,$ac_new_set in
3360    set,)
3361      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3362$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3363      ac_cache_corrupted=: ;;
3364    ,set)
3365      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3366$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3367      ac_cache_corrupted=: ;;
3368    ,);;
3369    *)
3370      if test "x$ac_old_val" != "x$ac_new_val"; then
3371	# differences in whitespace do not lead to failure.
3372	ac_old_val_w=`echo x $ac_old_val`
3373	ac_new_val_w=`echo x $ac_new_val`
3374	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3375	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3376$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3377	  ac_cache_corrupted=:
3378	else
3379	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3380$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3381	  eval $ac_var=\$ac_old_val
3382	fi
3383	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3384$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3385	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3386$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3387      fi;;
3388  esac
3389  # Pass precious variables to config.status.
3390  if test "$ac_new_set" = set; then
3391    case $ac_new_val in
3392    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3393    *) ac_arg=$ac_var=$ac_new_val ;;
3394    esac
3395    case " $ac_configure_args " in
3396      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3397      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3398    esac
3399  fi
3400done
3401if $ac_cache_corrupted; then
3402  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3404  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3405$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3406  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3407fi
3408## -------------------- ##
3409## Main body of script. ##
3410## -------------------- ##
3411
3412ac_ext=c
3413ac_cpp='$CPP $CPPFLAGS'
3414ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3415ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3416ac_compiler_gnu=$ac_cv_c_compiler_gnu
3417
3418
3419
3420ac_aux_dir=
3421for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3422  if test -f "$ac_dir/install-sh"; then
3423    ac_aux_dir=$ac_dir
3424    ac_install_sh="$ac_aux_dir/install-sh -c"
3425    break
3426  elif test -f "$ac_dir/install.sh"; then
3427    ac_aux_dir=$ac_dir
3428    ac_install_sh="$ac_aux_dir/install.sh -c"
3429    break
3430  elif test -f "$ac_dir/shtool"; then
3431    ac_aux_dir=$ac_dir
3432    ac_install_sh="$ac_aux_dir/shtool install -c"
3433    break
3434  fi
3435done
3436if test -z "$ac_aux_dir"; then
3437  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
3438fi
3439
3440# These three variables are undocumented and unsupported,
3441# and are intended to be withdrawn in a future Autoconf release.
3442# They can cause serious problems if a builder's source tree is in a directory
3443# whose full name contains unusual characters.
3444ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3445ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3446ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3447
3448
3449# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3450
3451#
3452# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3453# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3454#
3455# This code is free software; you can redistribute it and/or modify it
3456# under the terms of the GNU General Public License version 2 only, as
3457# published by the Free Software Foundation.  Oracle designates this
3458# particular file as subject to the "Classpath" exception as provided
3459# by Oracle in the LICENSE file that accompanied this code.
3460#
3461# This code is distributed in the hope that it will be useful, but WITHOUT
3462# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3463# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3464# version 2 for more details (a copy is included in the LICENSE file that
3465# accompanied this code).
3466#
3467# You should have received a copy of the GNU General Public License version
3468# 2 along with this work; if not, write to the Free Software Foundation,
3469# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3470#
3471# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3472# or visit www.oracle.com if you need additional information or have any
3473# questions.
3474#
3475
3476#
3477# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3478#
3479# This program is free software; you can redistribute it and/or modify
3480# it under the terms of the GNU General Public License as published by
3481# the Free Software Foundation; either version 2 of the License, or
3482# (at your option) any later version.
3483#
3484# This program is distributed in the hope that it will be useful, but
3485# WITHOUT ANY WARRANTY; without even the implied warranty of
3486# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3487# General Public License for more details.
3488#
3489# You should have received a copy of the GNU General Public License
3490# along with this program; if not, write to the Free Software
3491# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3492#
3493# As a special exception to the GNU General Public License, if you
3494# distribute this file as part of a program that contains a
3495# configuration script generated by Autoconf, you may include it under
3496# the same distribution terms that you use for the rest of that program.
3497
3498# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3499# ----------------------------------
3500# PKG_PROG_PKG_CONFIG
3501
3502# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3503#
3504# Check to see whether a particular set of modules exists.  Similar
3505# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3506#
3507#
3508# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3509# this or PKG_CHECK_MODULES is called, or make sure to call
3510# PKG_CHECK_EXISTS manually
3511# --------------------------------------------------------------
3512
3513
3514
3515# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3516# ---------------------------------------------
3517# _PKG_CONFIG
3518
3519# _PKG_SHORT_ERRORS_SUPPORTED
3520# -----------------------------
3521# _PKG_SHORT_ERRORS_SUPPORTED
3522
3523
3524# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3525# [ACTION-IF-NOT-FOUND])
3526#
3527#
3528# Note that if there is a possibility the first call to
3529# PKG_CHECK_MODULES might not happen, you should be sure to include an
3530# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3531#
3532#
3533# --------------------------------------------------------------
3534# PKG_CHECK_MODULES
3535
3536
3537# Include these first...
3538#
3539# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563# Create a function/macro that takes a series of named arguments. The call is
3564# similar to AC_DEFUN, but the setup of the function looks like this:
3565# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3566# ... do something
3567#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3568# ])
3569# A star (*) in front of a named argument means that it is required and it's
3570# presence will be verified. To pass e.g. the first value as a normal indexed
3571# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3572# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3573# "ARG_FOO".
3574#
3575# The generated function can be called like this:
3576# MYFUNC(FOO: [foo-val],
3577#     BAR: [
3578#         $ECHO hello world
3579#     ])
3580# Note that the argument value must start on the same line as the argument name.
3581#
3582# Argument 1: Name of the function to define
3583# Argument 2: List of legal named arguments, with a * prefix for required arguments
3584# Argument 3: Argument array to treat as named, typically $@
3585# Argument 4: The main function body
3586
3587
3588# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3589# If so, then append $1 to $2 \
3590# Also set JVM_ARG_OK to true/false depending on outcome.
3591
3592
3593# Appends a string to a path variable, only adding the : when needed.
3594
3595
3596# Prepends a string to a path variable, only adding the : when needed.
3597
3598
3599# This will make sure the given variable points to a full and proper
3600# path. This means:
3601# 1) There will be no spaces in the path. On unix platforms,
3602#    spaces in the path will result in an error. On Windows,
3603#    the path will be rewritten using short-style to be space-free.
3604# 2) The path will be absolute, and it will be in unix-style (on
3605#     cygwin).
3606# $1: The name of the variable to fix
3607
3608
3609# This will make sure the given variable points to a executable
3610# with a full and proper path. This means:
3611# 1) There will be no spaces in the path. On unix platforms,
3612#    spaces in the path will result in an error. On Windows,
3613#    the path will be rewritten using short-style to be space-free.
3614# 2) The path will be absolute, and it will be in unix-style (on
3615#     cygwin).
3616# Any arguments given to the executable is preserved.
3617# If the input variable does not have a directory specification, then
3618# it need to be in the PATH.
3619# $1: The name of the variable to fix
3620
3621
3622
3623
3624# Register a --with argument but mark it as deprecated
3625# $1: The name of the with argument to deprecate, not including --with-
3626
3627
3628# Register a --enable argument but mark it as deprecated
3629# $1: The name of the with argument to deprecate, not including --enable-
3630# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3631# $3: Messages to user.
3632
3633
3634
3635
3636# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3637# $1: variable to check
3638
3639
3640# Check that there are no unprocessed overridden variables left.
3641# If so, they are an incorrect argument and we will exit with an error.
3642
3643
3644# Setup a tool for the given variable. If correctly specified by the user,
3645# use that value, otherwise search for the tool using the supplied code snippet.
3646# $1: variable to set
3647# $2: code snippet to call to look for the tool
3648# $3: code snippet to call if variable was used to find tool
3649
3650
3651# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3652# $1: variable to set
3653# $2: executable name (or list of names) to look for
3654# $3: [path]
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660
3661
3662# Like BASIC_PATH_PROGS but fails if no tool was found.
3663# $1: variable to set
3664# $2: executable name (or list of names) to look for
3665# $3: [path]
3666
3667
3668# Like BASIC_SETUP_TOOL but fails if no tool was found.
3669# $1: variable to set
3670# $2: autoconf macro to call to look for the special tool
3671
3672
3673# Setup the most fundamental tools that relies on not much else to set up,
3674# but is used by much of the early bootstrap code.
3675
3676
3677# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3678
3679
3680# Evaluates platform specific overrides for devkit variables.
3681# $1: Name of variable
3682
3683
3684
3685
3686
3687
3688#%%% Simple tools %%%
3689
3690# Check if we have found a usable version of make
3691# $1: the path to a potential make binary (or empty)
3692# $2: the description on how we found this
3693
3694
3695
3696
3697# Goes looking for a usable version of GNU make.
3698
3699
3700
3701
3702
3703
3704
3705
3706# Check if build directory is on local disk. If not possible to determine,
3707# we prefer to claim it's local.
3708# Argument 1: directory to test
3709# Argument 2: what to do if it is on local disk
3710# Argument 3: what to do otherwise (remote disk or failure)
3711
3712
3713# Check that source files have basic read permissions set. This might
3714# not be the case in cygwin in certain conditions.
3715
3716
3717
3718
3719# Check for support for specific options in bash
3720
3721
3722################################################################################
3723#
3724# Default make target
3725#
3726
3727
3728# Code to run after AC_OUTPUT
3729
3730
3731#
3732# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3733# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3734#
3735# This code is free software; you can redistribute it and/or modify it
3736# under the terms of the GNU General Public License version 2 only, as
3737# published by the Free Software Foundation.  Oracle designates this
3738# particular file as subject to the "Classpath" exception as provided
3739# by Oracle in the LICENSE file that accompanied this code.
3740#
3741# This code is distributed in the hope that it will be useful, but WITHOUT
3742# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3743# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3744# version 2 for more details (a copy is included in the LICENSE file that
3745# accompanied this code).
3746#
3747# You should have received a copy of the GNU General Public License version
3748# 2 along with this work; if not, write to the Free Software Foundation,
3749# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3750#
3751# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3752# or visit www.oracle.com if you need additional information or have any
3753# questions.
3754#
3755
3756
3757
3758
3759
3760# Helper function which possibly converts a path using DOS-style short mode.
3761# If so, the updated path is stored in $new_path.
3762# $1: The path to check
3763
3764
3765# Helper function which possibly converts a path using DOS-style short mode.
3766# If so, the updated path is stored in $new_path.
3767# $1: The path to check
3768
3769
3770# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3771# and could probably be heavily simplified. However, all changes in this
3772# area tend to need lot of testing in different scenarios, and in lack of
3773# proper unit testing, cleaning this up has not been deemed worth the effort
3774# at the moment.
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3785
3786
3787
3788
3789# ... then the rest
3790#
3791# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3792# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3793#
3794# This code is free software; you can redistribute it and/or modify it
3795# under the terms of the GNU General Public License version 2 only, as
3796# published by the Free Software Foundation.  Oracle designates this
3797# particular file as subject to the "Classpath" exception as provided
3798# by Oracle in the LICENSE file that accompanied this code.
3799#
3800# This code is distributed in the hope that it will be useful, but WITHOUT
3801# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3802# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3803# version 2 for more details (a copy is included in the LICENSE file that
3804# accompanied this code).
3805#
3806# You should have received a copy of the GNU General Public License version
3807# 2 along with this work; if not, write to the Free Software Foundation,
3808# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3809#
3810# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3811# or visit www.oracle.com if you need additional information or have any
3812# questions.
3813#
3814
3815########################################################################
3816# This file handles detection of the Boot JDK. The Boot JDK detection
3817# process has been developed as a response to solve a complex real-world
3818# problem. Initially, it was simple, but it has grown as platform after
3819# platform, idiosyncracy after idiosyncracy has been supported.
3820#
3821# The basic idea is this:
3822# 1) You need an acceptable *) JDK to use as a Boot JDK
3823# 2) There are several ways to locate a JDK, that are mostly platform
3824#    dependent **)
3825# 3) You can have multiple JDKs installed
3826# 4) If possible, configure should try to dig out an acceptable JDK
3827#    automatically, without having to resort to command-line options
3828#
3829# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3830#     javac) and not a JRE, etc.
3831#
3832# **) On Windows we typically use a well-known path.
3833#     On MacOSX we typically use the tool java_home.
3834#     On Linux we typically find javac in the $PATH, and then follow a
3835#     chain of symlinks that often ends up in a real JDK.
3836#
3837# This leads to the code where we check in different ways to locate a
3838# JDK, and if one is found, check if it is acceptable. If not, we print
3839# our reasons for rejecting it (useful when debugging non-working
3840# configure situations) and continue checking the next one.
3841########################################################################
3842
3843# Execute the check given as argument, and verify the result
3844# If the Boot JDK was previously found, do nothing
3845# $1 A command line (typically autoconf macro) to execute
3846
3847
3848# Test: Is bootjdk explicitely set by command line arguments?
3849
3850
3851# Test: Is $JAVA_HOME set?
3852
3853
3854# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3855
3856
3857# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3858# $1: Argument to the java_home binary (optional)
3859
3860
3861# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3862
3863
3864# Look for a jdk in the given path. If there are multiple, try to select the newest.
3865# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3866# $1 = Path to directory containing jdk installations.
3867# $2 = String to append to the found JDK directory to get the proper JDK home
3868
3869
3870# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3871# environmental variable as base for where to look.
3872# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3873
3874
3875# Test: Is there a JDK installed in default, well-known locations?
3876
3877
3878# Check that a command-line tool in the Boot JDK is correct
3879# $1 = name of variable to assign
3880# $2 = name of binary
3881
3882
3883###############################################################################
3884#
3885# We need a Boot JDK to bootstrap the build.
3886#
3887
3888
3889
3890
3891
3892# BUILD_JDK: the location of the latest JDK that can run
3893#   on the host system and supports the target class file version
3894#   generated in this JDK build.  This variable should only be
3895#   used after the launchers are built.
3896#
3897
3898# Execute the check given as argument, and verify the result.
3899# If the JDK was previously found, do nothing.
3900# $1 A command line (typically autoconf macro) to execute
3901
3902
3903# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3904# is different than the host system doing the build (e.g. cross-compilation),
3905# a special BUILD_JDK is built as part of the build process.  An external
3906# prebuilt BUILD_JDK can also be supplied.
3907
3908
3909#
3910# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3911# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3912#
3913# This code is free software; you can redistribute it and/or modify it
3914# under the terms of the GNU General Public License version 2 only, as
3915# published by the Free Software Foundation.  Oracle designates this
3916# particular file as subject to the "Classpath" exception as provided
3917# by Oracle in the LICENSE file that accompanied this code.
3918#
3919# This code is distributed in the hope that it will be useful, but WITHOUT
3920# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3921# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3922# version 2 for more details (a copy is included in the LICENSE file that
3923# accompanied this code).
3924#
3925# You should have received a copy of the GNU General Public License version
3926# 2 along with this work; if not, write to the Free Software Foundation,
3927# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3928#
3929# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3930# or visit www.oracle.com if you need additional information or have any
3931# questions.
3932#
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950################################################################################
3951#
3952# Runs icecc-create-env once and prints the error if it fails
3953#
3954# $1: arguments to icecc-create-env
3955# $2: log file
3956#
3957
3958
3959################################################################################
3960#
3961# Optionally enable distributed compilation of native code using icecc/icecream
3962#
3963
3964
3965
3966
3967
3968
3969
3970#
3971# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3972# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3973#
3974# This code is free software; you can redistribute it and/or modify it
3975# under the terms of the GNU General Public License version 2 only, as
3976# published by the Free Software Foundation.  Oracle designates this
3977# particular file as subject to the "Classpath" exception as provided
3978# by Oracle in the LICENSE file that accompanied this code.
3979#
3980# This code is distributed in the hope that it will be useful, but WITHOUT
3981# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3982# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3983# version 2 for more details (a copy is included in the LICENSE file that
3984# accompanied this code).
3985#
3986# You should have received a copy of the GNU General Public License version
3987# 2 along with this work; if not, write to the Free Software Foundation,
3988# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3989#
3990# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3991# or visit www.oracle.com if you need additional information or have any
3992# questions.
3993#
3994
3995# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3996# corresponding configure arguments instead
3997
3998
3999# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4000# that configure can use them while detecting compilers.
4001# TOOLCHAIN_TYPE is available here.
4002# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4003
4004
4005
4006
4007
4008
4009# Documentation on common flags used for solstudio in HIGHEST.
4010#
4011# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4012#          done with care, there are some assumptions below that need to
4013#          be understood about the use of pointers, and IEEE behavior.
4014#
4015# -fns: Use non-standard floating point mode (not IEEE 754)
4016# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4017# -fsingle: Use single precision floating point with 'float'
4018# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4019#   (Source with excessing pointer casting and data access with mixed
4020#    pointer types are not recommended)
4021# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4022#   (If you expect perfect errno behavior, do not use this)
4023# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4024# -xrestrict: Pointer parameters to functions do not overlap
4025#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4026#    If you pass in multiple pointers to the same data, do not use this)
4027# -xlibmil: Inline some library routines
4028#   (If you expect perfect errno behavior, do not use this)
4029# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4030#   (If you expect perfect errno behavior, do not use this)
4031#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4032
4033    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4034    # Bug?
4035    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4036    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4037    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4038    #fi
4039
4040
4041
4042
4043
4044
4045################################################################################
4046# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4047#      conditionals against.
4048# $2 - Optional prefix for each variable defined.
4049
4050
4051# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4052#                                  IF_FALSE: [RUN-IF-FALSE])
4053# ------------------------------------------------------------
4054# Check that the C compiler supports an argument
4055
4056
4057
4058
4059# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060#                                    IF_FALSE: [RUN-IF-FALSE])
4061# ------------------------------------------------------------
4062# Check that the C++ compiler supports an argument
4063
4064
4065
4066
4067# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068#                                IF_FALSE: [RUN-IF-FALSE])
4069# ------------------------------------------------------------
4070# Check that the C and C++ compilers support an argument
4071
4072
4073
4074
4075# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076#                                   IF_FALSE: [RUN-IF-FALSE])
4077# ------------------------------------------------------------
4078# Check that the linker support an argument
4079
4080
4081
4082
4083
4084
4085# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4086# Arguments:
4087# $1 - Optional prefix for each variable defined.
4088
4089
4090#
4091# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4092# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4093#
4094# This code is free software; you can redistribute it and/or modify it
4095# under the terms of the GNU General Public License version 2 only, as
4096# published by the Free Software Foundation.  Oracle designates this
4097# particular file as subject to the "Classpath" exception as provided
4098# by Oracle in the LICENSE file that accompanied this code.
4099#
4100# This code is distributed in the hope that it will be useful, but WITHOUT
4101# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4102# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4103# version 2 for more details (a copy is included in the LICENSE file that
4104# accompanied this code).
4105#
4106# You should have received a copy of the GNU General Public License version
4107# 2 along with this work; if not, write to the Free Software Foundation,
4108# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4109#
4110# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4111# or visit www.oracle.com if you need additional information or have any
4112# questions.
4113#
4114
4115
4116
4117
4118
4119cygwin_help() {
4120  case $1 in
4121    unzip)
4122      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4123      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4124      ;;
4125    zip)
4126      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4127      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4128      ;;
4129    make)
4130      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4131      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132      ;;
4133    freetype)
4134      HELP_MSG="
4135The freetype library can now be build during the configure process.
4136Download the freetype sources and unpack them into an arbitrary directory:
4137
4138wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4139tar -xzf freetype-2.5.3.tar.gz
4140
4141Then run configure with '--with-freetype-src=<freetype_src>'. This will
4142automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4143builds or into '<freetype_src>/lib32' for 32-bit builds.
4144Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4145and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4146
4147Alternatively you can unpack the sources like this to use the default directory:
4148
4149tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4150      ;;
4151  esac
4152}
4153
4154msys_help() {
4155  PKGHANDLER_COMMAND=""
4156}
4157
4158apt_help() {
4159  case $1 in
4160    reduced)
4161      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4162    devkit)
4163      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4164    openjdk)
4165      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4166    alsa)
4167      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4168    cups)
4169      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4170    freetype)
4171      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4172    ffi)
4173      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4174    x11)
4175      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4176    ccache)
4177      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4178    dtrace)
4179      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4180  esac
4181}
4182
4183yum_help() {
4184  case $1 in
4185    devkit)
4186      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4187    openjdk)
4188      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4189    alsa)
4190      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4191    cups)
4192      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4193    freetype)
4194      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4195    x11)
4196      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4197    ccache)
4198      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4199  esac
4200}
4201
4202port_help() {
4203  PKGHANDLER_COMMAND=""
4204}
4205
4206pkgutil_help() {
4207  PKGHANDLER_COMMAND=""
4208}
4209
4210pkgadd_help() {
4211  PKGHANDLER_COMMAND=""
4212}
4213
4214# This function will check if we're called from the "configure" wrapper while
4215# printing --help. If so, we will print out additional information that can
4216# only be extracted within the autoconf script, and then exit. This must be
4217# called at the very beginning in configure.ac.
4218
4219
4220
4221
4222
4223
4224#
4225# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4226# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4227#
4228# This code is free software; you can redistribute it and/or modify it
4229# under the terms of the GNU General Public License version 2 only, as
4230# published by the Free Software Foundation.  Oracle designates this
4231# particular file as subject to the "Classpath" exception as provided
4232# by Oracle in the LICENSE file that accompanied this code.
4233#
4234# This code is distributed in the hope that it will be useful, but WITHOUT
4235# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4236# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4237# version 2 for more details (a copy is included in the LICENSE file that
4238# accompanied this code).
4239#
4240# You should have received a copy of the GNU General Public License version
4241# 2 along with this work; if not, write to the Free Software Foundation,
4242# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4243#
4244# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4245# or visit www.oracle.com if you need additional information or have any
4246# questions.
4247#
4248
4249# All valid JVM features, regardless of platform
4250VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4251    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4252
4253# All valid JVM variants
4254VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4255
4256###############################################################################
4257# Check if the specified JVM variant should be built. To be used in shell if
4258# constructs, like this:
4259# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4260#
4261# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4262
4263# Definition kept in one line to allow inlining in if statements.
4264# Additional [] needed to keep m4 from mangling shell constructs.
4265
4266
4267###############################################################################
4268# Check if the specified JVM features are explicitly enabled. To be used in
4269# shell if constructs, like this:
4270# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4271#
4272# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4273
4274# Definition kept in one line to allow inlining in if statements.
4275# Additional [] needed to keep m4 from mangling shell constructs.
4276
4277
4278###############################################################################
4279# Check which variants of the JVM that we want to build. Available variants are:
4280#   server: normal interpreter, and a tiered C1/C2 compiler
4281#   client: normal interpreter, and C1 (no C2 compiler)
4282#   minimal: reduced form of client with optional features stripped out
4283#   core: normal interpreter only, no compiler
4284#   zero: C++ based interpreter only, no compiler
4285#   zeroshark: C++ based interpreter, and a llvm-based compiler
4286#   custom: baseline JVM with no default features
4287#
4288
4289
4290###############################################################################
4291# Check if dtrace should be enabled and has all prerequisites present.
4292#
4293
4294
4295###############################################################################
4296# Set up all JVM features for each JVM variant.
4297#
4298
4299
4300###############################################################################
4301# Validate JVM features once all setup is complete, including custom setup.
4302#
4303
4304
4305################################################################################
4306# Check if gtest should be built
4307#
4308
4309
4310#
4311# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4312# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4313#
4314# This code is free software; you can redistribute it and/or modify it
4315# under the terms of the GNU General Public License version 2 only, as
4316# published by the Free Software Foundation.  Oracle designates this
4317# particular file as subject to the "Classpath" exception as provided
4318# by Oracle in the LICENSE file that accompanied this code.
4319#
4320# This code is distributed in the hope that it will be useful, but WITHOUT
4321# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4322# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4323# version 2 for more details (a copy is included in the LICENSE file that
4324# accompanied this code).
4325#
4326# You should have received a copy of the GNU General Public License version
4327# 2 along with this work; if not, write to the Free Software Foundation,
4328# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4329#
4330# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4331# or visit www.oracle.com if you need additional information or have any
4332# questions.
4333#
4334
4335###############################################################################
4336# Check which variant of the JDK that we want to build.
4337# Currently we have:
4338#    normal:   standard edition
4339# but the custom make system may add other variants
4340#
4341# Effectively the JDK variant gives a name to a specific set of
4342# modules to compile into the JDK.
4343
4344
4345###############################################################################
4346# Set the debug level
4347#    release: no debug information, all optimizations, no asserts.
4348#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4349#    fastdebug: debug information (-g), all optimizations, all asserts
4350#    slowdebug: debug information (-g), no optimizations, all asserts
4351
4352
4353###############################################################################
4354#
4355# Should we build only OpenJDK even if closed sources are present?
4356#
4357
4358
4359
4360
4361###############################################################################
4362#
4363# Enable or disable the elliptic curve crypto implementation
4364#
4365
4366
4367
4368
4369################################################################################
4370#
4371# Gcov coverage data for hotspot
4372#
4373
4374
4375################################################################################
4376#
4377# Static build support.  When enabled will generate static
4378# libraries instead of shared libraries for all JDK libs.
4379#
4380
4381
4382################################################################################
4383#
4384# jlink options.
4385# We always keep packaged modules in JDK image.
4386#
4387
4388
4389################################################################################
4390#
4391# Check if building of the jtreg failure handler should be enabled.
4392#
4393
4394
4395################################################################################
4396#
4397# Enable or disable generation of the classlist at build time
4398#
4399
4400
4401#
4402# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4403# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4404#
4405# This code is free software; you can redistribute it and/or modify it
4406# under the terms of the GNU General Public License version 2 only, as
4407# published by the Free Software Foundation.  Oracle designates this
4408# particular file as subject to the "Classpath" exception as provided
4409# by Oracle in the LICENSE file that accompanied this code.
4410#
4411# This code is distributed in the hope that it will be useful, but WITHOUT
4412# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4413# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4414# version 2 for more details (a copy is included in the LICENSE file that
4415# accompanied this code).
4416#
4417# You should have received a copy of the GNU General Public License version
4418# 2 along with this work; if not, write to the Free Software Foundation,
4419# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4420#
4421# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4422# or visit www.oracle.com if you need additional information or have any
4423# questions.
4424#
4425
4426###############################################################################
4427#
4428# Setup version numbers
4429#
4430
4431# Verify that a given string represents a valid version number, and assign it
4432# to a variable.
4433
4434# Argument 1: the variable to assign to
4435# Argument 2: the value given by the user
4436
4437
4438
4439
4440#
4441# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4442# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4443#
4444# This code is free software; you can redistribute it and/or modify it
4445# under the terms of the GNU General Public License version 2 only, as
4446# published by the Free Software Foundation.  Oracle designates this
4447# particular file as subject to the "Classpath" exception as provided
4448# by Oracle in the LICENSE file that accompanied this code.
4449#
4450# This code is distributed in the hope that it will be useful, but WITHOUT
4451# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4452# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4453# version 2 for more details (a copy is included in the LICENSE file that
4454# accompanied this code).
4455#
4456# You should have received a copy of the GNU General Public License version
4457# 2 along with this work; if not, write to the Free Software Foundation,
4458# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4459#
4460# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4461# or visit www.oracle.com if you need additional information or have any
4462# questions.
4463#
4464
4465# Major library component reside in separate files.
4466#
4467# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4468# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4469#
4470# This code is free software; you can redistribute it and/or modify it
4471# under the terms of the GNU General Public License version 2 only, as
4472# published by the Free Software Foundation.  Oracle designates this
4473# particular file as subject to the "Classpath" exception as provided
4474# by Oracle in the LICENSE file that accompanied this code.
4475#
4476# This code is distributed in the hope that it will be useful, but WITHOUT
4477# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4478# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4479# version 2 for more details (a copy is included in the LICENSE file that
4480# accompanied this code).
4481#
4482# You should have received a copy of the GNU General Public License version
4483# 2 along with this work; if not, write to the Free Software Foundation,
4484# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4485#
4486# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4487# or visit www.oracle.com if you need additional information or have any
4488# questions.
4489#
4490
4491################################################################################
4492# Setup alsa (Advanced Linux Sound Architecture)
4493################################################################################
4494
4495
4496#
4497# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4498# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4499#
4500# This code is free software; you can redistribute it and/or modify it
4501# under the terms of the GNU General Public License version 2 only, as
4502# published by the Free Software Foundation.  Oracle designates this
4503# particular file as subject to the "Classpath" exception as provided
4504# by Oracle in the LICENSE file that accompanied this code.
4505#
4506# This code is distributed in the hope that it will be useful, but WITHOUT
4507# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4508# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4509# version 2 for more details (a copy is included in the LICENSE file that
4510# accompanied this code).
4511#
4512# You should have received a copy of the GNU General Public License version
4513# 2 along with this work; if not, write to the Free Software Foundation,
4514# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4515#
4516# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4517# or visit www.oracle.com if you need additional information or have any
4518# questions.
4519#
4520
4521################################################################################
4522# Setup bundled libraries.
4523#
4524# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4525# OpenJDK repository. Default is to use these libraries as bundled, but they
4526# might be replaced by en external version by the user.
4527################################################################################
4528
4529
4530################################################################################
4531# Setup libjpeg
4532################################################################################
4533
4534
4535################################################################################
4536# Setup giflib
4537################################################################################
4538
4539
4540################################################################################
4541# Setup libpng
4542################################################################################
4543
4544
4545################################################################################
4546# Setup zlib
4547################################################################################
4548
4549
4550################################################################################
4551# Setup lcms (Little CMS)
4552################################################################################
4553
4554
4555#
4556# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4557# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4558#
4559# This code is free software; you can redistribute it and/or modify it
4560# under the terms of the GNU General Public License version 2 only, as
4561# published by the Free Software Foundation.  Oracle designates this
4562# particular file as subject to the "Classpath" exception as provided
4563# by Oracle in the LICENSE file that accompanied this code.
4564#
4565# This code is distributed in the hope that it will be useful, but WITHOUT
4566# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4567# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4568# version 2 for more details (a copy is included in the LICENSE file that
4569# accompanied this code).
4570#
4571# You should have received a copy of the GNU General Public License version
4572# 2 along with this work; if not, write to the Free Software Foundation,
4573# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4574#
4575# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4576# or visit www.oracle.com if you need additional information or have any
4577# questions.
4578#
4579
4580################################################################################
4581# Setup cups (Common Unix Printing System)
4582################################################################################
4583
4584
4585#
4586# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4587# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4588#
4589# This code is free software; you can redistribute it and/or modify it
4590# under the terms of the GNU General Public License version 2 only, as
4591# published by the Free Software Foundation.  Oracle designates this
4592# particular file as subject to the "Classpath" exception as provided
4593# by Oracle in the LICENSE file that accompanied this code.
4594#
4595# This code is distributed in the hope that it will be useful, but WITHOUT
4596# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4597# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4598# version 2 for more details (a copy is included in the LICENSE file that
4599# accompanied this code).
4600#
4601# You should have received a copy of the GNU General Public License version
4602# 2 along with this work; if not, write to the Free Software Foundation,
4603# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4604#
4605# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4606# or visit www.oracle.com if you need additional information or have any
4607# questions.
4608#
4609
4610################################################################################
4611# Setup libffi (Foreign Function Interface)
4612################################################################################
4613
4614
4615#
4616# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4618#
4619# This code is free software; you can redistribute it and/or modify it
4620# under the terms of the GNU General Public License version 2 only, as
4621# published by the Free Software Foundation.  Oracle designates this
4622# particular file as subject to the "Classpath" exception as provided
4623# by Oracle in the LICENSE file that accompanied this code.
4624#
4625# This code is distributed in the hope that it will be useful, but WITHOUT
4626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4628# version 2 for more details (a copy is included in the LICENSE file that
4629# accompanied this code).
4630#
4631# You should have received a copy of the GNU General Public License version
4632# 2 along with this work; if not, write to the Free Software Foundation,
4633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4634#
4635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4636# or visit www.oracle.com if you need additional information or have any
4637# questions.
4638#
4639
4640################################################################################
4641# Build the freetype lib from source
4642################################################################################
4643
4644
4645################################################################################
4646# Check if a potential freeype library match is correct and usable
4647################################################################################
4648
4649
4650################################################################################
4651# Setup freetype (The FreeType2 font rendering library)
4652################################################################################
4653
4654
4655#
4656# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4657# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4658#
4659# This code is free software; you can redistribute it and/or modify it
4660# under the terms of the GNU General Public License version 2 only, as
4661# published by the Free Software Foundation.  Oracle designates this
4662# particular file as subject to the "Classpath" exception as provided
4663# by Oracle in the LICENSE file that accompanied this code.
4664#
4665# This code is distributed in the hope that it will be useful, but WITHOUT
4666# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4667# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4668# version 2 for more details (a copy is included in the LICENSE file that
4669# accompanied this code).
4670#
4671# You should have received a copy of the GNU General Public License version
4672# 2 along with this work; if not, write to the Free Software Foundation,
4673# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4674#
4675# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4676# or visit www.oracle.com if you need additional information or have any
4677# questions.
4678#
4679
4680################################################################################
4681# Setup the standard C/C++ runtime libraries.
4682#
4683# Most importantly, determine if stdc++ should be linked statically or
4684# dynamically.
4685################################################################################
4686
4687
4688#
4689# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4691#
4692# This code is free software; you can redistribute it and/or modify it
4693# under the terms of the GNU General Public License version 2 only, as
4694# published by the Free Software Foundation.  Oracle designates this
4695# particular file as subject to the "Classpath" exception as provided
4696# by Oracle in the LICENSE file that accompanied this code.
4697#
4698# This code is distributed in the hope that it will be useful, but WITHOUT
4699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4701# version 2 for more details (a copy is included in the LICENSE file that
4702# accompanied this code).
4703#
4704# You should have received a copy of the GNU General Public License version
4705# 2 along with this work; if not, write to the Free Software Foundation,
4706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4707#
4708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4709# or visit www.oracle.com if you need additional information or have any
4710# questions.
4711#
4712
4713################################################################################
4714# Setup X11 Windows system
4715################################################################################
4716
4717
4718
4719################################################################################
4720# Determine which libraries are needed for this configuration
4721################################################################################
4722
4723
4724################################################################################
4725# Parse library options, and setup needed libraries
4726################################################################################
4727
4728
4729################################################################################
4730# Setup llvm (Low-Level VM)
4731################################################################################
4732
4733
4734################################################################################
4735# Setup various libraries, typically small system libraries
4736################################################################################
4737
4738
4739################################################################################
4740# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4741# redistribute it in the test image.
4742################################################################################
4743
4744
4745
4746#
4747# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4748# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4749#
4750# This code is free software; you can redistribute it and/or modify it
4751# under the terms of the GNU General Public License version 2 only, as
4752# published by the Free Software Foundation.  Oracle designates this
4753# particular file as subject to the "Classpath" exception as provided
4754# by Oracle in the LICENSE file that accompanied this code.
4755#
4756# This code is distributed in the hope that it will be useful, but WITHOUT
4757# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4758# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4759# version 2 for more details (a copy is included in the LICENSE file that
4760# accompanied this code).
4761#
4762# You should have received a copy of the GNU General Public License version
4763# 2 along with this work; if not, write to the Free Software Foundation,
4764# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4765#
4766# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4767# or visit www.oracle.com if you need additional information or have any
4768# questions.
4769#
4770
4771# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4772# Converts autoconf style CPU name to OpenJDK style, into
4773# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4774
4775
4776# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4777# Converts autoconf style OS name to OpenJDK style, into
4778# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4779
4780
4781# Expects $host_os $host_cpu $build_os and $build_cpu
4782# and $with_target_bits to have been setup!
4783#
4784# Translate the standard triplet(quadruplet) definition
4785# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4786# OPENJDK_BUILD_OS, etc.
4787
4788
4789# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4790# accordingly. Must be done after setting up build and target system, but before
4791# doing anything else with these values.
4792
4793
4794# Setup the legacy variables, for controlling the old makefiles.
4795#
4796
4797
4798# $1 - Either TARGET or BUILD to setup the variables for.
4799
4800
4801
4802
4803#%%% Build and target systems %%%
4804
4805
4806
4807
4808# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4809# Add -mX to various FLAGS variables.
4810
4811
4812
4813
4814
4815
4816#
4817# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4818# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4819#
4820# This code is free software; you can redistribute it and/or modify it
4821# under the terms of the GNU General Public License version 2 only, as
4822# published by the Free Software Foundation.  Oracle designates this
4823# particular file as subject to the "Classpath" exception as provided
4824# by Oracle in the LICENSE file that accompanied this code.
4825#
4826# This code is distributed in the hope that it will be useful, but WITHOUT
4827# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4828# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4829# version 2 for more details (a copy is included in the LICENSE file that
4830# accompanied this code).
4831#
4832# You should have received a copy of the GNU General Public License version
4833# 2 along with this work; if not, write to the Free Software Foundation,
4834# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4835#
4836# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4837# or visit www.oracle.com if you need additional information or have any
4838# questions.
4839#
4840
4841
4842
4843
4844
4845
4846
4847################################################################################
4848# Define a mechanism for importing extra prebuilt modules
4849#
4850
4851
4852
4853#
4854# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4855# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4856#
4857# This code is free software; you can redistribute it and/or modify it
4858# under the terms of the GNU General Public License version 2 only, as
4859# published by the Free Software Foundation.  Oracle designates this
4860# particular file as subject to the "Classpath" exception as provided
4861# by Oracle in the LICENSE file that accompanied this code.
4862#
4863# This code is distributed in the hope that it will be useful, but WITHOUT
4864# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4865# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4866# version 2 for more details (a copy is included in the LICENSE file that
4867# accompanied this code).
4868#
4869# You should have received a copy of the GNU General Public License version
4870# 2 along with this work; if not, write to the Free Software Foundation,
4871# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4872#
4873# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4874# or visit www.oracle.com if you need additional information or have any
4875# questions.
4876#
4877
4878########################################################################
4879# This file is responsible for detecting, verifying and setting up the
4880# toolchain, i.e. the compiler, linker and related utilities. It will setup
4881# proper paths to the binaries, but it will not setup any flags.
4882#
4883# The binaries used is determined by the toolchain type, which is the family of
4884# compilers and related tools that are used.
4885########################################################################
4886
4887
4888# All valid toolchains, regardless of platform (used by help.m4)
4889VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4890
4891# These toolchains are valid on different platforms
4892VALID_TOOLCHAINS_linux="gcc clang"
4893VALID_TOOLCHAINS_solaris="solstudio"
4894VALID_TOOLCHAINS_macosx="gcc clang"
4895VALID_TOOLCHAINS_aix="xlc"
4896VALID_TOOLCHAINS_windows="microsoft"
4897
4898# Toolchain descriptions
4899TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4900TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4901TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4902TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4903TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4904
4905# Minimum supported versions, empty means unspecified
4906TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4907TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4908TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4909TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4910TOOLCHAIN_MINIMUM_VERSION_xlc=""
4911
4912# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4913# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4914# $1 - optional variable prefix for compiler and version variables (BUILD_)
4915# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4916
4917
4918# Check if the configured compiler (C and C++) is of a specific version or
4919# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4920#
4921# Arguments:
4922#   VERSION:   The version string to check against the found version
4923#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4924#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4925#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4926
4927
4928
4929
4930# Setup a number of variables describing how native output files are
4931# named on this platform/toolchain.
4932
4933
4934# Determine which toolchain type to use, and make sure it is valid for this
4935# platform. Setup various information about the selected toolchain.
4936
4937
4938# Before we start detecting the toolchain executables, we might need some
4939# special setup, e.g. additional paths etc.
4940
4941
4942# Restore path, etc
4943
4944
4945# Check if a compiler is of the toolchain type we expect, and save the version
4946# information from it. If the compiler does not match the expected type,
4947# this function will abort using AC_MSG_ERROR. If it matches, the version will
4948# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4949# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4950#
4951# $1 = compiler to test (CC or CXX)
4952# $2 = human readable name of compiler (C or C++)
4953
4954
4955# Try to locate the given C or C++ compiler in the path, or otherwise.
4956#
4957# $1 = compiler to test (CC or CXX)
4958# $2 = human readable name of compiler (C or C++)
4959# $3 = list of compiler names to search for
4960
4961
4962# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4963# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4964# archiver (AR). Verify that the compilers are correct according to the
4965# toolchain type.
4966
4967
4968# Setup additional tools that is considered a part of the toolchain, but not the
4969# core part. Many of these are highly platform-specific and do not exist,
4970# and/or are not needed on all platforms.
4971
4972
4973# Setup the build tools (i.e, the compiler and linker used to build programs
4974# that should be run on the build platform, not the target platform, as a build
4975# helper). Since the non-cross-compile case uses the normal, target compilers
4976# for this, we can only do this after these have been setup.
4977
4978
4979# Setup legacy variables that are still needed as alternative ways to refer to
4980# parts of the toolchain.
4981
4982
4983# Do some additional checks on the detected tools.
4984
4985
4986# Setup the JTReg Regression Test Harness.
4987
4988
4989#
4990# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4991# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4992#
4993# This code is free software; you can redistribute it and/or modify it
4994# under the terms of the GNU General Public License version 2 only, as
4995# published by the Free Software Foundation.  Oracle designates this
4996# particular file as subject to the "Classpath" exception as provided
4997# by Oracle in the LICENSE file that accompanied this code.
4998#
4999# This code is distributed in the hope that it will be useful, but WITHOUT
5000# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5001# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5002# version 2 for more details (a copy is included in the LICENSE file that
5003# accompanied this code).
5004#
5005# You should have received a copy of the GNU General Public License version
5006# 2 along with this work; if not, write to the Free Software Foundation,
5007# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5008#
5009# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5010# or visit www.oracle.com if you need additional information or have any
5011# questions.
5012#
5013
5014################################################################################
5015# The order of these defines the priority by which we try to find them.
5016VALID_VS_VERSIONS="2013 2012 2010"
5017
5018VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5019VS_VERSION_INTERNAL_2010=100
5020VS_MSVCR_2010=msvcr100.dll
5021# We don't use msvcp on Visual Studio 2010
5022#VS_MSVCP_2010=msvcp100.dll
5023VS_ENVVAR_2010="VS100COMNTOOLS"
5024VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5025VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5026VS_VS_PLATFORM_NAME_2010="v100"
5027VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5028
5029VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5030VS_VERSION_INTERNAL_2012=110
5031VS_MSVCR_2012=msvcr110.dll
5032VS_MSVCP_2012=msvcp110.dll
5033VS_ENVVAR_2012="VS110COMNTOOLS"
5034VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5035VS_SDK_INSTALLDIR_2012=
5036VS_VS_PLATFORM_NAME_2012="v110"
5037VS_SDK_PLATFORM_NAME_2012=
5038
5039VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5040VS_VERSION_INTERNAL_2013=120
5041VS_MSVCR_2013=msvcr120.dll
5042VS_MSVCP_2013=msvcp120.dll
5043VS_ENVVAR_2013="VS120COMNTOOLS"
5044VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5045VS_SDK_INSTALLDIR_2013=
5046VS_VS_PLATFORM_NAME_2013="v120"
5047VS_SDK_PLATFORM_NAME_2013=
5048
5049################################################################################
5050
5051
5052
5053################################################################################
5054
5055
5056
5057################################################################################
5058# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5059# build environment and assigns it to VS_ENV_CMD
5060
5061
5062################################################################################
5063
5064
5065
5066################################################################################
5067# Check if the VS env variables were setup prior to running configure.
5068# If not, then find vcvarsall.bat and run it automatically, and integrate
5069# the set env variables into the spec file.
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084# This line needs to be here, verbatim, after all includes and the dummy hook
5085# definitions. It is replaced with custom functionality when building
5086# custom sources.
5087#CUSTOM_AUTOCONF_INCLUDE
5088
5089# Do not change or remove the following line, it is needed for consistency checks:
5090DATE_WHEN_GENERATED=1480956932
5091
5092###############################################################################
5093#
5094# Initialization / Boot-strapping
5095#
5096# The bootstrapping process needs to solve the "chicken or the egg" problem,
5097# thus it jumps back and forth, each time gaining something needed later on.
5098#
5099###############################################################################
5100
5101# If we are requested to print additional help, do that and then exit.
5102# This must be the very first call.
5103
5104  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5105
5106    # Print available toolchains
5107    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5108    $PRINTF "Which are valid to use depends on the build platform.\n"
5109    for toolchain in $VALID_TOOLCHAINS_all; do
5110      # Use indirect variable referencing
5111      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5112      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5113      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5114    done
5115    $PRINTF "\n"
5116
5117    # Print available jvm features
5118    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5119    $PRINTF "Which are valid to use depends on the target platform.\n  "
5120    $PRINTF "%s " $VALID_JVM_FEATURES
5121    $PRINTF "\n"
5122
5123    # And now exit directly
5124    exit 0
5125  fi
5126
5127
5128# Basic initialization that must happen first of all in the normal process.
5129
5130  # Save the original command line. This is passed to us by the wrapper configure script.
5131
5132  # Save the path variable before it gets changed
5133  ORIGINAL_PATH="$PATH"
5134
5135  DATE_WHEN_CONFIGURED=`LANG=C date`
5136
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5138$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5139  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5140$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5141
5142
5143  # Start with tools that do not need have cross compilation support
5144  # and can be expected to be found in the default PATH. These tools are
5145  # used by configure.
5146
5147  # First are all the simple required tools.
5148
5149
5150
5151  # Publish this variable in the help.
5152
5153
5154  if [ -z "${BASENAME+x}" ]; then
5155    # The variable is not set by user, try to locate tool using the code snippet
5156    for ac_prog in basename
5157do
5158  # Extract the first word of "$ac_prog", so it can be a program name with args.
5159set dummy $ac_prog; ac_word=$2
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5161$as_echo_n "checking for $ac_word... " >&6; }
5162if ${ac_cv_path_BASENAME+:} false; then :
5163  $as_echo_n "(cached) " >&6
5164else
5165  case $BASENAME in
5166  [\\/]* | ?:[\\/]*)
5167  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5168  ;;
5169  *)
5170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5171for as_dir in $PATH
5172do
5173  IFS=$as_save_IFS
5174  test -z "$as_dir" && as_dir=.
5175    for ac_exec_ext in '' $ac_executable_extensions; do
5176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5177    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5179    break 2
5180  fi
5181done
5182  done
5183IFS=$as_save_IFS
5184
5185  ;;
5186esac
5187fi
5188BASENAME=$ac_cv_path_BASENAME
5189if test -n "$BASENAME"; then
5190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5191$as_echo "$BASENAME" >&6; }
5192else
5193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5194$as_echo "no" >&6; }
5195fi
5196
5197
5198  test -n "$BASENAME" && break
5199done
5200
5201  else
5202    # The variable is set, but is it from the command line or the environment?
5203
5204    # Try to remove the string !BASENAME! from our list.
5205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5207      # If it failed, the variable was not from the command line. Ignore it,
5208      # but warn the user (except for BASH, which is always set by the calling BASH).
5209      if test "xBASENAME" != xBASH; then
5210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5211$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5212      fi
5213      # Try to locate tool using the code snippet
5214      for ac_prog in basename
5215do
5216  # Extract the first word of "$ac_prog", so it can be a program name with args.
5217set dummy $ac_prog; ac_word=$2
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5219$as_echo_n "checking for $ac_word... " >&6; }
5220if ${ac_cv_path_BASENAME+:} false; then :
5221  $as_echo_n "(cached) " >&6
5222else
5223  case $BASENAME in
5224  [\\/]* | ?:[\\/]*)
5225  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5226  ;;
5227  *)
5228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH
5230do
5231  IFS=$as_save_IFS
5232  test -z "$as_dir" && as_dir=.
5233    for ac_exec_ext in '' $ac_executable_extensions; do
5234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5235    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5237    break 2
5238  fi
5239done
5240  done
5241IFS=$as_save_IFS
5242
5243  ;;
5244esac
5245fi
5246BASENAME=$ac_cv_path_BASENAME
5247if test -n "$BASENAME"; then
5248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5249$as_echo "$BASENAME" >&6; }
5250else
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5252$as_echo "no" >&6; }
5253fi
5254
5255
5256  test -n "$BASENAME" && break
5257done
5258
5259    else
5260      # If it succeeded, then it was overridden by the user. We will use it
5261      # for the tool.
5262
5263      # First remove it from the list of overridden variables, so we can test
5264      # for unknown variables in the end.
5265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5266
5267      # Check if we try to supply an empty value
5268      if test "x$BASENAME" = x; then
5269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5270$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5272$as_echo_n "checking for BASENAME... " >&6; }
5273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5274$as_echo "disabled" >&6; }
5275      else
5276        # Check if the provided tool contains a complete path.
5277        tool_specified="$BASENAME"
5278        tool_basename="${tool_specified##*/}"
5279        if test "x$tool_basename" = "x$tool_specified"; then
5280          # A command without a complete path is provided, search $PATH.
5281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5282$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5283          # Extract the first word of "$tool_basename", so it can be a program name with args.
5284set dummy $tool_basename; ac_word=$2
5285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5286$as_echo_n "checking for $ac_word... " >&6; }
5287if ${ac_cv_path_BASENAME+:} false; then :
5288  $as_echo_n "(cached) " >&6
5289else
5290  case $BASENAME in
5291  [\\/]* | ?:[\\/]*)
5292  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5293  ;;
5294  *)
5295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5296for as_dir in $PATH
5297do
5298  IFS=$as_save_IFS
5299  test -z "$as_dir" && as_dir=.
5300    for ac_exec_ext in '' $ac_executable_extensions; do
5301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5302    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5304    break 2
5305  fi
5306done
5307  done
5308IFS=$as_save_IFS
5309
5310  ;;
5311esac
5312fi
5313BASENAME=$ac_cv_path_BASENAME
5314if test -n "$BASENAME"; then
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5316$as_echo "$BASENAME" >&6; }
5317else
5318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5319$as_echo "no" >&6; }
5320fi
5321
5322
5323          if test "x$BASENAME" = x; then
5324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5325          fi
5326        else
5327          # Otherwise we believe it is a complete path. Use it as it is.
5328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5329$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5331$as_echo_n "checking for BASENAME... " >&6; }
5332          if test ! -x "$tool_specified"; then
5333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5334$as_echo "not found" >&6; }
5335            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5336          fi
5337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5338$as_echo "$tool_specified" >&6; }
5339        fi
5340      fi
5341    fi
5342
5343  fi
5344
5345
5346
5347  if test "x$BASENAME" = x; then
5348    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5349  fi
5350
5351
5352
5353
5354
5355  # Publish this variable in the help.
5356
5357
5358  if [ -z "${BASH+x}" ]; then
5359    # The variable is not set by user, try to locate tool using the code snippet
5360    for ac_prog in bash
5361do
5362  # Extract the first word of "$ac_prog", so it can be a program name with args.
5363set dummy $ac_prog; ac_word=$2
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365$as_echo_n "checking for $ac_word... " >&6; }
5366if ${ac_cv_path_BASH+:} false; then :
5367  $as_echo_n "(cached) " >&6
5368else
5369  case $BASH in
5370  [\\/]* | ?:[\\/]*)
5371  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5372  ;;
5373  *)
5374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5375for as_dir in $PATH
5376do
5377  IFS=$as_save_IFS
5378  test -z "$as_dir" && as_dir=.
5379    for ac_exec_ext in '' $ac_executable_extensions; do
5380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5381    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5383    break 2
5384  fi
5385done
5386  done
5387IFS=$as_save_IFS
5388
5389  ;;
5390esac
5391fi
5392BASH=$ac_cv_path_BASH
5393if test -n "$BASH"; then
5394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5395$as_echo "$BASH" >&6; }
5396else
5397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5398$as_echo "no" >&6; }
5399fi
5400
5401
5402  test -n "$BASH" && break
5403done
5404
5405  else
5406    # The variable is set, but is it from the command line or the environment?
5407
5408    # Try to remove the string !BASH! from our list.
5409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5411      # If it failed, the variable was not from the command line. Ignore it,
5412      # but warn the user (except for BASH, which is always set by the calling BASH).
5413      if test "xBASH" != xBASH; then
5414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5415$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5416      fi
5417      # Try to locate tool using the code snippet
5418      for ac_prog in bash
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if ${ac_cv_path_BASH+:} false; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $BASH in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5439    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450BASH=$ac_cv_path_BASH
5451if test -n "$BASH"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5453$as_echo "$BASH" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$BASH" && break
5461done
5462
5463    else
5464      # If it succeeded, then it was overridden by the user. We will use it
5465      # for the tool.
5466
5467      # First remove it from the list of overridden variables, so we can test
5468      # for unknown variables in the end.
5469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5470
5471      # Check if we try to supply an empty value
5472      if test "x$BASH" = x; then
5473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5474$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5476$as_echo_n "checking for BASH... " >&6; }
5477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5478$as_echo "disabled" >&6; }
5479      else
5480        # Check if the provided tool contains a complete path.
5481        tool_specified="$BASH"
5482        tool_basename="${tool_specified##*/}"
5483        if test "x$tool_basename" = "x$tool_specified"; then
5484          # A command without a complete path is provided, search $PATH.
5485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5486$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5487          # Extract the first word of "$tool_basename", so it can be a program name with args.
5488set dummy $tool_basename; ac_word=$2
5489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490$as_echo_n "checking for $ac_word... " >&6; }
5491if ${ac_cv_path_BASH+:} false; then :
5492  $as_echo_n "(cached) " >&6
5493else
5494  case $BASH in
5495  [\\/]* | ?:[\\/]*)
5496  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5497  ;;
5498  *)
5499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5500for as_dir in $PATH
5501do
5502  IFS=$as_save_IFS
5503  test -z "$as_dir" && as_dir=.
5504    for ac_exec_ext in '' $ac_executable_extensions; do
5505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5506    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5508    break 2
5509  fi
5510done
5511  done
5512IFS=$as_save_IFS
5513
5514  ;;
5515esac
5516fi
5517BASH=$ac_cv_path_BASH
5518if test -n "$BASH"; then
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5520$as_echo "$BASH" >&6; }
5521else
5522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523$as_echo "no" >&6; }
5524fi
5525
5526
5527          if test "x$BASH" = x; then
5528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5529          fi
5530        else
5531          # Otherwise we believe it is a complete path. Use it as it is.
5532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5533$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5535$as_echo_n "checking for BASH... " >&6; }
5536          if test ! -x "$tool_specified"; then
5537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5538$as_echo "not found" >&6; }
5539            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5540          fi
5541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5542$as_echo "$tool_specified" >&6; }
5543        fi
5544      fi
5545    fi
5546
5547  fi
5548
5549
5550
5551  if test "x$BASH" = x; then
5552    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5553  fi
5554
5555
5556
5557
5558
5559  # Publish this variable in the help.
5560
5561
5562  if [ -z "${CAT+x}" ]; then
5563    # The variable is not set by user, try to locate tool using the code snippet
5564    for ac_prog in cat
5565do
5566  # Extract the first word of "$ac_prog", so it can be a program name with args.
5567set dummy $ac_prog; ac_word=$2
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569$as_echo_n "checking for $ac_word... " >&6; }
5570if ${ac_cv_path_CAT+:} false; then :
5571  $as_echo_n "(cached) " >&6
5572else
5573  case $CAT in
5574  [\\/]* | ?:[\\/]*)
5575  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5576  ;;
5577  *)
5578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581  IFS=$as_save_IFS
5582  test -z "$as_dir" && as_dir=.
5583    for ac_exec_ext in '' $ac_executable_extensions; do
5584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587    break 2
5588  fi
5589done
5590  done
5591IFS=$as_save_IFS
5592
5593  ;;
5594esac
5595fi
5596CAT=$ac_cv_path_CAT
5597if test -n "$CAT"; then
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5599$as_echo "$CAT" >&6; }
5600else
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602$as_echo "no" >&6; }
5603fi
5604
5605
5606  test -n "$CAT" && break
5607done
5608
5609  else
5610    # The variable is set, but is it from the command line or the environment?
5611
5612    # Try to remove the string !CAT! from our list.
5613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5615      # If it failed, the variable was not from the command line. Ignore it,
5616      # but warn the user (except for BASH, which is always set by the calling BASH).
5617      if test "xCAT" != xBASH; then
5618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5619$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5620      fi
5621      # Try to locate tool using the code snippet
5622      for ac_prog in cat
5623do
5624  # Extract the first word of "$ac_prog", so it can be a program name with args.
5625set dummy $ac_prog; ac_word=$2
5626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5627$as_echo_n "checking for $ac_word... " >&6; }
5628if ${ac_cv_path_CAT+:} false; then :
5629  $as_echo_n "(cached) " >&6
5630else
5631  case $CAT in
5632  [\\/]* | ?:[\\/]*)
5633  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5634  ;;
5635  *)
5636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5637for as_dir in $PATH
5638do
5639  IFS=$as_save_IFS
5640  test -z "$as_dir" && as_dir=.
5641    for ac_exec_ext in '' $ac_executable_extensions; do
5642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5643    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5645    break 2
5646  fi
5647done
5648  done
5649IFS=$as_save_IFS
5650
5651  ;;
5652esac
5653fi
5654CAT=$ac_cv_path_CAT
5655if test -n "$CAT"; then
5656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5657$as_echo "$CAT" >&6; }
5658else
5659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5660$as_echo "no" >&6; }
5661fi
5662
5663
5664  test -n "$CAT" && break
5665done
5666
5667    else
5668      # If it succeeded, then it was overridden by the user. We will use it
5669      # for the tool.
5670
5671      # First remove it from the list of overridden variables, so we can test
5672      # for unknown variables in the end.
5673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5674
5675      # Check if we try to supply an empty value
5676      if test "x$CAT" = x; then
5677        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5678$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5680$as_echo_n "checking for CAT... " >&6; }
5681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5682$as_echo "disabled" >&6; }
5683      else
5684        # Check if the provided tool contains a complete path.
5685        tool_specified="$CAT"
5686        tool_basename="${tool_specified##*/}"
5687        if test "x$tool_basename" = "x$tool_specified"; then
5688          # A command without a complete path is provided, search $PATH.
5689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5690$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5691          # Extract the first word of "$tool_basename", so it can be a program name with args.
5692set dummy $tool_basename; ac_word=$2
5693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
5695if ${ac_cv_path_CAT+:} false; then :
5696  $as_echo_n "(cached) " >&6
5697else
5698  case $CAT in
5699  [\\/]* | ?:[\\/]*)
5700  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5701  ;;
5702  *)
5703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704for as_dir in $PATH
5705do
5706  IFS=$as_save_IFS
5707  test -z "$as_dir" && as_dir=.
5708    for ac_exec_ext in '' $ac_executable_extensions; do
5709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5710    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5712    break 2
5713  fi
5714done
5715  done
5716IFS=$as_save_IFS
5717
5718  ;;
5719esac
5720fi
5721CAT=$ac_cv_path_CAT
5722if test -n "$CAT"; then
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5724$as_echo "$CAT" >&6; }
5725else
5726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
5728fi
5729
5730
5731          if test "x$CAT" = x; then
5732            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5733          fi
5734        else
5735          # Otherwise we believe it is a complete path. Use it as it is.
5736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5737$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5738          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5739$as_echo_n "checking for CAT... " >&6; }
5740          if test ! -x "$tool_specified"; then
5741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5742$as_echo "not found" >&6; }
5743            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5744          fi
5745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5746$as_echo "$tool_specified" >&6; }
5747        fi
5748      fi
5749    fi
5750
5751  fi
5752
5753
5754
5755  if test "x$CAT" = x; then
5756    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5757  fi
5758
5759
5760
5761
5762
5763  # Publish this variable in the help.
5764
5765
5766  if [ -z "${CHMOD+x}" ]; then
5767    # The variable is not set by user, try to locate tool using the code snippet
5768    for ac_prog in chmod
5769do
5770  # Extract the first word of "$ac_prog", so it can be a program name with args.
5771set dummy $ac_prog; ac_word=$2
5772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5773$as_echo_n "checking for $ac_word... " >&6; }
5774if ${ac_cv_path_CHMOD+:} false; then :
5775  $as_echo_n "(cached) " >&6
5776else
5777  case $CHMOD in
5778  [\\/]* | ?:[\\/]*)
5779  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5780  ;;
5781  *)
5782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5783for as_dir in $PATH
5784do
5785  IFS=$as_save_IFS
5786  test -z "$as_dir" && as_dir=.
5787    for ac_exec_ext in '' $ac_executable_extensions; do
5788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5789    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5791    break 2
5792  fi
5793done
5794  done
5795IFS=$as_save_IFS
5796
5797  ;;
5798esac
5799fi
5800CHMOD=$ac_cv_path_CHMOD
5801if test -n "$CHMOD"; then
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5803$as_echo "$CHMOD" >&6; }
5804else
5805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5806$as_echo "no" >&6; }
5807fi
5808
5809
5810  test -n "$CHMOD" && break
5811done
5812
5813  else
5814    # The variable is set, but is it from the command line or the environment?
5815
5816    # Try to remove the string !CHMOD! from our list.
5817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5819      # If it failed, the variable was not from the command line. Ignore it,
5820      # but warn the user (except for BASH, which is always set by the calling BASH).
5821      if test "xCHMOD" != xBASH; then
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5823$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5824      fi
5825      # Try to locate tool using the code snippet
5826      for ac_prog in chmod
5827do
5828  # Extract the first word of "$ac_prog", so it can be a program name with args.
5829set dummy $ac_prog; ac_word=$2
5830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5831$as_echo_n "checking for $ac_word... " >&6; }
5832if ${ac_cv_path_CHMOD+:} false; then :
5833  $as_echo_n "(cached) " >&6
5834else
5835  case $CHMOD in
5836  [\\/]* | ?:[\\/]*)
5837  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5838  ;;
5839  *)
5840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5841for as_dir in $PATH
5842do
5843  IFS=$as_save_IFS
5844  test -z "$as_dir" && as_dir=.
5845    for ac_exec_ext in '' $ac_executable_extensions; do
5846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5847    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5849    break 2
5850  fi
5851done
5852  done
5853IFS=$as_save_IFS
5854
5855  ;;
5856esac
5857fi
5858CHMOD=$ac_cv_path_CHMOD
5859if test -n "$CHMOD"; then
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5861$as_echo "$CHMOD" >&6; }
5862else
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864$as_echo "no" >&6; }
5865fi
5866
5867
5868  test -n "$CHMOD" && break
5869done
5870
5871    else
5872      # If it succeeded, then it was overridden by the user. We will use it
5873      # for the tool.
5874
5875      # First remove it from the list of overridden variables, so we can test
5876      # for unknown variables in the end.
5877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5878
5879      # Check if we try to supply an empty value
5880      if test "x$CHMOD" = x; then
5881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5882$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5884$as_echo_n "checking for CHMOD... " >&6; }
5885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5886$as_echo "disabled" >&6; }
5887      else
5888        # Check if the provided tool contains a complete path.
5889        tool_specified="$CHMOD"
5890        tool_basename="${tool_specified##*/}"
5891        if test "x$tool_basename" = "x$tool_specified"; then
5892          # A command without a complete path is provided, search $PATH.
5893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5894$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5895          # Extract the first word of "$tool_basename", so it can be a program name with args.
5896set dummy $tool_basename; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_path_CHMOD+:} false; then :
5900  $as_echo_n "(cached) " >&6
5901else
5902  case $CHMOD in
5903  [\\/]* | ?:[\\/]*)
5904  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5905  ;;
5906  *)
5907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910  IFS=$as_save_IFS
5911  test -z "$as_dir" && as_dir=.
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5914    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5916    break 2
5917  fi
5918done
5919  done
5920IFS=$as_save_IFS
5921
5922  ;;
5923esac
5924fi
5925CHMOD=$ac_cv_path_CHMOD
5926if test -n "$CHMOD"; then
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5928$as_echo "$CHMOD" >&6; }
5929else
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935          if test "x$CHMOD" = x; then
5936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5937          fi
5938        else
5939          # Otherwise we believe it is a complete path. Use it as it is.
5940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5941$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5943$as_echo_n "checking for CHMOD... " >&6; }
5944          if test ! -x "$tool_specified"; then
5945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5946$as_echo "not found" >&6; }
5947            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5948          fi
5949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5950$as_echo "$tool_specified" >&6; }
5951        fi
5952      fi
5953    fi
5954
5955  fi
5956
5957
5958
5959  if test "x$CHMOD" = x; then
5960    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5961  fi
5962
5963
5964
5965
5966
5967  # Publish this variable in the help.
5968
5969
5970  if [ -z "${CMP+x}" ]; then
5971    # The variable is not set by user, try to locate tool using the code snippet
5972    for ac_prog in cmp
5973do
5974  # Extract the first word of "$ac_prog", so it can be a program name with args.
5975set dummy $ac_prog; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_path_CMP+:} false; then :
5979  $as_echo_n "(cached) " >&6
5980else
5981  case $CMP in
5982  [\\/]* | ?:[\\/]*)
5983  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5984  ;;
5985  *)
5986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989  IFS=$as_save_IFS
5990  test -z "$as_dir" && as_dir=.
5991    for ac_exec_ext in '' $ac_executable_extensions; do
5992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5993    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995    break 2
5996  fi
5997done
5998  done
5999IFS=$as_save_IFS
6000
6001  ;;
6002esac
6003fi
6004CMP=$ac_cv_path_CMP
6005if test -n "$CMP"; then
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6007$as_echo "$CMP" >&6; }
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011fi
6012
6013
6014  test -n "$CMP" && break
6015done
6016
6017  else
6018    # The variable is set, but is it from the command line or the environment?
6019
6020    # Try to remove the string !CMP! from our list.
6021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6023      # If it failed, the variable was not from the command line. Ignore it,
6024      # but warn the user (except for BASH, which is always set by the calling BASH).
6025      if test "xCMP" != xBASH; then
6026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6027$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6028      fi
6029      # Try to locate tool using the code snippet
6030      for ac_prog in cmp
6031do
6032  # Extract the first word of "$ac_prog", so it can be a program name with args.
6033set dummy $ac_prog; ac_word=$2
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
6036if ${ac_cv_path_CMP+:} false; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  case $CMP in
6040  [\\/]* | ?:[\\/]*)
6041  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6042  ;;
6043  *)
6044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047  IFS=$as_save_IFS
6048  test -z "$as_dir" && as_dir=.
6049    for ac_exec_ext in '' $ac_executable_extensions; do
6050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6051    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053    break 2
6054  fi
6055done
6056  done
6057IFS=$as_save_IFS
6058
6059  ;;
6060esac
6061fi
6062CMP=$ac_cv_path_CMP
6063if test -n "$CMP"; then
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6065$as_echo "$CMP" >&6; }
6066else
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
6069fi
6070
6071
6072  test -n "$CMP" && break
6073done
6074
6075    else
6076      # If it succeeded, then it was overridden by the user. We will use it
6077      # for the tool.
6078
6079      # First remove it from the list of overridden variables, so we can test
6080      # for unknown variables in the end.
6081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6082
6083      # Check if we try to supply an empty value
6084      if test "x$CMP" = x; then
6085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6086$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6088$as_echo_n "checking for CMP... " >&6; }
6089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6090$as_echo "disabled" >&6; }
6091      else
6092        # Check if the provided tool contains a complete path.
6093        tool_specified="$CMP"
6094        tool_basename="${tool_specified##*/}"
6095        if test "x$tool_basename" = "x$tool_specified"; then
6096          # A command without a complete path is provided, search $PATH.
6097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6098$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6099          # Extract the first word of "$tool_basename", so it can be a program name with args.
6100set dummy $tool_basename; ac_word=$2
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102$as_echo_n "checking for $ac_word... " >&6; }
6103if ${ac_cv_path_CMP+:} false; then :
6104  $as_echo_n "(cached) " >&6
6105else
6106  case $CMP in
6107  [\\/]* | ?:[\\/]*)
6108  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6109  ;;
6110  *)
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_exec_ext in '' $ac_executable_extensions; do
6117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120    break 2
6121  fi
6122done
6123  done
6124IFS=$as_save_IFS
6125
6126  ;;
6127esac
6128fi
6129CMP=$ac_cv_path_CMP
6130if test -n "$CMP"; then
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6132$as_echo "$CMP" >&6; }
6133else
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139          if test "x$CMP" = x; then
6140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6141          fi
6142        else
6143          # Otherwise we believe it is a complete path. Use it as it is.
6144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6145$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6147$as_echo_n "checking for CMP... " >&6; }
6148          if test ! -x "$tool_specified"; then
6149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6150$as_echo "not found" >&6; }
6151            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6152          fi
6153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6154$as_echo "$tool_specified" >&6; }
6155        fi
6156      fi
6157    fi
6158
6159  fi
6160
6161
6162
6163  if test "x$CMP" = x; then
6164    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6165  fi
6166
6167
6168
6169
6170
6171  # Publish this variable in the help.
6172
6173
6174  if [ -z "${COMM+x}" ]; then
6175    # The variable is not set by user, try to locate tool using the code snippet
6176    for ac_prog in comm
6177do
6178  # Extract the first word of "$ac_prog", so it can be a program name with args.
6179set dummy $ac_prog; ac_word=$2
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6181$as_echo_n "checking for $ac_word... " >&6; }
6182if ${ac_cv_path_COMM+:} false; then :
6183  $as_echo_n "(cached) " >&6
6184else
6185  case $COMM in
6186  [\\/]* | ?:[\\/]*)
6187  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6188  ;;
6189  *)
6190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6191for as_dir in $PATH
6192do
6193  IFS=$as_save_IFS
6194  test -z "$as_dir" && as_dir=.
6195    for ac_exec_ext in '' $ac_executable_extensions; do
6196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6197    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6199    break 2
6200  fi
6201done
6202  done
6203IFS=$as_save_IFS
6204
6205  ;;
6206esac
6207fi
6208COMM=$ac_cv_path_COMM
6209if test -n "$COMM"; then
6210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6211$as_echo "$COMM" >&6; }
6212else
6213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6214$as_echo "no" >&6; }
6215fi
6216
6217
6218  test -n "$COMM" && break
6219done
6220
6221  else
6222    # The variable is set, but is it from the command line or the environment?
6223
6224    # Try to remove the string !COMM! from our list.
6225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6227      # If it failed, the variable was not from the command line. Ignore it,
6228      # but warn the user (except for BASH, which is always set by the calling BASH).
6229      if test "xCOMM" != xBASH; then
6230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6231$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6232      fi
6233      # Try to locate tool using the code snippet
6234      for ac_prog in comm
6235do
6236  # Extract the first word of "$ac_prog", so it can be a program name with args.
6237set dummy $ac_prog; ac_word=$2
6238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6239$as_echo_n "checking for $ac_word... " >&6; }
6240if ${ac_cv_path_COMM+:} false; then :
6241  $as_echo_n "(cached) " >&6
6242else
6243  case $COMM in
6244  [\\/]* | ?:[\\/]*)
6245  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6246  ;;
6247  *)
6248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251  IFS=$as_save_IFS
6252  test -z "$as_dir" && as_dir=.
6253    for ac_exec_ext in '' $ac_executable_extensions; do
6254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6255    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257    break 2
6258  fi
6259done
6260  done
6261IFS=$as_save_IFS
6262
6263  ;;
6264esac
6265fi
6266COMM=$ac_cv_path_COMM
6267if test -n "$COMM"; then
6268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6269$as_echo "$COMM" >&6; }
6270else
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6272$as_echo "no" >&6; }
6273fi
6274
6275
6276  test -n "$COMM" && break
6277done
6278
6279    else
6280      # If it succeeded, then it was overridden by the user. We will use it
6281      # for the tool.
6282
6283      # First remove it from the list of overridden variables, so we can test
6284      # for unknown variables in the end.
6285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6286
6287      # Check if we try to supply an empty value
6288      if test "x$COMM" = x; then
6289        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6290$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6292$as_echo_n "checking for COMM... " >&6; }
6293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6294$as_echo "disabled" >&6; }
6295      else
6296        # Check if the provided tool contains a complete path.
6297        tool_specified="$COMM"
6298        tool_basename="${tool_specified##*/}"
6299        if test "x$tool_basename" = "x$tool_specified"; then
6300          # A command without a complete path is provided, search $PATH.
6301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6302$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6303          # Extract the first word of "$tool_basename", so it can be a program name with args.
6304set dummy $tool_basename; ac_word=$2
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6306$as_echo_n "checking for $ac_word... " >&6; }
6307if ${ac_cv_path_COMM+:} false; then :
6308  $as_echo_n "(cached) " >&6
6309else
6310  case $COMM in
6311  [\\/]* | ?:[\\/]*)
6312  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6313  ;;
6314  *)
6315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318  IFS=$as_save_IFS
6319  test -z "$as_dir" && as_dir=.
6320    for ac_exec_ext in '' $ac_executable_extensions; do
6321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6322    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6324    break 2
6325  fi
6326done
6327  done
6328IFS=$as_save_IFS
6329
6330  ;;
6331esac
6332fi
6333COMM=$ac_cv_path_COMM
6334if test -n "$COMM"; then
6335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6336$as_echo "$COMM" >&6; }
6337else
6338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }
6340fi
6341
6342
6343          if test "x$COMM" = x; then
6344            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6345          fi
6346        else
6347          # Otherwise we believe it is a complete path. Use it as it is.
6348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6349$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6350          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6351$as_echo_n "checking for COMM... " >&6; }
6352          if test ! -x "$tool_specified"; then
6353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6354$as_echo "not found" >&6; }
6355            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6356          fi
6357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6358$as_echo "$tool_specified" >&6; }
6359        fi
6360      fi
6361    fi
6362
6363  fi
6364
6365
6366
6367  if test "x$COMM" = x; then
6368    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6369  fi
6370
6371
6372
6373
6374
6375  # Publish this variable in the help.
6376
6377
6378  if [ -z "${CP+x}" ]; then
6379    # The variable is not set by user, try to locate tool using the code snippet
6380    for ac_prog in cp
6381do
6382  # Extract the first word of "$ac_prog", so it can be a program name with args.
6383set dummy $ac_prog; ac_word=$2
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385$as_echo_n "checking for $ac_word... " >&6; }
6386if ${ac_cv_path_CP+:} false; then :
6387  $as_echo_n "(cached) " >&6
6388else
6389  case $CP in
6390  [\\/]* | ?:[\\/]*)
6391  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6392  ;;
6393  *)
6394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397  IFS=$as_save_IFS
6398  test -z "$as_dir" && as_dir=.
6399    for ac_exec_ext in '' $ac_executable_extensions; do
6400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6401    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403    break 2
6404  fi
6405done
6406  done
6407IFS=$as_save_IFS
6408
6409  ;;
6410esac
6411fi
6412CP=$ac_cv_path_CP
6413if test -n "$CP"; then
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6415$as_echo "$CP" >&6; }
6416else
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
6419fi
6420
6421
6422  test -n "$CP" && break
6423done
6424
6425  else
6426    # The variable is set, but is it from the command line or the environment?
6427
6428    # Try to remove the string !CP! from our list.
6429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6431      # If it failed, the variable was not from the command line. Ignore it,
6432      # but warn the user (except for BASH, which is always set by the calling BASH).
6433      if test "xCP" != xBASH; then
6434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6435$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6436      fi
6437      # Try to locate tool using the code snippet
6438      for ac_prog in cp
6439do
6440  # Extract the first word of "$ac_prog", so it can be a program name with args.
6441set dummy $ac_prog; ac_word=$2
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if ${ac_cv_path_CP+:} false; then :
6445  $as_echo_n "(cached) " >&6
6446else
6447  case $CP in
6448  [\\/]* | ?:[\\/]*)
6449  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6450  ;;
6451  *)
6452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453for as_dir in $PATH
6454do
6455  IFS=$as_save_IFS
6456  test -z "$as_dir" && as_dir=.
6457    for ac_exec_ext in '' $ac_executable_extensions; do
6458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6459    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461    break 2
6462  fi
6463done
6464  done
6465IFS=$as_save_IFS
6466
6467  ;;
6468esac
6469fi
6470CP=$ac_cv_path_CP
6471if test -n "$CP"; then
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6473$as_echo "$CP" >&6; }
6474else
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479
6480  test -n "$CP" && break
6481done
6482
6483    else
6484      # If it succeeded, then it was overridden by the user. We will use it
6485      # for the tool.
6486
6487      # First remove it from the list of overridden variables, so we can test
6488      # for unknown variables in the end.
6489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6490
6491      # Check if we try to supply an empty value
6492      if test "x$CP" = x; then
6493        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6494$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6496$as_echo_n "checking for CP... " >&6; }
6497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6498$as_echo "disabled" >&6; }
6499      else
6500        # Check if the provided tool contains a complete path.
6501        tool_specified="$CP"
6502        tool_basename="${tool_specified##*/}"
6503        if test "x$tool_basename" = "x$tool_specified"; then
6504          # A command without a complete path is provided, search $PATH.
6505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6506$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6507          # Extract the first word of "$tool_basename", so it can be a program name with args.
6508set dummy $tool_basename; ac_word=$2
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if ${ac_cv_path_CP+:} false; then :
6512  $as_echo_n "(cached) " >&6
6513else
6514  case $CP in
6515  [\\/]* | ?:[\\/]*)
6516  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6517  ;;
6518  *)
6519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520for as_dir in $PATH
6521do
6522  IFS=$as_save_IFS
6523  test -z "$as_dir" && as_dir=.
6524    for ac_exec_ext in '' $ac_executable_extensions; do
6525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528    break 2
6529  fi
6530done
6531  done
6532IFS=$as_save_IFS
6533
6534  ;;
6535esac
6536fi
6537CP=$ac_cv_path_CP
6538if test -n "$CP"; then
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6540$as_echo "$CP" >&6; }
6541else
6542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543$as_echo "no" >&6; }
6544fi
6545
6546
6547          if test "x$CP" = x; then
6548            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6549          fi
6550        else
6551          # Otherwise we believe it is a complete path. Use it as it is.
6552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6553$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6554          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6555$as_echo_n "checking for CP... " >&6; }
6556          if test ! -x "$tool_specified"; then
6557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6558$as_echo "not found" >&6; }
6559            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6560          fi
6561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6562$as_echo "$tool_specified" >&6; }
6563        fi
6564      fi
6565    fi
6566
6567  fi
6568
6569
6570
6571  if test "x$CP" = x; then
6572    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6573  fi
6574
6575
6576
6577
6578
6579  # Publish this variable in the help.
6580
6581
6582  if [ -z "${CUT+x}" ]; then
6583    # The variable is not set by user, try to locate tool using the code snippet
6584    for ac_prog in cut
6585do
6586  # Extract the first word of "$ac_prog", so it can be a program name with args.
6587set dummy $ac_prog; ac_word=$2
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6589$as_echo_n "checking for $ac_word... " >&6; }
6590if ${ac_cv_path_CUT+:} false; then :
6591  $as_echo_n "(cached) " >&6
6592else
6593  case $CUT in
6594  [\\/]* | ?:[\\/]*)
6595  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6596  ;;
6597  *)
6598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6599for as_dir in $PATH
6600do
6601  IFS=$as_save_IFS
6602  test -z "$as_dir" && as_dir=.
6603    for ac_exec_ext in '' $ac_executable_extensions; do
6604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6605    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6607    break 2
6608  fi
6609done
6610  done
6611IFS=$as_save_IFS
6612
6613  ;;
6614esac
6615fi
6616CUT=$ac_cv_path_CUT
6617if test -n "$CUT"; then
6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6619$as_echo "$CUT" >&6; }
6620else
6621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6622$as_echo "no" >&6; }
6623fi
6624
6625
6626  test -n "$CUT" && break
6627done
6628
6629  else
6630    # The variable is set, but is it from the command line or the environment?
6631
6632    # Try to remove the string !CUT! from our list.
6633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6635      # If it failed, the variable was not from the command line. Ignore it,
6636      # but warn the user (except for BASH, which is always set by the calling BASH).
6637      if test "xCUT" != xBASH; then
6638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6639$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6640      fi
6641      # Try to locate tool using the code snippet
6642      for ac_prog in cut
6643do
6644  # Extract the first word of "$ac_prog", so it can be a program name with args.
6645set dummy $ac_prog; ac_word=$2
6646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6647$as_echo_n "checking for $ac_word... " >&6; }
6648if ${ac_cv_path_CUT+:} false; then :
6649  $as_echo_n "(cached) " >&6
6650else
6651  case $CUT in
6652  [\\/]* | ?:[\\/]*)
6653  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6654  ;;
6655  *)
6656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6657for as_dir in $PATH
6658do
6659  IFS=$as_save_IFS
6660  test -z "$as_dir" && as_dir=.
6661    for ac_exec_ext in '' $ac_executable_extensions; do
6662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6663    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6665    break 2
6666  fi
6667done
6668  done
6669IFS=$as_save_IFS
6670
6671  ;;
6672esac
6673fi
6674CUT=$ac_cv_path_CUT
6675if test -n "$CUT"; then
6676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6677$as_echo "$CUT" >&6; }
6678else
6679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6680$as_echo "no" >&6; }
6681fi
6682
6683
6684  test -n "$CUT" && break
6685done
6686
6687    else
6688      # If it succeeded, then it was overridden by the user. We will use it
6689      # for the tool.
6690
6691      # First remove it from the list of overridden variables, so we can test
6692      # for unknown variables in the end.
6693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6694
6695      # Check if we try to supply an empty value
6696      if test "x$CUT" = x; then
6697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6698$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6700$as_echo_n "checking for CUT... " >&6; }
6701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6702$as_echo "disabled" >&6; }
6703      else
6704        # Check if the provided tool contains a complete path.
6705        tool_specified="$CUT"
6706        tool_basename="${tool_specified##*/}"
6707        if test "x$tool_basename" = "x$tool_specified"; then
6708          # A command without a complete path is provided, search $PATH.
6709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6710$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6711          # Extract the first word of "$tool_basename", so it can be a program name with args.
6712set dummy $tool_basename; ac_word=$2
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6714$as_echo_n "checking for $ac_word... " >&6; }
6715if ${ac_cv_path_CUT+:} false; then :
6716  $as_echo_n "(cached) " >&6
6717else
6718  case $CUT in
6719  [\\/]* | ?:[\\/]*)
6720  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6721  ;;
6722  *)
6723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6724for as_dir in $PATH
6725do
6726  IFS=$as_save_IFS
6727  test -z "$as_dir" && as_dir=.
6728    for ac_exec_ext in '' $ac_executable_extensions; do
6729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6730    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6732    break 2
6733  fi
6734done
6735  done
6736IFS=$as_save_IFS
6737
6738  ;;
6739esac
6740fi
6741CUT=$ac_cv_path_CUT
6742if test -n "$CUT"; then
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6744$as_echo "$CUT" >&6; }
6745else
6746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6747$as_echo "no" >&6; }
6748fi
6749
6750
6751          if test "x$CUT" = x; then
6752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6753          fi
6754        else
6755          # Otherwise we believe it is a complete path. Use it as it is.
6756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6757$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6759$as_echo_n "checking for CUT... " >&6; }
6760          if test ! -x "$tool_specified"; then
6761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6762$as_echo "not found" >&6; }
6763            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6764          fi
6765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6766$as_echo "$tool_specified" >&6; }
6767        fi
6768      fi
6769    fi
6770
6771  fi
6772
6773
6774
6775  if test "x$CUT" = x; then
6776    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6777  fi
6778
6779
6780
6781
6782
6783  # Publish this variable in the help.
6784
6785
6786  if [ -z "${DATE+x}" ]; then
6787    # The variable is not set by user, try to locate tool using the code snippet
6788    for ac_prog in date
6789do
6790  # Extract the first word of "$ac_prog", so it can be a program name with args.
6791set dummy $ac_prog; ac_word=$2
6792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6793$as_echo_n "checking for $ac_word... " >&6; }
6794if ${ac_cv_path_DATE+:} false; then :
6795  $as_echo_n "(cached) " >&6
6796else
6797  case $DATE in
6798  [\\/]* | ?:[\\/]*)
6799  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6800  ;;
6801  *)
6802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6803for as_dir in $PATH
6804do
6805  IFS=$as_save_IFS
6806  test -z "$as_dir" && as_dir=.
6807    for ac_exec_ext in '' $ac_executable_extensions; do
6808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6809    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6811    break 2
6812  fi
6813done
6814  done
6815IFS=$as_save_IFS
6816
6817  ;;
6818esac
6819fi
6820DATE=$ac_cv_path_DATE
6821if test -n "$DATE"; then
6822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6823$as_echo "$DATE" >&6; }
6824else
6825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6826$as_echo "no" >&6; }
6827fi
6828
6829
6830  test -n "$DATE" && break
6831done
6832
6833  else
6834    # The variable is set, but is it from the command line or the environment?
6835
6836    # Try to remove the string !DATE! from our list.
6837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6839      # If it failed, the variable was not from the command line. Ignore it,
6840      # but warn the user (except for BASH, which is always set by the calling BASH).
6841      if test "xDATE" != xBASH; then
6842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6843$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6844      fi
6845      # Try to locate tool using the code snippet
6846      for ac_prog in date
6847do
6848  # Extract the first word of "$ac_prog", so it can be a program name with args.
6849set dummy $ac_prog; ac_word=$2
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6851$as_echo_n "checking for $ac_word... " >&6; }
6852if ${ac_cv_path_DATE+:} false; then :
6853  $as_echo_n "(cached) " >&6
6854else
6855  case $DATE in
6856  [\\/]* | ?:[\\/]*)
6857  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6858  ;;
6859  *)
6860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6861for as_dir in $PATH
6862do
6863  IFS=$as_save_IFS
6864  test -z "$as_dir" && as_dir=.
6865    for ac_exec_ext in '' $ac_executable_extensions; do
6866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6867    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6869    break 2
6870  fi
6871done
6872  done
6873IFS=$as_save_IFS
6874
6875  ;;
6876esac
6877fi
6878DATE=$ac_cv_path_DATE
6879if test -n "$DATE"; then
6880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6881$as_echo "$DATE" >&6; }
6882else
6883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6884$as_echo "no" >&6; }
6885fi
6886
6887
6888  test -n "$DATE" && break
6889done
6890
6891    else
6892      # If it succeeded, then it was overridden by the user. We will use it
6893      # for the tool.
6894
6895      # First remove it from the list of overridden variables, so we can test
6896      # for unknown variables in the end.
6897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6898
6899      # Check if we try to supply an empty value
6900      if test "x$DATE" = x; then
6901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6902$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6904$as_echo_n "checking for DATE... " >&6; }
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6906$as_echo "disabled" >&6; }
6907      else
6908        # Check if the provided tool contains a complete path.
6909        tool_specified="$DATE"
6910        tool_basename="${tool_specified##*/}"
6911        if test "x$tool_basename" = "x$tool_specified"; then
6912          # A command without a complete path is provided, search $PATH.
6913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6914$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6915          # Extract the first word of "$tool_basename", so it can be a program name with args.
6916set dummy $tool_basename; ac_word=$2
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6918$as_echo_n "checking for $ac_word... " >&6; }
6919if ${ac_cv_path_DATE+:} false; then :
6920  $as_echo_n "(cached) " >&6
6921else
6922  case $DATE in
6923  [\\/]* | ?:[\\/]*)
6924  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6925  ;;
6926  *)
6927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928for as_dir in $PATH
6929do
6930  IFS=$as_save_IFS
6931  test -z "$as_dir" && as_dir=.
6932    for ac_exec_ext in '' $ac_executable_extensions; do
6933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6934    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6936    break 2
6937  fi
6938done
6939  done
6940IFS=$as_save_IFS
6941
6942  ;;
6943esac
6944fi
6945DATE=$ac_cv_path_DATE
6946if test -n "$DATE"; then
6947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6948$as_echo "$DATE" >&6; }
6949else
6950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951$as_echo "no" >&6; }
6952fi
6953
6954
6955          if test "x$DATE" = x; then
6956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6957          fi
6958        else
6959          # Otherwise we believe it is a complete path. Use it as it is.
6960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6961$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6963$as_echo_n "checking for DATE... " >&6; }
6964          if test ! -x "$tool_specified"; then
6965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6966$as_echo "not found" >&6; }
6967            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6968          fi
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6970$as_echo "$tool_specified" >&6; }
6971        fi
6972      fi
6973    fi
6974
6975  fi
6976
6977
6978
6979  if test "x$DATE" = x; then
6980    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6981  fi
6982
6983
6984
6985
6986
6987  # Publish this variable in the help.
6988
6989
6990  if [ -z "${DIFF+x}" ]; then
6991    # The variable is not set by user, try to locate tool using the code snippet
6992    for ac_prog in gdiff diff
6993do
6994  # Extract the first word of "$ac_prog", so it can be a program name with args.
6995set dummy $ac_prog; ac_word=$2
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6997$as_echo_n "checking for $ac_word... " >&6; }
6998if ${ac_cv_path_DIFF+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  case $DIFF in
7002  [\\/]* | ?:[\\/]*)
7003  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7004  ;;
7005  *)
7006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007for as_dir in $PATH
7008do
7009  IFS=$as_save_IFS
7010  test -z "$as_dir" && as_dir=.
7011    for ac_exec_ext in '' $ac_executable_extensions; do
7012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015    break 2
7016  fi
7017done
7018  done
7019IFS=$as_save_IFS
7020
7021  ;;
7022esac
7023fi
7024DIFF=$ac_cv_path_DIFF
7025if test -n "$DIFF"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7027$as_echo "$DIFF" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034  test -n "$DIFF" && break
7035done
7036
7037  else
7038    # The variable is set, but is it from the command line or the environment?
7039
7040    # Try to remove the string !DIFF! from our list.
7041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7043      # If it failed, the variable was not from the command line. Ignore it,
7044      # but warn the user (except for BASH, which is always set by the calling BASH).
7045      if test "xDIFF" != xBASH; then
7046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7047$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7048      fi
7049      # Try to locate tool using the code snippet
7050      for ac_prog in gdiff diff
7051do
7052  # Extract the first word of "$ac_prog", so it can be a program name with args.
7053set dummy $ac_prog; ac_word=$2
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7055$as_echo_n "checking for $ac_word... " >&6; }
7056if ${ac_cv_path_DIFF+:} false; then :
7057  $as_echo_n "(cached) " >&6
7058else
7059  case $DIFF in
7060  [\\/]* | ?:[\\/]*)
7061  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7062  ;;
7063  *)
7064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7065for as_dir in $PATH
7066do
7067  IFS=$as_save_IFS
7068  test -z "$as_dir" && as_dir=.
7069    for ac_exec_ext in '' $ac_executable_extensions; do
7070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7071    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7073    break 2
7074  fi
7075done
7076  done
7077IFS=$as_save_IFS
7078
7079  ;;
7080esac
7081fi
7082DIFF=$ac_cv_path_DIFF
7083if test -n "$DIFF"; then
7084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7085$as_echo "$DIFF" >&6; }
7086else
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7088$as_echo "no" >&6; }
7089fi
7090
7091
7092  test -n "$DIFF" && break
7093done
7094
7095    else
7096      # If it succeeded, then it was overridden by the user. We will use it
7097      # for the tool.
7098
7099      # First remove it from the list of overridden variables, so we can test
7100      # for unknown variables in the end.
7101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7102
7103      # Check if we try to supply an empty value
7104      if test "x$DIFF" = x; then
7105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7106$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7108$as_echo_n "checking for DIFF... " >&6; }
7109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7110$as_echo "disabled" >&6; }
7111      else
7112        # Check if the provided tool contains a complete path.
7113        tool_specified="$DIFF"
7114        tool_basename="${tool_specified##*/}"
7115        if test "x$tool_basename" = "x$tool_specified"; then
7116          # A command without a complete path is provided, search $PATH.
7117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7118$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7119          # Extract the first word of "$tool_basename", so it can be a program name with args.
7120set dummy $tool_basename; ac_word=$2
7121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7122$as_echo_n "checking for $ac_word... " >&6; }
7123if ${ac_cv_path_DIFF+:} false; then :
7124  $as_echo_n "(cached) " >&6
7125else
7126  case $DIFF in
7127  [\\/]* | ?:[\\/]*)
7128  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7129  ;;
7130  *)
7131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132for as_dir in $PATH
7133do
7134  IFS=$as_save_IFS
7135  test -z "$as_dir" && as_dir=.
7136    for ac_exec_ext in '' $ac_executable_extensions; do
7137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140    break 2
7141  fi
7142done
7143  done
7144IFS=$as_save_IFS
7145
7146  ;;
7147esac
7148fi
7149DIFF=$ac_cv_path_DIFF
7150if test -n "$DIFF"; then
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7152$as_echo "$DIFF" >&6; }
7153else
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155$as_echo "no" >&6; }
7156fi
7157
7158
7159          if test "x$DIFF" = x; then
7160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7161          fi
7162        else
7163          # Otherwise we believe it is a complete path. Use it as it is.
7164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7165$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7167$as_echo_n "checking for DIFF... " >&6; }
7168          if test ! -x "$tool_specified"; then
7169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7170$as_echo "not found" >&6; }
7171            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7172          fi
7173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7174$as_echo "$tool_specified" >&6; }
7175        fi
7176      fi
7177    fi
7178
7179  fi
7180
7181
7182
7183  if test "x$DIFF" = x; then
7184    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7185  fi
7186
7187
7188
7189
7190
7191  # Publish this variable in the help.
7192
7193
7194  if [ -z "${DIRNAME+x}" ]; then
7195    # The variable is not set by user, try to locate tool using the code snippet
7196    for ac_prog in dirname
7197do
7198  # Extract the first word of "$ac_prog", so it can be a program name with args.
7199set dummy $ac_prog; ac_word=$2
7200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7201$as_echo_n "checking for $ac_word... " >&6; }
7202if ${ac_cv_path_DIRNAME+:} false; then :
7203  $as_echo_n "(cached) " >&6
7204else
7205  case $DIRNAME in
7206  [\\/]* | ?:[\\/]*)
7207  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7208  ;;
7209  *)
7210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7211for as_dir in $PATH
7212do
7213  IFS=$as_save_IFS
7214  test -z "$as_dir" && as_dir=.
7215    for ac_exec_ext in '' $ac_executable_extensions; do
7216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7217    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7219    break 2
7220  fi
7221done
7222  done
7223IFS=$as_save_IFS
7224
7225  ;;
7226esac
7227fi
7228DIRNAME=$ac_cv_path_DIRNAME
7229if test -n "$DIRNAME"; then
7230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7231$as_echo "$DIRNAME" >&6; }
7232else
7233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7234$as_echo "no" >&6; }
7235fi
7236
7237
7238  test -n "$DIRNAME" && break
7239done
7240
7241  else
7242    # The variable is set, but is it from the command line or the environment?
7243
7244    # Try to remove the string !DIRNAME! from our list.
7245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7247      # If it failed, the variable was not from the command line. Ignore it,
7248      # but warn the user (except for BASH, which is always set by the calling BASH).
7249      if test "xDIRNAME" != xBASH; then
7250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7251$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7252      fi
7253      # Try to locate tool using the code snippet
7254      for ac_prog in dirname
7255do
7256  # Extract the first word of "$ac_prog", so it can be a program name with args.
7257set dummy $ac_prog; ac_word=$2
7258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7259$as_echo_n "checking for $ac_word... " >&6; }
7260if ${ac_cv_path_DIRNAME+:} false; then :
7261  $as_echo_n "(cached) " >&6
7262else
7263  case $DIRNAME in
7264  [\\/]* | ?:[\\/]*)
7265  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7266  ;;
7267  *)
7268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7269for as_dir in $PATH
7270do
7271  IFS=$as_save_IFS
7272  test -z "$as_dir" && as_dir=.
7273    for ac_exec_ext in '' $ac_executable_extensions; do
7274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7275    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7277    break 2
7278  fi
7279done
7280  done
7281IFS=$as_save_IFS
7282
7283  ;;
7284esac
7285fi
7286DIRNAME=$ac_cv_path_DIRNAME
7287if test -n "$DIRNAME"; then
7288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7289$as_echo "$DIRNAME" >&6; }
7290else
7291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7292$as_echo "no" >&6; }
7293fi
7294
7295
7296  test -n "$DIRNAME" && break
7297done
7298
7299    else
7300      # If it succeeded, then it was overridden by the user. We will use it
7301      # for the tool.
7302
7303      # First remove it from the list of overridden variables, so we can test
7304      # for unknown variables in the end.
7305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7306
7307      # Check if we try to supply an empty value
7308      if test "x$DIRNAME" = x; then
7309        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7310$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7312$as_echo_n "checking for DIRNAME... " >&6; }
7313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7314$as_echo "disabled" >&6; }
7315      else
7316        # Check if the provided tool contains a complete path.
7317        tool_specified="$DIRNAME"
7318        tool_basename="${tool_specified##*/}"
7319        if test "x$tool_basename" = "x$tool_specified"; then
7320          # A command without a complete path is provided, search $PATH.
7321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7322$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7323          # Extract the first word of "$tool_basename", so it can be a program name with args.
7324set dummy $tool_basename; ac_word=$2
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if ${ac_cv_path_DIRNAME+:} false; then :
7328  $as_echo_n "(cached) " >&6
7329else
7330  case $DIRNAME in
7331  [\\/]* | ?:[\\/]*)
7332  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7333  ;;
7334  *)
7335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336for as_dir in $PATH
7337do
7338  IFS=$as_save_IFS
7339  test -z "$as_dir" && as_dir=.
7340    for ac_exec_ext in '' $ac_executable_extensions; do
7341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7342    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7344    break 2
7345  fi
7346done
7347  done
7348IFS=$as_save_IFS
7349
7350  ;;
7351esac
7352fi
7353DIRNAME=$ac_cv_path_DIRNAME
7354if test -n "$DIRNAME"; then
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7356$as_echo "$DIRNAME" >&6; }
7357else
7358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359$as_echo "no" >&6; }
7360fi
7361
7362
7363          if test "x$DIRNAME" = x; then
7364            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7365          fi
7366        else
7367          # Otherwise we believe it is a complete path. Use it as it is.
7368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7369$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7370          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7371$as_echo_n "checking for DIRNAME... " >&6; }
7372          if test ! -x "$tool_specified"; then
7373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7374$as_echo "not found" >&6; }
7375            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7376          fi
7377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7378$as_echo "$tool_specified" >&6; }
7379        fi
7380      fi
7381    fi
7382
7383  fi
7384
7385
7386
7387  if test "x$DIRNAME" = x; then
7388    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7389  fi
7390
7391
7392
7393
7394
7395  # Publish this variable in the help.
7396
7397
7398  if [ -z "${ECHO+x}" ]; then
7399    # The variable is not set by user, try to locate tool using the code snippet
7400    for ac_prog in echo
7401do
7402  # Extract the first word of "$ac_prog", so it can be a program name with args.
7403set dummy $ac_prog; ac_word=$2
7404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7405$as_echo_n "checking for $ac_word... " >&6; }
7406if ${ac_cv_path_ECHO+:} false; then :
7407  $as_echo_n "(cached) " >&6
7408else
7409  case $ECHO in
7410  [\\/]* | ?:[\\/]*)
7411  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7412  ;;
7413  *)
7414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7415for as_dir in $PATH
7416do
7417  IFS=$as_save_IFS
7418  test -z "$as_dir" && as_dir=.
7419    for ac_exec_ext in '' $ac_executable_extensions; do
7420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7421    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7423    break 2
7424  fi
7425done
7426  done
7427IFS=$as_save_IFS
7428
7429  ;;
7430esac
7431fi
7432ECHO=$ac_cv_path_ECHO
7433if test -n "$ECHO"; then
7434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7435$as_echo "$ECHO" >&6; }
7436else
7437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438$as_echo "no" >&6; }
7439fi
7440
7441
7442  test -n "$ECHO" && break
7443done
7444
7445  else
7446    # The variable is set, but is it from the command line or the environment?
7447
7448    # Try to remove the string !ECHO! from our list.
7449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7451      # If it failed, the variable was not from the command line. Ignore it,
7452      # but warn the user (except for BASH, which is always set by the calling BASH).
7453      if test "xECHO" != xBASH; then
7454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7455$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7456      fi
7457      # Try to locate tool using the code snippet
7458      for ac_prog in echo
7459do
7460  # Extract the first word of "$ac_prog", so it can be a program name with args.
7461set dummy $ac_prog; ac_word=$2
7462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7463$as_echo_n "checking for $ac_word... " >&6; }
7464if ${ac_cv_path_ECHO+:} false; then :
7465  $as_echo_n "(cached) " >&6
7466else
7467  case $ECHO in
7468  [\\/]* | ?:[\\/]*)
7469  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7470  ;;
7471  *)
7472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473for as_dir in $PATH
7474do
7475  IFS=$as_save_IFS
7476  test -z "$as_dir" && as_dir=.
7477    for ac_exec_ext in '' $ac_executable_extensions; do
7478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7481    break 2
7482  fi
7483done
7484  done
7485IFS=$as_save_IFS
7486
7487  ;;
7488esac
7489fi
7490ECHO=$ac_cv_path_ECHO
7491if test -n "$ECHO"; then
7492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7493$as_echo "$ECHO" >&6; }
7494else
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496$as_echo "no" >&6; }
7497fi
7498
7499
7500  test -n "$ECHO" && break
7501done
7502
7503    else
7504      # If it succeeded, then it was overridden by the user. We will use it
7505      # for the tool.
7506
7507      # First remove it from the list of overridden variables, so we can test
7508      # for unknown variables in the end.
7509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7510
7511      # Check if we try to supply an empty value
7512      if test "x$ECHO" = x; then
7513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7514$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7516$as_echo_n "checking for ECHO... " >&6; }
7517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7518$as_echo "disabled" >&6; }
7519      else
7520        # Check if the provided tool contains a complete path.
7521        tool_specified="$ECHO"
7522        tool_basename="${tool_specified##*/}"
7523        if test "x$tool_basename" = "x$tool_specified"; then
7524          # A command without a complete path is provided, search $PATH.
7525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7526$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7527          # Extract the first word of "$tool_basename", so it can be a program name with args.
7528set dummy $tool_basename; ac_word=$2
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7530$as_echo_n "checking for $ac_word... " >&6; }
7531if ${ac_cv_path_ECHO+:} false; then :
7532  $as_echo_n "(cached) " >&6
7533else
7534  case $ECHO in
7535  [\\/]* | ?:[\\/]*)
7536  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7537  ;;
7538  *)
7539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540for as_dir in $PATH
7541do
7542  IFS=$as_save_IFS
7543  test -z "$as_dir" && as_dir=.
7544    for ac_exec_ext in '' $ac_executable_extensions; do
7545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7546    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7548    break 2
7549  fi
7550done
7551  done
7552IFS=$as_save_IFS
7553
7554  ;;
7555esac
7556fi
7557ECHO=$ac_cv_path_ECHO
7558if test -n "$ECHO"; then
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7560$as_echo "$ECHO" >&6; }
7561else
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563$as_echo "no" >&6; }
7564fi
7565
7566
7567          if test "x$ECHO" = x; then
7568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7569          fi
7570        else
7571          # Otherwise we believe it is a complete path. Use it as it is.
7572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7573$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7575$as_echo_n "checking for ECHO... " >&6; }
7576          if test ! -x "$tool_specified"; then
7577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7578$as_echo "not found" >&6; }
7579            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7580          fi
7581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7582$as_echo "$tool_specified" >&6; }
7583        fi
7584      fi
7585    fi
7586
7587  fi
7588
7589
7590
7591  if test "x$ECHO" = x; then
7592    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7593  fi
7594
7595
7596
7597
7598
7599  # Publish this variable in the help.
7600
7601
7602  if [ -z "${EXPR+x}" ]; then
7603    # The variable is not set by user, try to locate tool using the code snippet
7604    for ac_prog in expr
7605do
7606  # Extract the first word of "$ac_prog", so it can be a program name with args.
7607set dummy $ac_prog; ac_word=$2
7608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7609$as_echo_n "checking for $ac_word... " >&6; }
7610if ${ac_cv_path_EXPR+:} false; then :
7611  $as_echo_n "(cached) " >&6
7612else
7613  case $EXPR in
7614  [\\/]* | ?:[\\/]*)
7615  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7616  ;;
7617  *)
7618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7619for as_dir in $PATH
7620do
7621  IFS=$as_save_IFS
7622  test -z "$as_dir" && as_dir=.
7623    for ac_exec_ext in '' $ac_executable_extensions; do
7624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7625    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7627    break 2
7628  fi
7629done
7630  done
7631IFS=$as_save_IFS
7632
7633  ;;
7634esac
7635fi
7636EXPR=$ac_cv_path_EXPR
7637if test -n "$EXPR"; then
7638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7639$as_echo "$EXPR" >&6; }
7640else
7641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7642$as_echo "no" >&6; }
7643fi
7644
7645
7646  test -n "$EXPR" && break
7647done
7648
7649  else
7650    # The variable is set, but is it from the command line or the environment?
7651
7652    # Try to remove the string !EXPR! from our list.
7653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7655      # If it failed, the variable was not from the command line. Ignore it,
7656      # but warn the user (except for BASH, which is always set by the calling BASH).
7657      if test "xEXPR" != xBASH; then
7658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7659$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7660      fi
7661      # Try to locate tool using the code snippet
7662      for ac_prog in expr
7663do
7664  # Extract the first word of "$ac_prog", so it can be a program name with args.
7665set dummy $ac_prog; ac_word=$2
7666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7667$as_echo_n "checking for $ac_word... " >&6; }
7668if ${ac_cv_path_EXPR+:} false; then :
7669  $as_echo_n "(cached) " >&6
7670else
7671  case $EXPR in
7672  [\\/]* | ?:[\\/]*)
7673  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7674  ;;
7675  *)
7676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7677for as_dir in $PATH
7678do
7679  IFS=$as_save_IFS
7680  test -z "$as_dir" && as_dir=.
7681    for ac_exec_ext in '' $ac_executable_extensions; do
7682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7683    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7685    break 2
7686  fi
7687done
7688  done
7689IFS=$as_save_IFS
7690
7691  ;;
7692esac
7693fi
7694EXPR=$ac_cv_path_EXPR
7695if test -n "$EXPR"; then
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7697$as_echo "$EXPR" >&6; }
7698else
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7700$as_echo "no" >&6; }
7701fi
7702
7703
7704  test -n "$EXPR" && break
7705done
7706
7707    else
7708      # If it succeeded, then it was overridden by the user. We will use it
7709      # for the tool.
7710
7711      # First remove it from the list of overridden variables, so we can test
7712      # for unknown variables in the end.
7713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7714
7715      # Check if we try to supply an empty value
7716      if test "x$EXPR" = x; then
7717        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7718$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7720$as_echo_n "checking for EXPR... " >&6; }
7721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7722$as_echo "disabled" >&6; }
7723      else
7724        # Check if the provided tool contains a complete path.
7725        tool_specified="$EXPR"
7726        tool_basename="${tool_specified##*/}"
7727        if test "x$tool_basename" = "x$tool_specified"; then
7728          # A command without a complete path is provided, search $PATH.
7729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7730$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7731          # Extract the first word of "$tool_basename", so it can be a program name with args.
7732set dummy $tool_basename; ac_word=$2
7733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7734$as_echo_n "checking for $ac_word... " >&6; }
7735if ${ac_cv_path_EXPR+:} false; then :
7736  $as_echo_n "(cached) " >&6
7737else
7738  case $EXPR in
7739  [\\/]* | ?:[\\/]*)
7740  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7741  ;;
7742  *)
7743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7744for as_dir in $PATH
7745do
7746  IFS=$as_save_IFS
7747  test -z "$as_dir" && as_dir=.
7748    for ac_exec_ext in '' $ac_executable_extensions; do
7749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7750    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7752    break 2
7753  fi
7754done
7755  done
7756IFS=$as_save_IFS
7757
7758  ;;
7759esac
7760fi
7761EXPR=$ac_cv_path_EXPR
7762if test -n "$EXPR"; then
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7764$as_echo "$EXPR" >&6; }
7765else
7766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7767$as_echo "no" >&6; }
7768fi
7769
7770
7771          if test "x$EXPR" = x; then
7772            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7773          fi
7774        else
7775          # Otherwise we believe it is a complete path. Use it as it is.
7776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7777$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7779$as_echo_n "checking for EXPR... " >&6; }
7780          if test ! -x "$tool_specified"; then
7781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7782$as_echo "not found" >&6; }
7783            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7784          fi
7785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7786$as_echo "$tool_specified" >&6; }
7787        fi
7788      fi
7789    fi
7790
7791  fi
7792
7793
7794
7795  if test "x$EXPR" = x; then
7796    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7797  fi
7798
7799
7800
7801
7802
7803  # Publish this variable in the help.
7804
7805
7806  if [ -z "${FILE+x}" ]; then
7807    # The variable is not set by user, try to locate tool using the code snippet
7808    for ac_prog in file
7809do
7810  # Extract the first word of "$ac_prog", so it can be a program name with args.
7811set dummy $ac_prog; ac_word=$2
7812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7813$as_echo_n "checking for $ac_word... " >&6; }
7814if ${ac_cv_path_FILE+:} false; then :
7815  $as_echo_n "(cached) " >&6
7816else
7817  case $FILE in
7818  [\\/]* | ?:[\\/]*)
7819  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7820  ;;
7821  *)
7822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7823for as_dir in $PATH
7824do
7825  IFS=$as_save_IFS
7826  test -z "$as_dir" && as_dir=.
7827    for ac_exec_ext in '' $ac_executable_extensions; do
7828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7829    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7831    break 2
7832  fi
7833done
7834  done
7835IFS=$as_save_IFS
7836
7837  ;;
7838esac
7839fi
7840FILE=$ac_cv_path_FILE
7841if test -n "$FILE"; then
7842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7843$as_echo "$FILE" >&6; }
7844else
7845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7846$as_echo "no" >&6; }
7847fi
7848
7849
7850  test -n "$FILE" && break
7851done
7852
7853  else
7854    # The variable is set, but is it from the command line or the environment?
7855
7856    # Try to remove the string !FILE! from our list.
7857    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7858    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7859      # If it failed, the variable was not from the command line. Ignore it,
7860      # but warn the user (except for BASH, which is always set by the calling BASH).
7861      if test "xFILE" != xBASH; then
7862        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7863$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7864      fi
7865      # Try to locate tool using the code snippet
7866      for ac_prog in file
7867do
7868  # Extract the first word of "$ac_prog", so it can be a program name with args.
7869set dummy $ac_prog; ac_word=$2
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7871$as_echo_n "checking for $ac_word... " >&6; }
7872if ${ac_cv_path_FILE+:} false; then :
7873  $as_echo_n "(cached) " >&6
7874else
7875  case $FILE in
7876  [\\/]* | ?:[\\/]*)
7877  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7878  ;;
7879  *)
7880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7881for as_dir in $PATH
7882do
7883  IFS=$as_save_IFS
7884  test -z "$as_dir" && as_dir=.
7885    for ac_exec_ext in '' $ac_executable_extensions; do
7886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7887    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7889    break 2
7890  fi
7891done
7892  done
7893IFS=$as_save_IFS
7894
7895  ;;
7896esac
7897fi
7898FILE=$ac_cv_path_FILE
7899if test -n "$FILE"; then
7900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7901$as_echo "$FILE" >&6; }
7902else
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7904$as_echo "no" >&6; }
7905fi
7906
7907
7908  test -n "$FILE" && break
7909done
7910
7911    else
7912      # If it succeeded, then it was overridden by the user. We will use it
7913      # for the tool.
7914
7915      # First remove it from the list of overridden variables, so we can test
7916      # for unknown variables in the end.
7917      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7918
7919      # Check if we try to supply an empty value
7920      if test "x$FILE" = x; then
7921        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7922$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7924$as_echo_n "checking for FILE... " >&6; }
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7926$as_echo "disabled" >&6; }
7927      else
7928        # Check if the provided tool contains a complete path.
7929        tool_specified="$FILE"
7930        tool_basename="${tool_specified##*/}"
7931        if test "x$tool_basename" = "x$tool_specified"; then
7932          # A command without a complete path is provided, search $PATH.
7933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7934$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7935          # Extract the first word of "$tool_basename", so it can be a program name with args.
7936set dummy $tool_basename; ac_word=$2
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7938$as_echo_n "checking for $ac_word... " >&6; }
7939if ${ac_cv_path_FILE+:} false; then :
7940  $as_echo_n "(cached) " >&6
7941else
7942  case $FILE in
7943  [\\/]* | ?:[\\/]*)
7944  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7945  ;;
7946  *)
7947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7948for as_dir in $PATH
7949do
7950  IFS=$as_save_IFS
7951  test -z "$as_dir" && as_dir=.
7952    for ac_exec_ext in '' $ac_executable_extensions; do
7953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7954    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7956    break 2
7957  fi
7958done
7959  done
7960IFS=$as_save_IFS
7961
7962  ;;
7963esac
7964fi
7965FILE=$ac_cv_path_FILE
7966if test -n "$FILE"; then
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7968$as_echo "$FILE" >&6; }
7969else
7970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7971$as_echo "no" >&6; }
7972fi
7973
7974
7975          if test "x$FILE" = x; then
7976            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7977          fi
7978        else
7979          # Otherwise we believe it is a complete path. Use it as it is.
7980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7981$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7982          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7983$as_echo_n "checking for FILE... " >&6; }
7984          if test ! -x "$tool_specified"; then
7985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7986$as_echo "not found" >&6; }
7987            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7988          fi
7989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7990$as_echo "$tool_specified" >&6; }
7991        fi
7992      fi
7993    fi
7994
7995  fi
7996
7997
7998
7999  if test "x$FILE" = x; then
8000    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8001  fi
8002
8003
8004
8005
8006
8007  # Publish this variable in the help.
8008
8009
8010  if [ -z "${FIND+x}" ]; then
8011    # The variable is not set by user, try to locate tool using the code snippet
8012    for ac_prog in find
8013do
8014  # Extract the first word of "$ac_prog", so it can be a program name with args.
8015set dummy $ac_prog; ac_word=$2
8016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8017$as_echo_n "checking for $ac_word... " >&6; }
8018if ${ac_cv_path_FIND+:} false; then :
8019  $as_echo_n "(cached) " >&6
8020else
8021  case $FIND in
8022  [\\/]* | ?:[\\/]*)
8023  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8024  ;;
8025  *)
8026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8027for as_dir in $PATH
8028do
8029  IFS=$as_save_IFS
8030  test -z "$as_dir" && as_dir=.
8031    for ac_exec_ext in '' $ac_executable_extensions; do
8032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8033    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8035    break 2
8036  fi
8037done
8038  done
8039IFS=$as_save_IFS
8040
8041  ;;
8042esac
8043fi
8044FIND=$ac_cv_path_FIND
8045if test -n "$FIND"; then
8046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8047$as_echo "$FIND" >&6; }
8048else
8049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8050$as_echo "no" >&6; }
8051fi
8052
8053
8054  test -n "$FIND" && break
8055done
8056
8057  else
8058    # The variable is set, but is it from the command line or the environment?
8059
8060    # Try to remove the string !FIND! from our list.
8061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8063      # If it failed, the variable was not from the command line. Ignore it,
8064      # but warn the user (except for BASH, which is always set by the calling BASH).
8065      if test "xFIND" != xBASH; then
8066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8067$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8068      fi
8069      # Try to locate tool using the code snippet
8070      for ac_prog in find
8071do
8072  # Extract the first word of "$ac_prog", so it can be a program name with args.
8073set dummy $ac_prog; ac_word=$2
8074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8075$as_echo_n "checking for $ac_word... " >&6; }
8076if ${ac_cv_path_FIND+:} false; then :
8077  $as_echo_n "(cached) " >&6
8078else
8079  case $FIND in
8080  [\\/]* | ?:[\\/]*)
8081  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8082  ;;
8083  *)
8084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8085for as_dir in $PATH
8086do
8087  IFS=$as_save_IFS
8088  test -z "$as_dir" && as_dir=.
8089    for ac_exec_ext in '' $ac_executable_extensions; do
8090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8091    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8093    break 2
8094  fi
8095done
8096  done
8097IFS=$as_save_IFS
8098
8099  ;;
8100esac
8101fi
8102FIND=$ac_cv_path_FIND
8103if test -n "$FIND"; then
8104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8105$as_echo "$FIND" >&6; }
8106else
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8108$as_echo "no" >&6; }
8109fi
8110
8111
8112  test -n "$FIND" && break
8113done
8114
8115    else
8116      # If it succeeded, then it was overridden by the user. We will use it
8117      # for the tool.
8118
8119      # First remove it from the list of overridden variables, so we can test
8120      # for unknown variables in the end.
8121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8122
8123      # Check if we try to supply an empty value
8124      if test "x$FIND" = x; then
8125        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8126$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8127        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8128$as_echo_n "checking for FIND... " >&6; }
8129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8130$as_echo "disabled" >&6; }
8131      else
8132        # Check if the provided tool contains a complete path.
8133        tool_specified="$FIND"
8134        tool_basename="${tool_specified##*/}"
8135        if test "x$tool_basename" = "x$tool_specified"; then
8136          # A command without a complete path is provided, search $PATH.
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8138$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8139          # Extract the first word of "$tool_basename", so it can be a program name with args.
8140set dummy $tool_basename; ac_word=$2
8141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8142$as_echo_n "checking for $ac_word... " >&6; }
8143if ${ac_cv_path_FIND+:} false; then :
8144  $as_echo_n "(cached) " >&6
8145else
8146  case $FIND in
8147  [\\/]* | ?:[\\/]*)
8148  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8149  ;;
8150  *)
8151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8152for as_dir in $PATH
8153do
8154  IFS=$as_save_IFS
8155  test -z "$as_dir" && as_dir=.
8156    for ac_exec_ext in '' $ac_executable_extensions; do
8157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8158    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8160    break 2
8161  fi
8162done
8163  done
8164IFS=$as_save_IFS
8165
8166  ;;
8167esac
8168fi
8169FIND=$ac_cv_path_FIND
8170if test -n "$FIND"; then
8171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8172$as_echo "$FIND" >&6; }
8173else
8174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8175$as_echo "no" >&6; }
8176fi
8177
8178
8179          if test "x$FIND" = x; then
8180            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8181          fi
8182        else
8183          # Otherwise we believe it is a complete path. Use it as it is.
8184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8185$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8186          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8187$as_echo_n "checking for FIND... " >&6; }
8188          if test ! -x "$tool_specified"; then
8189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8190$as_echo "not found" >&6; }
8191            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8192          fi
8193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8194$as_echo "$tool_specified" >&6; }
8195        fi
8196      fi
8197    fi
8198
8199  fi
8200
8201
8202
8203  if test "x$FIND" = x; then
8204    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8205  fi
8206
8207
8208
8209
8210
8211  # Publish this variable in the help.
8212
8213
8214  if [ -z "${HEAD+x}" ]; then
8215    # The variable is not set by user, try to locate tool using the code snippet
8216    for ac_prog in head
8217do
8218  # Extract the first word of "$ac_prog", so it can be a program name with args.
8219set dummy $ac_prog; ac_word=$2
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8221$as_echo_n "checking for $ac_word... " >&6; }
8222if ${ac_cv_path_HEAD+:} false; then :
8223  $as_echo_n "(cached) " >&6
8224else
8225  case $HEAD in
8226  [\\/]* | ?:[\\/]*)
8227  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8228  ;;
8229  *)
8230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8231for as_dir in $PATH
8232do
8233  IFS=$as_save_IFS
8234  test -z "$as_dir" && as_dir=.
8235    for ac_exec_ext in '' $ac_executable_extensions; do
8236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8237    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8239    break 2
8240  fi
8241done
8242  done
8243IFS=$as_save_IFS
8244
8245  ;;
8246esac
8247fi
8248HEAD=$ac_cv_path_HEAD
8249if test -n "$HEAD"; then
8250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8251$as_echo "$HEAD" >&6; }
8252else
8253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8254$as_echo "no" >&6; }
8255fi
8256
8257
8258  test -n "$HEAD" && break
8259done
8260
8261  else
8262    # The variable is set, but is it from the command line or the environment?
8263
8264    # Try to remove the string !HEAD! from our list.
8265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8267      # If it failed, the variable was not from the command line. Ignore it,
8268      # but warn the user (except for BASH, which is always set by the calling BASH).
8269      if test "xHEAD" != xBASH; then
8270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8271$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8272      fi
8273      # Try to locate tool using the code snippet
8274      for ac_prog in head
8275do
8276  # Extract the first word of "$ac_prog", so it can be a program name with args.
8277set dummy $ac_prog; ac_word=$2
8278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8279$as_echo_n "checking for $ac_word... " >&6; }
8280if ${ac_cv_path_HEAD+:} false; then :
8281  $as_echo_n "(cached) " >&6
8282else
8283  case $HEAD in
8284  [\\/]* | ?:[\\/]*)
8285  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8286  ;;
8287  *)
8288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8289for as_dir in $PATH
8290do
8291  IFS=$as_save_IFS
8292  test -z "$as_dir" && as_dir=.
8293    for ac_exec_ext in '' $ac_executable_extensions; do
8294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8295    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8297    break 2
8298  fi
8299done
8300  done
8301IFS=$as_save_IFS
8302
8303  ;;
8304esac
8305fi
8306HEAD=$ac_cv_path_HEAD
8307if test -n "$HEAD"; then
8308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8309$as_echo "$HEAD" >&6; }
8310else
8311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8312$as_echo "no" >&6; }
8313fi
8314
8315
8316  test -n "$HEAD" && break
8317done
8318
8319    else
8320      # If it succeeded, then it was overridden by the user. We will use it
8321      # for the tool.
8322
8323      # First remove it from the list of overridden variables, so we can test
8324      # for unknown variables in the end.
8325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8326
8327      # Check if we try to supply an empty value
8328      if test "x$HEAD" = x; then
8329        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8330$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8331        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8332$as_echo_n "checking for HEAD... " >&6; }
8333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8334$as_echo "disabled" >&6; }
8335      else
8336        # Check if the provided tool contains a complete path.
8337        tool_specified="$HEAD"
8338        tool_basename="${tool_specified##*/}"
8339        if test "x$tool_basename" = "x$tool_specified"; then
8340          # A command without a complete path is provided, search $PATH.
8341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8342$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8343          # Extract the first word of "$tool_basename", so it can be a program name with args.
8344set dummy $tool_basename; ac_word=$2
8345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8346$as_echo_n "checking for $ac_word... " >&6; }
8347if ${ac_cv_path_HEAD+:} false; then :
8348  $as_echo_n "(cached) " >&6
8349else
8350  case $HEAD in
8351  [\\/]* | ?:[\\/]*)
8352  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8353  ;;
8354  *)
8355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8356for as_dir in $PATH
8357do
8358  IFS=$as_save_IFS
8359  test -z "$as_dir" && as_dir=.
8360    for ac_exec_ext in '' $ac_executable_extensions; do
8361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8362    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8364    break 2
8365  fi
8366done
8367  done
8368IFS=$as_save_IFS
8369
8370  ;;
8371esac
8372fi
8373HEAD=$ac_cv_path_HEAD
8374if test -n "$HEAD"; then
8375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8376$as_echo "$HEAD" >&6; }
8377else
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8379$as_echo "no" >&6; }
8380fi
8381
8382
8383          if test "x$HEAD" = x; then
8384            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8385          fi
8386        else
8387          # Otherwise we believe it is a complete path. Use it as it is.
8388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8389$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8390          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8391$as_echo_n "checking for HEAD... " >&6; }
8392          if test ! -x "$tool_specified"; then
8393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8394$as_echo "not found" >&6; }
8395            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8396          fi
8397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8398$as_echo "$tool_specified" >&6; }
8399        fi
8400      fi
8401    fi
8402
8403  fi
8404
8405
8406
8407  if test "x$HEAD" = x; then
8408    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8409  fi
8410
8411
8412
8413
8414
8415  # Publish this variable in the help.
8416
8417
8418  if [ -z "${GUNZIP+x}" ]; then
8419    # The variable is not set by user, try to locate tool using the code snippet
8420    for ac_prog in gunzip
8421do
8422  # Extract the first word of "$ac_prog", so it can be a program name with args.
8423set dummy $ac_prog; ac_word=$2
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8425$as_echo_n "checking for $ac_word... " >&6; }
8426if ${ac_cv_path_GUNZIP+:} false; then :
8427  $as_echo_n "(cached) " >&6
8428else
8429  case $GUNZIP in
8430  [\\/]* | ?:[\\/]*)
8431  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8432  ;;
8433  *)
8434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8435for as_dir in $PATH
8436do
8437  IFS=$as_save_IFS
8438  test -z "$as_dir" && as_dir=.
8439    for ac_exec_ext in '' $ac_executable_extensions; do
8440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8441    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8443    break 2
8444  fi
8445done
8446  done
8447IFS=$as_save_IFS
8448
8449  ;;
8450esac
8451fi
8452GUNZIP=$ac_cv_path_GUNZIP
8453if test -n "$GUNZIP"; then
8454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8455$as_echo "$GUNZIP" >&6; }
8456else
8457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8458$as_echo "no" >&6; }
8459fi
8460
8461
8462  test -n "$GUNZIP" && break
8463done
8464
8465  else
8466    # The variable is set, but is it from the command line or the environment?
8467
8468    # Try to remove the string !GUNZIP! from our list.
8469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8471      # If it failed, the variable was not from the command line. Ignore it,
8472      # but warn the user (except for BASH, which is always set by the calling BASH).
8473      if test "xGUNZIP" != xBASH; then
8474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8475$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8476      fi
8477      # Try to locate tool using the code snippet
8478      for ac_prog in gunzip
8479do
8480  # Extract the first word of "$ac_prog", so it can be a program name with args.
8481set dummy $ac_prog; ac_word=$2
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483$as_echo_n "checking for $ac_word... " >&6; }
8484if ${ac_cv_path_GUNZIP+:} false; then :
8485  $as_echo_n "(cached) " >&6
8486else
8487  case $GUNZIP in
8488  [\\/]* | ?:[\\/]*)
8489  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8490  ;;
8491  *)
8492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493for as_dir in $PATH
8494do
8495  IFS=$as_save_IFS
8496  test -z "$as_dir" && as_dir=.
8497    for ac_exec_ext in '' $ac_executable_extensions; do
8498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8499    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8501    break 2
8502  fi
8503done
8504  done
8505IFS=$as_save_IFS
8506
8507  ;;
8508esac
8509fi
8510GUNZIP=$ac_cv_path_GUNZIP
8511if test -n "$GUNZIP"; then
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8513$as_echo "$GUNZIP" >&6; }
8514else
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8516$as_echo "no" >&6; }
8517fi
8518
8519
8520  test -n "$GUNZIP" && break
8521done
8522
8523    else
8524      # If it succeeded, then it was overridden by the user. We will use it
8525      # for the tool.
8526
8527      # First remove it from the list of overridden variables, so we can test
8528      # for unknown variables in the end.
8529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8530
8531      # Check if we try to supply an empty value
8532      if test "x$GUNZIP" = x; then
8533        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8534$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8536$as_echo_n "checking for GUNZIP... " >&6; }
8537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8538$as_echo "disabled" >&6; }
8539      else
8540        # Check if the provided tool contains a complete path.
8541        tool_specified="$GUNZIP"
8542        tool_basename="${tool_specified##*/}"
8543        if test "x$tool_basename" = "x$tool_specified"; then
8544          # A command without a complete path is provided, search $PATH.
8545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8546$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8547          # Extract the first word of "$tool_basename", so it can be a program name with args.
8548set dummy $tool_basename; ac_word=$2
8549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8550$as_echo_n "checking for $ac_word... " >&6; }
8551if ${ac_cv_path_GUNZIP+:} false; then :
8552  $as_echo_n "(cached) " >&6
8553else
8554  case $GUNZIP in
8555  [\\/]* | ?:[\\/]*)
8556  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8557  ;;
8558  *)
8559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8560for as_dir in $PATH
8561do
8562  IFS=$as_save_IFS
8563  test -z "$as_dir" && as_dir=.
8564    for ac_exec_ext in '' $ac_executable_extensions; do
8565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8566    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8568    break 2
8569  fi
8570done
8571  done
8572IFS=$as_save_IFS
8573
8574  ;;
8575esac
8576fi
8577GUNZIP=$ac_cv_path_GUNZIP
8578if test -n "$GUNZIP"; then
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8580$as_echo "$GUNZIP" >&6; }
8581else
8582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8583$as_echo "no" >&6; }
8584fi
8585
8586
8587          if test "x$GUNZIP" = x; then
8588            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8589          fi
8590        else
8591          # Otherwise we believe it is a complete path. Use it as it is.
8592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8593$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8594          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8595$as_echo_n "checking for GUNZIP... " >&6; }
8596          if test ! -x "$tool_specified"; then
8597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8598$as_echo "not found" >&6; }
8599            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8600          fi
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8602$as_echo "$tool_specified" >&6; }
8603        fi
8604      fi
8605    fi
8606
8607  fi
8608
8609
8610
8611  if test "x$GUNZIP" = x; then
8612    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8613  fi
8614
8615
8616
8617
8618
8619  # Publish this variable in the help.
8620
8621
8622  if [ -z "${GZIP+x}" ]; then
8623    # The variable is not set by user, try to locate tool using the code snippet
8624    for ac_prog in pigz gzip
8625do
8626  # Extract the first word of "$ac_prog", so it can be a program name with args.
8627set dummy $ac_prog; ac_word=$2
8628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8629$as_echo_n "checking for $ac_word... " >&6; }
8630if ${ac_cv_path_GZIP+:} false; then :
8631  $as_echo_n "(cached) " >&6
8632else
8633  case $GZIP in
8634  [\\/]* | ?:[\\/]*)
8635  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8636  ;;
8637  *)
8638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8639for as_dir in $PATH
8640do
8641  IFS=$as_save_IFS
8642  test -z "$as_dir" && as_dir=.
8643    for ac_exec_ext in '' $ac_executable_extensions; do
8644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8645    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8647    break 2
8648  fi
8649done
8650  done
8651IFS=$as_save_IFS
8652
8653  ;;
8654esac
8655fi
8656GZIP=$ac_cv_path_GZIP
8657if test -n "$GZIP"; then
8658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8659$as_echo "$GZIP" >&6; }
8660else
8661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662$as_echo "no" >&6; }
8663fi
8664
8665
8666  test -n "$GZIP" && break
8667done
8668
8669  else
8670    # The variable is set, but is it from the command line or the environment?
8671
8672    # Try to remove the string !GZIP! from our list.
8673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8675      # If it failed, the variable was not from the command line. Ignore it,
8676      # but warn the user (except for BASH, which is always set by the calling BASH).
8677      if test "xGZIP" != xBASH; then
8678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8679$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8680      fi
8681      # Try to locate tool using the code snippet
8682      for ac_prog in pigz gzip
8683do
8684  # Extract the first word of "$ac_prog", so it can be a program name with args.
8685set dummy $ac_prog; ac_word=$2
8686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8687$as_echo_n "checking for $ac_word... " >&6; }
8688if ${ac_cv_path_GZIP+:} false; then :
8689  $as_echo_n "(cached) " >&6
8690else
8691  case $GZIP in
8692  [\\/]* | ?:[\\/]*)
8693  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8694  ;;
8695  *)
8696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8697for as_dir in $PATH
8698do
8699  IFS=$as_save_IFS
8700  test -z "$as_dir" && as_dir=.
8701    for ac_exec_ext in '' $ac_executable_extensions; do
8702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8703    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8705    break 2
8706  fi
8707done
8708  done
8709IFS=$as_save_IFS
8710
8711  ;;
8712esac
8713fi
8714GZIP=$ac_cv_path_GZIP
8715if test -n "$GZIP"; then
8716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8717$as_echo "$GZIP" >&6; }
8718else
8719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8720$as_echo "no" >&6; }
8721fi
8722
8723
8724  test -n "$GZIP" && break
8725done
8726
8727    else
8728      # If it succeeded, then it was overridden by the user. We will use it
8729      # for the tool.
8730
8731      # First remove it from the list of overridden variables, so we can test
8732      # for unknown variables in the end.
8733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8734
8735      # Check if we try to supply an empty value
8736      if test "x$GZIP" = x; then
8737        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8738$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8740$as_echo_n "checking for GZIP... " >&6; }
8741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8742$as_echo "disabled" >&6; }
8743      else
8744        # Check if the provided tool contains a complete path.
8745        tool_specified="$GZIP"
8746        tool_basename="${tool_specified##*/}"
8747        if test "x$tool_basename" = "x$tool_specified"; then
8748          # A command without a complete path is provided, search $PATH.
8749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8750$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8751          # Extract the first word of "$tool_basename", so it can be a program name with args.
8752set dummy $tool_basename; ac_word=$2
8753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8754$as_echo_n "checking for $ac_word... " >&6; }
8755if ${ac_cv_path_GZIP+:} false; then :
8756  $as_echo_n "(cached) " >&6
8757else
8758  case $GZIP in
8759  [\\/]* | ?:[\\/]*)
8760  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8761  ;;
8762  *)
8763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8764for as_dir in $PATH
8765do
8766  IFS=$as_save_IFS
8767  test -z "$as_dir" && as_dir=.
8768    for ac_exec_ext in '' $ac_executable_extensions; do
8769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8770    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8772    break 2
8773  fi
8774done
8775  done
8776IFS=$as_save_IFS
8777
8778  ;;
8779esac
8780fi
8781GZIP=$ac_cv_path_GZIP
8782if test -n "$GZIP"; then
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8784$as_echo "$GZIP" >&6; }
8785else
8786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8787$as_echo "no" >&6; }
8788fi
8789
8790
8791          if test "x$GZIP" = x; then
8792            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8793          fi
8794        else
8795          # Otherwise we believe it is a complete path. Use it as it is.
8796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8797$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8798          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8799$as_echo_n "checking for GZIP... " >&6; }
8800          if test ! -x "$tool_specified"; then
8801            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8802$as_echo "not found" >&6; }
8803            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8804          fi
8805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8806$as_echo "$tool_specified" >&6; }
8807        fi
8808      fi
8809    fi
8810
8811  fi
8812
8813
8814
8815  if test "x$GZIP" = x; then
8816    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8817  fi
8818
8819
8820
8821
8822
8823  # Publish this variable in the help.
8824
8825
8826  if [ -z "${LN+x}" ]; then
8827    # The variable is not set by user, try to locate tool using the code snippet
8828    for ac_prog in ln
8829do
8830  # Extract the first word of "$ac_prog", so it can be a program name with args.
8831set dummy $ac_prog; ac_word=$2
8832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8833$as_echo_n "checking for $ac_word... " >&6; }
8834if ${ac_cv_path_LN+:} false; then :
8835  $as_echo_n "(cached) " >&6
8836else
8837  case $LN in
8838  [\\/]* | ?:[\\/]*)
8839  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8840  ;;
8841  *)
8842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843for as_dir in $PATH
8844do
8845  IFS=$as_save_IFS
8846  test -z "$as_dir" && as_dir=.
8847    for ac_exec_ext in '' $ac_executable_extensions; do
8848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8849    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8851    break 2
8852  fi
8853done
8854  done
8855IFS=$as_save_IFS
8856
8857  ;;
8858esac
8859fi
8860LN=$ac_cv_path_LN
8861if test -n "$LN"; then
8862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8863$as_echo "$LN" >&6; }
8864else
8865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8866$as_echo "no" >&6; }
8867fi
8868
8869
8870  test -n "$LN" && break
8871done
8872
8873  else
8874    # The variable is set, but is it from the command line or the environment?
8875
8876    # Try to remove the string !LN! from our list.
8877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8879      # If it failed, the variable was not from the command line. Ignore it,
8880      # but warn the user (except for BASH, which is always set by the calling BASH).
8881      if test "xLN" != xBASH; then
8882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8883$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8884      fi
8885      # Try to locate tool using the code snippet
8886      for ac_prog in ln
8887do
8888  # Extract the first word of "$ac_prog", so it can be a program name with args.
8889set dummy $ac_prog; ac_word=$2
8890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8891$as_echo_n "checking for $ac_word... " >&6; }
8892if ${ac_cv_path_LN+:} false; then :
8893  $as_echo_n "(cached) " >&6
8894else
8895  case $LN in
8896  [\\/]* | ?:[\\/]*)
8897  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8898  ;;
8899  *)
8900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8901for as_dir in $PATH
8902do
8903  IFS=$as_save_IFS
8904  test -z "$as_dir" && as_dir=.
8905    for ac_exec_ext in '' $ac_executable_extensions; do
8906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8907    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8909    break 2
8910  fi
8911done
8912  done
8913IFS=$as_save_IFS
8914
8915  ;;
8916esac
8917fi
8918LN=$ac_cv_path_LN
8919if test -n "$LN"; then
8920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8921$as_echo "$LN" >&6; }
8922else
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8924$as_echo "no" >&6; }
8925fi
8926
8927
8928  test -n "$LN" && break
8929done
8930
8931    else
8932      # If it succeeded, then it was overridden by the user. We will use it
8933      # for the tool.
8934
8935      # First remove it from the list of overridden variables, so we can test
8936      # for unknown variables in the end.
8937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8938
8939      # Check if we try to supply an empty value
8940      if test "x$LN" = x; then
8941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8942$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8944$as_echo_n "checking for LN... " >&6; }
8945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8946$as_echo "disabled" >&6; }
8947      else
8948        # Check if the provided tool contains a complete path.
8949        tool_specified="$LN"
8950        tool_basename="${tool_specified##*/}"
8951        if test "x$tool_basename" = "x$tool_specified"; then
8952          # A command without a complete path is provided, search $PATH.
8953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8954$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8955          # Extract the first word of "$tool_basename", so it can be a program name with args.
8956set dummy $tool_basename; ac_word=$2
8957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8958$as_echo_n "checking for $ac_word... " >&6; }
8959if ${ac_cv_path_LN+:} false; then :
8960  $as_echo_n "(cached) " >&6
8961else
8962  case $LN in
8963  [\\/]* | ?:[\\/]*)
8964  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8965  ;;
8966  *)
8967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8968for as_dir in $PATH
8969do
8970  IFS=$as_save_IFS
8971  test -z "$as_dir" && as_dir=.
8972    for ac_exec_ext in '' $ac_executable_extensions; do
8973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8974    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8976    break 2
8977  fi
8978done
8979  done
8980IFS=$as_save_IFS
8981
8982  ;;
8983esac
8984fi
8985LN=$ac_cv_path_LN
8986if test -n "$LN"; then
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8988$as_echo "$LN" >&6; }
8989else
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
8992fi
8993
8994
8995          if test "x$LN" = x; then
8996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8997          fi
8998        else
8999          # Otherwise we believe it is a complete path. Use it as it is.
9000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9001$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9003$as_echo_n "checking for LN... " >&6; }
9004          if test ! -x "$tool_specified"; then
9005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9006$as_echo "not found" >&6; }
9007            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9008          fi
9009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9010$as_echo "$tool_specified" >&6; }
9011        fi
9012      fi
9013    fi
9014
9015  fi
9016
9017
9018
9019  if test "x$LN" = x; then
9020    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9021  fi
9022
9023
9024
9025
9026
9027  # Publish this variable in the help.
9028
9029
9030  if [ -z "${LS+x}" ]; then
9031    # The variable is not set by user, try to locate tool using the code snippet
9032    for ac_prog in ls
9033do
9034  # Extract the first word of "$ac_prog", so it can be a program name with args.
9035set dummy $ac_prog; ac_word=$2
9036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9037$as_echo_n "checking for $ac_word... " >&6; }
9038if ${ac_cv_path_LS+:} false; then :
9039  $as_echo_n "(cached) " >&6
9040else
9041  case $LS in
9042  [\\/]* | ?:[\\/]*)
9043  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9044  ;;
9045  *)
9046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9047for as_dir in $PATH
9048do
9049  IFS=$as_save_IFS
9050  test -z "$as_dir" && as_dir=.
9051    for ac_exec_ext in '' $ac_executable_extensions; do
9052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9053    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9055    break 2
9056  fi
9057done
9058  done
9059IFS=$as_save_IFS
9060
9061  ;;
9062esac
9063fi
9064LS=$ac_cv_path_LS
9065if test -n "$LS"; then
9066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9067$as_echo "$LS" >&6; }
9068else
9069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9070$as_echo "no" >&6; }
9071fi
9072
9073
9074  test -n "$LS" && break
9075done
9076
9077  else
9078    # The variable is set, but is it from the command line or the environment?
9079
9080    # Try to remove the string !LS! from our list.
9081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9083      # If it failed, the variable was not from the command line. Ignore it,
9084      # but warn the user (except for BASH, which is always set by the calling BASH).
9085      if test "xLS" != xBASH; then
9086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9087$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9088      fi
9089      # Try to locate tool using the code snippet
9090      for ac_prog in ls
9091do
9092  # Extract the first word of "$ac_prog", so it can be a program name with args.
9093set dummy $ac_prog; ac_word=$2
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9095$as_echo_n "checking for $ac_word... " >&6; }
9096if ${ac_cv_path_LS+:} false; then :
9097  $as_echo_n "(cached) " >&6
9098else
9099  case $LS in
9100  [\\/]* | ?:[\\/]*)
9101  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9102  ;;
9103  *)
9104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9105for as_dir in $PATH
9106do
9107  IFS=$as_save_IFS
9108  test -z "$as_dir" && as_dir=.
9109    for ac_exec_ext in '' $ac_executable_extensions; do
9110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9111    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9113    break 2
9114  fi
9115done
9116  done
9117IFS=$as_save_IFS
9118
9119  ;;
9120esac
9121fi
9122LS=$ac_cv_path_LS
9123if test -n "$LS"; then
9124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9125$as_echo "$LS" >&6; }
9126else
9127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128$as_echo "no" >&6; }
9129fi
9130
9131
9132  test -n "$LS" && break
9133done
9134
9135    else
9136      # If it succeeded, then it was overridden by the user. We will use it
9137      # for the tool.
9138
9139      # First remove it from the list of overridden variables, so we can test
9140      # for unknown variables in the end.
9141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9142
9143      # Check if we try to supply an empty value
9144      if test "x$LS" = x; then
9145        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9146$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9148$as_echo_n "checking for LS... " >&6; }
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9150$as_echo "disabled" >&6; }
9151      else
9152        # Check if the provided tool contains a complete path.
9153        tool_specified="$LS"
9154        tool_basename="${tool_specified##*/}"
9155        if test "x$tool_basename" = "x$tool_specified"; then
9156          # A command without a complete path is provided, search $PATH.
9157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9158$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9159          # Extract the first word of "$tool_basename", so it can be a program name with args.
9160set dummy $tool_basename; ac_word=$2
9161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9162$as_echo_n "checking for $ac_word... " >&6; }
9163if ${ac_cv_path_LS+:} false; then :
9164  $as_echo_n "(cached) " >&6
9165else
9166  case $LS in
9167  [\\/]* | ?:[\\/]*)
9168  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9169  ;;
9170  *)
9171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9172for as_dir in $PATH
9173do
9174  IFS=$as_save_IFS
9175  test -z "$as_dir" && as_dir=.
9176    for ac_exec_ext in '' $ac_executable_extensions; do
9177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9178    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9180    break 2
9181  fi
9182done
9183  done
9184IFS=$as_save_IFS
9185
9186  ;;
9187esac
9188fi
9189LS=$ac_cv_path_LS
9190if test -n "$LS"; then
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9192$as_echo "$LS" >&6; }
9193else
9194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9195$as_echo "no" >&6; }
9196fi
9197
9198
9199          if test "x$LS" = x; then
9200            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9201          fi
9202        else
9203          # Otherwise we believe it is a complete path. Use it as it is.
9204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9205$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9206          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9207$as_echo_n "checking for LS... " >&6; }
9208          if test ! -x "$tool_specified"; then
9209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9210$as_echo "not found" >&6; }
9211            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9212          fi
9213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9214$as_echo "$tool_specified" >&6; }
9215        fi
9216      fi
9217    fi
9218
9219  fi
9220
9221
9222
9223  if test "x$LS" = x; then
9224    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9225  fi
9226
9227
9228
9229
9230
9231  # Publish this variable in the help.
9232
9233
9234  if [ -z "${MKDIR+x}" ]; then
9235    # The variable is not set by user, try to locate tool using the code snippet
9236    for ac_prog in mkdir
9237do
9238  # Extract the first word of "$ac_prog", so it can be a program name with args.
9239set dummy $ac_prog; ac_word=$2
9240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9241$as_echo_n "checking for $ac_word... " >&6; }
9242if ${ac_cv_path_MKDIR+:} false; then :
9243  $as_echo_n "(cached) " >&6
9244else
9245  case $MKDIR in
9246  [\\/]* | ?:[\\/]*)
9247  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9248  ;;
9249  *)
9250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9251for as_dir in $PATH
9252do
9253  IFS=$as_save_IFS
9254  test -z "$as_dir" && as_dir=.
9255    for ac_exec_ext in '' $ac_executable_extensions; do
9256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9257    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9259    break 2
9260  fi
9261done
9262  done
9263IFS=$as_save_IFS
9264
9265  ;;
9266esac
9267fi
9268MKDIR=$ac_cv_path_MKDIR
9269if test -n "$MKDIR"; then
9270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9271$as_echo "$MKDIR" >&6; }
9272else
9273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
9275fi
9276
9277
9278  test -n "$MKDIR" && break
9279done
9280
9281  else
9282    # The variable is set, but is it from the command line or the environment?
9283
9284    # Try to remove the string !MKDIR! from our list.
9285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9287      # If it failed, the variable was not from the command line. Ignore it,
9288      # but warn the user (except for BASH, which is always set by the calling BASH).
9289      if test "xMKDIR" != xBASH; then
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9291$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9292      fi
9293      # Try to locate tool using the code snippet
9294      for ac_prog in mkdir
9295do
9296  # Extract the first word of "$ac_prog", so it can be a program name with args.
9297set dummy $ac_prog; ac_word=$2
9298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9299$as_echo_n "checking for $ac_word... " >&6; }
9300if ${ac_cv_path_MKDIR+:} false; then :
9301  $as_echo_n "(cached) " >&6
9302else
9303  case $MKDIR in
9304  [\\/]* | ?:[\\/]*)
9305  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9306  ;;
9307  *)
9308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9309for as_dir in $PATH
9310do
9311  IFS=$as_save_IFS
9312  test -z "$as_dir" && as_dir=.
9313    for ac_exec_ext in '' $ac_executable_extensions; do
9314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9315    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9317    break 2
9318  fi
9319done
9320  done
9321IFS=$as_save_IFS
9322
9323  ;;
9324esac
9325fi
9326MKDIR=$ac_cv_path_MKDIR
9327if test -n "$MKDIR"; then
9328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9329$as_echo "$MKDIR" >&6; }
9330else
9331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9332$as_echo "no" >&6; }
9333fi
9334
9335
9336  test -n "$MKDIR" && break
9337done
9338
9339    else
9340      # If it succeeded, then it was overridden by the user. We will use it
9341      # for the tool.
9342
9343      # First remove it from the list of overridden variables, so we can test
9344      # for unknown variables in the end.
9345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9346
9347      # Check if we try to supply an empty value
9348      if test "x$MKDIR" = x; then
9349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9350$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9352$as_echo_n "checking for MKDIR... " >&6; }
9353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9354$as_echo "disabled" >&6; }
9355      else
9356        # Check if the provided tool contains a complete path.
9357        tool_specified="$MKDIR"
9358        tool_basename="${tool_specified##*/}"
9359        if test "x$tool_basename" = "x$tool_specified"; then
9360          # A command without a complete path is provided, search $PATH.
9361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9362$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9363          # Extract the first word of "$tool_basename", so it can be a program name with args.
9364set dummy $tool_basename; ac_word=$2
9365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9366$as_echo_n "checking for $ac_word... " >&6; }
9367if ${ac_cv_path_MKDIR+:} false; then :
9368  $as_echo_n "(cached) " >&6
9369else
9370  case $MKDIR in
9371  [\\/]* | ?:[\\/]*)
9372  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9373  ;;
9374  *)
9375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9376for as_dir in $PATH
9377do
9378  IFS=$as_save_IFS
9379  test -z "$as_dir" && as_dir=.
9380    for ac_exec_ext in '' $ac_executable_extensions; do
9381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9382    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9384    break 2
9385  fi
9386done
9387  done
9388IFS=$as_save_IFS
9389
9390  ;;
9391esac
9392fi
9393MKDIR=$ac_cv_path_MKDIR
9394if test -n "$MKDIR"; then
9395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9396$as_echo "$MKDIR" >&6; }
9397else
9398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9399$as_echo "no" >&6; }
9400fi
9401
9402
9403          if test "x$MKDIR" = x; then
9404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9405          fi
9406        else
9407          # Otherwise we believe it is a complete path. Use it as it is.
9408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9409$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9411$as_echo_n "checking for MKDIR... " >&6; }
9412          if test ! -x "$tool_specified"; then
9413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9414$as_echo "not found" >&6; }
9415            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9416          fi
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9418$as_echo "$tool_specified" >&6; }
9419        fi
9420      fi
9421    fi
9422
9423  fi
9424
9425
9426
9427  if test "x$MKDIR" = x; then
9428    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9429  fi
9430
9431
9432
9433
9434
9435  # Publish this variable in the help.
9436
9437
9438  if [ -z "${MKTEMP+x}" ]; then
9439    # The variable is not set by user, try to locate tool using the code snippet
9440    for ac_prog in mktemp
9441do
9442  # Extract the first word of "$ac_prog", so it can be a program name with args.
9443set dummy $ac_prog; ac_word=$2
9444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9445$as_echo_n "checking for $ac_word... " >&6; }
9446if ${ac_cv_path_MKTEMP+:} false; then :
9447  $as_echo_n "(cached) " >&6
9448else
9449  case $MKTEMP in
9450  [\\/]* | ?:[\\/]*)
9451  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9452  ;;
9453  *)
9454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9455for as_dir in $PATH
9456do
9457  IFS=$as_save_IFS
9458  test -z "$as_dir" && as_dir=.
9459    for ac_exec_ext in '' $ac_executable_extensions; do
9460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9461    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9463    break 2
9464  fi
9465done
9466  done
9467IFS=$as_save_IFS
9468
9469  ;;
9470esac
9471fi
9472MKTEMP=$ac_cv_path_MKTEMP
9473if test -n "$MKTEMP"; then
9474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9475$as_echo "$MKTEMP" >&6; }
9476else
9477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
9479fi
9480
9481
9482  test -n "$MKTEMP" && break
9483done
9484
9485  else
9486    # The variable is set, but is it from the command line or the environment?
9487
9488    # Try to remove the string !MKTEMP! from our list.
9489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9491      # If it failed, the variable was not from the command line. Ignore it,
9492      # but warn the user (except for BASH, which is always set by the calling BASH).
9493      if test "xMKTEMP" != xBASH; then
9494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9495$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9496      fi
9497      # Try to locate tool using the code snippet
9498      for ac_prog in mktemp
9499do
9500  # Extract the first word of "$ac_prog", so it can be a program name with args.
9501set dummy $ac_prog; ac_word=$2
9502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9503$as_echo_n "checking for $ac_word... " >&6; }
9504if ${ac_cv_path_MKTEMP+:} false; then :
9505  $as_echo_n "(cached) " >&6
9506else
9507  case $MKTEMP in
9508  [\\/]* | ?:[\\/]*)
9509  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9510  ;;
9511  *)
9512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9513for as_dir in $PATH
9514do
9515  IFS=$as_save_IFS
9516  test -z "$as_dir" && as_dir=.
9517    for ac_exec_ext in '' $ac_executable_extensions; do
9518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9519    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9521    break 2
9522  fi
9523done
9524  done
9525IFS=$as_save_IFS
9526
9527  ;;
9528esac
9529fi
9530MKTEMP=$ac_cv_path_MKTEMP
9531if test -n "$MKTEMP"; then
9532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9533$as_echo "$MKTEMP" >&6; }
9534else
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
9537fi
9538
9539
9540  test -n "$MKTEMP" && break
9541done
9542
9543    else
9544      # If it succeeded, then it was overridden by the user. We will use it
9545      # for the tool.
9546
9547      # First remove it from the list of overridden variables, so we can test
9548      # for unknown variables in the end.
9549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9550
9551      # Check if we try to supply an empty value
9552      if test "x$MKTEMP" = x; then
9553        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9554$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9556$as_echo_n "checking for MKTEMP... " >&6; }
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9558$as_echo "disabled" >&6; }
9559      else
9560        # Check if the provided tool contains a complete path.
9561        tool_specified="$MKTEMP"
9562        tool_basename="${tool_specified##*/}"
9563        if test "x$tool_basename" = "x$tool_specified"; then
9564          # A command without a complete path is provided, search $PATH.
9565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9566$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9567          # Extract the first word of "$tool_basename", so it can be a program name with args.
9568set dummy $tool_basename; ac_word=$2
9569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9570$as_echo_n "checking for $ac_word... " >&6; }
9571if ${ac_cv_path_MKTEMP+:} false; then :
9572  $as_echo_n "(cached) " >&6
9573else
9574  case $MKTEMP in
9575  [\\/]* | ?:[\\/]*)
9576  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9577  ;;
9578  *)
9579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9580for as_dir in $PATH
9581do
9582  IFS=$as_save_IFS
9583  test -z "$as_dir" && as_dir=.
9584    for ac_exec_ext in '' $ac_executable_extensions; do
9585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9586    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9588    break 2
9589  fi
9590done
9591  done
9592IFS=$as_save_IFS
9593
9594  ;;
9595esac
9596fi
9597MKTEMP=$ac_cv_path_MKTEMP
9598if test -n "$MKTEMP"; then
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9600$as_echo "$MKTEMP" >&6; }
9601else
9602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
9604fi
9605
9606
9607          if test "x$MKTEMP" = x; then
9608            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9609          fi
9610        else
9611          # Otherwise we believe it is a complete path. Use it as it is.
9612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9613$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9615$as_echo_n "checking for MKTEMP... " >&6; }
9616          if test ! -x "$tool_specified"; then
9617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9618$as_echo "not found" >&6; }
9619            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9620          fi
9621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9622$as_echo "$tool_specified" >&6; }
9623        fi
9624      fi
9625    fi
9626
9627  fi
9628
9629
9630
9631  if test "x$MKTEMP" = x; then
9632    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9633  fi
9634
9635
9636
9637
9638
9639  # Publish this variable in the help.
9640
9641
9642  if [ -z "${MV+x}" ]; then
9643    # The variable is not set by user, try to locate tool using the code snippet
9644    for ac_prog in mv
9645do
9646  # Extract the first word of "$ac_prog", so it can be a program name with args.
9647set dummy $ac_prog; ac_word=$2
9648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9649$as_echo_n "checking for $ac_word... " >&6; }
9650if ${ac_cv_path_MV+:} false; then :
9651  $as_echo_n "(cached) " >&6
9652else
9653  case $MV in
9654  [\\/]* | ?:[\\/]*)
9655  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9656  ;;
9657  *)
9658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9659for as_dir in $PATH
9660do
9661  IFS=$as_save_IFS
9662  test -z "$as_dir" && as_dir=.
9663    for ac_exec_ext in '' $ac_executable_extensions; do
9664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9665    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9667    break 2
9668  fi
9669done
9670  done
9671IFS=$as_save_IFS
9672
9673  ;;
9674esac
9675fi
9676MV=$ac_cv_path_MV
9677if test -n "$MV"; then
9678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9679$as_echo "$MV" >&6; }
9680else
9681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9682$as_echo "no" >&6; }
9683fi
9684
9685
9686  test -n "$MV" && break
9687done
9688
9689  else
9690    # The variable is set, but is it from the command line or the environment?
9691
9692    # Try to remove the string !MV! from our list.
9693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9695      # If it failed, the variable was not from the command line. Ignore it,
9696      # but warn the user (except for BASH, which is always set by the calling BASH).
9697      if test "xMV" != xBASH; then
9698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9699$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9700      fi
9701      # Try to locate tool using the code snippet
9702      for ac_prog in mv
9703do
9704  # Extract the first word of "$ac_prog", so it can be a program name with args.
9705set dummy $ac_prog; ac_word=$2
9706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9707$as_echo_n "checking for $ac_word... " >&6; }
9708if ${ac_cv_path_MV+:} false; then :
9709  $as_echo_n "(cached) " >&6
9710else
9711  case $MV in
9712  [\\/]* | ?:[\\/]*)
9713  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9714  ;;
9715  *)
9716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9717for as_dir in $PATH
9718do
9719  IFS=$as_save_IFS
9720  test -z "$as_dir" && as_dir=.
9721    for ac_exec_ext in '' $ac_executable_extensions; do
9722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9723    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9725    break 2
9726  fi
9727done
9728  done
9729IFS=$as_save_IFS
9730
9731  ;;
9732esac
9733fi
9734MV=$ac_cv_path_MV
9735if test -n "$MV"; then
9736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9737$as_echo "$MV" >&6; }
9738else
9739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
9741fi
9742
9743
9744  test -n "$MV" && break
9745done
9746
9747    else
9748      # If it succeeded, then it was overridden by the user. We will use it
9749      # for the tool.
9750
9751      # First remove it from the list of overridden variables, so we can test
9752      # for unknown variables in the end.
9753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9754
9755      # Check if we try to supply an empty value
9756      if test "x$MV" = x; then
9757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9758$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9760$as_echo_n "checking for MV... " >&6; }
9761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9762$as_echo "disabled" >&6; }
9763      else
9764        # Check if the provided tool contains a complete path.
9765        tool_specified="$MV"
9766        tool_basename="${tool_specified##*/}"
9767        if test "x$tool_basename" = "x$tool_specified"; then
9768          # A command without a complete path is provided, search $PATH.
9769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9770$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9771          # Extract the first word of "$tool_basename", so it can be a program name with args.
9772set dummy $tool_basename; ac_word=$2
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774$as_echo_n "checking for $ac_word... " >&6; }
9775if ${ac_cv_path_MV+:} false; then :
9776  $as_echo_n "(cached) " >&6
9777else
9778  case $MV in
9779  [\\/]* | ?:[\\/]*)
9780  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9781  ;;
9782  *)
9783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786  IFS=$as_save_IFS
9787  test -z "$as_dir" && as_dir=.
9788    for ac_exec_ext in '' $ac_executable_extensions; do
9789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792    break 2
9793  fi
9794done
9795  done
9796IFS=$as_save_IFS
9797
9798  ;;
9799esac
9800fi
9801MV=$ac_cv_path_MV
9802if test -n "$MV"; then
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9804$as_echo "$MV" >&6; }
9805else
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
9811          if test "x$MV" = x; then
9812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9813          fi
9814        else
9815          # Otherwise we believe it is a complete path. Use it as it is.
9816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9817$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9819$as_echo_n "checking for MV... " >&6; }
9820          if test ! -x "$tool_specified"; then
9821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9822$as_echo "not found" >&6; }
9823            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9824          fi
9825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9826$as_echo "$tool_specified" >&6; }
9827        fi
9828      fi
9829    fi
9830
9831  fi
9832
9833
9834
9835  if test "x$MV" = x; then
9836    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9837  fi
9838
9839
9840
9841
9842
9843  # Publish this variable in the help.
9844
9845
9846  if [ -z "${NAWK+x}" ]; then
9847    # The variable is not set by user, try to locate tool using the code snippet
9848    for ac_prog in nawk gawk awk
9849do
9850  # Extract the first word of "$ac_prog", so it can be a program name with args.
9851set dummy $ac_prog; ac_word=$2
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9853$as_echo_n "checking for $ac_word... " >&6; }
9854if ${ac_cv_path_NAWK+:} false; then :
9855  $as_echo_n "(cached) " >&6
9856else
9857  case $NAWK in
9858  [\\/]* | ?:[\\/]*)
9859  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9860  ;;
9861  *)
9862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9863for as_dir in $PATH
9864do
9865  IFS=$as_save_IFS
9866  test -z "$as_dir" && as_dir=.
9867    for ac_exec_ext in '' $ac_executable_extensions; do
9868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9869    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9871    break 2
9872  fi
9873done
9874  done
9875IFS=$as_save_IFS
9876
9877  ;;
9878esac
9879fi
9880NAWK=$ac_cv_path_NAWK
9881if test -n "$NAWK"; then
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9883$as_echo "$NAWK" >&6; }
9884else
9885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
9887fi
9888
9889
9890  test -n "$NAWK" && break
9891done
9892
9893  else
9894    # The variable is set, but is it from the command line or the environment?
9895
9896    # Try to remove the string !NAWK! from our list.
9897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9899      # If it failed, the variable was not from the command line. Ignore it,
9900      # but warn the user (except for BASH, which is always set by the calling BASH).
9901      if test "xNAWK" != xBASH; then
9902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9903$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9904      fi
9905      # Try to locate tool using the code snippet
9906      for ac_prog in nawk gawk awk
9907do
9908  # Extract the first word of "$ac_prog", so it can be a program name with args.
9909set dummy $ac_prog; ac_word=$2
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911$as_echo_n "checking for $ac_word... " >&6; }
9912if ${ac_cv_path_NAWK+:} false; then :
9913  $as_echo_n "(cached) " >&6
9914else
9915  case $NAWK in
9916  [\\/]* | ?:[\\/]*)
9917  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9918  ;;
9919  *)
9920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921for as_dir in $PATH
9922do
9923  IFS=$as_save_IFS
9924  test -z "$as_dir" && as_dir=.
9925    for ac_exec_ext in '' $ac_executable_extensions; do
9926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9927    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929    break 2
9930  fi
9931done
9932  done
9933IFS=$as_save_IFS
9934
9935  ;;
9936esac
9937fi
9938NAWK=$ac_cv_path_NAWK
9939if test -n "$NAWK"; then
9940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9941$as_echo "$NAWK" >&6; }
9942else
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945fi
9946
9947
9948  test -n "$NAWK" && break
9949done
9950
9951    else
9952      # If it succeeded, then it was overridden by the user. We will use it
9953      # for the tool.
9954
9955      # First remove it from the list of overridden variables, so we can test
9956      # for unknown variables in the end.
9957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9958
9959      # Check if we try to supply an empty value
9960      if test "x$NAWK" = x; then
9961        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9962$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9964$as_echo_n "checking for NAWK... " >&6; }
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9966$as_echo "disabled" >&6; }
9967      else
9968        # Check if the provided tool contains a complete path.
9969        tool_specified="$NAWK"
9970        tool_basename="${tool_specified##*/}"
9971        if test "x$tool_basename" = "x$tool_specified"; then
9972          # A command without a complete path is provided, search $PATH.
9973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9974$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9975          # Extract the first word of "$tool_basename", so it can be a program name with args.
9976set dummy $tool_basename; ac_word=$2
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9978$as_echo_n "checking for $ac_word... " >&6; }
9979if ${ac_cv_path_NAWK+:} false; then :
9980  $as_echo_n "(cached) " >&6
9981else
9982  case $NAWK in
9983  [\\/]* | ?:[\\/]*)
9984  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9985  ;;
9986  *)
9987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9988for as_dir in $PATH
9989do
9990  IFS=$as_save_IFS
9991  test -z "$as_dir" && as_dir=.
9992    for ac_exec_ext in '' $ac_executable_extensions; do
9993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9994    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9996    break 2
9997  fi
9998done
9999  done
10000IFS=$as_save_IFS
10001
10002  ;;
10003esac
10004fi
10005NAWK=$ac_cv_path_NAWK
10006if test -n "$NAWK"; then
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10008$as_echo "$NAWK" >&6; }
10009else
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012fi
10013
10014
10015          if test "x$NAWK" = x; then
10016            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10017          fi
10018        else
10019          # Otherwise we believe it is a complete path. Use it as it is.
10020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10021$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10022          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10023$as_echo_n "checking for NAWK... " >&6; }
10024          if test ! -x "$tool_specified"; then
10025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10026$as_echo "not found" >&6; }
10027            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10028          fi
10029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10030$as_echo "$tool_specified" >&6; }
10031        fi
10032      fi
10033    fi
10034
10035  fi
10036
10037
10038
10039  if test "x$NAWK" = x; then
10040    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10041  fi
10042
10043
10044
10045
10046
10047  # Publish this variable in the help.
10048
10049
10050  if [ -z "${PRINTF+x}" ]; then
10051    # The variable is not set by user, try to locate tool using the code snippet
10052    for ac_prog in printf
10053do
10054  # Extract the first word of "$ac_prog", so it can be a program name with args.
10055set dummy $ac_prog; ac_word=$2
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10057$as_echo_n "checking for $ac_word... " >&6; }
10058if ${ac_cv_path_PRINTF+:} false; then :
10059  $as_echo_n "(cached) " >&6
10060else
10061  case $PRINTF in
10062  [\\/]* | ?:[\\/]*)
10063  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10064  ;;
10065  *)
10066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10067for as_dir in $PATH
10068do
10069  IFS=$as_save_IFS
10070  test -z "$as_dir" && as_dir=.
10071    for ac_exec_ext in '' $ac_executable_extensions; do
10072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10073    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10075    break 2
10076  fi
10077done
10078  done
10079IFS=$as_save_IFS
10080
10081  ;;
10082esac
10083fi
10084PRINTF=$ac_cv_path_PRINTF
10085if test -n "$PRINTF"; then
10086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10087$as_echo "$PRINTF" >&6; }
10088else
10089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
10091fi
10092
10093
10094  test -n "$PRINTF" && break
10095done
10096
10097  else
10098    # The variable is set, but is it from the command line or the environment?
10099
10100    # Try to remove the string !PRINTF! from our list.
10101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10103      # If it failed, the variable was not from the command line. Ignore it,
10104      # but warn the user (except for BASH, which is always set by the calling BASH).
10105      if test "xPRINTF" != xBASH; then
10106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10107$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10108      fi
10109      # Try to locate tool using the code snippet
10110      for ac_prog in printf
10111do
10112  # Extract the first word of "$ac_prog", so it can be a program name with args.
10113set dummy $ac_prog; ac_word=$2
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10115$as_echo_n "checking for $ac_word... " >&6; }
10116if ${ac_cv_path_PRINTF+:} false; then :
10117  $as_echo_n "(cached) " >&6
10118else
10119  case $PRINTF in
10120  [\\/]* | ?:[\\/]*)
10121  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10122  ;;
10123  *)
10124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10125for as_dir in $PATH
10126do
10127  IFS=$as_save_IFS
10128  test -z "$as_dir" && as_dir=.
10129    for ac_exec_ext in '' $ac_executable_extensions; do
10130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10131    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10133    break 2
10134  fi
10135done
10136  done
10137IFS=$as_save_IFS
10138
10139  ;;
10140esac
10141fi
10142PRINTF=$ac_cv_path_PRINTF
10143if test -n "$PRINTF"; then
10144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10145$as_echo "$PRINTF" >&6; }
10146else
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10148$as_echo "no" >&6; }
10149fi
10150
10151
10152  test -n "$PRINTF" && break
10153done
10154
10155    else
10156      # If it succeeded, then it was overridden by the user. We will use it
10157      # for the tool.
10158
10159      # First remove it from the list of overridden variables, so we can test
10160      # for unknown variables in the end.
10161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10162
10163      # Check if we try to supply an empty value
10164      if test "x$PRINTF" = x; then
10165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10166$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10168$as_echo_n "checking for PRINTF... " >&6; }
10169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10170$as_echo "disabled" >&6; }
10171      else
10172        # Check if the provided tool contains a complete path.
10173        tool_specified="$PRINTF"
10174        tool_basename="${tool_specified##*/}"
10175        if test "x$tool_basename" = "x$tool_specified"; then
10176          # A command without a complete path is provided, search $PATH.
10177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10178$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10179          # Extract the first word of "$tool_basename", so it can be a program name with args.
10180set dummy $tool_basename; ac_word=$2
10181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10182$as_echo_n "checking for $ac_word... " >&6; }
10183if ${ac_cv_path_PRINTF+:} false; then :
10184  $as_echo_n "(cached) " >&6
10185else
10186  case $PRINTF in
10187  [\\/]* | ?:[\\/]*)
10188  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10189  ;;
10190  *)
10191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10192for as_dir in $PATH
10193do
10194  IFS=$as_save_IFS
10195  test -z "$as_dir" && as_dir=.
10196    for ac_exec_ext in '' $ac_executable_extensions; do
10197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10198    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10200    break 2
10201  fi
10202done
10203  done
10204IFS=$as_save_IFS
10205
10206  ;;
10207esac
10208fi
10209PRINTF=$ac_cv_path_PRINTF
10210if test -n "$PRINTF"; then
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10212$as_echo "$PRINTF" >&6; }
10213else
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
10216fi
10217
10218
10219          if test "x$PRINTF" = x; then
10220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10221          fi
10222        else
10223          # Otherwise we believe it is a complete path. Use it as it is.
10224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10225$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10227$as_echo_n "checking for PRINTF... " >&6; }
10228          if test ! -x "$tool_specified"; then
10229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10230$as_echo "not found" >&6; }
10231            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10232          fi
10233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10234$as_echo "$tool_specified" >&6; }
10235        fi
10236      fi
10237    fi
10238
10239  fi
10240
10241
10242
10243  if test "x$PRINTF" = x; then
10244    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10245  fi
10246
10247
10248
10249
10250
10251  # Publish this variable in the help.
10252
10253
10254  if [ -z "${RM+x}" ]; then
10255    # The variable is not set by user, try to locate tool using the code snippet
10256    for ac_prog in rm
10257do
10258  # Extract the first word of "$ac_prog", so it can be a program name with args.
10259set dummy $ac_prog; ac_word=$2
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10261$as_echo_n "checking for $ac_word... " >&6; }
10262if ${ac_cv_path_RM+:} false; then :
10263  $as_echo_n "(cached) " >&6
10264else
10265  case $RM in
10266  [\\/]* | ?:[\\/]*)
10267  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10268  ;;
10269  *)
10270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10271for as_dir in $PATH
10272do
10273  IFS=$as_save_IFS
10274  test -z "$as_dir" && as_dir=.
10275    for ac_exec_ext in '' $ac_executable_extensions; do
10276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10277    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10279    break 2
10280  fi
10281done
10282  done
10283IFS=$as_save_IFS
10284
10285  ;;
10286esac
10287fi
10288RM=$ac_cv_path_RM
10289if test -n "$RM"; then
10290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10291$as_echo "$RM" >&6; }
10292else
10293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
10295fi
10296
10297
10298  test -n "$RM" && break
10299done
10300
10301  else
10302    # The variable is set, but is it from the command line or the environment?
10303
10304    # Try to remove the string !RM! from our list.
10305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10307      # If it failed, the variable was not from the command line. Ignore it,
10308      # but warn the user (except for BASH, which is always set by the calling BASH).
10309      if test "xRM" != xBASH; then
10310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10311$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10312      fi
10313      # Try to locate tool using the code snippet
10314      for ac_prog in rm
10315do
10316  # Extract the first word of "$ac_prog", so it can be a program name with args.
10317set dummy $ac_prog; ac_word=$2
10318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10319$as_echo_n "checking for $ac_word... " >&6; }
10320if ${ac_cv_path_RM+:} false; then :
10321  $as_echo_n "(cached) " >&6
10322else
10323  case $RM in
10324  [\\/]* | ?:[\\/]*)
10325  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10326  ;;
10327  *)
10328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10329for as_dir in $PATH
10330do
10331  IFS=$as_save_IFS
10332  test -z "$as_dir" && as_dir=.
10333    for ac_exec_ext in '' $ac_executable_extensions; do
10334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10335    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10337    break 2
10338  fi
10339done
10340  done
10341IFS=$as_save_IFS
10342
10343  ;;
10344esac
10345fi
10346RM=$ac_cv_path_RM
10347if test -n "$RM"; then
10348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10349$as_echo "$RM" >&6; }
10350else
10351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352$as_echo "no" >&6; }
10353fi
10354
10355
10356  test -n "$RM" && break
10357done
10358
10359    else
10360      # If it succeeded, then it was overridden by the user. We will use it
10361      # for the tool.
10362
10363      # First remove it from the list of overridden variables, so we can test
10364      # for unknown variables in the end.
10365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10366
10367      # Check if we try to supply an empty value
10368      if test "x$RM" = x; then
10369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10370$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10372$as_echo_n "checking for RM... " >&6; }
10373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10374$as_echo "disabled" >&6; }
10375      else
10376        # Check if the provided tool contains a complete path.
10377        tool_specified="$RM"
10378        tool_basename="${tool_specified##*/}"
10379        if test "x$tool_basename" = "x$tool_specified"; then
10380          # A command without a complete path is provided, search $PATH.
10381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10382$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10383          # Extract the first word of "$tool_basename", so it can be a program name with args.
10384set dummy $tool_basename; ac_word=$2
10385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10386$as_echo_n "checking for $ac_word... " >&6; }
10387if ${ac_cv_path_RM+:} false; then :
10388  $as_echo_n "(cached) " >&6
10389else
10390  case $RM in
10391  [\\/]* | ?:[\\/]*)
10392  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10393  ;;
10394  *)
10395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10396for as_dir in $PATH
10397do
10398  IFS=$as_save_IFS
10399  test -z "$as_dir" && as_dir=.
10400    for ac_exec_ext in '' $ac_executable_extensions; do
10401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10402    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10404    break 2
10405  fi
10406done
10407  done
10408IFS=$as_save_IFS
10409
10410  ;;
10411esac
10412fi
10413RM=$ac_cv_path_RM
10414if test -n "$RM"; then
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10416$as_echo "$RM" >&6; }
10417else
10418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419$as_echo "no" >&6; }
10420fi
10421
10422
10423          if test "x$RM" = x; then
10424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10425          fi
10426        else
10427          # Otherwise we believe it is a complete path. Use it as it is.
10428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10429$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10431$as_echo_n "checking for RM... " >&6; }
10432          if test ! -x "$tool_specified"; then
10433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10434$as_echo "not found" >&6; }
10435            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10436          fi
10437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10438$as_echo "$tool_specified" >&6; }
10439        fi
10440      fi
10441    fi
10442
10443  fi
10444
10445
10446
10447  if test "x$RM" = x; then
10448    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10449  fi
10450
10451
10452
10453
10454
10455  # Publish this variable in the help.
10456
10457
10458  if [ -z "${RMDIR+x}" ]; then
10459    # The variable is not set by user, try to locate tool using the code snippet
10460    for ac_prog in rmdir
10461do
10462  # Extract the first word of "$ac_prog", so it can be a program name with args.
10463set dummy $ac_prog; ac_word=$2
10464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10465$as_echo_n "checking for $ac_word... " >&6; }
10466if ${ac_cv_path_RMDIR+:} false; then :
10467  $as_echo_n "(cached) " >&6
10468else
10469  case $RMDIR in
10470  [\\/]* | ?:[\\/]*)
10471  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10472  ;;
10473  *)
10474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10475for as_dir in $PATH
10476do
10477  IFS=$as_save_IFS
10478  test -z "$as_dir" && as_dir=.
10479    for ac_exec_ext in '' $ac_executable_extensions; do
10480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10481    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10483    break 2
10484  fi
10485done
10486  done
10487IFS=$as_save_IFS
10488
10489  ;;
10490esac
10491fi
10492RMDIR=$ac_cv_path_RMDIR
10493if test -n "$RMDIR"; then
10494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10495$as_echo "$RMDIR" >&6; }
10496else
10497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10498$as_echo "no" >&6; }
10499fi
10500
10501
10502  test -n "$RMDIR" && break
10503done
10504
10505  else
10506    # The variable is set, but is it from the command line or the environment?
10507
10508    # Try to remove the string !RMDIR! from our list.
10509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10511      # If it failed, the variable was not from the command line. Ignore it,
10512      # but warn the user (except for BASH, which is always set by the calling BASH).
10513      if test "xRMDIR" != xBASH; then
10514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10515$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10516      fi
10517      # Try to locate tool using the code snippet
10518      for ac_prog in rmdir
10519do
10520  # Extract the first word of "$ac_prog", so it can be a program name with args.
10521set dummy $ac_prog; ac_word=$2
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10523$as_echo_n "checking for $ac_word... " >&6; }
10524if ${ac_cv_path_RMDIR+:} false; then :
10525  $as_echo_n "(cached) " >&6
10526else
10527  case $RMDIR in
10528  [\\/]* | ?:[\\/]*)
10529  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10530  ;;
10531  *)
10532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10533for as_dir in $PATH
10534do
10535  IFS=$as_save_IFS
10536  test -z "$as_dir" && as_dir=.
10537    for ac_exec_ext in '' $ac_executable_extensions; do
10538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10539    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10541    break 2
10542  fi
10543done
10544  done
10545IFS=$as_save_IFS
10546
10547  ;;
10548esac
10549fi
10550RMDIR=$ac_cv_path_RMDIR
10551if test -n "$RMDIR"; then
10552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10553$as_echo "$RMDIR" >&6; }
10554else
10555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10556$as_echo "no" >&6; }
10557fi
10558
10559
10560  test -n "$RMDIR" && break
10561done
10562
10563    else
10564      # If it succeeded, then it was overridden by the user. We will use it
10565      # for the tool.
10566
10567      # First remove it from the list of overridden variables, so we can test
10568      # for unknown variables in the end.
10569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10570
10571      # Check if we try to supply an empty value
10572      if test "x$RMDIR" = x; then
10573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10574$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10576$as_echo_n "checking for RMDIR... " >&6; }
10577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10578$as_echo "disabled" >&6; }
10579      else
10580        # Check if the provided tool contains a complete path.
10581        tool_specified="$RMDIR"
10582        tool_basename="${tool_specified##*/}"
10583        if test "x$tool_basename" = "x$tool_specified"; then
10584          # A command without a complete path is provided, search $PATH.
10585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10586$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10587          # Extract the first word of "$tool_basename", so it can be a program name with args.
10588set dummy $tool_basename; ac_word=$2
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10590$as_echo_n "checking for $ac_word... " >&6; }
10591if ${ac_cv_path_RMDIR+:} false; then :
10592  $as_echo_n "(cached) " >&6
10593else
10594  case $RMDIR in
10595  [\\/]* | ?:[\\/]*)
10596  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10597  ;;
10598  *)
10599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10600for as_dir in $PATH
10601do
10602  IFS=$as_save_IFS
10603  test -z "$as_dir" && as_dir=.
10604    for ac_exec_ext in '' $ac_executable_extensions; do
10605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10606    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10608    break 2
10609  fi
10610done
10611  done
10612IFS=$as_save_IFS
10613
10614  ;;
10615esac
10616fi
10617RMDIR=$ac_cv_path_RMDIR
10618if test -n "$RMDIR"; then
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10620$as_echo "$RMDIR" >&6; }
10621else
10622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10623$as_echo "no" >&6; }
10624fi
10625
10626
10627          if test "x$RMDIR" = x; then
10628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10629          fi
10630        else
10631          # Otherwise we believe it is a complete path. Use it as it is.
10632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10633$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10635$as_echo_n "checking for RMDIR... " >&6; }
10636          if test ! -x "$tool_specified"; then
10637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10638$as_echo "not found" >&6; }
10639            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10640          fi
10641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10642$as_echo "$tool_specified" >&6; }
10643        fi
10644      fi
10645    fi
10646
10647  fi
10648
10649
10650
10651  if test "x$RMDIR" = x; then
10652    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10653  fi
10654
10655
10656
10657
10658
10659  # Publish this variable in the help.
10660
10661
10662  if [ -z "${SH+x}" ]; then
10663    # The variable is not set by user, try to locate tool using the code snippet
10664    for ac_prog in sh
10665do
10666  # Extract the first word of "$ac_prog", so it can be a program name with args.
10667set dummy $ac_prog; ac_word=$2
10668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10669$as_echo_n "checking for $ac_word... " >&6; }
10670if ${ac_cv_path_SH+:} false; then :
10671  $as_echo_n "(cached) " >&6
10672else
10673  case $SH in
10674  [\\/]* | ?:[\\/]*)
10675  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10676  ;;
10677  *)
10678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679for as_dir in $PATH
10680do
10681  IFS=$as_save_IFS
10682  test -z "$as_dir" && as_dir=.
10683    for ac_exec_ext in '' $ac_executable_extensions; do
10684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10685    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687    break 2
10688  fi
10689done
10690  done
10691IFS=$as_save_IFS
10692
10693  ;;
10694esac
10695fi
10696SH=$ac_cv_path_SH
10697if test -n "$SH"; then
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10699$as_echo "$SH" >&6; }
10700else
10701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702$as_echo "no" >&6; }
10703fi
10704
10705
10706  test -n "$SH" && break
10707done
10708
10709  else
10710    # The variable is set, but is it from the command line or the environment?
10711
10712    # Try to remove the string !SH! from our list.
10713    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10714    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10715      # If it failed, the variable was not from the command line. Ignore it,
10716      # but warn the user (except for BASH, which is always set by the calling BASH).
10717      if test "xSH" != xBASH; then
10718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10719$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10720      fi
10721      # Try to locate tool using the code snippet
10722      for ac_prog in sh
10723do
10724  # Extract the first word of "$ac_prog", so it can be a program name with args.
10725set dummy $ac_prog; ac_word=$2
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10727$as_echo_n "checking for $ac_word... " >&6; }
10728if ${ac_cv_path_SH+:} false; then :
10729  $as_echo_n "(cached) " >&6
10730else
10731  case $SH in
10732  [\\/]* | ?:[\\/]*)
10733  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10734  ;;
10735  *)
10736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10737for as_dir in $PATH
10738do
10739  IFS=$as_save_IFS
10740  test -z "$as_dir" && as_dir=.
10741    for ac_exec_ext in '' $ac_executable_extensions; do
10742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10743    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10745    break 2
10746  fi
10747done
10748  done
10749IFS=$as_save_IFS
10750
10751  ;;
10752esac
10753fi
10754SH=$ac_cv_path_SH
10755if test -n "$SH"; then
10756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10757$as_echo "$SH" >&6; }
10758else
10759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
10761fi
10762
10763
10764  test -n "$SH" && break
10765done
10766
10767    else
10768      # If it succeeded, then it was overridden by the user. We will use it
10769      # for the tool.
10770
10771      # First remove it from the list of overridden variables, so we can test
10772      # for unknown variables in the end.
10773      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10774
10775      # Check if we try to supply an empty value
10776      if test "x$SH" = x; then
10777        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10778$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10780$as_echo_n "checking for SH... " >&6; }
10781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10782$as_echo "disabled" >&6; }
10783      else
10784        # Check if the provided tool contains a complete path.
10785        tool_specified="$SH"
10786        tool_basename="${tool_specified##*/}"
10787        if test "x$tool_basename" = "x$tool_specified"; then
10788          # A command without a complete path is provided, search $PATH.
10789          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10790$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10791          # Extract the first word of "$tool_basename", so it can be a program name with args.
10792set dummy $tool_basename; ac_word=$2
10793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10794$as_echo_n "checking for $ac_word... " >&6; }
10795if ${ac_cv_path_SH+:} false; then :
10796  $as_echo_n "(cached) " >&6
10797else
10798  case $SH in
10799  [\\/]* | ?:[\\/]*)
10800  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10801  ;;
10802  *)
10803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10804for as_dir in $PATH
10805do
10806  IFS=$as_save_IFS
10807  test -z "$as_dir" && as_dir=.
10808    for ac_exec_ext in '' $ac_executable_extensions; do
10809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10810    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10812    break 2
10813  fi
10814done
10815  done
10816IFS=$as_save_IFS
10817
10818  ;;
10819esac
10820fi
10821SH=$ac_cv_path_SH
10822if test -n "$SH"; then
10823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10824$as_echo "$SH" >&6; }
10825else
10826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10827$as_echo "no" >&6; }
10828fi
10829
10830
10831          if test "x$SH" = x; then
10832            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10833          fi
10834        else
10835          # Otherwise we believe it is a complete path. Use it as it is.
10836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10837$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10838          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10839$as_echo_n "checking for SH... " >&6; }
10840          if test ! -x "$tool_specified"; then
10841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10842$as_echo "not found" >&6; }
10843            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10844          fi
10845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10846$as_echo "$tool_specified" >&6; }
10847        fi
10848      fi
10849    fi
10850
10851  fi
10852
10853
10854
10855  if test "x$SH" = x; then
10856    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10857  fi
10858
10859
10860
10861
10862
10863  # Publish this variable in the help.
10864
10865
10866  if [ -z "${SORT+x}" ]; then
10867    # The variable is not set by user, try to locate tool using the code snippet
10868    for ac_prog in sort
10869do
10870  # Extract the first word of "$ac_prog", so it can be a program name with args.
10871set dummy $ac_prog; ac_word=$2
10872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10873$as_echo_n "checking for $ac_word... " >&6; }
10874if ${ac_cv_path_SORT+:} false; then :
10875  $as_echo_n "(cached) " >&6
10876else
10877  case $SORT in
10878  [\\/]* | ?:[\\/]*)
10879  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10880  ;;
10881  *)
10882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10883for as_dir in $PATH
10884do
10885  IFS=$as_save_IFS
10886  test -z "$as_dir" && as_dir=.
10887    for ac_exec_ext in '' $ac_executable_extensions; do
10888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10889    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10891    break 2
10892  fi
10893done
10894  done
10895IFS=$as_save_IFS
10896
10897  ;;
10898esac
10899fi
10900SORT=$ac_cv_path_SORT
10901if test -n "$SORT"; then
10902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10903$as_echo "$SORT" >&6; }
10904else
10905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906$as_echo "no" >&6; }
10907fi
10908
10909
10910  test -n "$SORT" && break
10911done
10912
10913  else
10914    # The variable is set, but is it from the command line or the environment?
10915
10916    # Try to remove the string !SORT! from our list.
10917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10919      # If it failed, the variable was not from the command line. Ignore it,
10920      # but warn the user (except for BASH, which is always set by the calling BASH).
10921      if test "xSORT" != xBASH; then
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10923$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10924      fi
10925      # Try to locate tool using the code snippet
10926      for ac_prog in sort
10927do
10928  # Extract the first word of "$ac_prog", so it can be a program name with args.
10929set dummy $ac_prog; ac_word=$2
10930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10931$as_echo_n "checking for $ac_word... " >&6; }
10932if ${ac_cv_path_SORT+:} false; then :
10933  $as_echo_n "(cached) " >&6
10934else
10935  case $SORT in
10936  [\\/]* | ?:[\\/]*)
10937  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10938  ;;
10939  *)
10940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10941for as_dir in $PATH
10942do
10943  IFS=$as_save_IFS
10944  test -z "$as_dir" && as_dir=.
10945    for ac_exec_ext in '' $ac_executable_extensions; do
10946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10947    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10949    break 2
10950  fi
10951done
10952  done
10953IFS=$as_save_IFS
10954
10955  ;;
10956esac
10957fi
10958SORT=$ac_cv_path_SORT
10959if test -n "$SORT"; then
10960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10961$as_echo "$SORT" >&6; }
10962else
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
10965fi
10966
10967
10968  test -n "$SORT" && break
10969done
10970
10971    else
10972      # If it succeeded, then it was overridden by the user. We will use it
10973      # for the tool.
10974
10975      # First remove it from the list of overridden variables, so we can test
10976      # for unknown variables in the end.
10977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10978
10979      # Check if we try to supply an empty value
10980      if test "x$SORT" = x; then
10981        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10982$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10984$as_echo_n "checking for SORT... " >&6; }
10985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10986$as_echo "disabled" >&6; }
10987      else
10988        # Check if the provided tool contains a complete path.
10989        tool_specified="$SORT"
10990        tool_basename="${tool_specified##*/}"
10991        if test "x$tool_basename" = "x$tool_specified"; then
10992          # A command without a complete path is provided, search $PATH.
10993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10994$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10995          # Extract the first word of "$tool_basename", so it can be a program name with args.
10996set dummy $tool_basename; ac_word=$2
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10998$as_echo_n "checking for $ac_word... " >&6; }
10999if ${ac_cv_path_SORT+:} false; then :
11000  $as_echo_n "(cached) " >&6
11001else
11002  case $SORT in
11003  [\\/]* | ?:[\\/]*)
11004  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11005  ;;
11006  *)
11007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010  IFS=$as_save_IFS
11011  test -z "$as_dir" && as_dir=.
11012    for ac_exec_ext in '' $ac_executable_extensions; do
11013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11014    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11016    break 2
11017  fi
11018done
11019  done
11020IFS=$as_save_IFS
11021
11022  ;;
11023esac
11024fi
11025SORT=$ac_cv_path_SORT
11026if test -n "$SORT"; then
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11028$as_echo "$SORT" >&6; }
11029else
11030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11031$as_echo "no" >&6; }
11032fi
11033
11034
11035          if test "x$SORT" = x; then
11036            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11037          fi
11038        else
11039          # Otherwise we believe it is a complete path. Use it as it is.
11040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11041$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11042          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11043$as_echo_n "checking for SORT... " >&6; }
11044          if test ! -x "$tool_specified"; then
11045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11046$as_echo "not found" >&6; }
11047            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11048          fi
11049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11050$as_echo "$tool_specified" >&6; }
11051        fi
11052      fi
11053    fi
11054
11055  fi
11056
11057
11058
11059  if test "x$SORT" = x; then
11060    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11061  fi
11062
11063
11064
11065
11066
11067  # Publish this variable in the help.
11068
11069
11070  if [ -z "${TAIL+x}" ]; then
11071    # The variable is not set by user, try to locate tool using the code snippet
11072    for ac_prog in tail
11073do
11074  # Extract the first word of "$ac_prog", so it can be a program name with args.
11075set dummy $ac_prog; ac_word=$2
11076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11077$as_echo_n "checking for $ac_word... " >&6; }
11078if ${ac_cv_path_TAIL+:} false; then :
11079  $as_echo_n "(cached) " >&6
11080else
11081  case $TAIL in
11082  [\\/]* | ?:[\\/]*)
11083  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11084  ;;
11085  *)
11086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11087for as_dir in $PATH
11088do
11089  IFS=$as_save_IFS
11090  test -z "$as_dir" && as_dir=.
11091    for ac_exec_ext in '' $ac_executable_extensions; do
11092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11093    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11095    break 2
11096  fi
11097done
11098  done
11099IFS=$as_save_IFS
11100
11101  ;;
11102esac
11103fi
11104TAIL=$ac_cv_path_TAIL
11105if test -n "$TAIL"; then
11106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11107$as_echo "$TAIL" >&6; }
11108else
11109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
11111fi
11112
11113
11114  test -n "$TAIL" && break
11115done
11116
11117  else
11118    # The variable is set, but is it from the command line or the environment?
11119
11120    # Try to remove the string !TAIL! from our list.
11121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11123      # If it failed, the variable was not from the command line. Ignore it,
11124      # but warn the user (except for BASH, which is always set by the calling BASH).
11125      if test "xTAIL" != xBASH; then
11126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11127$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11128      fi
11129      # Try to locate tool using the code snippet
11130      for ac_prog in tail
11131do
11132  # Extract the first word of "$ac_prog", so it can be a program name with args.
11133set dummy $ac_prog; ac_word=$2
11134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11135$as_echo_n "checking for $ac_word... " >&6; }
11136if ${ac_cv_path_TAIL+:} false; then :
11137  $as_echo_n "(cached) " >&6
11138else
11139  case $TAIL in
11140  [\\/]* | ?:[\\/]*)
11141  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11142  ;;
11143  *)
11144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11145for as_dir in $PATH
11146do
11147  IFS=$as_save_IFS
11148  test -z "$as_dir" && as_dir=.
11149    for ac_exec_ext in '' $ac_executable_extensions; do
11150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11151    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11153    break 2
11154  fi
11155done
11156  done
11157IFS=$as_save_IFS
11158
11159  ;;
11160esac
11161fi
11162TAIL=$ac_cv_path_TAIL
11163if test -n "$TAIL"; then
11164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11165$as_echo "$TAIL" >&6; }
11166else
11167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11168$as_echo "no" >&6; }
11169fi
11170
11171
11172  test -n "$TAIL" && break
11173done
11174
11175    else
11176      # If it succeeded, then it was overridden by the user. We will use it
11177      # for the tool.
11178
11179      # First remove it from the list of overridden variables, so we can test
11180      # for unknown variables in the end.
11181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11182
11183      # Check if we try to supply an empty value
11184      if test "x$TAIL" = x; then
11185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11186$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11188$as_echo_n "checking for TAIL... " >&6; }
11189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11190$as_echo "disabled" >&6; }
11191      else
11192        # Check if the provided tool contains a complete path.
11193        tool_specified="$TAIL"
11194        tool_basename="${tool_specified##*/}"
11195        if test "x$tool_basename" = "x$tool_specified"; then
11196          # A command without a complete path is provided, search $PATH.
11197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11198$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11199          # Extract the first word of "$tool_basename", so it can be a program name with args.
11200set dummy $tool_basename; ac_word=$2
11201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11202$as_echo_n "checking for $ac_word... " >&6; }
11203if ${ac_cv_path_TAIL+:} false; then :
11204  $as_echo_n "(cached) " >&6
11205else
11206  case $TAIL in
11207  [\\/]* | ?:[\\/]*)
11208  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11209  ;;
11210  *)
11211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11212for as_dir in $PATH
11213do
11214  IFS=$as_save_IFS
11215  test -z "$as_dir" && as_dir=.
11216    for ac_exec_ext in '' $ac_executable_extensions; do
11217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11218    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11220    break 2
11221  fi
11222done
11223  done
11224IFS=$as_save_IFS
11225
11226  ;;
11227esac
11228fi
11229TAIL=$ac_cv_path_TAIL
11230if test -n "$TAIL"; then
11231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11232$as_echo "$TAIL" >&6; }
11233else
11234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235$as_echo "no" >&6; }
11236fi
11237
11238
11239          if test "x$TAIL" = x; then
11240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11241          fi
11242        else
11243          # Otherwise we believe it is a complete path. Use it as it is.
11244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11245$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11247$as_echo_n "checking for TAIL... " >&6; }
11248          if test ! -x "$tool_specified"; then
11249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11250$as_echo "not found" >&6; }
11251            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11252          fi
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11254$as_echo "$tool_specified" >&6; }
11255        fi
11256      fi
11257    fi
11258
11259  fi
11260
11261
11262
11263  if test "x$TAIL" = x; then
11264    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11265  fi
11266
11267
11268
11269
11270
11271  # Publish this variable in the help.
11272
11273
11274  if [ -z "${TAR+x}" ]; then
11275    # The variable is not set by user, try to locate tool using the code snippet
11276    for ac_prog in gtar tar
11277do
11278  # Extract the first word of "$ac_prog", so it can be a program name with args.
11279set dummy $ac_prog; ac_word=$2
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11281$as_echo_n "checking for $ac_word... " >&6; }
11282if ${ac_cv_path_TAR+:} false; then :
11283  $as_echo_n "(cached) " >&6
11284else
11285  case $TAR in
11286  [\\/]* | ?:[\\/]*)
11287  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11288  ;;
11289  *)
11290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11291for as_dir in $PATH
11292do
11293  IFS=$as_save_IFS
11294  test -z "$as_dir" && as_dir=.
11295    for ac_exec_ext in '' $ac_executable_extensions; do
11296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11297    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11299    break 2
11300  fi
11301done
11302  done
11303IFS=$as_save_IFS
11304
11305  ;;
11306esac
11307fi
11308TAR=$ac_cv_path_TAR
11309if test -n "$TAR"; then
11310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11311$as_echo "$TAR" >&6; }
11312else
11313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
11315fi
11316
11317
11318  test -n "$TAR" && break
11319done
11320
11321  else
11322    # The variable is set, but is it from the command line or the environment?
11323
11324    # Try to remove the string !TAR! from our list.
11325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11327      # If it failed, the variable was not from the command line. Ignore it,
11328      # but warn the user (except for BASH, which is always set by the calling BASH).
11329      if test "xTAR" != xBASH; then
11330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11331$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11332      fi
11333      # Try to locate tool using the code snippet
11334      for ac_prog in gtar tar
11335do
11336  # Extract the first word of "$ac_prog", so it can be a program name with args.
11337set dummy $ac_prog; ac_word=$2
11338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11339$as_echo_n "checking for $ac_word... " >&6; }
11340if ${ac_cv_path_TAR+:} false; then :
11341  $as_echo_n "(cached) " >&6
11342else
11343  case $TAR in
11344  [\\/]* | ?:[\\/]*)
11345  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11346  ;;
11347  *)
11348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11349for as_dir in $PATH
11350do
11351  IFS=$as_save_IFS
11352  test -z "$as_dir" && as_dir=.
11353    for ac_exec_ext in '' $ac_executable_extensions; do
11354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11355    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11357    break 2
11358  fi
11359done
11360  done
11361IFS=$as_save_IFS
11362
11363  ;;
11364esac
11365fi
11366TAR=$ac_cv_path_TAR
11367if test -n "$TAR"; then
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11369$as_echo "$TAR" >&6; }
11370else
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373fi
11374
11375
11376  test -n "$TAR" && break
11377done
11378
11379    else
11380      # If it succeeded, then it was overridden by the user. We will use it
11381      # for the tool.
11382
11383      # First remove it from the list of overridden variables, so we can test
11384      # for unknown variables in the end.
11385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11386
11387      # Check if we try to supply an empty value
11388      if test "x$TAR" = x; then
11389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11390$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11392$as_echo_n "checking for TAR... " >&6; }
11393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11394$as_echo "disabled" >&6; }
11395      else
11396        # Check if the provided tool contains a complete path.
11397        tool_specified="$TAR"
11398        tool_basename="${tool_specified##*/}"
11399        if test "x$tool_basename" = "x$tool_specified"; then
11400          # A command without a complete path is provided, search $PATH.
11401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11402$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11403          # Extract the first word of "$tool_basename", so it can be a program name with args.
11404set dummy $tool_basename; ac_word=$2
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11406$as_echo_n "checking for $ac_word... " >&6; }
11407if ${ac_cv_path_TAR+:} false; then :
11408  $as_echo_n "(cached) " >&6
11409else
11410  case $TAR in
11411  [\\/]* | ?:[\\/]*)
11412  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11413  ;;
11414  *)
11415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11416for as_dir in $PATH
11417do
11418  IFS=$as_save_IFS
11419  test -z "$as_dir" && as_dir=.
11420    for ac_exec_ext in '' $ac_executable_extensions; do
11421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11422    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11424    break 2
11425  fi
11426done
11427  done
11428IFS=$as_save_IFS
11429
11430  ;;
11431esac
11432fi
11433TAR=$ac_cv_path_TAR
11434if test -n "$TAR"; then
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11436$as_echo "$TAR" >&6; }
11437else
11438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439$as_echo "no" >&6; }
11440fi
11441
11442
11443          if test "x$TAR" = x; then
11444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11445          fi
11446        else
11447          # Otherwise we believe it is a complete path. Use it as it is.
11448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11449$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11451$as_echo_n "checking for TAR... " >&6; }
11452          if test ! -x "$tool_specified"; then
11453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11454$as_echo "not found" >&6; }
11455            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11456          fi
11457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11458$as_echo "$tool_specified" >&6; }
11459        fi
11460      fi
11461    fi
11462
11463  fi
11464
11465
11466
11467  if test "x$TAR" = x; then
11468    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11469  fi
11470
11471
11472
11473
11474
11475  # Publish this variable in the help.
11476
11477
11478  if [ -z "${TEE+x}" ]; then
11479    # The variable is not set by user, try to locate tool using the code snippet
11480    for ac_prog in tee
11481do
11482  # Extract the first word of "$ac_prog", so it can be a program name with args.
11483set dummy $ac_prog; ac_word=$2
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11485$as_echo_n "checking for $ac_word... " >&6; }
11486if ${ac_cv_path_TEE+:} false; then :
11487  $as_echo_n "(cached) " >&6
11488else
11489  case $TEE in
11490  [\\/]* | ?:[\\/]*)
11491  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11492  ;;
11493  *)
11494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11495for as_dir in $PATH
11496do
11497  IFS=$as_save_IFS
11498  test -z "$as_dir" && as_dir=.
11499    for ac_exec_ext in '' $ac_executable_extensions; do
11500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11501    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11503    break 2
11504  fi
11505done
11506  done
11507IFS=$as_save_IFS
11508
11509  ;;
11510esac
11511fi
11512TEE=$ac_cv_path_TEE
11513if test -n "$TEE"; then
11514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11515$as_echo "$TEE" >&6; }
11516else
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
11519fi
11520
11521
11522  test -n "$TEE" && break
11523done
11524
11525  else
11526    # The variable is set, but is it from the command line or the environment?
11527
11528    # Try to remove the string !TEE! from our list.
11529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11531      # If it failed, the variable was not from the command line. Ignore it,
11532      # but warn the user (except for BASH, which is always set by the calling BASH).
11533      if test "xTEE" != xBASH; then
11534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11535$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11536      fi
11537      # Try to locate tool using the code snippet
11538      for ac_prog in tee
11539do
11540  # Extract the first word of "$ac_prog", so it can be a program name with args.
11541set dummy $ac_prog; ac_word=$2
11542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11543$as_echo_n "checking for $ac_word... " >&6; }
11544if ${ac_cv_path_TEE+:} false; then :
11545  $as_echo_n "(cached) " >&6
11546else
11547  case $TEE in
11548  [\\/]* | ?:[\\/]*)
11549  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11550  ;;
11551  *)
11552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11553for as_dir in $PATH
11554do
11555  IFS=$as_save_IFS
11556  test -z "$as_dir" && as_dir=.
11557    for ac_exec_ext in '' $ac_executable_extensions; do
11558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11559    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11561    break 2
11562  fi
11563done
11564  done
11565IFS=$as_save_IFS
11566
11567  ;;
11568esac
11569fi
11570TEE=$ac_cv_path_TEE
11571if test -n "$TEE"; then
11572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11573$as_echo "$TEE" >&6; }
11574else
11575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
11577fi
11578
11579
11580  test -n "$TEE" && break
11581done
11582
11583    else
11584      # If it succeeded, then it was overridden by the user. We will use it
11585      # for the tool.
11586
11587      # First remove it from the list of overridden variables, so we can test
11588      # for unknown variables in the end.
11589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11590
11591      # Check if we try to supply an empty value
11592      if test "x$TEE" = x; then
11593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11594$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11596$as_echo_n "checking for TEE... " >&6; }
11597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11598$as_echo "disabled" >&6; }
11599      else
11600        # Check if the provided tool contains a complete path.
11601        tool_specified="$TEE"
11602        tool_basename="${tool_specified##*/}"
11603        if test "x$tool_basename" = "x$tool_specified"; then
11604          # A command without a complete path is provided, search $PATH.
11605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11606$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11607          # Extract the first word of "$tool_basename", so it can be a program name with args.
11608set dummy $tool_basename; ac_word=$2
11609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11610$as_echo_n "checking for $ac_word... " >&6; }
11611if ${ac_cv_path_TEE+:} false; then :
11612  $as_echo_n "(cached) " >&6
11613else
11614  case $TEE in
11615  [\\/]* | ?:[\\/]*)
11616  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11617  ;;
11618  *)
11619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11620for as_dir in $PATH
11621do
11622  IFS=$as_save_IFS
11623  test -z "$as_dir" && as_dir=.
11624    for ac_exec_ext in '' $ac_executable_extensions; do
11625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11626    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11628    break 2
11629  fi
11630done
11631  done
11632IFS=$as_save_IFS
11633
11634  ;;
11635esac
11636fi
11637TEE=$ac_cv_path_TEE
11638if test -n "$TEE"; then
11639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11640$as_echo "$TEE" >&6; }
11641else
11642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643$as_echo "no" >&6; }
11644fi
11645
11646
11647          if test "x$TEE" = x; then
11648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11649          fi
11650        else
11651          # Otherwise we believe it is a complete path. Use it as it is.
11652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11653$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11655$as_echo_n "checking for TEE... " >&6; }
11656          if test ! -x "$tool_specified"; then
11657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11658$as_echo "not found" >&6; }
11659            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11660          fi
11661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11662$as_echo "$tool_specified" >&6; }
11663        fi
11664      fi
11665    fi
11666
11667  fi
11668
11669
11670
11671  if test "x$TEE" = x; then
11672    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11673  fi
11674
11675
11676
11677
11678
11679  # Publish this variable in the help.
11680
11681
11682  if [ -z "${TOUCH+x}" ]; then
11683    # The variable is not set by user, try to locate tool using the code snippet
11684    for ac_prog in touch
11685do
11686  # Extract the first word of "$ac_prog", so it can be a program name with args.
11687set dummy $ac_prog; ac_word=$2
11688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11689$as_echo_n "checking for $ac_word... " >&6; }
11690if ${ac_cv_path_TOUCH+:} false; then :
11691  $as_echo_n "(cached) " >&6
11692else
11693  case $TOUCH in
11694  [\\/]* | ?:[\\/]*)
11695  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11696  ;;
11697  *)
11698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11699for as_dir in $PATH
11700do
11701  IFS=$as_save_IFS
11702  test -z "$as_dir" && as_dir=.
11703    for ac_exec_ext in '' $ac_executable_extensions; do
11704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11705    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11707    break 2
11708  fi
11709done
11710  done
11711IFS=$as_save_IFS
11712
11713  ;;
11714esac
11715fi
11716TOUCH=$ac_cv_path_TOUCH
11717if test -n "$TOUCH"; then
11718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11719$as_echo "$TOUCH" >&6; }
11720else
11721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11722$as_echo "no" >&6; }
11723fi
11724
11725
11726  test -n "$TOUCH" && break
11727done
11728
11729  else
11730    # The variable is set, but is it from the command line or the environment?
11731
11732    # Try to remove the string !TOUCH! from our list.
11733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11735      # If it failed, the variable was not from the command line. Ignore it,
11736      # but warn the user (except for BASH, which is always set by the calling BASH).
11737      if test "xTOUCH" != xBASH; then
11738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11739$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11740      fi
11741      # Try to locate tool using the code snippet
11742      for ac_prog in touch
11743do
11744  # Extract the first word of "$ac_prog", so it can be a program name with args.
11745set dummy $ac_prog; ac_word=$2
11746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11747$as_echo_n "checking for $ac_word... " >&6; }
11748if ${ac_cv_path_TOUCH+:} false; then :
11749  $as_echo_n "(cached) " >&6
11750else
11751  case $TOUCH in
11752  [\\/]* | ?:[\\/]*)
11753  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11754  ;;
11755  *)
11756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11757for as_dir in $PATH
11758do
11759  IFS=$as_save_IFS
11760  test -z "$as_dir" && as_dir=.
11761    for ac_exec_ext in '' $ac_executable_extensions; do
11762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11763    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11765    break 2
11766  fi
11767done
11768  done
11769IFS=$as_save_IFS
11770
11771  ;;
11772esac
11773fi
11774TOUCH=$ac_cv_path_TOUCH
11775if test -n "$TOUCH"; then
11776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11777$as_echo "$TOUCH" >&6; }
11778else
11779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11780$as_echo "no" >&6; }
11781fi
11782
11783
11784  test -n "$TOUCH" && break
11785done
11786
11787    else
11788      # If it succeeded, then it was overridden by the user. We will use it
11789      # for the tool.
11790
11791      # First remove it from the list of overridden variables, so we can test
11792      # for unknown variables in the end.
11793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11794
11795      # Check if we try to supply an empty value
11796      if test "x$TOUCH" = x; then
11797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11798$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11800$as_echo_n "checking for TOUCH... " >&6; }
11801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11802$as_echo "disabled" >&6; }
11803      else
11804        # Check if the provided tool contains a complete path.
11805        tool_specified="$TOUCH"
11806        tool_basename="${tool_specified##*/}"
11807        if test "x$tool_basename" = "x$tool_specified"; then
11808          # A command without a complete path is provided, search $PATH.
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11810$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11811          # Extract the first word of "$tool_basename", so it can be a program name with args.
11812set dummy $tool_basename; ac_word=$2
11813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11814$as_echo_n "checking for $ac_word... " >&6; }
11815if ${ac_cv_path_TOUCH+:} false; then :
11816  $as_echo_n "(cached) " >&6
11817else
11818  case $TOUCH in
11819  [\\/]* | ?:[\\/]*)
11820  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11821  ;;
11822  *)
11823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11824for as_dir in $PATH
11825do
11826  IFS=$as_save_IFS
11827  test -z "$as_dir" && as_dir=.
11828    for ac_exec_ext in '' $ac_executable_extensions; do
11829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11830    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11832    break 2
11833  fi
11834done
11835  done
11836IFS=$as_save_IFS
11837
11838  ;;
11839esac
11840fi
11841TOUCH=$ac_cv_path_TOUCH
11842if test -n "$TOUCH"; then
11843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11844$as_echo "$TOUCH" >&6; }
11845else
11846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11847$as_echo "no" >&6; }
11848fi
11849
11850
11851          if test "x$TOUCH" = x; then
11852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11853          fi
11854        else
11855          # Otherwise we believe it is a complete path. Use it as it is.
11856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11857$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11859$as_echo_n "checking for TOUCH... " >&6; }
11860          if test ! -x "$tool_specified"; then
11861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11862$as_echo "not found" >&6; }
11863            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11864          fi
11865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11866$as_echo "$tool_specified" >&6; }
11867        fi
11868      fi
11869    fi
11870
11871  fi
11872
11873
11874
11875  if test "x$TOUCH" = x; then
11876    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11877  fi
11878
11879
11880
11881
11882
11883  # Publish this variable in the help.
11884
11885
11886  if [ -z "${TR+x}" ]; then
11887    # The variable is not set by user, try to locate tool using the code snippet
11888    for ac_prog in tr
11889do
11890  # Extract the first word of "$ac_prog", so it can be a program name with args.
11891set dummy $ac_prog; ac_word=$2
11892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11893$as_echo_n "checking for $ac_word... " >&6; }
11894if ${ac_cv_path_TR+:} false; then :
11895  $as_echo_n "(cached) " >&6
11896else
11897  case $TR in
11898  [\\/]* | ?:[\\/]*)
11899  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11900  ;;
11901  *)
11902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11903for as_dir in $PATH
11904do
11905  IFS=$as_save_IFS
11906  test -z "$as_dir" && as_dir=.
11907    for ac_exec_ext in '' $ac_executable_extensions; do
11908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11909    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11911    break 2
11912  fi
11913done
11914  done
11915IFS=$as_save_IFS
11916
11917  ;;
11918esac
11919fi
11920TR=$ac_cv_path_TR
11921if test -n "$TR"; then
11922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11923$as_echo "$TR" >&6; }
11924else
11925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11926$as_echo "no" >&6; }
11927fi
11928
11929
11930  test -n "$TR" && break
11931done
11932
11933  else
11934    # The variable is set, but is it from the command line or the environment?
11935
11936    # Try to remove the string !TR! from our list.
11937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11939      # If it failed, the variable was not from the command line. Ignore it,
11940      # but warn the user (except for BASH, which is always set by the calling BASH).
11941      if test "xTR" != xBASH; then
11942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11943$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11944      fi
11945      # Try to locate tool using the code snippet
11946      for ac_prog in tr
11947do
11948  # Extract the first word of "$ac_prog", so it can be a program name with args.
11949set dummy $ac_prog; ac_word=$2
11950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11951$as_echo_n "checking for $ac_word... " >&6; }
11952if ${ac_cv_path_TR+:} false; then :
11953  $as_echo_n "(cached) " >&6
11954else
11955  case $TR in
11956  [\\/]* | ?:[\\/]*)
11957  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11958  ;;
11959  *)
11960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11961for as_dir in $PATH
11962do
11963  IFS=$as_save_IFS
11964  test -z "$as_dir" && as_dir=.
11965    for ac_exec_ext in '' $ac_executable_extensions; do
11966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11967    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11969    break 2
11970  fi
11971done
11972  done
11973IFS=$as_save_IFS
11974
11975  ;;
11976esac
11977fi
11978TR=$ac_cv_path_TR
11979if test -n "$TR"; then
11980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11981$as_echo "$TR" >&6; }
11982else
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11984$as_echo "no" >&6; }
11985fi
11986
11987
11988  test -n "$TR" && break
11989done
11990
11991    else
11992      # If it succeeded, then it was overridden by the user. We will use it
11993      # for the tool.
11994
11995      # First remove it from the list of overridden variables, so we can test
11996      # for unknown variables in the end.
11997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11998
11999      # Check if we try to supply an empty value
12000      if test "x$TR" = x; then
12001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12002$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12004$as_echo_n "checking for TR... " >&6; }
12005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12006$as_echo "disabled" >&6; }
12007      else
12008        # Check if the provided tool contains a complete path.
12009        tool_specified="$TR"
12010        tool_basename="${tool_specified##*/}"
12011        if test "x$tool_basename" = "x$tool_specified"; then
12012          # A command without a complete path is provided, search $PATH.
12013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12014$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12015          # Extract the first word of "$tool_basename", so it can be a program name with args.
12016set dummy $tool_basename; ac_word=$2
12017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12018$as_echo_n "checking for $ac_word... " >&6; }
12019if ${ac_cv_path_TR+:} false; then :
12020  $as_echo_n "(cached) " >&6
12021else
12022  case $TR in
12023  [\\/]* | ?:[\\/]*)
12024  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12025  ;;
12026  *)
12027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12028for as_dir in $PATH
12029do
12030  IFS=$as_save_IFS
12031  test -z "$as_dir" && as_dir=.
12032    for ac_exec_ext in '' $ac_executable_extensions; do
12033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12034    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12036    break 2
12037  fi
12038done
12039  done
12040IFS=$as_save_IFS
12041
12042  ;;
12043esac
12044fi
12045TR=$ac_cv_path_TR
12046if test -n "$TR"; then
12047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12048$as_echo "$TR" >&6; }
12049else
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12051$as_echo "no" >&6; }
12052fi
12053
12054
12055          if test "x$TR" = x; then
12056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12057          fi
12058        else
12059          # Otherwise we believe it is a complete path. Use it as it is.
12060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12061$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12063$as_echo_n "checking for TR... " >&6; }
12064          if test ! -x "$tool_specified"; then
12065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12066$as_echo "not found" >&6; }
12067            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12068          fi
12069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12070$as_echo "$tool_specified" >&6; }
12071        fi
12072      fi
12073    fi
12074
12075  fi
12076
12077
12078
12079  if test "x$TR" = x; then
12080    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12081  fi
12082
12083
12084
12085
12086
12087  # Publish this variable in the help.
12088
12089
12090  if [ -z "${UNAME+x}" ]; then
12091    # The variable is not set by user, try to locate tool using the code snippet
12092    for ac_prog in uname
12093do
12094  # Extract the first word of "$ac_prog", so it can be a program name with args.
12095set dummy $ac_prog; ac_word=$2
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12097$as_echo_n "checking for $ac_word... " >&6; }
12098if ${ac_cv_path_UNAME+:} false; then :
12099  $as_echo_n "(cached) " >&6
12100else
12101  case $UNAME in
12102  [\\/]* | ?:[\\/]*)
12103  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12104  ;;
12105  *)
12106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107for as_dir in $PATH
12108do
12109  IFS=$as_save_IFS
12110  test -z "$as_dir" && as_dir=.
12111    for ac_exec_ext in '' $ac_executable_extensions; do
12112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12113    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12115    break 2
12116  fi
12117done
12118  done
12119IFS=$as_save_IFS
12120
12121  ;;
12122esac
12123fi
12124UNAME=$ac_cv_path_UNAME
12125if test -n "$UNAME"; then
12126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12127$as_echo "$UNAME" >&6; }
12128else
12129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130$as_echo "no" >&6; }
12131fi
12132
12133
12134  test -n "$UNAME" && break
12135done
12136
12137  else
12138    # The variable is set, but is it from the command line or the environment?
12139
12140    # Try to remove the string !UNAME! from our list.
12141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12143      # If it failed, the variable was not from the command line. Ignore it,
12144      # but warn the user (except for BASH, which is always set by the calling BASH).
12145      if test "xUNAME" != xBASH; then
12146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12147$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12148      fi
12149      # Try to locate tool using the code snippet
12150      for ac_prog in uname
12151do
12152  # Extract the first word of "$ac_prog", so it can be a program name with args.
12153set dummy $ac_prog; ac_word=$2
12154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12155$as_echo_n "checking for $ac_word... " >&6; }
12156if ${ac_cv_path_UNAME+:} false; then :
12157  $as_echo_n "(cached) " >&6
12158else
12159  case $UNAME in
12160  [\\/]* | ?:[\\/]*)
12161  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12162  ;;
12163  *)
12164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12165for as_dir in $PATH
12166do
12167  IFS=$as_save_IFS
12168  test -z "$as_dir" && as_dir=.
12169    for ac_exec_ext in '' $ac_executable_extensions; do
12170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12171    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12173    break 2
12174  fi
12175done
12176  done
12177IFS=$as_save_IFS
12178
12179  ;;
12180esac
12181fi
12182UNAME=$ac_cv_path_UNAME
12183if test -n "$UNAME"; then
12184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12185$as_echo "$UNAME" >&6; }
12186else
12187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12188$as_echo "no" >&6; }
12189fi
12190
12191
12192  test -n "$UNAME" && break
12193done
12194
12195    else
12196      # If it succeeded, then it was overridden by the user. We will use it
12197      # for the tool.
12198
12199      # First remove it from the list of overridden variables, so we can test
12200      # for unknown variables in the end.
12201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12202
12203      # Check if we try to supply an empty value
12204      if test "x$UNAME" = x; then
12205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12206$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12208$as_echo_n "checking for UNAME... " >&6; }
12209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12210$as_echo "disabled" >&6; }
12211      else
12212        # Check if the provided tool contains a complete path.
12213        tool_specified="$UNAME"
12214        tool_basename="${tool_specified##*/}"
12215        if test "x$tool_basename" = "x$tool_specified"; then
12216          # A command without a complete path is provided, search $PATH.
12217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12218$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12219          # Extract the first word of "$tool_basename", so it can be a program name with args.
12220set dummy $tool_basename; ac_word=$2
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12222$as_echo_n "checking for $ac_word... " >&6; }
12223if ${ac_cv_path_UNAME+:} false; then :
12224  $as_echo_n "(cached) " >&6
12225else
12226  case $UNAME in
12227  [\\/]* | ?:[\\/]*)
12228  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12229  ;;
12230  *)
12231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12232for as_dir in $PATH
12233do
12234  IFS=$as_save_IFS
12235  test -z "$as_dir" && as_dir=.
12236    for ac_exec_ext in '' $ac_executable_extensions; do
12237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12238    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12240    break 2
12241  fi
12242done
12243  done
12244IFS=$as_save_IFS
12245
12246  ;;
12247esac
12248fi
12249UNAME=$ac_cv_path_UNAME
12250if test -n "$UNAME"; then
12251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12252$as_echo "$UNAME" >&6; }
12253else
12254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12255$as_echo "no" >&6; }
12256fi
12257
12258
12259          if test "x$UNAME" = x; then
12260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12261          fi
12262        else
12263          # Otherwise we believe it is a complete path. Use it as it is.
12264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12265$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12267$as_echo_n "checking for UNAME... " >&6; }
12268          if test ! -x "$tool_specified"; then
12269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12270$as_echo "not found" >&6; }
12271            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12272          fi
12273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12274$as_echo "$tool_specified" >&6; }
12275        fi
12276      fi
12277    fi
12278
12279  fi
12280
12281
12282
12283  if test "x$UNAME" = x; then
12284    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12285  fi
12286
12287
12288
12289
12290
12291  # Publish this variable in the help.
12292
12293
12294  if [ -z "${UNIQ+x}" ]; then
12295    # The variable is not set by user, try to locate tool using the code snippet
12296    for ac_prog in uniq
12297do
12298  # Extract the first word of "$ac_prog", so it can be a program name with args.
12299set dummy $ac_prog; ac_word=$2
12300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12301$as_echo_n "checking for $ac_word... " >&6; }
12302if ${ac_cv_path_UNIQ+:} false; then :
12303  $as_echo_n "(cached) " >&6
12304else
12305  case $UNIQ in
12306  [\\/]* | ?:[\\/]*)
12307  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12308  ;;
12309  *)
12310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12311for as_dir in $PATH
12312do
12313  IFS=$as_save_IFS
12314  test -z "$as_dir" && as_dir=.
12315    for ac_exec_ext in '' $ac_executable_extensions; do
12316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12317    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12319    break 2
12320  fi
12321done
12322  done
12323IFS=$as_save_IFS
12324
12325  ;;
12326esac
12327fi
12328UNIQ=$ac_cv_path_UNIQ
12329if test -n "$UNIQ"; then
12330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12331$as_echo "$UNIQ" >&6; }
12332else
12333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12334$as_echo "no" >&6; }
12335fi
12336
12337
12338  test -n "$UNIQ" && break
12339done
12340
12341  else
12342    # The variable is set, but is it from the command line or the environment?
12343
12344    # Try to remove the string !UNIQ! from our list.
12345    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12346    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12347      # If it failed, the variable was not from the command line. Ignore it,
12348      # but warn the user (except for BASH, which is always set by the calling BASH).
12349      if test "xUNIQ" != xBASH; then
12350        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12351$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12352      fi
12353      # Try to locate tool using the code snippet
12354      for ac_prog in uniq
12355do
12356  # Extract the first word of "$ac_prog", so it can be a program name with args.
12357set dummy $ac_prog; ac_word=$2
12358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12359$as_echo_n "checking for $ac_word... " >&6; }
12360if ${ac_cv_path_UNIQ+:} false; then :
12361  $as_echo_n "(cached) " >&6
12362else
12363  case $UNIQ in
12364  [\\/]* | ?:[\\/]*)
12365  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12366  ;;
12367  *)
12368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12369for as_dir in $PATH
12370do
12371  IFS=$as_save_IFS
12372  test -z "$as_dir" && as_dir=.
12373    for ac_exec_ext in '' $ac_executable_extensions; do
12374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12375    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12377    break 2
12378  fi
12379done
12380  done
12381IFS=$as_save_IFS
12382
12383  ;;
12384esac
12385fi
12386UNIQ=$ac_cv_path_UNIQ
12387if test -n "$UNIQ"; then
12388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12389$as_echo "$UNIQ" >&6; }
12390else
12391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12392$as_echo "no" >&6; }
12393fi
12394
12395
12396  test -n "$UNIQ" && break
12397done
12398
12399    else
12400      # If it succeeded, then it was overridden by the user. We will use it
12401      # for the tool.
12402
12403      # First remove it from the list of overridden variables, so we can test
12404      # for unknown variables in the end.
12405      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12406
12407      # Check if we try to supply an empty value
12408      if test "x$UNIQ" = x; then
12409        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12410$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12412$as_echo_n "checking for UNIQ... " >&6; }
12413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12414$as_echo "disabled" >&6; }
12415      else
12416        # Check if the provided tool contains a complete path.
12417        tool_specified="$UNIQ"
12418        tool_basename="${tool_specified##*/}"
12419        if test "x$tool_basename" = "x$tool_specified"; then
12420          # A command without a complete path is provided, search $PATH.
12421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12422$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12423          # Extract the first word of "$tool_basename", so it can be a program name with args.
12424set dummy $tool_basename; ac_word=$2
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12426$as_echo_n "checking for $ac_word... " >&6; }
12427if ${ac_cv_path_UNIQ+:} false; then :
12428  $as_echo_n "(cached) " >&6
12429else
12430  case $UNIQ in
12431  [\\/]* | ?:[\\/]*)
12432  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12433  ;;
12434  *)
12435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12436for as_dir in $PATH
12437do
12438  IFS=$as_save_IFS
12439  test -z "$as_dir" && as_dir=.
12440    for ac_exec_ext in '' $ac_executable_extensions; do
12441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12442    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12444    break 2
12445  fi
12446done
12447  done
12448IFS=$as_save_IFS
12449
12450  ;;
12451esac
12452fi
12453UNIQ=$ac_cv_path_UNIQ
12454if test -n "$UNIQ"; then
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12456$as_echo "$UNIQ" >&6; }
12457else
12458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
12460fi
12461
12462
12463          if test "x$UNIQ" = x; then
12464            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12465          fi
12466        else
12467          # Otherwise we believe it is a complete path. Use it as it is.
12468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12469$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12470          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12471$as_echo_n "checking for UNIQ... " >&6; }
12472          if test ! -x "$tool_specified"; then
12473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12474$as_echo "not found" >&6; }
12475            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12476          fi
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12478$as_echo "$tool_specified" >&6; }
12479        fi
12480      fi
12481    fi
12482
12483  fi
12484
12485
12486
12487  if test "x$UNIQ" = x; then
12488    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12489  fi
12490
12491
12492
12493
12494
12495  # Publish this variable in the help.
12496
12497
12498  if [ -z "${WC+x}" ]; then
12499    # The variable is not set by user, try to locate tool using the code snippet
12500    for ac_prog in wc
12501do
12502  # Extract the first word of "$ac_prog", so it can be a program name with args.
12503set dummy $ac_prog; ac_word=$2
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12505$as_echo_n "checking for $ac_word... " >&6; }
12506if ${ac_cv_path_WC+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  case $WC in
12510  [\\/]* | ?:[\\/]*)
12511  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12512  ;;
12513  *)
12514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12515for as_dir in $PATH
12516do
12517  IFS=$as_save_IFS
12518  test -z "$as_dir" && as_dir=.
12519    for ac_exec_ext in '' $ac_executable_extensions; do
12520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12521    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12523    break 2
12524  fi
12525done
12526  done
12527IFS=$as_save_IFS
12528
12529  ;;
12530esac
12531fi
12532WC=$ac_cv_path_WC
12533if test -n "$WC"; then
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12535$as_echo "$WC" >&6; }
12536else
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
12539fi
12540
12541
12542  test -n "$WC" && break
12543done
12544
12545  else
12546    # The variable is set, but is it from the command line or the environment?
12547
12548    # Try to remove the string !WC! from our list.
12549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12551      # If it failed, the variable was not from the command line. Ignore it,
12552      # but warn the user (except for BASH, which is always set by the calling BASH).
12553      if test "xWC" != xBASH; then
12554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12555$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12556      fi
12557      # Try to locate tool using the code snippet
12558      for ac_prog in wc
12559do
12560  # Extract the first word of "$ac_prog", so it can be a program name with args.
12561set dummy $ac_prog; ac_word=$2
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12563$as_echo_n "checking for $ac_word... " >&6; }
12564if ${ac_cv_path_WC+:} false; then :
12565  $as_echo_n "(cached) " >&6
12566else
12567  case $WC in
12568  [\\/]* | ?:[\\/]*)
12569  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12570  ;;
12571  *)
12572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12573for as_dir in $PATH
12574do
12575  IFS=$as_save_IFS
12576  test -z "$as_dir" && as_dir=.
12577    for ac_exec_ext in '' $ac_executable_extensions; do
12578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12579    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12581    break 2
12582  fi
12583done
12584  done
12585IFS=$as_save_IFS
12586
12587  ;;
12588esac
12589fi
12590WC=$ac_cv_path_WC
12591if test -n "$WC"; then
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12593$as_echo "$WC" >&6; }
12594else
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598
12599
12600  test -n "$WC" && break
12601done
12602
12603    else
12604      # If it succeeded, then it was overridden by the user. We will use it
12605      # for the tool.
12606
12607      # First remove it from the list of overridden variables, so we can test
12608      # for unknown variables in the end.
12609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12610
12611      # Check if we try to supply an empty value
12612      if test "x$WC" = x; then
12613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12614$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12616$as_echo_n "checking for WC... " >&6; }
12617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12618$as_echo "disabled" >&6; }
12619      else
12620        # Check if the provided tool contains a complete path.
12621        tool_specified="$WC"
12622        tool_basename="${tool_specified##*/}"
12623        if test "x$tool_basename" = "x$tool_specified"; then
12624          # A command without a complete path is provided, search $PATH.
12625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12626$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12627          # Extract the first word of "$tool_basename", so it can be a program name with args.
12628set dummy $tool_basename; ac_word=$2
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12630$as_echo_n "checking for $ac_word... " >&6; }
12631if ${ac_cv_path_WC+:} false; then :
12632  $as_echo_n "(cached) " >&6
12633else
12634  case $WC in
12635  [\\/]* | ?:[\\/]*)
12636  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12637  ;;
12638  *)
12639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12640for as_dir in $PATH
12641do
12642  IFS=$as_save_IFS
12643  test -z "$as_dir" && as_dir=.
12644    for ac_exec_ext in '' $ac_executable_extensions; do
12645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12646    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12648    break 2
12649  fi
12650done
12651  done
12652IFS=$as_save_IFS
12653
12654  ;;
12655esac
12656fi
12657WC=$ac_cv_path_WC
12658if test -n "$WC"; then
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12660$as_echo "$WC" >&6; }
12661else
12662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12663$as_echo "no" >&6; }
12664fi
12665
12666
12667          if test "x$WC" = x; then
12668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12669          fi
12670        else
12671          # Otherwise we believe it is a complete path. Use it as it is.
12672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12673$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12675$as_echo_n "checking for WC... " >&6; }
12676          if test ! -x "$tool_specified"; then
12677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12678$as_echo "not found" >&6; }
12679            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12680          fi
12681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12682$as_echo "$tool_specified" >&6; }
12683        fi
12684      fi
12685    fi
12686
12687  fi
12688
12689
12690
12691  if test "x$WC" = x; then
12692    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12693  fi
12694
12695
12696
12697
12698
12699  # Publish this variable in the help.
12700
12701
12702  if [ -z "${WHICH+x}" ]; then
12703    # The variable is not set by user, try to locate tool using the code snippet
12704    for ac_prog in which
12705do
12706  # Extract the first word of "$ac_prog", so it can be a program name with args.
12707set dummy $ac_prog; ac_word=$2
12708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12709$as_echo_n "checking for $ac_word... " >&6; }
12710if ${ac_cv_path_WHICH+:} false; then :
12711  $as_echo_n "(cached) " >&6
12712else
12713  case $WHICH in
12714  [\\/]* | ?:[\\/]*)
12715  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12716  ;;
12717  *)
12718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12719for as_dir in $PATH
12720do
12721  IFS=$as_save_IFS
12722  test -z "$as_dir" && as_dir=.
12723    for ac_exec_ext in '' $ac_executable_extensions; do
12724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12725    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12727    break 2
12728  fi
12729done
12730  done
12731IFS=$as_save_IFS
12732
12733  ;;
12734esac
12735fi
12736WHICH=$ac_cv_path_WHICH
12737if test -n "$WHICH"; then
12738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12739$as_echo "$WHICH" >&6; }
12740else
12741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12742$as_echo "no" >&6; }
12743fi
12744
12745
12746  test -n "$WHICH" && break
12747done
12748
12749  else
12750    # The variable is set, but is it from the command line or the environment?
12751
12752    # Try to remove the string !WHICH! from our list.
12753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12755      # If it failed, the variable was not from the command line. Ignore it,
12756      # but warn the user (except for BASH, which is always set by the calling BASH).
12757      if test "xWHICH" != xBASH; then
12758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12759$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12760      fi
12761      # Try to locate tool using the code snippet
12762      for ac_prog in which
12763do
12764  # Extract the first word of "$ac_prog", so it can be a program name with args.
12765set dummy $ac_prog; ac_word=$2
12766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12767$as_echo_n "checking for $ac_word... " >&6; }
12768if ${ac_cv_path_WHICH+:} false; then :
12769  $as_echo_n "(cached) " >&6
12770else
12771  case $WHICH in
12772  [\\/]* | ?:[\\/]*)
12773  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12774  ;;
12775  *)
12776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12777for as_dir in $PATH
12778do
12779  IFS=$as_save_IFS
12780  test -z "$as_dir" && as_dir=.
12781    for ac_exec_ext in '' $ac_executable_extensions; do
12782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12783    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12785    break 2
12786  fi
12787done
12788  done
12789IFS=$as_save_IFS
12790
12791  ;;
12792esac
12793fi
12794WHICH=$ac_cv_path_WHICH
12795if test -n "$WHICH"; then
12796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12797$as_echo "$WHICH" >&6; }
12798else
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12800$as_echo "no" >&6; }
12801fi
12802
12803
12804  test -n "$WHICH" && break
12805done
12806
12807    else
12808      # If it succeeded, then it was overridden by the user. We will use it
12809      # for the tool.
12810
12811      # First remove it from the list of overridden variables, so we can test
12812      # for unknown variables in the end.
12813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12814
12815      # Check if we try to supply an empty value
12816      if test "x$WHICH" = x; then
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12818$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12820$as_echo_n "checking for WHICH... " >&6; }
12821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12822$as_echo "disabled" >&6; }
12823      else
12824        # Check if the provided tool contains a complete path.
12825        tool_specified="$WHICH"
12826        tool_basename="${tool_specified##*/}"
12827        if test "x$tool_basename" = "x$tool_specified"; then
12828          # A command without a complete path is provided, search $PATH.
12829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12830$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12831          # Extract the first word of "$tool_basename", so it can be a program name with args.
12832set dummy $tool_basename; ac_word=$2
12833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12834$as_echo_n "checking for $ac_word... " >&6; }
12835if ${ac_cv_path_WHICH+:} false; then :
12836  $as_echo_n "(cached) " >&6
12837else
12838  case $WHICH in
12839  [\\/]* | ?:[\\/]*)
12840  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12841  ;;
12842  *)
12843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12844for as_dir in $PATH
12845do
12846  IFS=$as_save_IFS
12847  test -z "$as_dir" && as_dir=.
12848    for ac_exec_ext in '' $ac_executable_extensions; do
12849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12850    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12852    break 2
12853  fi
12854done
12855  done
12856IFS=$as_save_IFS
12857
12858  ;;
12859esac
12860fi
12861WHICH=$ac_cv_path_WHICH
12862if test -n "$WHICH"; then
12863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12864$as_echo "$WHICH" >&6; }
12865else
12866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12867$as_echo "no" >&6; }
12868fi
12869
12870
12871          if test "x$WHICH" = x; then
12872            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12873          fi
12874        else
12875          # Otherwise we believe it is a complete path. Use it as it is.
12876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12877$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12878          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12879$as_echo_n "checking for WHICH... " >&6; }
12880          if test ! -x "$tool_specified"; then
12881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12882$as_echo "not found" >&6; }
12883            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12884          fi
12885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12886$as_echo "$tool_specified" >&6; }
12887        fi
12888      fi
12889    fi
12890
12891  fi
12892
12893
12894
12895  if test "x$WHICH" = x; then
12896    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12897  fi
12898
12899
12900
12901
12902
12903  # Publish this variable in the help.
12904
12905
12906  if [ -z "${XARGS+x}" ]; then
12907    # The variable is not set by user, try to locate tool using the code snippet
12908    for ac_prog in xargs
12909do
12910  # Extract the first word of "$ac_prog", so it can be a program name with args.
12911set dummy $ac_prog; ac_word=$2
12912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12913$as_echo_n "checking for $ac_word... " >&6; }
12914if ${ac_cv_path_XARGS+:} false; then :
12915  $as_echo_n "(cached) " >&6
12916else
12917  case $XARGS in
12918  [\\/]* | ?:[\\/]*)
12919  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12920  ;;
12921  *)
12922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12923for as_dir in $PATH
12924do
12925  IFS=$as_save_IFS
12926  test -z "$as_dir" && as_dir=.
12927    for ac_exec_ext in '' $ac_executable_extensions; do
12928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12929    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12931    break 2
12932  fi
12933done
12934  done
12935IFS=$as_save_IFS
12936
12937  ;;
12938esac
12939fi
12940XARGS=$ac_cv_path_XARGS
12941if test -n "$XARGS"; then
12942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12943$as_echo "$XARGS" >&6; }
12944else
12945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12946$as_echo "no" >&6; }
12947fi
12948
12949
12950  test -n "$XARGS" && break
12951done
12952
12953  else
12954    # The variable is set, but is it from the command line or the environment?
12955
12956    # Try to remove the string !XARGS! from our list.
12957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12959      # If it failed, the variable was not from the command line. Ignore it,
12960      # but warn the user (except for BASH, which is always set by the calling BASH).
12961      if test "xXARGS" != xBASH; then
12962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12963$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12964      fi
12965      # Try to locate tool using the code snippet
12966      for ac_prog in xargs
12967do
12968  # Extract the first word of "$ac_prog", so it can be a program name with args.
12969set dummy $ac_prog; ac_word=$2
12970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12971$as_echo_n "checking for $ac_word... " >&6; }
12972if ${ac_cv_path_XARGS+:} false; then :
12973  $as_echo_n "(cached) " >&6
12974else
12975  case $XARGS in
12976  [\\/]* | ?:[\\/]*)
12977  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12978  ;;
12979  *)
12980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12981for as_dir in $PATH
12982do
12983  IFS=$as_save_IFS
12984  test -z "$as_dir" && as_dir=.
12985    for ac_exec_ext in '' $ac_executable_extensions; do
12986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12987    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12989    break 2
12990  fi
12991done
12992  done
12993IFS=$as_save_IFS
12994
12995  ;;
12996esac
12997fi
12998XARGS=$ac_cv_path_XARGS
12999if test -n "$XARGS"; then
13000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13001$as_echo "$XARGS" >&6; }
13002else
13003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13004$as_echo "no" >&6; }
13005fi
13006
13007
13008  test -n "$XARGS" && break
13009done
13010
13011    else
13012      # If it succeeded, then it was overridden by the user. We will use it
13013      # for the tool.
13014
13015      # First remove it from the list of overridden variables, so we can test
13016      # for unknown variables in the end.
13017      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13018
13019      # Check if we try to supply an empty value
13020      if test "x$XARGS" = x; then
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13022$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13024$as_echo_n "checking for XARGS... " >&6; }
13025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13026$as_echo "disabled" >&6; }
13027      else
13028        # Check if the provided tool contains a complete path.
13029        tool_specified="$XARGS"
13030        tool_basename="${tool_specified##*/}"
13031        if test "x$tool_basename" = "x$tool_specified"; then
13032          # A command without a complete path is provided, search $PATH.
13033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13034$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13035          # Extract the first word of "$tool_basename", so it can be a program name with args.
13036set dummy $tool_basename; ac_word=$2
13037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13038$as_echo_n "checking for $ac_word... " >&6; }
13039if ${ac_cv_path_XARGS+:} false; then :
13040  $as_echo_n "(cached) " >&6
13041else
13042  case $XARGS in
13043  [\\/]* | ?:[\\/]*)
13044  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13045  ;;
13046  *)
13047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13048for as_dir in $PATH
13049do
13050  IFS=$as_save_IFS
13051  test -z "$as_dir" && as_dir=.
13052    for ac_exec_ext in '' $ac_executable_extensions; do
13053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13054    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13056    break 2
13057  fi
13058done
13059  done
13060IFS=$as_save_IFS
13061
13062  ;;
13063esac
13064fi
13065XARGS=$ac_cv_path_XARGS
13066if test -n "$XARGS"; then
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13068$as_echo "$XARGS" >&6; }
13069else
13070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071$as_echo "no" >&6; }
13072fi
13073
13074
13075          if test "x$XARGS" = x; then
13076            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13077          fi
13078        else
13079          # Otherwise we believe it is a complete path. Use it as it is.
13080          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13081$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13082          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13083$as_echo_n "checking for XARGS... " >&6; }
13084          if test ! -x "$tool_specified"; then
13085            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13086$as_echo "not found" >&6; }
13087            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13088          fi
13089          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13090$as_echo "$tool_specified" >&6; }
13091        fi
13092      fi
13093    fi
13094
13095  fi
13096
13097
13098
13099  if test "x$XARGS" = x; then
13100    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13101  fi
13102
13103
13104
13105  # Then required tools that require some special treatment.
13106
13107
13108  # Publish this variable in the help.
13109
13110
13111  if [ -z "${AWK+x}" ]; then
13112    # The variable is not set by user, try to locate tool using the code snippet
13113    for ac_prog in gawk mawk nawk awk
13114do
13115  # Extract the first word of "$ac_prog", so it can be a program name with args.
13116set dummy $ac_prog; ac_word=$2
13117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13118$as_echo_n "checking for $ac_word... " >&6; }
13119if ${ac_cv_prog_AWK+:} false; then :
13120  $as_echo_n "(cached) " >&6
13121else
13122  if test -n "$AWK"; then
13123  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13124else
13125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13126for as_dir in $PATH
13127do
13128  IFS=$as_save_IFS
13129  test -z "$as_dir" && as_dir=.
13130    for ac_exec_ext in '' $ac_executable_extensions; do
13131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13132    ac_cv_prog_AWK="$ac_prog"
13133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13134    break 2
13135  fi
13136done
13137  done
13138IFS=$as_save_IFS
13139
13140fi
13141fi
13142AWK=$ac_cv_prog_AWK
13143if test -n "$AWK"; then
13144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13145$as_echo "$AWK" >&6; }
13146else
13147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13148$as_echo "no" >&6; }
13149fi
13150
13151
13152  test -n "$AWK" && break
13153done
13154
13155  else
13156    # The variable is set, but is it from the command line or the environment?
13157
13158    # Try to remove the string !AWK! from our list.
13159    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13160    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13161      # If it failed, the variable was not from the command line. Ignore it,
13162      # but warn the user (except for BASH, which is always set by the calling BASH).
13163      if test "xAWK" != xBASH; then
13164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13165$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13166      fi
13167      # Try to locate tool using the code snippet
13168      for ac_prog in gawk mawk nawk awk
13169do
13170  # Extract the first word of "$ac_prog", so it can be a program name with args.
13171set dummy $ac_prog; ac_word=$2
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13173$as_echo_n "checking for $ac_word... " >&6; }
13174if ${ac_cv_prog_AWK+:} false; then :
13175  $as_echo_n "(cached) " >&6
13176else
13177  if test -n "$AWK"; then
13178  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13179else
13180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13181for as_dir in $PATH
13182do
13183  IFS=$as_save_IFS
13184  test -z "$as_dir" && as_dir=.
13185    for ac_exec_ext in '' $ac_executable_extensions; do
13186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13187    ac_cv_prog_AWK="$ac_prog"
13188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13189    break 2
13190  fi
13191done
13192  done
13193IFS=$as_save_IFS
13194
13195fi
13196fi
13197AWK=$ac_cv_prog_AWK
13198if test -n "$AWK"; then
13199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13200$as_echo "$AWK" >&6; }
13201else
13202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13203$as_echo "no" >&6; }
13204fi
13205
13206
13207  test -n "$AWK" && break
13208done
13209
13210    else
13211      # If it succeeded, then it was overridden by the user. We will use it
13212      # for the tool.
13213
13214      # First remove it from the list of overridden variables, so we can test
13215      # for unknown variables in the end.
13216      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13217
13218      # Check if we try to supply an empty value
13219      if test "x$AWK" = x; then
13220        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13221$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13223$as_echo_n "checking for AWK... " >&6; }
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13225$as_echo "disabled" >&6; }
13226      else
13227        # Check if the provided tool contains a complete path.
13228        tool_specified="$AWK"
13229        tool_basename="${tool_specified##*/}"
13230        if test "x$tool_basename" = "x$tool_specified"; then
13231          # A command without a complete path is provided, search $PATH.
13232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13233$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13234          # Extract the first word of "$tool_basename", so it can be a program name with args.
13235set dummy $tool_basename; ac_word=$2
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13237$as_echo_n "checking for $ac_word... " >&6; }
13238if ${ac_cv_path_AWK+:} false; then :
13239  $as_echo_n "(cached) " >&6
13240else
13241  case $AWK in
13242  [\\/]* | ?:[\\/]*)
13243  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13244  ;;
13245  *)
13246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13247for as_dir in $PATH
13248do
13249  IFS=$as_save_IFS
13250  test -z "$as_dir" && as_dir=.
13251    for ac_exec_ext in '' $ac_executable_extensions; do
13252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13253    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13255    break 2
13256  fi
13257done
13258  done
13259IFS=$as_save_IFS
13260
13261  ;;
13262esac
13263fi
13264AWK=$ac_cv_path_AWK
13265if test -n "$AWK"; then
13266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13267$as_echo "$AWK" >&6; }
13268else
13269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13270$as_echo "no" >&6; }
13271fi
13272
13273
13274          if test "x$AWK" = x; then
13275            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13276          fi
13277        else
13278          # Otherwise we believe it is a complete path. Use it as it is.
13279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13280$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13281          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13282$as_echo_n "checking for AWK... " >&6; }
13283          if test ! -x "$tool_specified"; then
13284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13285$as_echo "not found" >&6; }
13286            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13287          fi
13288          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13289$as_echo "$tool_specified" >&6; }
13290        fi
13291      fi
13292    fi
13293
13294  fi
13295
13296
13297  if test "x$AWK" = x; then
13298    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13299  fi
13300
13301
13302
13303
13304  # Publish this variable in the help.
13305
13306
13307  if [ -z "${GREP+x}" ]; then
13308    # The variable is not set by user, try to locate tool using the code snippet
13309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13310$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13311if ${ac_cv_path_GREP+:} false; then :
13312  $as_echo_n "(cached) " >&6
13313else
13314  if test -z "$GREP"; then
13315  ac_path_GREP_found=false
13316  # Loop through the user's path and test for each of PROGNAME-LIST
13317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13318for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13319do
13320  IFS=$as_save_IFS
13321  test -z "$as_dir" && as_dir=.
13322    for ac_prog in grep ggrep; do
13323    for ac_exec_ext in '' $ac_executable_extensions; do
13324      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13325      as_fn_executable_p "$ac_path_GREP" || continue
13326# Check for GNU ac_path_GREP and select it if it is found.
13327  # Check for GNU $ac_path_GREP
13328case `"$ac_path_GREP" --version 2>&1` in
13329*GNU*)
13330  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13331*)
13332  ac_count=0
13333  $as_echo_n 0123456789 >"conftest.in"
13334  while :
13335  do
13336    cat "conftest.in" "conftest.in" >"conftest.tmp"
13337    mv "conftest.tmp" "conftest.in"
13338    cp "conftest.in" "conftest.nl"
13339    $as_echo 'GREP' >> "conftest.nl"
13340    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13341    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13342    as_fn_arith $ac_count + 1 && ac_count=$as_val
13343    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13344      # Best one so far, save it but keep looking for a better one
13345      ac_cv_path_GREP="$ac_path_GREP"
13346      ac_path_GREP_max=$ac_count
13347    fi
13348    # 10*(2^10) chars as input seems more than enough
13349    test $ac_count -gt 10 && break
13350  done
13351  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13352esac
13353
13354      $ac_path_GREP_found && break 3
13355    done
13356  done
13357  done
13358IFS=$as_save_IFS
13359  if test -z "$ac_cv_path_GREP"; then
13360    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13361  fi
13362else
13363  ac_cv_path_GREP=$GREP
13364fi
13365
13366fi
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13368$as_echo "$ac_cv_path_GREP" >&6; }
13369 GREP="$ac_cv_path_GREP"
13370
13371
13372  else
13373    # The variable is set, but is it from the command line or the environment?
13374
13375    # Try to remove the string !GREP! from our list.
13376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13378      # If it failed, the variable was not from the command line. Ignore it,
13379      # but warn the user (except for BASH, which is always set by the calling BASH).
13380      if test "xGREP" != xBASH; then
13381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13382$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13383      fi
13384      # Try to locate tool using the code snippet
13385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13386$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13387if ${ac_cv_path_GREP+:} false; then :
13388  $as_echo_n "(cached) " >&6
13389else
13390  if test -z "$GREP"; then
13391  ac_path_GREP_found=false
13392  # Loop through the user's path and test for each of PROGNAME-LIST
13393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13394for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13395do
13396  IFS=$as_save_IFS
13397  test -z "$as_dir" && as_dir=.
13398    for ac_prog in grep ggrep; do
13399    for ac_exec_ext in '' $ac_executable_extensions; do
13400      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13401      as_fn_executable_p "$ac_path_GREP" || continue
13402# Check for GNU ac_path_GREP and select it if it is found.
13403  # Check for GNU $ac_path_GREP
13404case `"$ac_path_GREP" --version 2>&1` in
13405*GNU*)
13406  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13407*)
13408  ac_count=0
13409  $as_echo_n 0123456789 >"conftest.in"
13410  while :
13411  do
13412    cat "conftest.in" "conftest.in" >"conftest.tmp"
13413    mv "conftest.tmp" "conftest.in"
13414    cp "conftest.in" "conftest.nl"
13415    $as_echo 'GREP' >> "conftest.nl"
13416    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13417    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13418    as_fn_arith $ac_count + 1 && ac_count=$as_val
13419    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13420      # Best one so far, save it but keep looking for a better one
13421      ac_cv_path_GREP="$ac_path_GREP"
13422      ac_path_GREP_max=$ac_count
13423    fi
13424    # 10*(2^10) chars as input seems more than enough
13425    test $ac_count -gt 10 && break
13426  done
13427  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13428esac
13429
13430      $ac_path_GREP_found && break 3
13431    done
13432  done
13433  done
13434IFS=$as_save_IFS
13435  if test -z "$ac_cv_path_GREP"; then
13436    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13437  fi
13438else
13439  ac_cv_path_GREP=$GREP
13440fi
13441
13442fi
13443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13444$as_echo "$ac_cv_path_GREP" >&6; }
13445 GREP="$ac_cv_path_GREP"
13446
13447
13448    else
13449      # If it succeeded, then it was overridden by the user. We will use it
13450      # for the tool.
13451
13452      # First remove it from the list of overridden variables, so we can test
13453      # for unknown variables in the end.
13454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13455
13456      # Check if we try to supply an empty value
13457      if test "x$GREP" = x; then
13458        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13459$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13461$as_echo_n "checking for GREP... " >&6; }
13462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13463$as_echo "disabled" >&6; }
13464      else
13465        # Check if the provided tool contains a complete path.
13466        tool_specified="$GREP"
13467        tool_basename="${tool_specified##*/}"
13468        if test "x$tool_basename" = "x$tool_specified"; then
13469          # A command without a complete path is provided, search $PATH.
13470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13471$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13472          # Extract the first word of "$tool_basename", so it can be a program name with args.
13473set dummy $tool_basename; ac_word=$2
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13475$as_echo_n "checking for $ac_word... " >&6; }
13476if ${ac_cv_path_GREP+:} false; then :
13477  $as_echo_n "(cached) " >&6
13478else
13479  case $GREP in
13480  [\\/]* | ?:[\\/]*)
13481  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13482  ;;
13483  *)
13484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13485for as_dir in $PATH
13486do
13487  IFS=$as_save_IFS
13488  test -z "$as_dir" && as_dir=.
13489    for ac_exec_ext in '' $ac_executable_extensions; do
13490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13491    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13493    break 2
13494  fi
13495done
13496  done
13497IFS=$as_save_IFS
13498
13499  ;;
13500esac
13501fi
13502GREP=$ac_cv_path_GREP
13503if test -n "$GREP"; then
13504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13505$as_echo "$GREP" >&6; }
13506else
13507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508$as_echo "no" >&6; }
13509fi
13510
13511
13512          if test "x$GREP" = x; then
13513            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13514          fi
13515        else
13516          # Otherwise we believe it is a complete path. Use it as it is.
13517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13518$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13519          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13520$as_echo_n "checking for GREP... " >&6; }
13521          if test ! -x "$tool_specified"; then
13522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13523$as_echo "not found" >&6; }
13524            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13525          fi
13526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13527$as_echo "$tool_specified" >&6; }
13528        fi
13529      fi
13530    fi
13531
13532  fi
13533
13534
13535  if test "x$GREP" = x; then
13536    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13537  fi
13538
13539
13540
13541
13542  # Publish this variable in the help.
13543
13544
13545  if [ -z "${EGREP+x}" ]; then
13546    # The variable is not set by user, try to locate tool using the code snippet
13547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13548$as_echo_n "checking for egrep... " >&6; }
13549if ${ac_cv_path_EGREP+:} false; then :
13550  $as_echo_n "(cached) " >&6
13551else
13552  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13553   then ac_cv_path_EGREP="$GREP -E"
13554   else
13555     if test -z "$EGREP"; then
13556  ac_path_EGREP_found=false
13557  # Loop through the user's path and test for each of PROGNAME-LIST
13558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13559for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13560do
13561  IFS=$as_save_IFS
13562  test -z "$as_dir" && as_dir=.
13563    for ac_prog in egrep; do
13564    for ac_exec_ext in '' $ac_executable_extensions; do
13565      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13566      as_fn_executable_p "$ac_path_EGREP" || continue
13567# Check for GNU ac_path_EGREP and select it if it is found.
13568  # Check for GNU $ac_path_EGREP
13569case `"$ac_path_EGREP" --version 2>&1` in
13570*GNU*)
13571  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13572*)
13573  ac_count=0
13574  $as_echo_n 0123456789 >"conftest.in"
13575  while :
13576  do
13577    cat "conftest.in" "conftest.in" >"conftest.tmp"
13578    mv "conftest.tmp" "conftest.in"
13579    cp "conftest.in" "conftest.nl"
13580    $as_echo 'EGREP' >> "conftest.nl"
13581    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13582    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13583    as_fn_arith $ac_count + 1 && ac_count=$as_val
13584    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13585      # Best one so far, save it but keep looking for a better one
13586      ac_cv_path_EGREP="$ac_path_EGREP"
13587      ac_path_EGREP_max=$ac_count
13588    fi
13589    # 10*(2^10) chars as input seems more than enough
13590    test $ac_count -gt 10 && break
13591  done
13592  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13593esac
13594
13595      $ac_path_EGREP_found && break 3
13596    done
13597  done
13598  done
13599IFS=$as_save_IFS
13600  if test -z "$ac_cv_path_EGREP"; then
13601    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13602  fi
13603else
13604  ac_cv_path_EGREP=$EGREP
13605fi
13606
13607   fi
13608fi
13609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13610$as_echo "$ac_cv_path_EGREP" >&6; }
13611 EGREP="$ac_cv_path_EGREP"
13612
13613
13614  else
13615    # The variable is set, but is it from the command line or the environment?
13616
13617    # Try to remove the string !EGREP! from our list.
13618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13620      # If it failed, the variable was not from the command line. Ignore it,
13621      # but warn the user (except for BASH, which is always set by the calling BASH).
13622      if test "xEGREP" != xBASH; then
13623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13624$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13625      fi
13626      # Try to locate tool using the code snippet
13627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13628$as_echo_n "checking for egrep... " >&6; }
13629if ${ac_cv_path_EGREP+:} false; then :
13630  $as_echo_n "(cached) " >&6
13631else
13632  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13633   then ac_cv_path_EGREP="$GREP -E"
13634   else
13635     if test -z "$EGREP"; then
13636  ac_path_EGREP_found=false
13637  # Loop through the user's path and test for each of PROGNAME-LIST
13638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13639for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13640do
13641  IFS=$as_save_IFS
13642  test -z "$as_dir" && as_dir=.
13643    for ac_prog in egrep; do
13644    for ac_exec_ext in '' $ac_executable_extensions; do
13645      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13646      as_fn_executable_p "$ac_path_EGREP" || continue
13647# Check for GNU ac_path_EGREP and select it if it is found.
13648  # Check for GNU $ac_path_EGREP
13649case `"$ac_path_EGREP" --version 2>&1` in
13650*GNU*)
13651  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13652*)
13653  ac_count=0
13654  $as_echo_n 0123456789 >"conftest.in"
13655  while :
13656  do
13657    cat "conftest.in" "conftest.in" >"conftest.tmp"
13658    mv "conftest.tmp" "conftest.in"
13659    cp "conftest.in" "conftest.nl"
13660    $as_echo 'EGREP' >> "conftest.nl"
13661    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13662    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13663    as_fn_arith $ac_count + 1 && ac_count=$as_val
13664    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13665      # Best one so far, save it but keep looking for a better one
13666      ac_cv_path_EGREP="$ac_path_EGREP"
13667      ac_path_EGREP_max=$ac_count
13668    fi
13669    # 10*(2^10) chars as input seems more than enough
13670    test $ac_count -gt 10 && break
13671  done
13672  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13673esac
13674
13675      $ac_path_EGREP_found && break 3
13676    done
13677  done
13678  done
13679IFS=$as_save_IFS
13680  if test -z "$ac_cv_path_EGREP"; then
13681    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13682  fi
13683else
13684  ac_cv_path_EGREP=$EGREP
13685fi
13686
13687   fi
13688fi
13689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13690$as_echo "$ac_cv_path_EGREP" >&6; }
13691 EGREP="$ac_cv_path_EGREP"
13692
13693
13694    else
13695      # If it succeeded, then it was overridden by the user. We will use it
13696      # for the tool.
13697
13698      # First remove it from the list of overridden variables, so we can test
13699      # for unknown variables in the end.
13700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13701
13702      # Check if we try to supply an empty value
13703      if test "x$EGREP" = x; then
13704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13705$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13707$as_echo_n "checking for EGREP... " >&6; }
13708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13709$as_echo "disabled" >&6; }
13710      else
13711        # Check if the provided tool contains a complete path.
13712        tool_specified="$EGREP"
13713        tool_basename="${tool_specified##*/}"
13714        if test "x$tool_basename" = "x$tool_specified"; then
13715          # A command without a complete path is provided, search $PATH.
13716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13717$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13718          # Extract the first word of "$tool_basename", so it can be a program name with args.
13719set dummy $tool_basename; 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_EGREP+:} false; then :
13723  $as_echo_n "(cached) " >&6
13724else
13725  case $EGREP in
13726  [\\/]* | ?:[\\/]*)
13727  ac_cv_path_EGREP="$EGREP" # 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_EGREP="$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
13748EGREP=$ac_cv_path_EGREP
13749if test -n "$EGREP"; then
13750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13751$as_echo "$EGREP" >&6; }
13752else
13753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
13755fi
13756
13757
13758          if test "x$EGREP" = x; then
13759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13760          fi
13761        else
13762          # Otherwise we believe it is a complete path. Use it as it is.
13763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13764$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13766$as_echo_n "checking for EGREP... " >&6; }
13767          if test ! -x "$tool_specified"; then
13768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13769$as_echo "not found" >&6; }
13770            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13771          fi
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13773$as_echo "$tool_specified" >&6; }
13774        fi
13775      fi
13776    fi
13777
13778  fi
13779
13780
13781  if test "x$EGREP" = x; then
13782    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13783  fi
13784
13785
13786
13787
13788  # Publish this variable in the help.
13789
13790
13791  if [ -z "${FGREP+x}" ]; then
13792    # The variable is not set by user, try to locate tool using the code snippet
13793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13794$as_echo_n "checking for fgrep... " >&6; }
13795if ${ac_cv_path_FGREP+:} false; then :
13796  $as_echo_n "(cached) " >&6
13797else
13798  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13799   then ac_cv_path_FGREP="$GREP -F"
13800   else
13801     if test -z "$FGREP"; then
13802  ac_path_FGREP_found=false
13803  # Loop through the user's path and test for each of PROGNAME-LIST
13804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13805for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13806do
13807  IFS=$as_save_IFS
13808  test -z "$as_dir" && as_dir=.
13809    for ac_prog in fgrep; do
13810    for ac_exec_ext in '' $ac_executable_extensions; do
13811      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13812      as_fn_executable_p "$ac_path_FGREP" || continue
13813# Check for GNU ac_path_FGREP and select it if it is found.
13814  # Check for GNU $ac_path_FGREP
13815case `"$ac_path_FGREP" --version 2>&1` in
13816*GNU*)
13817  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13818*)
13819  ac_count=0
13820  $as_echo_n 0123456789 >"conftest.in"
13821  while :
13822  do
13823    cat "conftest.in" "conftest.in" >"conftest.tmp"
13824    mv "conftest.tmp" "conftest.in"
13825    cp "conftest.in" "conftest.nl"
13826    $as_echo 'FGREP' >> "conftest.nl"
13827    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13828    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13829    as_fn_arith $ac_count + 1 && ac_count=$as_val
13830    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13831      # Best one so far, save it but keep looking for a better one
13832      ac_cv_path_FGREP="$ac_path_FGREP"
13833      ac_path_FGREP_max=$ac_count
13834    fi
13835    # 10*(2^10) chars as input seems more than enough
13836    test $ac_count -gt 10 && break
13837  done
13838  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13839esac
13840
13841      $ac_path_FGREP_found && break 3
13842    done
13843  done
13844  done
13845IFS=$as_save_IFS
13846  if test -z "$ac_cv_path_FGREP"; then
13847    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13848  fi
13849else
13850  ac_cv_path_FGREP=$FGREP
13851fi
13852
13853   fi
13854fi
13855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13856$as_echo "$ac_cv_path_FGREP" >&6; }
13857 FGREP="$ac_cv_path_FGREP"
13858
13859
13860  else
13861    # The variable is set, but is it from the command line or the environment?
13862
13863    # Try to remove the string !FGREP! from our list.
13864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13866      # If it failed, the variable was not from the command line. Ignore it,
13867      # but warn the user (except for BASH, which is always set by the calling BASH).
13868      if test "xFGREP" != xBASH; then
13869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13870$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13871      fi
13872      # Try to locate tool using the code snippet
13873      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13874$as_echo_n "checking for fgrep... " >&6; }
13875if ${ac_cv_path_FGREP+:} false; then :
13876  $as_echo_n "(cached) " >&6
13877else
13878  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13879   then ac_cv_path_FGREP="$GREP -F"
13880   else
13881     if test -z "$FGREP"; then
13882  ac_path_FGREP_found=false
13883  # Loop through the user's path and test for each of PROGNAME-LIST
13884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13885for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13886do
13887  IFS=$as_save_IFS
13888  test -z "$as_dir" && as_dir=.
13889    for ac_prog in fgrep; do
13890    for ac_exec_ext in '' $ac_executable_extensions; do
13891      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13892      as_fn_executable_p "$ac_path_FGREP" || continue
13893# Check for GNU ac_path_FGREP and select it if it is found.
13894  # Check for GNU $ac_path_FGREP
13895case `"$ac_path_FGREP" --version 2>&1` in
13896*GNU*)
13897  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13898*)
13899  ac_count=0
13900  $as_echo_n 0123456789 >"conftest.in"
13901  while :
13902  do
13903    cat "conftest.in" "conftest.in" >"conftest.tmp"
13904    mv "conftest.tmp" "conftest.in"
13905    cp "conftest.in" "conftest.nl"
13906    $as_echo 'FGREP' >> "conftest.nl"
13907    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13908    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13909    as_fn_arith $ac_count + 1 && ac_count=$as_val
13910    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13911      # Best one so far, save it but keep looking for a better one
13912      ac_cv_path_FGREP="$ac_path_FGREP"
13913      ac_path_FGREP_max=$ac_count
13914    fi
13915    # 10*(2^10) chars as input seems more than enough
13916    test $ac_count -gt 10 && break
13917  done
13918  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13919esac
13920
13921      $ac_path_FGREP_found && break 3
13922    done
13923  done
13924  done
13925IFS=$as_save_IFS
13926  if test -z "$ac_cv_path_FGREP"; then
13927    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13928  fi
13929else
13930  ac_cv_path_FGREP=$FGREP
13931fi
13932
13933   fi
13934fi
13935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13936$as_echo "$ac_cv_path_FGREP" >&6; }
13937 FGREP="$ac_cv_path_FGREP"
13938
13939
13940    else
13941      # If it succeeded, then it was overridden by the user. We will use it
13942      # for the tool.
13943
13944      # First remove it from the list of overridden variables, so we can test
13945      # for unknown variables in the end.
13946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13947
13948      # Check if we try to supply an empty value
13949      if test "x$FGREP" = x; then
13950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13951$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13953$as_echo_n "checking for FGREP... " >&6; }
13954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13955$as_echo "disabled" >&6; }
13956      else
13957        # Check if the provided tool contains a complete path.
13958        tool_specified="$FGREP"
13959        tool_basename="${tool_specified##*/}"
13960        if test "x$tool_basename" = "x$tool_specified"; then
13961          # A command without a complete path is provided, search $PATH.
13962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13963$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13964          # Extract the first word of "$tool_basename", so it can be a program name with args.
13965set dummy $tool_basename; ac_word=$2
13966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13967$as_echo_n "checking for $ac_word... " >&6; }
13968if ${ac_cv_path_FGREP+:} false; then :
13969  $as_echo_n "(cached) " >&6
13970else
13971  case $FGREP in
13972  [\\/]* | ?:[\\/]*)
13973  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13974  ;;
13975  *)
13976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13977for as_dir in $PATH
13978do
13979  IFS=$as_save_IFS
13980  test -z "$as_dir" && as_dir=.
13981    for ac_exec_ext in '' $ac_executable_extensions; do
13982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13983    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13985    break 2
13986  fi
13987done
13988  done
13989IFS=$as_save_IFS
13990
13991  ;;
13992esac
13993fi
13994FGREP=$ac_cv_path_FGREP
13995if test -n "$FGREP"; then
13996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13997$as_echo "$FGREP" >&6; }
13998else
13999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14000$as_echo "no" >&6; }
14001fi
14002
14003
14004          if test "x$FGREP" = x; then
14005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14006          fi
14007        else
14008          # Otherwise we believe it is a complete path. Use it as it is.
14009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14010$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14012$as_echo_n "checking for FGREP... " >&6; }
14013          if test ! -x "$tool_specified"; then
14014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14015$as_echo "not found" >&6; }
14016            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14017          fi
14018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14019$as_echo "$tool_specified" >&6; }
14020        fi
14021      fi
14022    fi
14023
14024  fi
14025
14026
14027  if test "x$FGREP" = x; then
14028    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14029  fi
14030
14031
14032
14033
14034  # Publish this variable in the help.
14035
14036
14037  if [ -z "${SED+x}" ]; then
14038    # The variable is not set by user, try to locate tool using the code snippet
14039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14040$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14041if ${ac_cv_path_SED+:} false; then :
14042  $as_echo_n "(cached) " >&6
14043else
14044            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14045     for ac_i in 1 2 3 4 5 6 7; do
14046       ac_script="$ac_script$as_nl$ac_script"
14047     done
14048     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14049     { ac_script=; unset ac_script;}
14050     if test -z "$SED"; then
14051  ac_path_SED_found=false
14052  # Loop through the user's path and test for each of PROGNAME-LIST
14053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14054for as_dir in $PATH
14055do
14056  IFS=$as_save_IFS
14057  test -z "$as_dir" && as_dir=.
14058    for ac_prog in sed gsed; do
14059    for ac_exec_ext in '' $ac_executable_extensions; do
14060      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14061      as_fn_executable_p "$ac_path_SED" || continue
14062# Check for GNU ac_path_SED and select it if it is found.
14063  # Check for GNU $ac_path_SED
14064case `"$ac_path_SED" --version 2>&1` in
14065*GNU*)
14066  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14067*)
14068  ac_count=0
14069  $as_echo_n 0123456789 >"conftest.in"
14070  while :
14071  do
14072    cat "conftest.in" "conftest.in" >"conftest.tmp"
14073    mv "conftest.tmp" "conftest.in"
14074    cp "conftest.in" "conftest.nl"
14075    $as_echo '' >> "conftest.nl"
14076    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14077    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14078    as_fn_arith $ac_count + 1 && ac_count=$as_val
14079    if test $ac_count -gt ${ac_path_SED_max-0}; then
14080      # Best one so far, save it but keep looking for a better one
14081      ac_cv_path_SED="$ac_path_SED"
14082      ac_path_SED_max=$ac_count
14083    fi
14084    # 10*(2^10) chars as input seems more than enough
14085    test $ac_count -gt 10 && break
14086  done
14087  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14088esac
14089
14090      $ac_path_SED_found && break 3
14091    done
14092  done
14093  done
14094IFS=$as_save_IFS
14095  if test -z "$ac_cv_path_SED"; then
14096    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14097  fi
14098else
14099  ac_cv_path_SED=$SED
14100fi
14101
14102fi
14103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14104$as_echo "$ac_cv_path_SED" >&6; }
14105 SED="$ac_cv_path_SED"
14106  rm -f conftest.sed
14107
14108  else
14109    # The variable is set, but is it from the command line or the environment?
14110
14111    # Try to remove the string !SED! from our list.
14112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14114      # If it failed, the variable was not from the command line. Ignore it,
14115      # but warn the user (except for BASH, which is always set by the calling BASH).
14116      if test "xSED" != xBASH; then
14117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14118$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14119      fi
14120      # Try to locate tool using the code snippet
14121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14122$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14123if ${ac_cv_path_SED+:} false; then :
14124  $as_echo_n "(cached) " >&6
14125else
14126            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14127     for ac_i in 1 2 3 4 5 6 7; do
14128       ac_script="$ac_script$as_nl$ac_script"
14129     done
14130     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14131     { ac_script=; unset ac_script;}
14132     if test -z "$SED"; then
14133  ac_path_SED_found=false
14134  # Loop through the user's path and test for each of PROGNAME-LIST
14135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14136for as_dir in $PATH
14137do
14138  IFS=$as_save_IFS
14139  test -z "$as_dir" && as_dir=.
14140    for ac_prog in sed gsed; do
14141    for ac_exec_ext in '' $ac_executable_extensions; do
14142      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14143      as_fn_executable_p "$ac_path_SED" || continue
14144# Check for GNU ac_path_SED and select it if it is found.
14145  # Check for GNU $ac_path_SED
14146case `"$ac_path_SED" --version 2>&1` in
14147*GNU*)
14148  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14149*)
14150  ac_count=0
14151  $as_echo_n 0123456789 >"conftest.in"
14152  while :
14153  do
14154    cat "conftest.in" "conftest.in" >"conftest.tmp"
14155    mv "conftest.tmp" "conftest.in"
14156    cp "conftest.in" "conftest.nl"
14157    $as_echo '' >> "conftest.nl"
14158    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14159    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14160    as_fn_arith $ac_count + 1 && ac_count=$as_val
14161    if test $ac_count -gt ${ac_path_SED_max-0}; then
14162      # Best one so far, save it but keep looking for a better one
14163      ac_cv_path_SED="$ac_path_SED"
14164      ac_path_SED_max=$ac_count
14165    fi
14166    # 10*(2^10) chars as input seems more than enough
14167    test $ac_count -gt 10 && break
14168  done
14169  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14170esac
14171
14172      $ac_path_SED_found && break 3
14173    done
14174  done
14175  done
14176IFS=$as_save_IFS
14177  if test -z "$ac_cv_path_SED"; then
14178    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14179  fi
14180else
14181  ac_cv_path_SED=$SED
14182fi
14183
14184fi
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14186$as_echo "$ac_cv_path_SED" >&6; }
14187 SED="$ac_cv_path_SED"
14188  rm -f conftest.sed
14189
14190    else
14191      # If it succeeded, then it was overridden by the user. We will use it
14192      # for the tool.
14193
14194      # First remove it from the list of overridden variables, so we can test
14195      # for unknown variables in the end.
14196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14197
14198      # Check if we try to supply an empty value
14199      if test "x$SED" = x; then
14200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14201$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14203$as_echo_n "checking for SED... " >&6; }
14204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14205$as_echo "disabled" >&6; }
14206      else
14207        # Check if the provided tool contains a complete path.
14208        tool_specified="$SED"
14209        tool_basename="${tool_specified##*/}"
14210        if test "x$tool_basename" = "x$tool_specified"; then
14211          # A command without a complete path is provided, search $PATH.
14212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14213$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14214          # Extract the first word of "$tool_basename", so it can be a program name with args.
14215set dummy $tool_basename; ac_word=$2
14216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14217$as_echo_n "checking for $ac_word... " >&6; }
14218if ${ac_cv_path_SED+:} false; then :
14219  $as_echo_n "(cached) " >&6
14220else
14221  case $SED in
14222  [\\/]* | ?:[\\/]*)
14223  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14224  ;;
14225  *)
14226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14227for as_dir in $PATH
14228do
14229  IFS=$as_save_IFS
14230  test -z "$as_dir" && as_dir=.
14231    for ac_exec_ext in '' $ac_executable_extensions; do
14232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14233    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14235    break 2
14236  fi
14237done
14238  done
14239IFS=$as_save_IFS
14240
14241  ;;
14242esac
14243fi
14244SED=$ac_cv_path_SED
14245if test -n "$SED"; then
14246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14247$as_echo "$SED" >&6; }
14248else
14249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14250$as_echo "no" >&6; }
14251fi
14252
14253
14254          if test "x$SED" = x; then
14255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14256          fi
14257        else
14258          # Otherwise we believe it is a complete path. Use it as it is.
14259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14260$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14262$as_echo_n "checking for SED... " >&6; }
14263          if test ! -x "$tool_specified"; then
14264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14265$as_echo "not found" >&6; }
14266            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14267          fi
14268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14269$as_echo "$tool_specified" >&6; }
14270        fi
14271      fi
14272    fi
14273
14274  fi
14275
14276
14277  if test "x$SED" = x; then
14278    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14279  fi
14280
14281
14282
14283  # Always force rm.
14284  RM="$RM -f"
14285
14286  # pwd behaves differently on various platforms and some don't support the -L flag.
14287  # Always use the bash builtin pwd to get uniform behavior.
14288  THEPWDCMD=pwd
14289
14290  # These are not required on all platforms
14291
14292
14293  # Publish this variable in the help.
14294
14295
14296  if [ -z "${CYGPATH+x}" ]; then
14297    # The variable is not set by user, try to locate tool using the code snippet
14298    for ac_prog in cygpath
14299do
14300  # Extract the first word of "$ac_prog", so it can be a program name with args.
14301set dummy $ac_prog; ac_word=$2
14302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14303$as_echo_n "checking for $ac_word... " >&6; }
14304if ${ac_cv_path_CYGPATH+:} false; then :
14305  $as_echo_n "(cached) " >&6
14306else
14307  case $CYGPATH in
14308  [\\/]* | ?:[\\/]*)
14309  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14310  ;;
14311  *)
14312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14313for as_dir in $PATH
14314do
14315  IFS=$as_save_IFS
14316  test -z "$as_dir" && as_dir=.
14317    for ac_exec_ext in '' $ac_executable_extensions; do
14318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14319    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14321    break 2
14322  fi
14323done
14324  done
14325IFS=$as_save_IFS
14326
14327  ;;
14328esac
14329fi
14330CYGPATH=$ac_cv_path_CYGPATH
14331if test -n "$CYGPATH"; then
14332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14333$as_echo "$CYGPATH" >&6; }
14334else
14335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14336$as_echo "no" >&6; }
14337fi
14338
14339
14340  test -n "$CYGPATH" && break
14341done
14342
14343  else
14344    # The variable is set, but is it from the command line or the environment?
14345
14346    # Try to remove the string !CYGPATH! from our list.
14347    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14348    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14349      # If it failed, the variable was not from the command line. Ignore it,
14350      # but warn the user (except for BASH, which is always set by the calling BASH).
14351      if test "xCYGPATH" != xBASH; then
14352        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14353$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14354      fi
14355      # Try to locate tool using the code snippet
14356      for ac_prog in cygpath
14357do
14358  # Extract the first word of "$ac_prog", so it can be a program name with args.
14359set dummy $ac_prog; ac_word=$2
14360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14361$as_echo_n "checking for $ac_word... " >&6; }
14362if ${ac_cv_path_CYGPATH+:} false; then :
14363  $as_echo_n "(cached) " >&6
14364else
14365  case $CYGPATH in
14366  [\\/]* | ?:[\\/]*)
14367  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14368  ;;
14369  *)
14370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14371for as_dir in $PATH
14372do
14373  IFS=$as_save_IFS
14374  test -z "$as_dir" && as_dir=.
14375    for ac_exec_ext in '' $ac_executable_extensions; do
14376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14377    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14379    break 2
14380  fi
14381done
14382  done
14383IFS=$as_save_IFS
14384
14385  ;;
14386esac
14387fi
14388CYGPATH=$ac_cv_path_CYGPATH
14389if test -n "$CYGPATH"; then
14390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14391$as_echo "$CYGPATH" >&6; }
14392else
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14394$as_echo "no" >&6; }
14395fi
14396
14397
14398  test -n "$CYGPATH" && break
14399done
14400
14401    else
14402      # If it succeeded, then it was overridden by the user. We will use it
14403      # for the tool.
14404
14405      # First remove it from the list of overridden variables, so we can test
14406      # for unknown variables in the end.
14407      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14408
14409      # Check if we try to supply an empty value
14410      if test "x$CYGPATH" = x; then
14411        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14412$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14414$as_echo_n "checking for CYGPATH... " >&6; }
14415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14416$as_echo "disabled" >&6; }
14417      else
14418        # Check if the provided tool contains a complete path.
14419        tool_specified="$CYGPATH"
14420        tool_basename="${tool_specified##*/}"
14421        if test "x$tool_basename" = "x$tool_specified"; then
14422          # A command without a complete path is provided, search $PATH.
14423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14424$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14425          # Extract the first word of "$tool_basename", so it can be a program name with args.
14426set dummy $tool_basename; ac_word=$2
14427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14428$as_echo_n "checking for $ac_word... " >&6; }
14429if ${ac_cv_path_CYGPATH+:} false; then :
14430  $as_echo_n "(cached) " >&6
14431else
14432  case $CYGPATH in
14433  [\\/]* | ?:[\\/]*)
14434  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14435  ;;
14436  *)
14437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14438for as_dir in $PATH
14439do
14440  IFS=$as_save_IFS
14441  test -z "$as_dir" && as_dir=.
14442    for ac_exec_ext in '' $ac_executable_extensions; do
14443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14444    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14446    break 2
14447  fi
14448done
14449  done
14450IFS=$as_save_IFS
14451
14452  ;;
14453esac
14454fi
14455CYGPATH=$ac_cv_path_CYGPATH
14456if test -n "$CYGPATH"; then
14457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14458$as_echo "$CYGPATH" >&6; }
14459else
14460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14461$as_echo "no" >&6; }
14462fi
14463
14464
14465          if test "x$CYGPATH" = x; then
14466            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14467          fi
14468        else
14469          # Otherwise we believe it is a complete path. Use it as it is.
14470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14471$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14472          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14473$as_echo_n "checking for CYGPATH... " >&6; }
14474          if test ! -x "$tool_specified"; then
14475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14476$as_echo "not found" >&6; }
14477            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14478          fi
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14480$as_echo "$tool_specified" >&6; }
14481        fi
14482      fi
14483    fi
14484
14485  fi
14486
14487
14488
14489
14490  # Publish this variable in the help.
14491
14492
14493  if [ -z "${READLINK+x}" ]; then
14494    # The variable is not set by user, try to locate tool using the code snippet
14495    for ac_prog in greadlink readlink
14496do
14497  # Extract the first word of "$ac_prog", so it can be a program name with args.
14498set dummy $ac_prog; ac_word=$2
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14500$as_echo_n "checking for $ac_word... " >&6; }
14501if ${ac_cv_path_READLINK+:} false; then :
14502  $as_echo_n "(cached) " >&6
14503else
14504  case $READLINK in
14505  [\\/]* | ?:[\\/]*)
14506  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14507  ;;
14508  *)
14509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14510for as_dir in $PATH
14511do
14512  IFS=$as_save_IFS
14513  test -z "$as_dir" && as_dir=.
14514    for ac_exec_ext in '' $ac_executable_extensions; do
14515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14516    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14518    break 2
14519  fi
14520done
14521  done
14522IFS=$as_save_IFS
14523
14524  ;;
14525esac
14526fi
14527READLINK=$ac_cv_path_READLINK
14528if test -n "$READLINK"; then
14529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14530$as_echo "$READLINK" >&6; }
14531else
14532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14533$as_echo "no" >&6; }
14534fi
14535
14536
14537  test -n "$READLINK" && break
14538done
14539
14540  else
14541    # The variable is set, but is it from the command line or the environment?
14542
14543    # Try to remove the string !READLINK! from our list.
14544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14546      # If it failed, the variable was not from the command line. Ignore it,
14547      # but warn the user (except for BASH, which is always set by the calling BASH).
14548      if test "xREADLINK" != xBASH; then
14549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14550$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14551      fi
14552      # Try to locate tool using the code snippet
14553      for ac_prog in greadlink readlink
14554do
14555  # Extract the first word of "$ac_prog", so it can be a program name with args.
14556set dummy $ac_prog; ac_word=$2
14557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14558$as_echo_n "checking for $ac_word... " >&6; }
14559if ${ac_cv_path_READLINK+:} false; then :
14560  $as_echo_n "(cached) " >&6
14561else
14562  case $READLINK in
14563  [\\/]* | ?:[\\/]*)
14564  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14565  ;;
14566  *)
14567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14568for as_dir in $PATH
14569do
14570  IFS=$as_save_IFS
14571  test -z "$as_dir" && as_dir=.
14572    for ac_exec_ext in '' $ac_executable_extensions; do
14573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14574    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14576    break 2
14577  fi
14578done
14579  done
14580IFS=$as_save_IFS
14581
14582  ;;
14583esac
14584fi
14585READLINK=$ac_cv_path_READLINK
14586if test -n "$READLINK"; then
14587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14588$as_echo "$READLINK" >&6; }
14589else
14590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14591$as_echo "no" >&6; }
14592fi
14593
14594
14595  test -n "$READLINK" && break
14596done
14597
14598    else
14599      # If it succeeded, then it was overridden by the user. We will use it
14600      # for the tool.
14601
14602      # First remove it from the list of overridden variables, so we can test
14603      # for unknown variables in the end.
14604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14605
14606      # Check if we try to supply an empty value
14607      if test "x$READLINK" = x; then
14608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14609$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14611$as_echo_n "checking for READLINK... " >&6; }
14612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14613$as_echo "disabled" >&6; }
14614      else
14615        # Check if the provided tool contains a complete path.
14616        tool_specified="$READLINK"
14617        tool_basename="${tool_specified##*/}"
14618        if test "x$tool_basename" = "x$tool_specified"; then
14619          # A command without a complete path is provided, search $PATH.
14620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14621$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14622          # Extract the first word of "$tool_basename", so it can be a program name with args.
14623set dummy $tool_basename; ac_word=$2
14624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14625$as_echo_n "checking for $ac_word... " >&6; }
14626if ${ac_cv_path_READLINK+:} false; then :
14627  $as_echo_n "(cached) " >&6
14628else
14629  case $READLINK in
14630  [\\/]* | ?:[\\/]*)
14631  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14632  ;;
14633  *)
14634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14635for as_dir in $PATH
14636do
14637  IFS=$as_save_IFS
14638  test -z "$as_dir" && as_dir=.
14639    for ac_exec_ext in '' $ac_executable_extensions; do
14640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14641    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14643    break 2
14644  fi
14645done
14646  done
14647IFS=$as_save_IFS
14648
14649  ;;
14650esac
14651fi
14652READLINK=$ac_cv_path_READLINK
14653if test -n "$READLINK"; then
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14655$as_echo "$READLINK" >&6; }
14656else
14657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14658$as_echo "no" >&6; }
14659fi
14660
14661
14662          if test "x$READLINK" = x; then
14663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14664          fi
14665        else
14666          # Otherwise we believe it is a complete path. Use it as it is.
14667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14668$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14670$as_echo_n "checking for READLINK... " >&6; }
14671          if test ! -x "$tool_specified"; then
14672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14673$as_echo "not found" >&6; }
14674            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14675          fi
14676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14677$as_echo "$tool_specified" >&6; }
14678        fi
14679      fi
14680    fi
14681
14682  fi
14683
14684
14685
14686
14687  # Publish this variable in the help.
14688
14689
14690  if [ -z "${DF+x}" ]; then
14691    # The variable is not set by user, try to locate tool using the code snippet
14692    for ac_prog in df
14693do
14694  # Extract the first word of "$ac_prog", so it can be a program name with args.
14695set dummy $ac_prog; ac_word=$2
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14697$as_echo_n "checking for $ac_word... " >&6; }
14698if ${ac_cv_path_DF+:} false; then :
14699  $as_echo_n "(cached) " >&6
14700else
14701  case $DF in
14702  [\\/]* | ?:[\\/]*)
14703  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14704  ;;
14705  *)
14706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14707for as_dir in $PATH
14708do
14709  IFS=$as_save_IFS
14710  test -z "$as_dir" && as_dir=.
14711    for ac_exec_ext in '' $ac_executable_extensions; do
14712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14713    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14715    break 2
14716  fi
14717done
14718  done
14719IFS=$as_save_IFS
14720
14721  ;;
14722esac
14723fi
14724DF=$ac_cv_path_DF
14725if test -n "$DF"; then
14726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14727$as_echo "$DF" >&6; }
14728else
14729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14730$as_echo "no" >&6; }
14731fi
14732
14733
14734  test -n "$DF" && break
14735done
14736
14737  else
14738    # The variable is set, but is it from the command line or the environment?
14739
14740    # Try to remove the string !DF! from our list.
14741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14743      # If it failed, the variable was not from the command line. Ignore it,
14744      # but warn the user (except for BASH, which is always set by the calling BASH).
14745      if test "xDF" != xBASH; then
14746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14747$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14748      fi
14749      # Try to locate tool using the code snippet
14750      for ac_prog in df
14751do
14752  # Extract the first word of "$ac_prog", so it can be a program name with args.
14753set dummy $ac_prog; ac_word=$2
14754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14755$as_echo_n "checking for $ac_word... " >&6; }
14756if ${ac_cv_path_DF+:} false; then :
14757  $as_echo_n "(cached) " >&6
14758else
14759  case $DF in
14760  [\\/]* | ?:[\\/]*)
14761  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14762  ;;
14763  *)
14764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14765for as_dir in $PATH
14766do
14767  IFS=$as_save_IFS
14768  test -z "$as_dir" && as_dir=.
14769    for ac_exec_ext in '' $ac_executable_extensions; do
14770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14771    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14773    break 2
14774  fi
14775done
14776  done
14777IFS=$as_save_IFS
14778
14779  ;;
14780esac
14781fi
14782DF=$ac_cv_path_DF
14783if test -n "$DF"; then
14784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14785$as_echo "$DF" >&6; }
14786else
14787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14788$as_echo "no" >&6; }
14789fi
14790
14791
14792  test -n "$DF" && break
14793done
14794
14795    else
14796      # If it succeeded, then it was overridden by the user. We will use it
14797      # for the tool.
14798
14799      # First remove it from the list of overridden variables, so we can test
14800      # for unknown variables in the end.
14801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14802
14803      # Check if we try to supply an empty value
14804      if test "x$DF" = x; then
14805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14806$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14808$as_echo_n "checking for DF... " >&6; }
14809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14810$as_echo "disabled" >&6; }
14811      else
14812        # Check if the provided tool contains a complete path.
14813        tool_specified="$DF"
14814        tool_basename="${tool_specified##*/}"
14815        if test "x$tool_basename" = "x$tool_specified"; then
14816          # A command without a complete path is provided, search $PATH.
14817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14818$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14819          # Extract the first word of "$tool_basename", so it can be a program name with args.
14820set dummy $tool_basename; ac_word=$2
14821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14822$as_echo_n "checking for $ac_word... " >&6; }
14823if ${ac_cv_path_DF+:} false; then :
14824  $as_echo_n "(cached) " >&6
14825else
14826  case $DF in
14827  [\\/]* | ?:[\\/]*)
14828  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14829  ;;
14830  *)
14831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14832for as_dir in $PATH
14833do
14834  IFS=$as_save_IFS
14835  test -z "$as_dir" && as_dir=.
14836    for ac_exec_ext in '' $ac_executable_extensions; do
14837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14838    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14840    break 2
14841  fi
14842done
14843  done
14844IFS=$as_save_IFS
14845
14846  ;;
14847esac
14848fi
14849DF=$ac_cv_path_DF
14850if test -n "$DF"; then
14851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14852$as_echo "$DF" >&6; }
14853else
14854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14855$as_echo "no" >&6; }
14856fi
14857
14858
14859          if test "x$DF" = x; then
14860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14861          fi
14862        else
14863          # Otherwise we believe it is a complete path. Use it as it is.
14864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14865$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14867$as_echo_n "checking for DF... " >&6; }
14868          if test ! -x "$tool_specified"; then
14869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14870$as_echo "not found" >&6; }
14871            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14872          fi
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14874$as_echo "$tool_specified" >&6; }
14875        fi
14876      fi
14877    fi
14878
14879  fi
14880
14881
14882
14883
14884  # Publish this variable in the help.
14885
14886
14887  if [ -z "${CPIO+x}" ]; then
14888    # The variable is not set by user, try to locate tool using the code snippet
14889    for ac_prog in cpio bsdcpio
14890do
14891  # Extract the first word of "$ac_prog", so it can be a program name with args.
14892set dummy $ac_prog; ac_word=$2
14893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14894$as_echo_n "checking for $ac_word... " >&6; }
14895if ${ac_cv_path_CPIO+:} false; then :
14896  $as_echo_n "(cached) " >&6
14897else
14898  case $CPIO in
14899  [\\/]* | ?:[\\/]*)
14900  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14901  ;;
14902  *)
14903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14904for as_dir in $PATH
14905do
14906  IFS=$as_save_IFS
14907  test -z "$as_dir" && as_dir=.
14908    for ac_exec_ext in '' $ac_executable_extensions; do
14909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14910    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14912    break 2
14913  fi
14914done
14915  done
14916IFS=$as_save_IFS
14917
14918  ;;
14919esac
14920fi
14921CPIO=$ac_cv_path_CPIO
14922if test -n "$CPIO"; then
14923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14924$as_echo "$CPIO" >&6; }
14925else
14926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14927$as_echo "no" >&6; }
14928fi
14929
14930
14931  test -n "$CPIO" && break
14932done
14933
14934  else
14935    # The variable is set, but is it from the command line or the environment?
14936
14937    # Try to remove the string !CPIO! from our list.
14938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14940      # If it failed, the variable was not from the command line. Ignore it,
14941      # but warn the user (except for BASH, which is always set by the calling BASH).
14942      if test "xCPIO" != xBASH; then
14943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14944$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14945      fi
14946      # Try to locate tool using the code snippet
14947      for ac_prog in cpio bsdcpio
14948do
14949  # Extract the first word of "$ac_prog", so it can be a program name with args.
14950set dummy $ac_prog; ac_word=$2
14951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14952$as_echo_n "checking for $ac_word... " >&6; }
14953if ${ac_cv_path_CPIO+:} false; then :
14954  $as_echo_n "(cached) " >&6
14955else
14956  case $CPIO in
14957  [\\/]* | ?:[\\/]*)
14958  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14959  ;;
14960  *)
14961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14962for as_dir in $PATH
14963do
14964  IFS=$as_save_IFS
14965  test -z "$as_dir" && as_dir=.
14966    for ac_exec_ext in '' $ac_executable_extensions; do
14967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14968    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14970    break 2
14971  fi
14972done
14973  done
14974IFS=$as_save_IFS
14975
14976  ;;
14977esac
14978fi
14979CPIO=$ac_cv_path_CPIO
14980if test -n "$CPIO"; then
14981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14982$as_echo "$CPIO" >&6; }
14983else
14984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14985$as_echo "no" >&6; }
14986fi
14987
14988
14989  test -n "$CPIO" && break
14990done
14991
14992    else
14993      # If it succeeded, then it was overridden by the user. We will use it
14994      # for the tool.
14995
14996      # First remove it from the list of overridden variables, so we can test
14997      # for unknown variables in the end.
14998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14999
15000      # Check if we try to supply an empty value
15001      if test "x$CPIO" = x; then
15002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15003$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15005$as_echo_n "checking for CPIO... " >&6; }
15006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15007$as_echo "disabled" >&6; }
15008      else
15009        # Check if the provided tool contains a complete path.
15010        tool_specified="$CPIO"
15011        tool_basename="${tool_specified##*/}"
15012        if test "x$tool_basename" = "x$tool_specified"; then
15013          # A command without a complete path is provided, search $PATH.
15014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15015$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15016          # Extract the first word of "$tool_basename", so it can be a program name with args.
15017set dummy $tool_basename; ac_word=$2
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15019$as_echo_n "checking for $ac_word... " >&6; }
15020if ${ac_cv_path_CPIO+:} false; then :
15021  $as_echo_n "(cached) " >&6
15022else
15023  case $CPIO in
15024  [\\/]* | ?:[\\/]*)
15025  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15026  ;;
15027  *)
15028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15029for as_dir in $PATH
15030do
15031  IFS=$as_save_IFS
15032  test -z "$as_dir" && as_dir=.
15033    for ac_exec_ext in '' $ac_executable_extensions; do
15034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15035    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15037    break 2
15038  fi
15039done
15040  done
15041IFS=$as_save_IFS
15042
15043  ;;
15044esac
15045fi
15046CPIO=$ac_cv_path_CPIO
15047if test -n "$CPIO"; then
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15049$as_echo "$CPIO" >&6; }
15050else
15051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15052$as_echo "no" >&6; }
15053fi
15054
15055
15056          if test "x$CPIO" = x; then
15057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15058          fi
15059        else
15060          # Otherwise we believe it is a complete path. Use it as it is.
15061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15062$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15064$as_echo_n "checking for CPIO... " >&6; }
15065          if test ! -x "$tool_specified"; then
15066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15067$as_echo "not found" >&6; }
15068            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15069          fi
15070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15071$as_echo "$tool_specified" >&6; }
15072        fi
15073      fi
15074    fi
15075
15076  fi
15077
15078
15079
15080
15081  # Publish this variable in the help.
15082
15083
15084  if [ -z "${NICE+x}" ]; then
15085    # The variable is not set by user, try to locate tool using the code snippet
15086    for ac_prog in nice
15087do
15088  # Extract the first word of "$ac_prog", so it can be a program name with args.
15089set dummy $ac_prog; ac_word=$2
15090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15091$as_echo_n "checking for $ac_word... " >&6; }
15092if ${ac_cv_path_NICE+:} false; then :
15093  $as_echo_n "(cached) " >&6
15094else
15095  case $NICE in
15096  [\\/]* | ?:[\\/]*)
15097  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15098  ;;
15099  *)
15100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15101for as_dir in $PATH
15102do
15103  IFS=$as_save_IFS
15104  test -z "$as_dir" && as_dir=.
15105    for ac_exec_ext in '' $ac_executable_extensions; do
15106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15107    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15109    break 2
15110  fi
15111done
15112  done
15113IFS=$as_save_IFS
15114
15115  ;;
15116esac
15117fi
15118NICE=$ac_cv_path_NICE
15119if test -n "$NICE"; then
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15121$as_echo "$NICE" >&6; }
15122else
15123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15124$as_echo "no" >&6; }
15125fi
15126
15127
15128  test -n "$NICE" && break
15129done
15130
15131  else
15132    # The variable is set, but is it from the command line or the environment?
15133
15134    # Try to remove the string !NICE! from our list.
15135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15137      # If it failed, the variable was not from the command line. Ignore it,
15138      # but warn the user (except for BASH, which is always set by the calling BASH).
15139      if test "xNICE" != xBASH; then
15140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15141$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15142      fi
15143      # Try to locate tool using the code snippet
15144      for ac_prog in nice
15145do
15146  # Extract the first word of "$ac_prog", so it can be a program name with args.
15147set dummy $ac_prog; ac_word=$2
15148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15149$as_echo_n "checking for $ac_word... " >&6; }
15150if ${ac_cv_path_NICE+:} false; then :
15151  $as_echo_n "(cached) " >&6
15152else
15153  case $NICE in
15154  [\\/]* | ?:[\\/]*)
15155  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15156  ;;
15157  *)
15158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15159for as_dir in $PATH
15160do
15161  IFS=$as_save_IFS
15162  test -z "$as_dir" && as_dir=.
15163    for ac_exec_ext in '' $ac_executable_extensions; do
15164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15165    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15167    break 2
15168  fi
15169done
15170  done
15171IFS=$as_save_IFS
15172
15173  ;;
15174esac
15175fi
15176NICE=$ac_cv_path_NICE
15177if test -n "$NICE"; then
15178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15179$as_echo "$NICE" >&6; }
15180else
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15182$as_echo "no" >&6; }
15183fi
15184
15185
15186  test -n "$NICE" && break
15187done
15188
15189    else
15190      # If it succeeded, then it was overridden by the user. We will use it
15191      # for the tool.
15192
15193      # First remove it from the list of overridden variables, so we can test
15194      # for unknown variables in the end.
15195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15196
15197      # Check if we try to supply an empty value
15198      if test "x$NICE" = x; then
15199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15200$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15202$as_echo_n "checking for NICE... " >&6; }
15203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15204$as_echo "disabled" >&6; }
15205      else
15206        # Check if the provided tool contains a complete path.
15207        tool_specified="$NICE"
15208        tool_basename="${tool_specified##*/}"
15209        if test "x$tool_basename" = "x$tool_specified"; then
15210          # A command without a complete path is provided, search $PATH.
15211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15212$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15213          # Extract the first word of "$tool_basename", so it can be a program name with args.
15214set dummy $tool_basename; ac_word=$2
15215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15216$as_echo_n "checking for $ac_word... " >&6; }
15217if ${ac_cv_path_NICE+:} false; then :
15218  $as_echo_n "(cached) " >&6
15219else
15220  case $NICE in
15221  [\\/]* | ?:[\\/]*)
15222  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15223  ;;
15224  *)
15225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15226for as_dir in $PATH
15227do
15228  IFS=$as_save_IFS
15229  test -z "$as_dir" && as_dir=.
15230    for ac_exec_ext in '' $ac_executable_extensions; do
15231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15232    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15234    break 2
15235  fi
15236done
15237  done
15238IFS=$as_save_IFS
15239
15240  ;;
15241esac
15242fi
15243NICE=$ac_cv_path_NICE
15244if test -n "$NICE"; then
15245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15246$as_echo "$NICE" >&6; }
15247else
15248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15249$as_echo "no" >&6; }
15250fi
15251
15252
15253          if test "x$NICE" = x; then
15254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15255          fi
15256        else
15257          # Otherwise we believe it is a complete path. Use it as it is.
15258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15259$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15261$as_echo_n "checking for NICE... " >&6; }
15262          if test ! -x "$tool_specified"; then
15263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15264$as_echo "not found" >&6; }
15265            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15266          fi
15267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15268$as_echo "$tool_specified" >&6; }
15269        fi
15270      fi
15271    fi
15272
15273  fi
15274
15275
15276
15277
15278# Now we can determine OpenJDK build and target platforms. This is required to
15279# have early on.
15280# Make sure we can run config.sub.
15281$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15282  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15283
15284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15285$as_echo_n "checking build system type... " >&6; }
15286if ${ac_cv_build+:} false; then :
15287  $as_echo_n "(cached) " >&6
15288else
15289  ac_build_alias=$build_alias
15290test "x$ac_build_alias" = x &&
15291  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15292test "x$ac_build_alias" = x &&
15293  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15294ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15295  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15296
15297fi
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15299$as_echo "$ac_cv_build" >&6; }
15300case $ac_cv_build in
15301*-*-*) ;;
15302*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15303esac
15304build=$ac_cv_build
15305ac_save_IFS=$IFS; IFS='-'
15306set x $ac_cv_build
15307shift
15308build_cpu=$1
15309build_vendor=$2
15310shift; shift
15311# Remember, the first character of IFS is used to create $*,
15312# except with old shells:
15313build_os=$*
15314IFS=$ac_save_IFS
15315case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15316
15317
15318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15319$as_echo_n "checking host system type... " >&6; }
15320if ${ac_cv_host+:} false; then :
15321  $as_echo_n "(cached) " >&6
15322else
15323  if test "x$host_alias" = x; then
15324  ac_cv_host=$ac_cv_build
15325else
15326  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15327    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15328fi
15329
15330fi
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15332$as_echo "$ac_cv_host" >&6; }
15333case $ac_cv_host in
15334*-*-*) ;;
15335*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15336esac
15337host=$ac_cv_host
15338ac_save_IFS=$IFS; IFS='-'
15339set x $ac_cv_host
15340shift
15341host_cpu=$1
15342host_vendor=$2
15343shift; shift
15344# Remember, the first character of IFS is used to create $*,
15345# except with old shells:
15346host_os=$*
15347IFS=$ac_save_IFS
15348case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15349
15350
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15352$as_echo_n "checking target system type... " >&6; }
15353if ${ac_cv_target+:} false; then :
15354  $as_echo_n "(cached) " >&6
15355else
15356  if test "x$target_alias" = x; then
15357  ac_cv_target=$ac_cv_host
15358else
15359  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15360    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15361fi
15362
15363fi
15364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15365$as_echo "$ac_cv_target" >&6; }
15366case $ac_cv_target in
15367*-*-*) ;;
15368*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15369esac
15370target=$ac_cv_target
15371ac_save_IFS=$IFS; IFS='-'
15372set x $ac_cv_target
15373shift
15374target_cpu=$1
15375target_vendor=$2
15376shift; shift
15377# Remember, the first character of IFS is used to create $*,
15378# except with old shells:
15379target_os=$*
15380IFS=$ac_save_IFS
15381case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15382
15383
15384# The aliases save the names the user supplied, while $host etc.
15385# will get canonicalized.
15386test -n "$target_alias" &&
15387  test "$program_prefix$program_suffix$program_transform_name" = \
15388    NONENONEs,x,x, &&
15389  program_prefix=${target_alias}-
15390
15391  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15392  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15393  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15394  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15395  # to use the configure naming style.
15396
15397
15398
15399
15400
15401  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15402  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15403  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15404  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15405  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15406  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15407
15408
15409
15410  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15411
15412  case "$build_os" in
15413    *linux*)
15414      VAR_OS=linux
15415      VAR_OS_TYPE=unix
15416      ;;
15417    *solaris*)
15418      VAR_OS=solaris
15419      VAR_OS_TYPE=unix
15420      ;;
15421    *darwin*)
15422      VAR_OS=macosx
15423      VAR_OS_TYPE=unix
15424      ;;
15425    *bsd*)
15426      VAR_OS=bsd
15427      VAR_OS_TYPE=unix
15428      ;;
15429    *cygwin*)
15430      VAR_OS=windows
15431      VAR_OS_ENV=windows.cygwin
15432      ;;
15433    *mingw*)
15434      VAR_OS=windows
15435      VAR_OS_ENV=windows.msys
15436      ;;
15437    *aix*)
15438      VAR_OS=aix
15439      VAR_OS_TYPE=unix
15440      ;;
15441    *)
15442      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15443      ;;
15444  esac
15445
15446
15447  # First argument is the cpu name from the trip/quad
15448  case "$build_cpu" in
15449    x86_64)
15450      VAR_CPU=x86_64
15451      VAR_CPU_ARCH=x86
15452      VAR_CPU_BITS=64
15453      VAR_CPU_ENDIAN=little
15454      ;;
15455    i?86)
15456      VAR_CPU=x86
15457      VAR_CPU_ARCH=x86
15458      VAR_CPU_BITS=32
15459      VAR_CPU_ENDIAN=little
15460      ;;
15461    arm*)
15462      VAR_CPU=arm
15463      VAR_CPU_ARCH=arm
15464      VAR_CPU_BITS=32
15465      VAR_CPU_ENDIAN=little
15466      ;;
15467    aarch64)
15468      VAR_CPU=aarch64
15469      VAR_CPU_ARCH=aarch64
15470      VAR_CPU_BITS=64
15471      VAR_CPU_ENDIAN=little
15472      ;;
15473    powerpc)
15474      VAR_CPU=ppc
15475      VAR_CPU_ARCH=ppc
15476      VAR_CPU_BITS=32
15477      VAR_CPU_ENDIAN=big
15478      ;;
15479    powerpc64)
15480      VAR_CPU=ppc64
15481      VAR_CPU_ARCH=ppc
15482      VAR_CPU_BITS=64
15483      VAR_CPU_ENDIAN=big
15484      ;;
15485    powerpc64le)
15486      VAR_CPU=ppc64le
15487      VAR_CPU_ARCH=ppc
15488      VAR_CPU_BITS=64
15489      VAR_CPU_ENDIAN=little
15490      ;;
15491    s390)
15492      VAR_CPU=s390
15493      VAR_CPU_ARCH=s390
15494      VAR_CPU_BITS=32
15495      VAR_CPU_ENDIAN=big
15496      ;;
15497    s390x)
15498      VAR_CPU=s390x
15499      VAR_CPU_ARCH=s390
15500      VAR_CPU_BITS=64
15501      VAR_CPU_ENDIAN=big
15502      ;;
15503    sparc)
15504      VAR_CPU=sparc
15505      VAR_CPU_ARCH=sparc
15506      VAR_CPU_BITS=32
15507      VAR_CPU_ENDIAN=big
15508      ;;
15509    sparcv9|sparc64)
15510      VAR_CPU=sparcv9
15511      VAR_CPU_ARCH=sparc
15512      VAR_CPU_BITS=64
15513      VAR_CPU_ENDIAN=big
15514      ;;
15515    *)
15516      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15517      ;;
15518  esac
15519
15520  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15521  OPENJDK_BUILD_OS="$VAR_OS"
15522  if test "x$VAR_OS_TYPE" != x; then
15523    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15524  else
15525    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15526  fi
15527  if test "x$VAR_OS_ENV" != x; then
15528    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15529  else
15530    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15531  fi
15532  OPENJDK_BUILD_CPU="$VAR_CPU"
15533  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15534  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15535  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15536
15537
15538
15539
15540
15541
15542
15543
15544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15545$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15547$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15548
15549  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15550
15551  case "$host_os" in
15552    *linux*)
15553      VAR_OS=linux
15554      VAR_OS_TYPE=unix
15555      ;;
15556    *solaris*)
15557      VAR_OS=solaris
15558      VAR_OS_TYPE=unix
15559      ;;
15560    *darwin*)
15561      VAR_OS=macosx
15562      VAR_OS_TYPE=unix
15563      ;;
15564    *bsd*)
15565      VAR_OS=bsd
15566      VAR_OS_TYPE=unix
15567      ;;
15568    *cygwin*)
15569      VAR_OS=windows
15570      VAR_OS_ENV=windows.cygwin
15571      ;;
15572    *mingw*)
15573      VAR_OS=windows
15574      VAR_OS_ENV=windows.msys
15575      ;;
15576    *aix*)
15577      VAR_OS=aix
15578      VAR_OS_TYPE=unix
15579      ;;
15580    *)
15581      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15582      ;;
15583  esac
15584
15585
15586  # First argument is the cpu name from the trip/quad
15587  case "$host_cpu" in
15588    x86_64)
15589      VAR_CPU=x86_64
15590      VAR_CPU_ARCH=x86
15591      VAR_CPU_BITS=64
15592      VAR_CPU_ENDIAN=little
15593      ;;
15594    i?86)
15595      VAR_CPU=x86
15596      VAR_CPU_ARCH=x86
15597      VAR_CPU_BITS=32
15598      VAR_CPU_ENDIAN=little
15599      ;;
15600    arm*)
15601      VAR_CPU=arm
15602      VAR_CPU_ARCH=arm
15603      VAR_CPU_BITS=32
15604      VAR_CPU_ENDIAN=little
15605      ;;
15606    aarch64)
15607      VAR_CPU=aarch64
15608      VAR_CPU_ARCH=aarch64
15609      VAR_CPU_BITS=64
15610      VAR_CPU_ENDIAN=little
15611      ;;
15612    powerpc)
15613      VAR_CPU=ppc
15614      VAR_CPU_ARCH=ppc
15615      VAR_CPU_BITS=32
15616      VAR_CPU_ENDIAN=big
15617      ;;
15618    powerpc64)
15619      VAR_CPU=ppc64
15620      VAR_CPU_ARCH=ppc
15621      VAR_CPU_BITS=64
15622      VAR_CPU_ENDIAN=big
15623      ;;
15624    powerpc64le)
15625      VAR_CPU=ppc64le
15626      VAR_CPU_ARCH=ppc
15627      VAR_CPU_BITS=64
15628      VAR_CPU_ENDIAN=little
15629      ;;
15630    s390)
15631      VAR_CPU=s390
15632      VAR_CPU_ARCH=s390
15633      VAR_CPU_BITS=32
15634      VAR_CPU_ENDIAN=big
15635      ;;
15636    s390x)
15637      VAR_CPU=s390x
15638      VAR_CPU_ARCH=s390
15639      VAR_CPU_BITS=64
15640      VAR_CPU_ENDIAN=big
15641      ;;
15642    sparc)
15643      VAR_CPU=sparc
15644      VAR_CPU_ARCH=sparc
15645      VAR_CPU_BITS=32
15646      VAR_CPU_ENDIAN=big
15647      ;;
15648    sparcv9|sparc64)
15649      VAR_CPU=sparcv9
15650      VAR_CPU_ARCH=sparc
15651      VAR_CPU_BITS=64
15652      VAR_CPU_ENDIAN=big
15653      ;;
15654    *)
15655      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15656      ;;
15657  esac
15658
15659  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15660  OPENJDK_TARGET_OS="$VAR_OS"
15661  if test "x$VAR_OS_TYPE" != x; then
15662    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15663  else
15664    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15665  fi
15666  if test "x$VAR_OS_ENV" != x; then
15667    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15668  else
15669    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15670  fi
15671  OPENJDK_TARGET_CPU="$VAR_CPU"
15672  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15673  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15674  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15675
15676
15677
15678
15679
15680
15681
15682
15683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15684$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15686$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15687
15688
15689
15690# Check whether --with-target-bits was given.
15691if test "${with_target_bits+set}" = set; then :
15692  withval=$with_target_bits;
15693fi
15694
15695
15696  # We have three types of compiles:
15697  # native  == normal compilation, target system == build system
15698  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15699  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15700  #
15701  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15702    # We're doing a proper cross-compilation
15703    COMPILE_TYPE="cross"
15704  else
15705    COMPILE_TYPE="native"
15706  fi
15707
15708  if test "x$with_target_bits" != x; then
15709    if test "x$COMPILE_TYPE" = "xcross"; then
15710      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15711    fi
15712
15713    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15714      # A reduced build is requested
15715      COMPILE_TYPE="reduced"
15716      OPENJDK_TARGET_CPU_BITS=32
15717      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15718        OPENJDK_TARGET_CPU=x86
15719      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15720        OPENJDK_TARGET_CPU=sparc
15721      else
15722        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15723      fi
15724    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15725      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
15726    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15727      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15728$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15729    else
15730      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15731    fi
15732  fi
15733
15734
15735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15736$as_echo_n "checking compilation type... " >&6; }
15737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15738$as_echo "$COMPILE_TYPE" >&6; }
15739
15740
15741  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15742    REQUIRED_OS_NAME=SunOS
15743    REQUIRED_OS_VERSION=5.10
15744  fi
15745  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15746    REQUIRED_OS_NAME=Linux
15747    REQUIRED_OS_VERSION=2.6
15748  fi
15749  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15750    REQUIRED_OS_NAME=Windows
15751    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15752      REQUIRED_OS_VERSION=5.2
15753    else
15754      REQUIRED_OS_VERSION=5.1
15755    fi
15756  fi
15757  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15758    REQUIRED_OS_NAME=Darwin
15759    REQUIRED_OS_VERSION=11.2
15760  fi
15761  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15762    REQUIRED_OS_NAME=AIX
15763    REQUIRED_OS_VERSION=7.1
15764  fi
15765
15766
15767
15768
15769
15770
15771  # Also store the legacy naming of the cpu.
15772  # Ie i586 and amd64 instead of x86 and x86_64
15773  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15774  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15775    OPENJDK_TARGET_CPU_LEGACY="i586"
15776  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15777    # On all platforms except MacOSX replace x86_64 with amd64.
15778    OPENJDK_TARGET_CPU_LEGACY="amd64"
15779  fi
15780
15781
15782  # And the second legacy naming of the cpu.
15783  # Ie i386 and amd64 instead of x86 and x86_64.
15784  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15785  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15786    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15787  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15788    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15789  fi
15790
15791
15792  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15793  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15794  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15795  OPENJDK_TARGET_CPU_ISADIR=""
15796  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15797    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15798      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15799    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15800      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15801    fi
15802  fi
15803
15804
15805  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15806  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15807  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15808    # On linux only, we replace x86 with i386.
15809    OPENJDK_TARGET_CPU_OSARCH="i386"
15810  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15811    # On all platforms except macosx, we replace x86_64 with amd64.
15812    OPENJDK_TARGET_CPU_OSARCH="amd64"
15813  fi
15814
15815
15816  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15817  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15818    OPENJDK_TARGET_CPU_JLI="i386"
15819  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15820    # On all platforms except macosx, we replace x86_64 with amd64.
15821    OPENJDK_TARGET_CPU_JLI="amd64"
15822  fi
15823
15824  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15825      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15826  else
15827      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15828  fi
15829
15830
15831  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15832  # Macosx is osx and x86_64 is x64
15833  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15834    OPENJDK_TARGET_OS_BUNDLE="osx"
15835  else
15836    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15837  fi
15838  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15839    OPENJDK_TARGET_CPU_BUNDLE="x64"
15840  else
15841    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15842  fi
15843  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15844
15845
15846
15847
15848  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15849    A_LP64="LP64:="
15850    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15851    # unpack200.exe
15852    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15853      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15854    fi
15855  fi
15856  LP64=$A_LP64
15857
15858
15859  if test "x$COMPILE_TYPE" = "xcross"; then
15860    # FIXME: ... or should this include reduced builds..?
15861    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15862  else
15863    DEFINE_CROSS_COMPILE_ARCH=""
15864  fi
15865
15866
15867  # Convert openjdk platform names to hotspot names
15868
15869  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15870  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15871    HOTSPOT_TARGET_OS=bsd
15872  fi
15873
15874
15875  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15876  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15877    HOTSPOT_TARGET_OS_TYPE=posix
15878  fi
15879
15880
15881  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15882  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15883    HOTSPOT_TARGET_CPU=x86_32
15884  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15885    HOTSPOT_TARGET_CPU=sparc
15886  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15887    HOTSPOT_TARGET_CPU=ppc_64
15888  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15889    HOTSPOT_TARGET_CPU=ppc_64
15890  fi
15891
15892
15893  # This is identical with OPENJDK_*, but define anyway for consistency.
15894  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15895
15896
15897  # Setup HOTSPOT_TARGET_CPU_DEFINE
15898  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15899    HOTSPOT_TARGET_CPU_DEFINE=IA32
15900  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15901    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15902  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15903    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15904  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15905    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15906  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15907    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15908  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15909    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15910
15911  # The cpu defines below are for zero, we don't support them directly.
15912  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15913    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15914  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15915    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15916  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15917    HOTSPOT_TARGET_CPU_DEFINE=S390
15918  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15919    HOTSPOT_TARGET_CPU_DEFINE=S390
15920  elif test "x$OPENJDK_TARGET_CPU" != x; then
15921    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15922  fi
15923
15924
15925
15926
15927  # Also store the legacy naming of the cpu.
15928  # Ie i586 and amd64 instead of x86 and x86_64
15929  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15930  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15931    OPENJDK_BUILD_CPU_LEGACY="i586"
15932  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15933    # On all platforms except MacOSX replace x86_64 with amd64.
15934    OPENJDK_BUILD_CPU_LEGACY="amd64"
15935  fi
15936
15937
15938  # And the second legacy naming of the cpu.
15939  # Ie i386 and amd64 instead of x86 and x86_64.
15940  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15941  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15942    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15943  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15944    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15945  fi
15946
15947
15948  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15949  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15950  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15951  OPENJDK_BUILD_CPU_ISADIR=""
15952  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15953    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15954      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15955    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15956      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15957    fi
15958  fi
15959
15960
15961  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15962  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15963  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15964    # On linux only, we replace x86 with i386.
15965    OPENJDK_BUILD_CPU_OSARCH="i386"
15966  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15967    # On all platforms except macosx, we replace x86_64 with amd64.
15968    OPENJDK_BUILD_CPU_OSARCH="amd64"
15969  fi
15970
15971
15972  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15973  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15974    OPENJDK_BUILD_CPU_JLI="i386"
15975  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15976    # On all platforms except macosx, we replace x86_64 with amd64.
15977    OPENJDK_BUILD_CPU_JLI="amd64"
15978  fi
15979
15980  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15981      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15982  else
15983      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15984  fi
15985
15986
15987  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15988  # Macosx is osx and x86_64 is x64
15989  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15990    OPENJDK_BUILD_OS_BUNDLE="osx"
15991  else
15992    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
15993  fi
15994  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15995    OPENJDK_BUILD_CPU_BUNDLE="x64"
15996  else
15997    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
15998  fi
15999  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16000
16001
16002
16003
16004  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16005    A_LP64="LP64:="
16006    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16007    # unpack200.exe
16008    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16009      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16010    fi
16011  fi
16012  LP64=$A_LP64
16013
16014
16015  if test "x$COMPILE_TYPE" = "xcross"; then
16016    # FIXME: ... or should this include reduced builds..?
16017    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16018  else
16019    DEFINE_CROSS_COMPILE_ARCH=""
16020  fi
16021
16022
16023  # Convert openjdk platform names to hotspot names
16024
16025  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16026  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16027    HOTSPOT_BUILD_OS=bsd
16028  fi
16029
16030
16031  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16032  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16033    HOTSPOT_BUILD_OS_TYPE=posix
16034  fi
16035
16036
16037  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16038  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16039    HOTSPOT_BUILD_CPU=x86_32
16040  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16041    HOTSPOT_BUILD_CPU=sparc
16042  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16043    HOTSPOT_BUILD_CPU=ppc_64
16044  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16045    HOTSPOT_BUILD_CPU=ppc_64
16046  fi
16047
16048
16049  # This is identical with OPENJDK_*, but define anyway for consistency.
16050  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16051
16052
16053  # Setup HOTSPOT_BUILD_CPU_DEFINE
16054  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16055    HOTSPOT_BUILD_CPU_DEFINE=IA32
16056  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16057    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16058  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16059    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16060  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16061    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16062  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16063    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16064  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16065    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16066
16067  # The cpu defines below are for zero, we don't support them directly.
16068  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16069    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16070  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16071    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16072  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16073    HOTSPOT_BUILD_CPU_DEFINE=S390
16074  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16075    HOTSPOT_BUILD_CPU_DEFINE=S390
16076  elif test "x$OPENJDK_BUILD_CPU" != x; then
16077    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16078  fi
16079
16080
16081
16082
16083  # ZERO_ARCHDEF is used to enable architecture-specific code.
16084  # This is used in legacy hotspot build.
16085  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16086
16087
16088
16089
16090
16091# Continue setting up basic stuff. Most remaining code require fundamental tools.
16092
16093  # Save the current directory this script was started from
16094  CURDIR="$PWD"
16095
16096  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16097  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16098  # was not available at that time.
16099  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16100  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16101    ORIGINAL_PATH="$REWRITTEN_PATH"
16102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16103$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16104  fi
16105
16106  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16107    PATH_SEP=";"
16108
16109  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16110  if test $SRC_ROOT_LENGTH -gt 100; then
16111    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16112  fi
16113
16114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16116$as_echo_n "checking cygwin release... " >&6; }
16117    CYGWIN_VERSION=`$UNAME -r`
16118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16119$as_echo "$CYGWIN_VERSION" >&6; }
16120    WINDOWS_ENV_VENDOR='cygwin'
16121    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16122
16123    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16124    if test "x$CYGWIN_VERSION_OLD" != x; then
16125      { $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
16126$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;}
16127      as_fn_error $? "Cannot continue" "$LINENO" 5
16128    fi
16129    if test "x$CYGPATH" = x; then
16130      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16131    fi
16132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16133$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16134    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16135    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16136    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16137    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16139$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16140    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16141    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16142    if test "x$test_cygdrive_prefix" = x; then
16143      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16144    fi
16145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16147$as_echo_n "checking msys release... " >&6; }
16148    MSYS_VERSION=`$UNAME -r`
16149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16150$as_echo "$MSYS_VERSION" >&6; }
16151
16152    WINDOWS_ENV_VENDOR='msys'
16153    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16154
16155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16156$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16157    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16158    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16159
16160  windows_path="$MSYS_ROOT_PATH"
16161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16162    unix_path=`$CYGPATH -u "$windows_path"`
16163    MSYS_ROOT_PATH="$unix_path"
16164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16166    MSYS_ROOT_PATH="$unix_path"
16167  fi
16168
16169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16170$as_echo "$MSYS_ROOT_PATH" >&6; }
16171    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16172  else
16173    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16174  fi
16175
16176  # Test if windows or unix (cygwin/msys) find is first in path.
16177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16178$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16179  FIND_BINARY_OUTPUT=`find --version 2>&1`
16180  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16182$as_echo "unix style" >&6; }
16183  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16185$as_echo "Windows" >&6; }
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16187$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16188    { $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
16189$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16190    as_fn_error $? "Cannot continue" "$LINENO" 5
16191  else
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16193$as_echo "unknown" >&6; }
16194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16195$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16196  fi
16197
16198  else
16199    PATH_SEP=":"
16200  fi
16201
16202
16203  # We get the top-level directory from the supporting wrappers.
16204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16205$as_echo_n "checking for top-level directory... " >&6; }
16206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16207$as_echo "$TOPDIR" >&6; }
16208
16209
16210  # Save the original version of TOPDIR for string comparisons
16211  ORIGINAL_TOPDIR="$TOPDIR"
16212
16213
16214  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16215
16216  # Only process if variable expands to non-empty
16217
16218  if test "x$CURDIR" != x; then
16219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16220
16221  # Input might be given as Windows format, start by converting to
16222  # unix format.
16223  path="$CURDIR"
16224  new_path=`$CYGPATH -u "$path"`
16225
16226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16229  # "foo.exe" is OK but "foo" is an error.
16230  #
16231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16232  # It is also a way to make sure we got the proper file name for the real test later on.
16233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16234  if test "x$test_shortpath" = x; then
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16236$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16237    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16238  fi
16239
16240  # Call helper function which possibly converts this using DOS-style short mode.
16241  # If so, the updated path is stored in $new_path.
16242
16243  input_path="$new_path"
16244  # Check if we need to convert this using DOS-style short mode. If the path
16245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16246  # take no chances and rewrite it.
16247  # Note: m4 eats our [], so we need to use [ and ] instead.
16248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16249  if test "x$has_forbidden_chars" != x; then
16250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16254      # Going to short mode and back again did indeed matter. Since short mode is
16255      # case insensitive, let's make it lowercase to improve readability.
16256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16257      # Now convert it back to Unix-style (cygpath)
16258      input_path=`$CYGPATH -u "$shortmode_path"`
16259      new_path="$input_path"
16260    fi
16261  fi
16262
16263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16264  if test "x$test_cygdrive_prefix" = x; then
16265    # As a simple fix, exclude /usr/bin since it's not a real path.
16266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16268      # a path prefixed by /cygdrive for fixpath to work.
16269      new_path="$CYGWIN_ROOT_PATH$input_path"
16270    fi
16271  fi
16272
16273
16274  if test "x$path" != "x$new_path"; then
16275    CURDIR="$new_path"
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16277$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16278  fi
16279
16280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16281
16282  path="$CURDIR"
16283  has_colon=`$ECHO $path | $GREP ^.:`
16284  new_path="$path"
16285  if test "x$has_colon" = x; then
16286    # Not in mixed or Windows style, start by that.
16287    new_path=`cmd //c echo $path`
16288  fi
16289
16290
16291  input_path="$new_path"
16292  # Check if we need to convert this using DOS-style short mode. If the path
16293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16294  # take no chances and rewrite it.
16295  # Note: m4 eats our [], so we need to use [ and ] instead.
16296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16297  if test "x$has_forbidden_chars" != x; then
16298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16300  fi
16301
16302
16303  windows_path="$new_path"
16304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16305    unix_path=`$CYGPATH -u "$windows_path"`
16306    new_path="$unix_path"
16307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16309    new_path="$unix_path"
16310  fi
16311
16312  if test "x$path" != "x$new_path"; then
16313    CURDIR="$new_path"
16314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16315$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16316  fi
16317
16318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16320
16321    else
16322      # We're on a unix platform. Hooray! :)
16323      path="$CURDIR"
16324      has_space=`$ECHO "$path" | $GREP " "`
16325      if test "x$has_space" != x; then
16326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16327$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16329      fi
16330
16331      # Use eval to expand a potential ~
16332      eval path="$path"
16333      if test ! -f "$path" && test ! -d "$path"; then
16334        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16335      fi
16336
16337      if test -d "$path"; then
16338        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16339      else
16340        dir="`$DIRNAME "$path"`"
16341        base="`$BASENAME "$path"`"
16342        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16343      fi
16344    fi
16345  fi
16346
16347
16348  # Only process if variable expands to non-empty
16349
16350  if test "x$TOPDIR" != x; then
16351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16352
16353  # Input might be given as Windows format, start by converting to
16354  # unix format.
16355  path="$TOPDIR"
16356  new_path=`$CYGPATH -u "$path"`
16357
16358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16361  # "foo.exe" is OK but "foo" is an error.
16362  #
16363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16364  # It is also a way to make sure we got the proper file name for the real test later on.
16365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16366  if test "x$test_shortpath" = x; then
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16368$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16369    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16370  fi
16371
16372  # Call helper function which possibly converts this using DOS-style short mode.
16373  # If so, the updated path is stored in $new_path.
16374
16375  input_path="$new_path"
16376  # Check if we need to convert this using DOS-style short mode. If the path
16377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16378  # take no chances and rewrite it.
16379  # Note: m4 eats our [], so we need to use [ and ] instead.
16380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16381  if test "x$has_forbidden_chars" != x; then
16382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16386      # Going to short mode and back again did indeed matter. Since short mode is
16387      # case insensitive, let's make it lowercase to improve readability.
16388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16389      # Now convert it back to Unix-style (cygpath)
16390      input_path=`$CYGPATH -u "$shortmode_path"`
16391      new_path="$input_path"
16392    fi
16393  fi
16394
16395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16396  if test "x$test_cygdrive_prefix" = x; then
16397    # As a simple fix, exclude /usr/bin since it's not a real path.
16398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16400      # a path prefixed by /cygdrive for fixpath to work.
16401      new_path="$CYGWIN_ROOT_PATH$input_path"
16402    fi
16403  fi
16404
16405
16406  if test "x$path" != "x$new_path"; then
16407    TOPDIR="$new_path"
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16409$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16410  fi
16411
16412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16413
16414  path="$TOPDIR"
16415  has_colon=`$ECHO $path | $GREP ^.:`
16416  new_path="$path"
16417  if test "x$has_colon" = x; then
16418    # Not in mixed or Windows style, start by that.
16419    new_path=`cmd //c echo $path`
16420  fi
16421
16422
16423  input_path="$new_path"
16424  # Check if we need to convert this using DOS-style short mode. If the path
16425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16426  # take no chances and rewrite it.
16427  # Note: m4 eats our [], so we need to use [ and ] instead.
16428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16429  if test "x$has_forbidden_chars" != x; then
16430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16432  fi
16433
16434
16435  windows_path="$new_path"
16436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16437    unix_path=`$CYGPATH -u "$windows_path"`
16438    new_path="$unix_path"
16439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16441    new_path="$unix_path"
16442  fi
16443
16444  if test "x$path" != "x$new_path"; then
16445    TOPDIR="$new_path"
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16447$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16448  fi
16449
16450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16452
16453    else
16454      # We're on a unix platform. Hooray! :)
16455      path="$TOPDIR"
16456      has_space=`$ECHO "$path" | $GREP " "`
16457      if test "x$has_space" != x; then
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16459$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16461      fi
16462
16463      # Use eval to expand a potential ~
16464      eval path="$path"
16465      if test ! -f "$path" && test ! -d "$path"; then
16466        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16467      fi
16468
16469      if test -d "$path"; then
16470        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16471      else
16472        dir="`$DIRNAME "$path"`"
16473        base="`$BASENAME "$path"`"
16474        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16475      fi
16476    fi
16477  fi
16478
16479  # SRC_ROOT is a traditional alias for TOPDIR.
16480  SRC_ROOT=$TOPDIR
16481
16482  # Calculate a canonical version of TOPDIR for string comparisons
16483  CANONICAL_TOPDIR=$TOPDIR
16484
16485  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16486    # Follow a chain of symbolic links. Use readlink
16487    # where it exists, else fall back to horribly
16488    # complicated shell code.
16489    if test "x$READLINK_TESTED" != yes; then
16490      # On MacOSX there is a readlink tool with a different
16491      # purpose than the GNU readlink tool. Check the found readlink.
16492      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16493      if test "x$ISGNU" = x; then
16494        # A readlink that we do not know how to use.
16495        # Are there other non-GNU readlinks out there?
16496        READLINK_TESTED=yes
16497        READLINK=
16498      fi
16499    fi
16500
16501    if test "x$READLINK" != x; then
16502      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16503    else
16504      # Save the current directory for restoring afterwards
16505      STARTDIR=$PWD
16506      COUNTER=0
16507      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16508      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16509      cd $sym_link_dir
16510      # Use -P flag to resolve symlinks in directories.
16511      cd `$THEPWDCMD -P`
16512      sym_link_dir=`$THEPWDCMD -P`
16513      # Resolve file symlinks
16514      while test $COUNTER -lt 20; do
16515        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16516        if test "x$ISLINK" == x; then
16517          # This is not a symbolic link! We are done!
16518          break
16519        fi
16520        # Again resolve directory symlinks since the target of the just found
16521        # link could be in a different directory
16522        cd `$DIRNAME $ISLINK`
16523        sym_link_dir=`$THEPWDCMD -P`
16524        sym_link_file=`$BASENAME $ISLINK`
16525        let COUNTER=COUNTER+1
16526      done
16527      cd $STARTDIR
16528      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16529    fi
16530  fi
16531
16532
16533
16534  # Locate the directory of this script.
16535  AUTOCONF_DIR=$TOPDIR/common/autoconf
16536
16537  # Setup username (for use in adhoc version strings etc)
16538  # Outer [ ] to quote m4.
16539   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16540
16541
16542
16543# Check if it's a pure open build or if custom sources are to be used.
16544
16545  # Check whether --enable-openjdk-only was given.
16546if test "${enable_openjdk_only+set}" = set; then :
16547  enableval=$enable_openjdk_only;
16548else
16549  enable_openjdk_only="no"
16550fi
16551
16552
16553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16554$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16556$as_echo "$enable_openjdk_only" >&6; }
16557  if test "x$enable_openjdk_only" = "xyes"; then
16558    SUPPRESS_CUSTOM_EXTENSIONS="true"
16559  elif test "x$enable_openjdk_only" = "xno"; then
16560    SUPPRESS_CUSTOM_EXTENSIONS="false"
16561  else
16562    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16563  fi
16564
16565  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16566  # the IncludeCustomExtension macro.
16567
16568
16569# Check whether --with-custom-make-dir was given.
16570if test "${with_custom_make_dir+set}" = set; then :
16571  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
16572$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16573fi
16574
16575
16576
16577
16578# These are needed to be able to create a configuration name (and thus the output directory)
16579
16580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16581$as_echo_n "checking which variant of the JDK to build... " >&6; }
16582
16583# Check whether --with-jdk-variant was given.
16584if test "${with_jdk_variant+set}" = set; then :
16585  withval=$with_jdk_variant;
16586fi
16587
16588
16589  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16590    JDK_VARIANT="normal"
16591  else
16592    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16593  fi
16594
16595
16596
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16598$as_echo "$JDK_VARIANT" >&6; }
16599
16600
16601  DEBUG_LEVEL="release"
16602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16603$as_echo_n "checking which debug level to use... " >&6; }
16604  # Check whether --enable-debug was given.
16605if test "${enable_debug+set}" = set; then :
16606  enableval=$enable_debug;
16607        ENABLE_DEBUG="${enableval}"
16608        DEBUG_LEVEL="fastdebug"
16609
16610else
16611  ENABLE_DEBUG="no"
16612fi
16613
16614
16615
16616# Check whether --with-debug-level was given.
16617if test "${with_debug_level+set}" = set; then :
16618  withval=$with_debug_level;
16619        DEBUG_LEVEL="${withval}"
16620        if test "x$ENABLE_DEBUG" = xyes; then
16621          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16622        fi
16623
16624fi
16625
16626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16627$as_echo "$DEBUG_LEVEL" >&6; }
16628
16629  if test "x$DEBUG_LEVEL" != xrelease && \
16630      test "x$DEBUG_LEVEL" != xoptimized && \
16631      test "x$DEBUG_LEVEL" != xfastdebug && \
16632      test "x$DEBUG_LEVEL" != xslowdebug; then
16633    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16634  fi
16635
16636  # Translate DEBUG_LEVEL to debug level used by Hotspot
16637  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16638  if test "x$DEBUG_LEVEL" = xrelease; then
16639    HOTSPOT_DEBUG_LEVEL="product"
16640  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16641    HOTSPOT_DEBUG_LEVEL="debug"
16642  fi
16643
16644  if test "x$DEBUG_LEVEL" = xoptimized; then
16645    # The debug level 'optimized' is a little special because it is currently only
16646    # applicable to the HotSpot build where it means to build a completely
16647    # optimized version of the VM without any debugging code (like for the
16648    # 'release' debug level which is called 'product' in the HotSpot build) but
16649    # with the exception that it can contain additional code which is otherwise
16650    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16651    # test new and/or experimental features which are not intended for customer
16652    # shipment. Because these new features need to be tested and benchmarked in
16653    # real world scenarios, we want to build the containing JDK at the 'release'
16654    # debug level.
16655    DEBUG_LEVEL="release"
16656  fi
16657
16658
16659
16660
16661
16662
16663# Check whether --with-jvm-variants was given.
16664if test "${with_jvm_variants+set}" = set; then :
16665  withval=$with_jvm_variants;
16666fi
16667
16668
16669  if test "x$with_jvm_variants" = x; then
16670    with_jvm_variants="server"
16671  fi
16672  JVM_VARIANTS_OPT="$with_jvm_variants"
16673
16674  # Has the user listed more than one variant?
16675  # Additional [] needed to keep m4 from mangling shell constructs.
16676  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16677    BUILDING_MULTIPLE_JVM_VARIANTS=true
16678  else
16679    BUILDING_MULTIPLE_JVM_VARIANTS=false
16680  fi
16681  # Replace the commas with AND for use in the build directory name.
16682  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16683
16684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16685$as_echo_n "checking which variants of the JVM to build... " >&6; }
16686  # JVM_VARIANTS is a space-separated list.
16687  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16688  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16690$as_echo "$JVM_VARIANTS" >&6; }
16691
16692  # Check that the selected variants are valid
16693
16694  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16695  # Notice that the original variant failes on SLES 10 and 11
16696  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16697  STACK=${JVM_VARIANTS// /$'\n'}
16698  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16699  if test "x$INVALID_VARIANTS" != x; then
16700    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16701$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16702    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16703  fi
16704
16705  # All "special" variants share the same output directory ("server")
16706  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16707  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16708  STACK=${JVM_VARIANTS// /$'\n'}
16709  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16710  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16711    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16712  fi
16713
16714  # The "main" variant is the one used by other libs to link against during the
16715  # build.
16716  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16717    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16718    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16719      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16720        JVM_VARIANT_MAIN="$variant"
16721        break
16722      fi
16723    done
16724  else
16725    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16726  fi
16727
16728
16729
16730
16731
16732  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16733    # zero behaves as a platform and rewrites these values. This is really weird. :(
16734    # We are guaranteed that we do not build any other variants when building zero.
16735    HOTSPOT_TARGET_CPU=zero
16736    HOTSPOT_TARGET_CPU_ARCH=zero
16737  fi
16738
16739
16740# With basic setup done, call the custom early hook.
16741
16742
16743# Check if we have devkits, extra paths or sysroot set.
16744
16745
16746# Check whether --with-devkit was given.
16747if test "${with_devkit+set}" = set; then :
16748  withval=$with_devkit;
16749
16750  # Only process if variable expands to non-empty
16751
16752  if test "x$with_devkit" != x; then
16753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16754
16755  # Input might be given as Windows format, start by converting to
16756  # unix format.
16757  path="$with_devkit"
16758  new_path=`$CYGPATH -u "$path"`
16759
16760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16763  # "foo.exe" is OK but "foo" is an error.
16764  #
16765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16766  # It is also a way to make sure we got the proper file name for the real test later on.
16767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16768  if test "x$test_shortpath" = x; then
16769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16770$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16771    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16772  fi
16773
16774  # Call helper function which possibly converts this using DOS-style short mode.
16775  # If so, the updated path is stored in $new_path.
16776
16777  input_path="$new_path"
16778  # Check if we need to convert this using DOS-style short mode. If the path
16779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16780  # take no chances and rewrite it.
16781  # Note: m4 eats our [], so we need to use [ and ] instead.
16782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16783  if test "x$has_forbidden_chars" != x; then
16784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16788      # Going to short mode and back again did indeed matter. Since short mode is
16789      # case insensitive, let's make it lowercase to improve readability.
16790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16791      # Now convert it back to Unix-style (cygpath)
16792      input_path=`$CYGPATH -u "$shortmode_path"`
16793      new_path="$input_path"
16794    fi
16795  fi
16796
16797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16798  if test "x$test_cygdrive_prefix" = x; then
16799    # As a simple fix, exclude /usr/bin since it's not a real path.
16800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16802      # a path prefixed by /cygdrive for fixpath to work.
16803      new_path="$CYGWIN_ROOT_PATH$input_path"
16804    fi
16805  fi
16806
16807
16808  if test "x$path" != "x$new_path"; then
16809    with_devkit="$new_path"
16810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16811$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16812  fi
16813
16814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16815
16816  path="$with_devkit"
16817  has_colon=`$ECHO $path | $GREP ^.:`
16818  new_path="$path"
16819  if test "x$has_colon" = x; then
16820    # Not in mixed or Windows style, start by that.
16821    new_path=`cmd //c echo $path`
16822  fi
16823
16824
16825  input_path="$new_path"
16826  # Check if we need to convert this using DOS-style short mode. If the path
16827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16828  # take no chances and rewrite it.
16829  # Note: m4 eats our [], so we need to use [ and ] instead.
16830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16831  if test "x$has_forbidden_chars" != x; then
16832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16834  fi
16835
16836
16837  windows_path="$new_path"
16838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16839    unix_path=`$CYGPATH -u "$windows_path"`
16840    new_path="$unix_path"
16841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16843    new_path="$unix_path"
16844  fi
16845
16846  if test "x$path" != "x$new_path"; then
16847    with_devkit="$new_path"
16848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16849$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16850  fi
16851
16852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16854
16855    else
16856      # We're on a unix platform. Hooray! :)
16857      path="$with_devkit"
16858      has_space=`$ECHO "$path" | $GREP " "`
16859      if test "x$has_space" != x; then
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16861$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16863      fi
16864
16865      # Use eval to expand a potential ~
16866      eval path="$path"
16867      if test ! -f "$path" && test ! -d "$path"; then
16868        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16869      fi
16870
16871      if test -d "$path"; then
16872        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16873      else
16874        dir="`$DIRNAME "$path"`"
16875        base="`$BASENAME "$path"`"
16876        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16877      fi
16878    fi
16879  fi
16880
16881        DEVKIT_ROOT="$with_devkit"
16882        # Check for a meta data info file in the root of the devkit
16883        if test -f "$DEVKIT_ROOT/devkit.info"; then
16884          . $DEVKIT_ROOT/devkit.info
16885          # This potentially sets the following:
16886          # A descriptive name of the devkit
16887
16888  if test "x$DEVKIT_NAME" = x; then
16889    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16890  fi
16891
16892          # Corresponds to --with-extra-path
16893
16894  if test "x$DEVKIT_EXTRA_PATH" = x; then
16895    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16896  fi
16897
16898          # Corresponds to --with-toolchain-path
16899
16900  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16901    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16902  fi
16903
16904          # Corresponds to --with-sysroot
16905
16906  if test "x$DEVKIT_SYSROOT" = x; then
16907    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16908  fi
16909
16910
16911          # Identifies the Visual Studio version in the devkit
16912
16913  if test "x$DEVKIT_VS_VERSION" = x; then
16914    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16915  fi
16916
16917          # The Visual Studio include environment variable
16918
16919  if test "x$DEVKIT_VS_INCLUDE" = x; then
16920    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16921  fi
16922
16923          # The Visual Studio lib environment variable
16924
16925  if test "x$DEVKIT_VS_LIB" = x; then
16926    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16927  fi
16928
16929          # Corresponds to --with-msvcr-dll
16930
16931  if test "x$DEVKIT_MSVCR_DLL" = x; then
16932    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # Corresponds to --with-msvcp-dll
16936
16937  if test "x$DEVKIT_MSVCP_DLL" = x; then
16938    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941        fi
16942
16943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16944$as_echo_n "checking for devkit... " >&6; }
16945        if test "x$DEVKIT_NAME" != x; then
16946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16947$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16948        else
16949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16950$as_echo "$DEVKIT_ROOT" >&6; }
16951        fi
16952
16953
16954  if test "x$DEVKIT_EXTRA_PATH" != x; then
16955    if test "x$EXTRA_PATH" = x; then
16956      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16957    else
16958      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16959    fi
16960  fi
16961
16962
16963        # Fallback default of just /bin if DEVKIT_PATH is not defined
16964        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16965          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16966        fi
16967
16968  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16969    if test "x$TOOLCHAIN_PATH" = x; then
16970      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16971    else
16972      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16973    fi
16974  fi
16975
16976
16977        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16978        # places for backwards compatiblity.
16979        if test "x$DEVKIT_SYSROOT" != x; then
16980          SYSROOT="$DEVKIT_SYSROOT"
16981        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16982          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16983        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16984          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16985        fi
16986
16987
16988fi
16989
16990
16991  # You can force the sysroot if the sysroot encoded into the compiler tools
16992  # is not correct.
16993
16994# Check whether --with-sys-root was given.
16995if test "${with_sys_root+set}" = set; then :
16996  withval=$with_sys_root; SYSROOT=$with_sys_root
16997
16998fi
16999
17000
17001
17002# Check whether --with-sysroot was given.
17003if test "${with_sysroot+set}" = set; then :
17004  withval=$with_sysroot; SYSROOT=$with_sysroot
17005
17006fi
17007
17008
17009
17010# Check whether --with-tools-dir was given.
17011if test "${with_tools_dir+set}" = set; then :
17012  withval=$with_tools_dir;
17013  if test "x$with_tools_dir" != x; then
17014    if test "x$TOOLCHAIN_PATH" = x; then
17015      TOOLCHAIN_PATH="$with_tools_dir"
17016    else
17017      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17018    fi
17019  fi
17020
17021
17022fi
17023
17024
17025
17026# Check whether --with-toolchain-path was given.
17027if test "${with_toolchain_path+set}" = set; then :
17028  withval=$with_toolchain_path;
17029  if test "x$with_toolchain_path" != x; then
17030    if test "x$TOOLCHAIN_PATH" = x; then
17031      TOOLCHAIN_PATH="$with_toolchain_path"
17032    else
17033      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17034    fi
17035  fi
17036
17037
17038fi
17039
17040
17041
17042# Check whether --with-extra-path was given.
17043if test "${with_extra_path+set}" = set; then :
17044  withval=$with_extra_path;
17045  if test "x$with_extra_path" != x; then
17046    if test "x$EXTRA_PATH" = x; then
17047      EXTRA_PATH="$with_extra_path"
17048    else
17049      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17050    fi
17051  fi
17052
17053
17054fi
17055
17056
17057  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17058    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17059    # If not, detect if Xcode is installed by running xcodebuild -version
17060    # if no Xcode installed, xcodebuild exits with 1
17061    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17062    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17063      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17064      # fall back on the stub binary in /usr/bin/xcodebuild
17065      # Extract the first word of "xcodebuild", so it can be a program name with args.
17066set dummy xcodebuild; ac_word=$2
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17068$as_echo_n "checking for $ac_word... " >&6; }
17069if ${ac_cv_path_XCODEBUILD+:} false; then :
17070  $as_echo_n "(cached) " >&6
17071else
17072  case $XCODEBUILD in
17073  [\\/]* | ?:[\\/]*)
17074  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17075  ;;
17076  *)
17077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17078for as_dir in $TOOLCHAIN_PATH
17079do
17080  IFS=$as_save_IFS
17081  test -z "$as_dir" && as_dir=.
17082    for ac_exec_ext in '' $ac_executable_extensions; do
17083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17084    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17086    break 2
17087  fi
17088done
17089  done
17090IFS=$as_save_IFS
17091
17092  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17093  ;;
17094esac
17095fi
17096XCODEBUILD=$ac_cv_path_XCODEBUILD
17097if test -n "$XCODEBUILD"; then
17098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17099$as_echo "$XCODEBUILD" >&6; }
17100else
17101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17102$as_echo "no" >&6; }
17103fi
17104
17105
17106    else
17107      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17108      # when only the command line tools are installed there are no SDKs, so headers
17109      # are copied into the system frameworks
17110      XCODEBUILD=
17111
17112    fi
17113
17114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17115$as_echo_n "checking for sdk name... " >&6; }
17116
17117# Check whether --with-sdk-name was given.
17118if test "${with_sdk_name+set}" = set; then :
17119  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17120
17121fi
17122
17123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17124$as_echo "$SDKNAME" >&6; }
17125
17126    # if toolchain path is specified then don't rely on system headers, they may not compile
17127    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17128    test -z "$TOOLCHAIN_PATH" && \
17129      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17130
17131    if test -z "$SYSROOT"; then
17132      if test -n "$XCODEBUILD"; then
17133        # if we don't have system headers, use default SDK name (last resort)
17134        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17135          SDKNAME=${SDKNAME:-macosx}
17136        fi
17137
17138        if test -n "$SDKNAME"; then
17139          # Call xcodebuild to determine SYSROOT
17140          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17141        fi
17142      else
17143        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17144          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
17145        fi
17146      fi
17147    else
17148      # warn user if --with-sdk-name was also set
17149      if test -n "$with_sdk_name"; then
17150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17151$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17152      fi
17153    fi
17154
17155    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17156      # If no system framework headers, then SYSROOT must be set, or we won't build
17157      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
17158    fi
17159
17160    # Perform a basic sanity test
17161    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17162      if test -z "$SYSROOT"; then
17163        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
17164      else
17165        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17166      fi
17167    fi
17168
17169    # set SDKROOT too, Xcode tools will pick it up
17170    SDKROOT=$SYSROOT
17171
17172  fi
17173
17174  # Prepend the extra path to the global path
17175
17176  if test "x$EXTRA_PATH" != x; then
17177    if test "x$PATH" = x; then
17178      PATH="$EXTRA_PATH"
17179    else
17180      PATH="$EXTRA_PATH:$PATH"
17181    fi
17182  fi
17183
17184
17185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17186$as_echo_n "checking for sysroot... " >&6; }
17187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17188$as_echo "$SYSROOT" >&6; }
17189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17190$as_echo_n "checking for toolchain path... " >&6; }
17191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17192$as_echo "$TOOLCHAIN_PATH" >&6; }
17193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17194$as_echo_n "checking for extra path... " >&6; }
17195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17196$as_echo "$EXTRA_PATH" >&6; }
17197
17198
17199# To properly create a configuration name, we need to have the OpenJDK target
17200# and options (variants and debug level) parsed.
17201
17202
17203
17204# Check whether --with-conf-name was given.
17205if test "${with_conf_name+set}" = set; then :
17206  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17207fi
17208
17209
17210  # Test from where we are running configure, in or outside of src root.
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17212$as_echo_n "checking where to store configuration... " >&6; }
17213  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17214      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17215      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17216    # We are running configure from the src root.
17217    # Create a default ./build/target-variant-debuglevel output root.
17218    if test "x${CONF_NAME}" = x; then
17219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17220$as_echo "in default location" >&6; }
17221      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17222    else
17223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17224$as_echo "in build directory with custom name" >&6; }
17225    fi
17226    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17227    $MKDIR -p "$OUTPUT_ROOT"
17228    if test ! -d "$OUTPUT_ROOT"; then
17229      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17230    fi
17231  else
17232    # We are running configure from outside of the src dir.
17233    # Then use the current directory as output dir!
17234    # If configuration is situated in normal build directory, just use the build
17235    # directory name as configuration name, otherwise use the complete path.
17236    if test "x${CONF_NAME}" = x; then
17237      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17238    fi
17239    OUTPUT_ROOT="$CURDIR"
17240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17241$as_echo "in current directory" >&6; }
17242
17243    # WARNING: This might be a bad thing to do. You need to be sure you want to
17244    # have a configuration in this directory. Do some sanity checks!
17245
17246    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17247      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17248      # other files
17249      files_present=`$LS $OUTPUT_ROOT`
17250      # Configure has already touched config.log and confdefs.h in the current dir when this check
17251      # is performed.
17252      filtered_files=`$ECHO "$files_present" \
17253          | $SED -e 's/config.log//g' \
17254              -e 's/configure.log//g' \
17255              -e 's/confdefs.h//g' \
17256              -e 's/ //g' \
17257          | $TR -d '\n'`
17258      if test "x$filtered_files" != x; then
17259        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17260$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17261        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17262$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17263        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17264$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17265        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17266$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17267        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17268$as_echo "$as_me: seriously mess up just about everything." >&6;}
17269        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17270$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17271        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17272$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17273        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17274      fi
17275    fi
17276  fi
17277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17278$as_echo_n "checking what configuration name to use... " >&6; }
17279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17280$as_echo "$CONF_NAME" >&6; }
17281
17282
17283  # Only process if variable expands to non-empty
17284
17285  if test "x$OUTPUT_ROOT" != x; then
17286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17287
17288  # Input might be given as Windows format, start by converting to
17289  # unix format.
17290  path="$OUTPUT_ROOT"
17291  new_path=`$CYGPATH -u "$path"`
17292
17293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17296  # "foo.exe" is OK but "foo" is an error.
17297  #
17298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17299  # It is also a way to make sure we got the proper file name for the real test later on.
17300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17301  if test "x$test_shortpath" = x; then
17302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17303$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17304    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17305  fi
17306
17307  # Call helper function which possibly converts this using DOS-style short mode.
17308  # If so, the updated path is stored in $new_path.
17309
17310  input_path="$new_path"
17311  # Check if we need to convert this using DOS-style short mode. If the path
17312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17313  # take no chances and rewrite it.
17314  # Note: m4 eats our [], so we need to use [ and ] instead.
17315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17316  if test "x$has_forbidden_chars" != x; then
17317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17321      # Going to short mode and back again did indeed matter. Since short mode is
17322      # case insensitive, let's make it lowercase to improve readability.
17323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17324      # Now convert it back to Unix-style (cygpath)
17325      input_path=`$CYGPATH -u "$shortmode_path"`
17326      new_path="$input_path"
17327    fi
17328  fi
17329
17330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17331  if test "x$test_cygdrive_prefix" = x; then
17332    # As a simple fix, exclude /usr/bin since it's not a real path.
17333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17335      # a path prefixed by /cygdrive for fixpath to work.
17336      new_path="$CYGWIN_ROOT_PATH$input_path"
17337    fi
17338  fi
17339
17340
17341  if test "x$path" != "x$new_path"; then
17342    OUTPUT_ROOT="$new_path"
17343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17344$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17345  fi
17346
17347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17348
17349  path="$OUTPUT_ROOT"
17350  has_colon=`$ECHO $path | $GREP ^.:`
17351  new_path="$path"
17352  if test "x$has_colon" = x; then
17353    # Not in mixed or Windows style, start by that.
17354    new_path=`cmd //c echo $path`
17355  fi
17356
17357
17358  input_path="$new_path"
17359  # Check if we need to convert this using DOS-style short mode. If the path
17360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17361  # take no chances and rewrite it.
17362  # Note: m4 eats our [], so we need to use [ and ] instead.
17363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17364  if test "x$has_forbidden_chars" != x; then
17365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17367  fi
17368
17369
17370  windows_path="$new_path"
17371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17372    unix_path=`$CYGPATH -u "$windows_path"`
17373    new_path="$unix_path"
17374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17376    new_path="$unix_path"
17377  fi
17378
17379  if test "x$path" != "x$new_path"; then
17380    OUTPUT_ROOT="$new_path"
17381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17382$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17383  fi
17384
17385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17387
17388    else
17389      # We're on a unix platform. Hooray! :)
17390      path="$OUTPUT_ROOT"
17391      has_space=`$ECHO "$path" | $GREP " "`
17392      if test "x$has_space" != x; then
17393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17394$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17396      fi
17397
17398      # Use eval to expand a potential ~
17399      eval path="$path"
17400      if test ! -f "$path" && test ! -d "$path"; then
17401        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17402      fi
17403
17404      if test -d "$path"; then
17405        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17406      else
17407        dir="`$DIRNAME "$path"`"
17408        base="`$BASENAME "$path"`"
17409        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17410      fi
17411    fi
17412  fi
17413
17414
17415  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17416  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17417
17418  SPEC=$OUTPUT_ROOT/spec.gmk
17419
17420  CONF_NAME=$CONF_NAME
17421
17422  OUTPUT_ROOT=$OUTPUT_ROOT
17423
17424
17425
17426  # The spec.gmk file contains all variables for the make system.
17427  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17428
17429  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17430  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17431
17432  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17433  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17434
17435  # The compare.sh is used to compare the build output to other builds.
17436  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17437
17438  # The generated Makefile knows where the spec.gmk is and where the source is.
17439  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17440  # which will look for generated configurations
17441  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17442
17443
17444
17445# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17446
17447  for ac_prog in apt-get yum port pkgutil pkgadd
17448do
17449  # Extract the first word of "$ac_prog", so it can be a program name with args.
17450set dummy $ac_prog; ac_word=$2
17451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17452$as_echo_n "checking for $ac_word... " >&6; }
17453if ${ac_cv_prog_PKGHANDLER+:} false; then :
17454  $as_echo_n "(cached) " >&6
17455else
17456  if test -n "$PKGHANDLER"; then
17457  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17458else
17459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17460for as_dir in $PATH
17461do
17462  IFS=$as_save_IFS
17463  test -z "$as_dir" && as_dir=.
17464    for ac_exec_ext in '' $ac_executable_extensions; do
17465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17466    ac_cv_prog_PKGHANDLER="$ac_prog"
17467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17468    break 2
17469  fi
17470done
17471  done
17472IFS=$as_save_IFS
17473
17474fi
17475fi
17476PKGHANDLER=$ac_cv_prog_PKGHANDLER
17477if test -n "$PKGHANDLER"; then
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17479$as_echo "$PKGHANDLER" >&6; }
17480else
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17482$as_echo "no" >&6; }
17483fi
17484
17485
17486  test -n "$PKGHANDLER" && break
17487done
17488
17489
17490
17491# Setup tools that requires more complex handling, or that is not needed by the configure script.
17492
17493
17494
17495  # Publish this variable in the help.
17496
17497
17498  if [ -z "${MAKE+x}" ]; then
17499    # The variable is not set by user, try to locate tool using the code snippet
17500
17501    # Try our hardest to locate a correct version of GNU make
17502    for ac_prog in gmake
17503do
17504  # Extract the first word of "$ac_prog", so it can be a program name with args.
17505set dummy $ac_prog; ac_word=$2
17506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507$as_echo_n "checking for $ac_word... " >&6; }
17508if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17509  $as_echo_n "(cached) " >&6
17510else
17511  case $CHECK_GMAKE in
17512  [\\/]* | ?:[\\/]*)
17513  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17514  ;;
17515  *)
17516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17517for as_dir in $PATH
17518do
17519  IFS=$as_save_IFS
17520  test -z "$as_dir" && as_dir=.
17521    for ac_exec_ext in '' $ac_executable_extensions; do
17522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17523    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17525    break 2
17526  fi
17527done
17528  done
17529IFS=$as_save_IFS
17530
17531  ;;
17532esac
17533fi
17534CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17535if test -n "$CHECK_GMAKE"; then
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17537$as_echo "$CHECK_GMAKE" >&6; }
17538else
17539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17540$as_echo "no" >&6; }
17541fi
17542
17543
17544  test -n "$CHECK_GMAKE" && break
17545done
17546
17547
17548  MAKE_CANDIDATE=""$CHECK_GMAKE""
17549  DESCRIPTION="gmake in PATH"
17550
17551  # On Cygwin, we require a newer version of make than on other platforms
17552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17553    MAKE_VERSION_EXPR="-e 4\."
17554    MAKE_REQUIRED_VERSION="4.0"
17555   else
17556    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17557    MAKE_REQUIRED_VERSION="3.81"
17558  fi
17559
17560  if test "x$MAKE_CANDIDATE" != x; then
17561    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17562$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17563    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17564    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17565    if test "x$IS_GNU_MAKE" = x; then
17566      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17567$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17568    else
17569      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17570      if test "x$IS_MODERN_MAKE" = x; then
17571        { $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
17572$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;}
17573      else
17574        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17575          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17576            MAKE_EXPECTED_ENV='cygwin'
17577          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17578            MAKE_EXPECTED_ENV='msys'
17579          else
17580            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17581          fi
17582          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17583          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17584        else
17585          # Not relevant for non-Windows
17586          IS_MAKE_CORRECT_ENV=true
17587        fi
17588        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17589          { $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
17590$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;}
17591        else
17592          FOUND_MAKE=$MAKE_CANDIDATE
17593
17594  # Only process if variable expands to non-empty
17595
17596  if test "x$FOUND_MAKE" != x; then
17597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17598
17599  # First separate the path from the arguments. This will split at the first
17600  # space.
17601  complete="$FOUND_MAKE"
17602  path="${complete%% *}"
17603  tmp="$complete EOL"
17604  arguments="${tmp#* }"
17605
17606  # Input might be given as Windows format, start by converting to
17607  # unix format.
17608  new_path=`$CYGPATH -u "$path"`
17609
17610  # Now try to locate executable using which
17611  new_path=`$WHICH "$new_path" 2> /dev/null`
17612  # bat and cmd files are not always considered executable in cygwin causing which
17613  # to not find them
17614  if test "x$new_path" = x \
17615      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17616      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17617    new_path=`$CYGPATH -u "$path"`
17618  fi
17619  if test "x$new_path" = x; then
17620    # Oops. Which didn't find the executable.
17621    # The splitting of arguments from the executable at a space might have been incorrect,
17622    # since paths with space are more likely in Windows. Give it another try with the whole
17623    # argument.
17624    path="$complete"
17625    arguments="EOL"
17626    new_path=`$CYGPATH -u "$path"`
17627    new_path=`$WHICH "$new_path" 2> /dev/null`
17628    # bat and cmd files are not always considered executable in cygwin causing which
17629    # to not find them
17630    if test "x$new_path" = x \
17631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17633      new_path=`$CYGPATH -u "$path"`
17634    fi
17635    if test "x$new_path" = x; then
17636      # It's still not found. Now this is an unrecoverable error.
17637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17639      has_space=`$ECHO "$complete" | $GREP " "`
17640      if test "x$has_space" != x; then
17641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17643      fi
17644      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17645    fi
17646  fi
17647
17648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17651  # "foo.exe" is OK but "foo" is an error.
17652  #
17653  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17654  # It is also a way to make sure we got the proper file name for the real test later on.
17655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17656  if test "x$test_shortpath" = x; then
17657    # Short path failed, file does not exist as specified.
17658    # Try adding .exe or .cmd
17659    if test -f "${new_path}.exe"; then
17660      input_to_shortpath="${new_path}.exe"
17661    elif test -f "${new_path}.cmd"; then
17662      input_to_shortpath="${new_path}.cmd"
17663    else
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17665$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17667$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17668      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17669    fi
17670  else
17671    input_to_shortpath="$new_path"
17672  fi
17673
17674  # Call helper function which possibly converts this using DOS-style short mode.
17675  # If so, the updated path is stored in $new_path.
17676  new_path="$input_to_shortpath"
17677
17678  input_path="$input_to_shortpath"
17679  # Check if we need to convert this using DOS-style short mode. If the path
17680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17681  # take no chances and rewrite it.
17682  # Note: m4 eats our [], so we need to use [ and ] instead.
17683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17684  if test "x$has_forbidden_chars" != x; then
17685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17689      # Going to short mode and back again did indeed matter. Since short mode is
17690      # case insensitive, let's make it lowercase to improve readability.
17691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17692      # Now convert it back to Unix-style (cygpath)
17693      input_path=`$CYGPATH -u "$shortmode_path"`
17694      new_path="$input_path"
17695    fi
17696  fi
17697
17698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17699  if test "x$test_cygdrive_prefix" = x; then
17700    # As a simple fix, exclude /usr/bin since it's not a real path.
17701    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17703      # a path prefixed by /cygdrive for fixpath to work.
17704      new_path="$CYGWIN_ROOT_PATH$input_path"
17705    fi
17706  fi
17707
17708  # remove trailing .exe if any
17709  new_path="${new_path/%.exe/}"
17710
17711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17712
17713  # First separate the path from the arguments. This will split at the first
17714  # space.
17715  complete="$FOUND_MAKE"
17716  path="${complete%% *}"
17717  tmp="$complete EOL"
17718  arguments="${tmp#* }"
17719
17720  # Input might be given as Windows format, start by converting to
17721  # unix format.
17722  new_path="$path"
17723
17724  windows_path="$new_path"
17725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17726    unix_path=`$CYGPATH -u "$windows_path"`
17727    new_path="$unix_path"
17728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17730    new_path="$unix_path"
17731  fi
17732
17733
17734  # Now try to locate executable using which
17735  new_path=`$WHICH "$new_path" 2> /dev/null`
17736
17737  if test "x$new_path" = x; then
17738    # Oops. Which didn't find the executable.
17739    # The splitting of arguments from the executable at a space might have been incorrect,
17740    # since paths with space are more likely in Windows. Give it another try with the whole
17741    # argument.
17742    path="$complete"
17743    arguments="EOL"
17744    new_path="$path"
17745
17746  windows_path="$new_path"
17747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17748    unix_path=`$CYGPATH -u "$windows_path"`
17749    new_path="$unix_path"
17750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17752    new_path="$unix_path"
17753  fi
17754
17755
17756    new_path=`$WHICH "$new_path" 2> /dev/null`
17757    # bat and cmd files are not always considered executable in MSYS causing which
17758    # to not find them
17759    if test "x$new_path" = x \
17760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17762      new_path="$path"
17763
17764  windows_path="$new_path"
17765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17766    unix_path=`$CYGPATH -u "$windows_path"`
17767    new_path="$unix_path"
17768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17770    new_path="$unix_path"
17771  fi
17772
17773    fi
17774
17775    if test "x$new_path" = x; then
17776      # It's still not found. Now this is an unrecoverable error.
17777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17778$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17779      has_space=`$ECHO "$complete" | $GREP " "`
17780      if test "x$has_space" != x; then
17781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17783      fi
17784      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17785    fi
17786  fi
17787
17788  # Now new_path has a complete unix path to the binary
17789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17790    # Keep paths in /bin as-is, but remove trailing .exe if any
17791    new_path="${new_path/%.exe/}"
17792    # Do not save /bin paths to all_fixpath_prefixes!
17793  else
17794    # Not in mixed or Windows style, start by that.
17795    new_path=`cmd //c echo $new_path`
17796
17797  input_path="$new_path"
17798  # Check if we need to convert this using DOS-style short mode. If the path
17799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17800  # take no chances and rewrite it.
17801  # Note: m4 eats our [], so we need to use [ and ] instead.
17802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17803  if test "x$has_forbidden_chars" != x; then
17804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17806  fi
17807
17808    # Output is in $new_path
17809
17810  windows_path="$new_path"
17811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17812    unix_path=`$CYGPATH -u "$windows_path"`
17813    new_path="$unix_path"
17814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17816    new_path="$unix_path"
17817  fi
17818
17819    # remove trailing .exe if any
17820    new_path="${new_path/%.exe/}"
17821
17822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17824  fi
17825
17826    else
17827      # We're on a unix platform. Hooray! :)
17828      # First separate the path from the arguments. This will split at the first
17829      # space.
17830      complete="$FOUND_MAKE"
17831      path="${complete%% *}"
17832      tmp="$complete EOL"
17833      arguments="${tmp#* }"
17834
17835      # Cannot rely on the command "which" here since it doesn't always work.
17836      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17837      if test -z "$is_absolute_path"; then
17838        # Path to executable is not absolute. Find it.
17839        IFS_save="$IFS"
17840        IFS=:
17841        for p in $PATH; do
17842          if test -f "$p/$path" && test -x "$p/$path"; then
17843            new_path="$p/$path"
17844            break
17845          fi
17846        done
17847        IFS="$IFS_save"
17848      else
17849        # This is an absolute path, we can use it without further modifications.
17850        new_path="$path"
17851      fi
17852
17853      if test "x$new_path" = x; then
17854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17855$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17856        has_space=`$ECHO "$complete" | $GREP " "`
17857        if test "x$has_space" != x; then
17858          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17859$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17860        fi
17861        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17862      fi
17863    fi
17864
17865    # Now join together the path and the arguments once again
17866    if test "x$arguments" != xEOL; then
17867      new_complete="$new_path ${arguments% *}"
17868    else
17869      new_complete="$new_path"
17870    fi
17871
17872    if test "x$complete" != "x$new_complete"; then
17873      FOUND_MAKE="$new_complete"
17874      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17875$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17876    fi
17877  fi
17878
17879        fi
17880      fi
17881    fi
17882  fi
17883
17884
17885    if test "x$FOUND_MAKE" = x; then
17886      for ac_prog in make
17887do
17888  # Extract the first word of "$ac_prog", so it can be a program name with args.
17889set dummy $ac_prog; ac_word=$2
17890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17891$as_echo_n "checking for $ac_word... " >&6; }
17892if ${ac_cv_path_CHECK_MAKE+:} false; then :
17893  $as_echo_n "(cached) " >&6
17894else
17895  case $CHECK_MAKE in
17896  [\\/]* | ?:[\\/]*)
17897  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17898  ;;
17899  *)
17900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17901for as_dir in $PATH
17902do
17903  IFS=$as_save_IFS
17904  test -z "$as_dir" && as_dir=.
17905    for ac_exec_ext in '' $ac_executable_extensions; do
17906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17907    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17909    break 2
17910  fi
17911done
17912  done
17913IFS=$as_save_IFS
17914
17915  ;;
17916esac
17917fi
17918CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17919if test -n "$CHECK_MAKE"; then
17920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17921$as_echo "$CHECK_MAKE" >&6; }
17922else
17923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17924$as_echo "no" >&6; }
17925fi
17926
17927
17928  test -n "$CHECK_MAKE" && break
17929done
17930
17931
17932  MAKE_CANDIDATE=""$CHECK_MAKE""
17933  DESCRIPTION="make in PATH"
17934
17935  # On Cygwin, we require a newer version of make than on other platforms
17936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17937    MAKE_VERSION_EXPR="-e 4\."
17938    MAKE_REQUIRED_VERSION="4.0"
17939   else
17940    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17941    MAKE_REQUIRED_VERSION="3.81"
17942  fi
17943
17944  if test "x$MAKE_CANDIDATE" != x; then
17945    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17946$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17947    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17948    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17949    if test "x$IS_GNU_MAKE" = x; then
17950      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17951$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17952    else
17953      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17954      if test "x$IS_MODERN_MAKE" = x; then
17955        { $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
17956$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;}
17957      else
17958        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17959          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17960            MAKE_EXPECTED_ENV='cygwin'
17961          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17962            MAKE_EXPECTED_ENV='msys'
17963          else
17964            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17965          fi
17966          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17967          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17968        else
17969          # Not relevant for non-Windows
17970          IS_MAKE_CORRECT_ENV=true
17971        fi
17972        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17973          { $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
17974$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;}
17975        else
17976          FOUND_MAKE=$MAKE_CANDIDATE
17977
17978  # Only process if variable expands to non-empty
17979
17980  if test "x$FOUND_MAKE" != x; then
17981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17982
17983  # First separate the path from the arguments. This will split at the first
17984  # space.
17985  complete="$FOUND_MAKE"
17986  path="${complete%% *}"
17987  tmp="$complete EOL"
17988  arguments="${tmp#* }"
17989
17990  # Input might be given as Windows format, start by converting to
17991  # unix format.
17992  new_path=`$CYGPATH -u "$path"`
17993
17994  # Now try to locate executable using which
17995  new_path=`$WHICH "$new_path" 2> /dev/null`
17996  # bat and cmd files are not always considered executable in cygwin causing which
17997  # to not find them
17998  if test "x$new_path" = x \
17999      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18000      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18001    new_path=`$CYGPATH -u "$path"`
18002  fi
18003  if test "x$new_path" = x; then
18004    # Oops. Which didn't find the executable.
18005    # The splitting of arguments from the executable at a space might have been incorrect,
18006    # since paths with space are more likely in Windows. Give it another try with the whole
18007    # argument.
18008    path="$complete"
18009    arguments="EOL"
18010    new_path=`$CYGPATH -u "$path"`
18011    new_path=`$WHICH "$new_path" 2> /dev/null`
18012    # bat and cmd files are not always considered executable in cygwin causing which
18013    # to not find them
18014    if test "x$new_path" = x \
18015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18017      new_path=`$CYGPATH -u "$path"`
18018    fi
18019    if test "x$new_path" = x; then
18020      # It's still not found. Now this is an unrecoverable error.
18021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18023      has_space=`$ECHO "$complete" | $GREP " "`
18024      if test "x$has_space" != x; then
18025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18027      fi
18028      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18029    fi
18030  fi
18031
18032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18035  # "foo.exe" is OK but "foo" is an error.
18036  #
18037  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18038  # It is also a way to make sure we got the proper file name for the real test later on.
18039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18040  if test "x$test_shortpath" = x; then
18041    # Short path failed, file does not exist as specified.
18042    # Try adding .exe or .cmd
18043    if test -f "${new_path}.exe"; then
18044      input_to_shortpath="${new_path}.exe"
18045    elif test -f "${new_path}.cmd"; then
18046      input_to_shortpath="${new_path}.cmd"
18047    else
18048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18049$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18052      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18053    fi
18054  else
18055    input_to_shortpath="$new_path"
18056  fi
18057
18058  # Call helper function which possibly converts this using DOS-style short mode.
18059  # If so, the updated path is stored in $new_path.
18060  new_path="$input_to_shortpath"
18061
18062  input_path="$input_to_shortpath"
18063  # Check if we need to convert this using DOS-style short mode. If the path
18064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18065  # take no chances and rewrite it.
18066  # Note: m4 eats our [], so we need to use [ and ] instead.
18067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18068  if test "x$has_forbidden_chars" != x; then
18069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18073      # Going to short mode and back again did indeed matter. Since short mode is
18074      # case insensitive, let's make it lowercase to improve readability.
18075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18076      # Now convert it back to Unix-style (cygpath)
18077      input_path=`$CYGPATH -u "$shortmode_path"`
18078      new_path="$input_path"
18079    fi
18080  fi
18081
18082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18083  if test "x$test_cygdrive_prefix" = x; then
18084    # As a simple fix, exclude /usr/bin since it's not a real path.
18085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18087      # a path prefixed by /cygdrive for fixpath to work.
18088      new_path="$CYGWIN_ROOT_PATH$input_path"
18089    fi
18090  fi
18091
18092  # remove trailing .exe if any
18093  new_path="${new_path/%.exe/}"
18094
18095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18096
18097  # First separate the path from the arguments. This will split at the first
18098  # space.
18099  complete="$FOUND_MAKE"
18100  path="${complete%% *}"
18101  tmp="$complete EOL"
18102  arguments="${tmp#* }"
18103
18104  # Input might be given as Windows format, start by converting to
18105  # unix format.
18106  new_path="$path"
18107
18108  windows_path="$new_path"
18109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18110    unix_path=`$CYGPATH -u "$windows_path"`
18111    new_path="$unix_path"
18112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18114    new_path="$unix_path"
18115  fi
18116
18117
18118  # Now try to locate executable using which
18119  new_path=`$WHICH "$new_path" 2> /dev/null`
18120
18121  if test "x$new_path" = x; then
18122    # Oops. Which didn't find the executable.
18123    # The splitting of arguments from the executable at a space might have been incorrect,
18124    # since paths with space are more likely in Windows. Give it another try with the whole
18125    # argument.
18126    path="$complete"
18127    arguments="EOL"
18128    new_path="$path"
18129
18130  windows_path="$new_path"
18131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18132    unix_path=`$CYGPATH -u "$windows_path"`
18133    new_path="$unix_path"
18134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18136    new_path="$unix_path"
18137  fi
18138
18139
18140    new_path=`$WHICH "$new_path" 2> /dev/null`
18141    # bat and cmd files are not always considered executable in MSYS causing which
18142    # to not find them
18143    if test "x$new_path" = x \
18144        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18145        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18146      new_path="$path"
18147
18148  windows_path="$new_path"
18149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18150    unix_path=`$CYGPATH -u "$windows_path"`
18151    new_path="$unix_path"
18152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18154    new_path="$unix_path"
18155  fi
18156
18157    fi
18158
18159    if test "x$new_path" = x; then
18160      # It's still not found. Now this is an unrecoverable error.
18161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18163      has_space=`$ECHO "$complete" | $GREP " "`
18164      if test "x$has_space" != x; then
18165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18167      fi
18168      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18169    fi
18170  fi
18171
18172  # Now new_path has a complete unix path to the binary
18173  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18174    # Keep paths in /bin as-is, but remove trailing .exe if any
18175    new_path="${new_path/%.exe/}"
18176    # Do not save /bin paths to all_fixpath_prefixes!
18177  else
18178    # Not in mixed or Windows style, start by that.
18179    new_path=`cmd //c echo $new_path`
18180
18181  input_path="$new_path"
18182  # Check if we need to convert this using DOS-style short mode. If the path
18183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18184  # take no chances and rewrite it.
18185  # Note: m4 eats our [], so we need to use [ and ] instead.
18186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18187  if test "x$has_forbidden_chars" != x; then
18188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18190  fi
18191
18192    # Output is in $new_path
18193
18194  windows_path="$new_path"
18195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18196    unix_path=`$CYGPATH -u "$windows_path"`
18197    new_path="$unix_path"
18198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18200    new_path="$unix_path"
18201  fi
18202
18203    # remove trailing .exe if any
18204    new_path="${new_path/%.exe/}"
18205
18206    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18207    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18208  fi
18209
18210    else
18211      # We're on a unix platform. Hooray! :)
18212      # First separate the path from the arguments. This will split at the first
18213      # space.
18214      complete="$FOUND_MAKE"
18215      path="${complete%% *}"
18216      tmp="$complete EOL"
18217      arguments="${tmp#* }"
18218
18219      # Cannot rely on the command "which" here since it doesn't always work.
18220      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18221      if test -z "$is_absolute_path"; then
18222        # Path to executable is not absolute. Find it.
18223        IFS_save="$IFS"
18224        IFS=:
18225        for p in $PATH; do
18226          if test -f "$p/$path" && test -x "$p/$path"; then
18227            new_path="$p/$path"
18228            break
18229          fi
18230        done
18231        IFS="$IFS_save"
18232      else
18233        # This is an absolute path, we can use it without further modifications.
18234        new_path="$path"
18235      fi
18236
18237      if test "x$new_path" = x; then
18238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18240        has_space=`$ECHO "$complete" | $GREP " "`
18241        if test "x$has_space" != x; then
18242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18244        fi
18245        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18246      fi
18247    fi
18248
18249    # Now join together the path and the arguments once again
18250    if test "x$arguments" != xEOL; then
18251      new_complete="$new_path ${arguments% *}"
18252    else
18253      new_complete="$new_path"
18254    fi
18255
18256    if test "x$complete" != "x$new_complete"; then
18257      FOUND_MAKE="$new_complete"
18258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18259$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18260    fi
18261  fi
18262
18263        fi
18264      fi
18265    fi
18266  fi
18267
18268    fi
18269
18270    if test "x$FOUND_MAKE" = x; then
18271      if test "x$TOOLCHAIN_PATH" != x; then
18272        # We have a toolchain path, check that as well before giving up.
18273        OLD_PATH=$PATH
18274        PATH=$TOOLCHAIN_PATH:$PATH
18275        for ac_prog in gmake
18276do
18277  # Extract the first word of "$ac_prog", so it can be a program name with args.
18278set dummy $ac_prog; ac_word=$2
18279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18280$as_echo_n "checking for $ac_word... " >&6; }
18281if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18282  $as_echo_n "(cached) " >&6
18283else
18284  case $CHECK_TOOLSDIR_GMAKE in
18285  [\\/]* | ?:[\\/]*)
18286  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18287  ;;
18288  *)
18289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18290for as_dir in $PATH
18291do
18292  IFS=$as_save_IFS
18293  test -z "$as_dir" && as_dir=.
18294    for ac_exec_ext in '' $ac_executable_extensions; do
18295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18296    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18298    break 2
18299  fi
18300done
18301  done
18302IFS=$as_save_IFS
18303
18304  ;;
18305esac
18306fi
18307CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18308if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18310$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18311else
18312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18313$as_echo "no" >&6; }
18314fi
18315
18316
18317  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18318done
18319
18320
18321  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18322  DESCRIPTION="gmake in tools-dir"
18323
18324  # On Cygwin, we require a newer version of make than on other platforms
18325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18326    MAKE_VERSION_EXPR="-e 4\."
18327    MAKE_REQUIRED_VERSION="4.0"
18328   else
18329    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18330    MAKE_REQUIRED_VERSION="3.81"
18331  fi
18332
18333  if test "x$MAKE_CANDIDATE" != x; then
18334    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18335$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18336    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18337    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18338    if test "x$IS_GNU_MAKE" = x; then
18339      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18340$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18341    else
18342      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18343      if test "x$IS_MODERN_MAKE" = x; then
18344        { $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
18345$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;}
18346      else
18347        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18348          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18349            MAKE_EXPECTED_ENV='cygwin'
18350          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18351            MAKE_EXPECTED_ENV='msys'
18352          else
18353            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18354          fi
18355          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18356          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18357        else
18358          # Not relevant for non-Windows
18359          IS_MAKE_CORRECT_ENV=true
18360        fi
18361        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18362          { $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
18363$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;}
18364        else
18365          FOUND_MAKE=$MAKE_CANDIDATE
18366
18367  # Only process if variable expands to non-empty
18368
18369  if test "x$FOUND_MAKE" != x; then
18370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18371
18372  # First separate the path from the arguments. This will split at the first
18373  # space.
18374  complete="$FOUND_MAKE"
18375  path="${complete%% *}"
18376  tmp="$complete EOL"
18377  arguments="${tmp#* }"
18378
18379  # Input might be given as Windows format, start by converting to
18380  # unix format.
18381  new_path=`$CYGPATH -u "$path"`
18382
18383  # Now try to locate executable using which
18384  new_path=`$WHICH "$new_path" 2> /dev/null`
18385  # bat and cmd files are not always considered executable in cygwin causing which
18386  # to not find them
18387  if test "x$new_path" = x \
18388      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18389      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18390    new_path=`$CYGPATH -u "$path"`
18391  fi
18392  if test "x$new_path" = x; then
18393    # Oops. Which didn't find the executable.
18394    # The splitting of arguments from the executable at a space might have been incorrect,
18395    # since paths with space are more likely in Windows. Give it another try with the whole
18396    # argument.
18397    path="$complete"
18398    arguments="EOL"
18399    new_path=`$CYGPATH -u "$path"`
18400    new_path=`$WHICH "$new_path" 2> /dev/null`
18401    # bat and cmd files are not always considered executable in cygwin causing which
18402    # to not find them
18403    if test "x$new_path" = x \
18404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18406      new_path=`$CYGPATH -u "$path"`
18407    fi
18408    if test "x$new_path" = x; then
18409      # It's still not found. Now this is an unrecoverable error.
18410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18412      has_space=`$ECHO "$complete" | $GREP " "`
18413      if test "x$has_space" != x; then
18414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18416      fi
18417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18418    fi
18419  fi
18420
18421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18424  # "foo.exe" is OK but "foo" is an error.
18425  #
18426  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18427  # It is also a way to make sure we got the proper file name for the real test later on.
18428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18429  if test "x$test_shortpath" = x; then
18430    # Short path failed, file does not exist as specified.
18431    # Try adding .exe or .cmd
18432    if test -f "${new_path}.exe"; then
18433      input_to_shortpath="${new_path}.exe"
18434    elif test -f "${new_path}.cmd"; then
18435      input_to_shortpath="${new_path}.cmd"
18436    else
18437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18442    fi
18443  else
18444    input_to_shortpath="$new_path"
18445  fi
18446
18447  # Call helper function which possibly converts this using DOS-style short mode.
18448  # If so, the updated path is stored in $new_path.
18449  new_path="$input_to_shortpath"
18450
18451  input_path="$input_to_shortpath"
18452  # Check if we need to convert this using DOS-style short mode. If the path
18453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18454  # take no chances and rewrite it.
18455  # Note: m4 eats our [], so we need to use [ and ] instead.
18456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18457  if test "x$has_forbidden_chars" != x; then
18458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18462      # Going to short mode and back again did indeed matter. Since short mode is
18463      # case insensitive, let's make it lowercase to improve readability.
18464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18465      # Now convert it back to Unix-style (cygpath)
18466      input_path=`$CYGPATH -u "$shortmode_path"`
18467      new_path="$input_path"
18468    fi
18469  fi
18470
18471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18472  if test "x$test_cygdrive_prefix" = x; then
18473    # As a simple fix, exclude /usr/bin since it's not a real path.
18474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18476      # a path prefixed by /cygdrive for fixpath to work.
18477      new_path="$CYGWIN_ROOT_PATH$input_path"
18478    fi
18479  fi
18480
18481  # remove trailing .exe if any
18482  new_path="${new_path/%.exe/}"
18483
18484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18485
18486  # First separate the path from the arguments. This will split at the first
18487  # space.
18488  complete="$FOUND_MAKE"
18489  path="${complete%% *}"
18490  tmp="$complete EOL"
18491  arguments="${tmp#* }"
18492
18493  # Input might be given as Windows format, start by converting to
18494  # unix format.
18495  new_path="$path"
18496
18497  windows_path="$new_path"
18498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18499    unix_path=`$CYGPATH -u "$windows_path"`
18500    new_path="$unix_path"
18501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18503    new_path="$unix_path"
18504  fi
18505
18506
18507  # Now try to locate executable using which
18508  new_path=`$WHICH "$new_path" 2> /dev/null`
18509
18510  if test "x$new_path" = x; then
18511    # Oops. Which didn't find the executable.
18512    # The splitting of arguments from the executable at a space might have been incorrect,
18513    # since paths with space are more likely in Windows. Give it another try with the whole
18514    # argument.
18515    path="$complete"
18516    arguments="EOL"
18517    new_path="$path"
18518
18519  windows_path="$new_path"
18520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18521    unix_path=`$CYGPATH -u "$windows_path"`
18522    new_path="$unix_path"
18523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18525    new_path="$unix_path"
18526  fi
18527
18528
18529    new_path=`$WHICH "$new_path" 2> /dev/null`
18530    # bat and cmd files are not always considered executable in MSYS causing which
18531    # to not find them
18532    if test "x$new_path" = x \
18533        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18534        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18535      new_path="$path"
18536
18537  windows_path="$new_path"
18538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18539    unix_path=`$CYGPATH -u "$windows_path"`
18540    new_path="$unix_path"
18541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18543    new_path="$unix_path"
18544  fi
18545
18546    fi
18547
18548    if test "x$new_path" = x; then
18549      # It's still not found. Now this is an unrecoverable error.
18550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18552      has_space=`$ECHO "$complete" | $GREP " "`
18553      if test "x$has_space" != x; then
18554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18556      fi
18557      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18558    fi
18559  fi
18560
18561  # Now new_path has a complete unix path to the binary
18562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18563    # Keep paths in /bin as-is, but remove trailing .exe if any
18564    new_path="${new_path/%.exe/}"
18565    # Do not save /bin paths to all_fixpath_prefixes!
18566  else
18567    # Not in mixed or Windows style, start by that.
18568    new_path=`cmd //c echo $new_path`
18569
18570  input_path="$new_path"
18571  # Check if we need to convert this using DOS-style short mode. If the path
18572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18573  # take no chances and rewrite it.
18574  # Note: m4 eats our [], so we need to use [ and ] instead.
18575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18576  if test "x$has_forbidden_chars" != x; then
18577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18579  fi
18580
18581    # Output is in $new_path
18582
18583  windows_path="$new_path"
18584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18585    unix_path=`$CYGPATH -u "$windows_path"`
18586    new_path="$unix_path"
18587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18589    new_path="$unix_path"
18590  fi
18591
18592    # remove trailing .exe if any
18593    new_path="${new_path/%.exe/}"
18594
18595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18597  fi
18598
18599    else
18600      # We're on a unix platform. Hooray! :)
18601      # First separate the path from the arguments. This will split at the first
18602      # space.
18603      complete="$FOUND_MAKE"
18604      path="${complete%% *}"
18605      tmp="$complete EOL"
18606      arguments="${tmp#* }"
18607
18608      # Cannot rely on the command "which" here since it doesn't always work.
18609      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18610      if test -z "$is_absolute_path"; then
18611        # Path to executable is not absolute. Find it.
18612        IFS_save="$IFS"
18613        IFS=:
18614        for p in $PATH; do
18615          if test -f "$p/$path" && test -x "$p/$path"; then
18616            new_path="$p/$path"
18617            break
18618          fi
18619        done
18620        IFS="$IFS_save"
18621      else
18622        # This is an absolute path, we can use it without further modifications.
18623        new_path="$path"
18624      fi
18625
18626      if test "x$new_path" = x; then
18627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18628$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18629        has_space=`$ECHO "$complete" | $GREP " "`
18630        if test "x$has_space" != x; then
18631          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18633        fi
18634        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18635      fi
18636    fi
18637
18638    # Now join together the path and the arguments once again
18639    if test "x$arguments" != xEOL; then
18640      new_complete="$new_path ${arguments% *}"
18641    else
18642      new_complete="$new_path"
18643    fi
18644
18645    if test "x$complete" != "x$new_complete"; then
18646      FOUND_MAKE="$new_complete"
18647      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18648$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18649    fi
18650  fi
18651
18652        fi
18653      fi
18654    fi
18655  fi
18656
18657        if test "x$FOUND_MAKE" = x; then
18658          for ac_prog in make
18659do
18660  # Extract the first word of "$ac_prog", so it can be a program name with args.
18661set dummy $ac_prog; ac_word=$2
18662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18663$as_echo_n "checking for $ac_word... " >&6; }
18664if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18665  $as_echo_n "(cached) " >&6
18666else
18667  case $CHECK_TOOLSDIR_MAKE in
18668  [\\/]* | ?:[\\/]*)
18669  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18670  ;;
18671  *)
18672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18673for as_dir in $PATH
18674do
18675  IFS=$as_save_IFS
18676  test -z "$as_dir" && as_dir=.
18677    for ac_exec_ext in '' $ac_executable_extensions; do
18678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18679    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18681    break 2
18682  fi
18683done
18684  done
18685IFS=$as_save_IFS
18686
18687  ;;
18688esac
18689fi
18690CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18691if test -n "$CHECK_TOOLSDIR_MAKE"; then
18692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18693$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18694else
18695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18696$as_echo "no" >&6; }
18697fi
18698
18699
18700  test -n "$CHECK_TOOLSDIR_MAKE" && break
18701done
18702
18703
18704  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18705  DESCRIPTION="make in tools-dir"
18706
18707  # On Cygwin, we require a newer version of make than on other platforms
18708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18709    MAKE_VERSION_EXPR="-e 4\."
18710    MAKE_REQUIRED_VERSION="4.0"
18711   else
18712    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18713    MAKE_REQUIRED_VERSION="3.81"
18714  fi
18715
18716  if test "x$MAKE_CANDIDATE" != x; then
18717    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18718$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18719    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18720    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18721    if test "x$IS_GNU_MAKE" = x; then
18722      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18723$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18724    else
18725      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18726      if test "x$IS_MODERN_MAKE" = x; then
18727        { $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
18728$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;}
18729      else
18730        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18731          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18732            MAKE_EXPECTED_ENV='cygwin'
18733          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18734            MAKE_EXPECTED_ENV='msys'
18735          else
18736            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18737          fi
18738          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18739          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18740        else
18741          # Not relevant for non-Windows
18742          IS_MAKE_CORRECT_ENV=true
18743        fi
18744        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18745          { $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
18746$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;}
18747        else
18748          FOUND_MAKE=$MAKE_CANDIDATE
18749
18750  # Only process if variable expands to non-empty
18751
18752  if test "x$FOUND_MAKE" != x; then
18753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18754
18755  # First separate the path from the arguments. This will split at the first
18756  # space.
18757  complete="$FOUND_MAKE"
18758  path="${complete%% *}"
18759  tmp="$complete EOL"
18760  arguments="${tmp#* }"
18761
18762  # Input might be given as Windows format, start by converting to
18763  # unix format.
18764  new_path=`$CYGPATH -u "$path"`
18765
18766  # Now try to locate executable using which
18767  new_path=`$WHICH "$new_path" 2> /dev/null`
18768  # bat and cmd files are not always considered executable in cygwin causing which
18769  # to not find them
18770  if test "x$new_path" = x \
18771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18773    new_path=`$CYGPATH -u "$path"`
18774  fi
18775  if test "x$new_path" = x; then
18776    # Oops. Which didn't find the executable.
18777    # The splitting of arguments from the executable at a space might have been incorrect,
18778    # since paths with space are more likely in Windows. Give it another try with the whole
18779    # argument.
18780    path="$complete"
18781    arguments="EOL"
18782    new_path=`$CYGPATH -u "$path"`
18783    new_path=`$WHICH "$new_path" 2> /dev/null`
18784    # bat and cmd files are not always considered executable in cygwin causing which
18785    # to not find them
18786    if test "x$new_path" = x \
18787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18789      new_path=`$CYGPATH -u "$path"`
18790    fi
18791    if test "x$new_path" = x; then
18792      # It's still not found. Now this is an unrecoverable error.
18793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18794$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18795      has_space=`$ECHO "$complete" | $GREP " "`
18796      if test "x$has_space" != x; then
18797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18799      fi
18800      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18801    fi
18802  fi
18803
18804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18807  # "foo.exe" is OK but "foo" is an error.
18808  #
18809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18810  # It is also a way to make sure we got the proper file name for the real test later on.
18811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18812  if test "x$test_shortpath" = x; then
18813    # Short path failed, file does not exist as specified.
18814    # Try adding .exe or .cmd
18815    if test -f "${new_path}.exe"; then
18816      input_to_shortpath="${new_path}.exe"
18817    elif test -f "${new_path}.cmd"; then
18818      input_to_shortpath="${new_path}.cmd"
18819    else
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18824      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18825    fi
18826  else
18827    input_to_shortpath="$new_path"
18828  fi
18829
18830  # Call helper function which possibly converts this using DOS-style short mode.
18831  # If so, the updated path is stored in $new_path.
18832  new_path="$input_to_shortpath"
18833
18834  input_path="$input_to_shortpath"
18835  # Check if we need to convert this using DOS-style short mode. If the path
18836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18837  # take no chances and rewrite it.
18838  # Note: m4 eats our [], so we need to use [ and ] instead.
18839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18840  if test "x$has_forbidden_chars" != x; then
18841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18845      # Going to short mode and back again did indeed matter. Since short mode is
18846      # case insensitive, let's make it lowercase to improve readability.
18847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18848      # Now convert it back to Unix-style (cygpath)
18849      input_path=`$CYGPATH -u "$shortmode_path"`
18850      new_path="$input_path"
18851    fi
18852  fi
18853
18854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18855  if test "x$test_cygdrive_prefix" = x; then
18856    # As a simple fix, exclude /usr/bin since it's not a real path.
18857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18859      # a path prefixed by /cygdrive for fixpath to work.
18860      new_path="$CYGWIN_ROOT_PATH$input_path"
18861    fi
18862  fi
18863
18864  # remove trailing .exe if any
18865  new_path="${new_path/%.exe/}"
18866
18867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18868
18869  # First separate the path from the arguments. This will split at the first
18870  # space.
18871  complete="$FOUND_MAKE"
18872  path="${complete%% *}"
18873  tmp="$complete EOL"
18874  arguments="${tmp#* }"
18875
18876  # Input might be given as Windows format, start by converting to
18877  # unix format.
18878  new_path="$path"
18879
18880  windows_path="$new_path"
18881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18882    unix_path=`$CYGPATH -u "$windows_path"`
18883    new_path="$unix_path"
18884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18886    new_path="$unix_path"
18887  fi
18888
18889
18890  # Now try to locate executable using which
18891  new_path=`$WHICH "$new_path" 2> /dev/null`
18892
18893  if test "x$new_path" = x; then
18894    # Oops. Which didn't find the executable.
18895    # The splitting of arguments from the executable at a space might have been incorrect,
18896    # since paths with space are more likely in Windows. Give it another try with the whole
18897    # argument.
18898    path="$complete"
18899    arguments="EOL"
18900    new_path="$path"
18901
18902  windows_path="$new_path"
18903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18904    unix_path=`$CYGPATH -u "$windows_path"`
18905    new_path="$unix_path"
18906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18908    new_path="$unix_path"
18909  fi
18910
18911
18912    new_path=`$WHICH "$new_path" 2> /dev/null`
18913    # bat and cmd files are not always considered executable in MSYS causing which
18914    # to not find them
18915    if test "x$new_path" = x \
18916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18918      new_path="$path"
18919
18920  windows_path="$new_path"
18921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18922    unix_path=`$CYGPATH -u "$windows_path"`
18923    new_path="$unix_path"
18924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18926    new_path="$unix_path"
18927  fi
18928
18929    fi
18930
18931    if test "x$new_path" = x; then
18932      # It's still not found. Now this is an unrecoverable error.
18933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18935      has_space=`$ECHO "$complete" | $GREP " "`
18936      if test "x$has_space" != x; then
18937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18939      fi
18940      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18941    fi
18942  fi
18943
18944  # Now new_path has a complete unix path to the binary
18945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18946    # Keep paths in /bin as-is, but remove trailing .exe if any
18947    new_path="${new_path/%.exe/}"
18948    # Do not save /bin paths to all_fixpath_prefixes!
18949  else
18950    # Not in mixed or Windows style, start by that.
18951    new_path=`cmd //c echo $new_path`
18952
18953  input_path="$new_path"
18954  # Check if we need to convert this using DOS-style short mode. If the path
18955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18956  # take no chances and rewrite it.
18957  # Note: m4 eats our [], so we need to use [ and ] instead.
18958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18959  if test "x$has_forbidden_chars" != x; then
18960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18962  fi
18963
18964    # Output is in $new_path
18965
18966  windows_path="$new_path"
18967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18968    unix_path=`$CYGPATH -u "$windows_path"`
18969    new_path="$unix_path"
18970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18972    new_path="$unix_path"
18973  fi
18974
18975    # remove trailing .exe if any
18976    new_path="${new_path/%.exe/}"
18977
18978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18980  fi
18981
18982    else
18983      # We're on a unix platform. Hooray! :)
18984      # First separate the path from the arguments. This will split at the first
18985      # space.
18986      complete="$FOUND_MAKE"
18987      path="${complete%% *}"
18988      tmp="$complete EOL"
18989      arguments="${tmp#* }"
18990
18991      # Cannot rely on the command "which" here since it doesn't always work.
18992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18993      if test -z "$is_absolute_path"; then
18994        # Path to executable is not absolute. Find it.
18995        IFS_save="$IFS"
18996        IFS=:
18997        for p in $PATH; do
18998          if test -f "$p/$path" && test -x "$p/$path"; then
18999            new_path="$p/$path"
19000            break
19001          fi
19002        done
19003        IFS="$IFS_save"
19004      else
19005        # This is an absolute path, we can use it without further modifications.
19006        new_path="$path"
19007      fi
19008
19009      if test "x$new_path" = x; then
19010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19011$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19012        has_space=`$ECHO "$complete" | $GREP " "`
19013        if test "x$has_space" != x; then
19014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19016        fi
19017        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19018      fi
19019    fi
19020
19021    # Now join together the path and the arguments once again
19022    if test "x$arguments" != xEOL; then
19023      new_complete="$new_path ${arguments% *}"
19024    else
19025      new_complete="$new_path"
19026    fi
19027
19028    if test "x$complete" != "x$new_complete"; then
19029      FOUND_MAKE="$new_complete"
19030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19031$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19032    fi
19033  fi
19034
19035        fi
19036      fi
19037    fi
19038  fi
19039
19040        fi
19041        PATH=$OLD_PATH
19042      fi
19043    fi
19044
19045    if test "x$FOUND_MAKE" = x; then
19046      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
19047    fi
19048
19049  else
19050    # The variable is set, but is it from the command line or the environment?
19051
19052    # Try to remove the string !MAKE! from our list.
19053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19055      # If it failed, the variable was not from the command line. Ignore it,
19056      # but warn the user (except for BASH, which is always set by the calling BASH).
19057      if test "xMAKE" != xBASH; then
19058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19059$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19060      fi
19061      # Try to locate tool using the code snippet
19062
19063    # Try our hardest to locate a correct version of GNU make
19064    for ac_prog in gmake
19065do
19066  # Extract the first word of "$ac_prog", so it can be a program name with args.
19067set dummy $ac_prog; ac_word=$2
19068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19069$as_echo_n "checking for $ac_word... " >&6; }
19070if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19071  $as_echo_n "(cached) " >&6
19072else
19073  case $CHECK_GMAKE in
19074  [\\/]* | ?:[\\/]*)
19075  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19076  ;;
19077  *)
19078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19079for as_dir in $PATH
19080do
19081  IFS=$as_save_IFS
19082  test -z "$as_dir" && as_dir=.
19083    for ac_exec_ext in '' $ac_executable_extensions; do
19084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19085    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19087    break 2
19088  fi
19089done
19090  done
19091IFS=$as_save_IFS
19092
19093  ;;
19094esac
19095fi
19096CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19097if test -n "$CHECK_GMAKE"; then
19098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19099$as_echo "$CHECK_GMAKE" >&6; }
19100else
19101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19102$as_echo "no" >&6; }
19103fi
19104
19105
19106  test -n "$CHECK_GMAKE" && break
19107done
19108
19109
19110  MAKE_CANDIDATE=""$CHECK_GMAKE""
19111  DESCRIPTION="gmake in PATH"
19112
19113  # On Cygwin, we require a newer version of make than on other platforms
19114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19115    MAKE_VERSION_EXPR="-e 4\."
19116    MAKE_REQUIRED_VERSION="4.0"
19117   else
19118    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19119    MAKE_REQUIRED_VERSION="3.81"
19120  fi
19121
19122  if test "x$MAKE_CANDIDATE" != x; then
19123    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19124$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19125    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19126    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19127    if test "x$IS_GNU_MAKE" = x; then
19128      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19129$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19130    else
19131      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19132      if test "x$IS_MODERN_MAKE" = x; then
19133        { $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
19134$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;}
19135      else
19136        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19137          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19138            MAKE_EXPECTED_ENV='cygwin'
19139          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19140            MAKE_EXPECTED_ENV='msys'
19141          else
19142            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19143          fi
19144          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19145          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19146        else
19147          # Not relevant for non-Windows
19148          IS_MAKE_CORRECT_ENV=true
19149        fi
19150        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19151          { $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
19152$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;}
19153        else
19154          FOUND_MAKE=$MAKE_CANDIDATE
19155
19156  # Only process if variable expands to non-empty
19157
19158  if test "x$FOUND_MAKE" != x; then
19159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19160
19161  # First separate the path from the arguments. This will split at the first
19162  # space.
19163  complete="$FOUND_MAKE"
19164  path="${complete%% *}"
19165  tmp="$complete EOL"
19166  arguments="${tmp#* }"
19167
19168  # Input might be given as Windows format, start by converting to
19169  # unix format.
19170  new_path=`$CYGPATH -u "$path"`
19171
19172  # Now try to locate executable using which
19173  new_path=`$WHICH "$new_path" 2> /dev/null`
19174  # bat and cmd files are not always considered executable in cygwin causing which
19175  # to not find them
19176  if test "x$new_path" = x \
19177      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19178      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19179    new_path=`$CYGPATH -u "$path"`
19180  fi
19181  if test "x$new_path" = x; then
19182    # Oops. Which didn't find the executable.
19183    # The splitting of arguments from the executable at a space might have been incorrect,
19184    # since paths with space are more likely in Windows. Give it another try with the whole
19185    # argument.
19186    path="$complete"
19187    arguments="EOL"
19188    new_path=`$CYGPATH -u "$path"`
19189    new_path=`$WHICH "$new_path" 2> /dev/null`
19190    # bat and cmd files are not always considered executable in cygwin causing which
19191    # to not find them
19192    if test "x$new_path" = x \
19193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19195      new_path=`$CYGPATH -u "$path"`
19196    fi
19197    if test "x$new_path" = x; then
19198      # It's still not found. Now this is an unrecoverable error.
19199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19201      has_space=`$ECHO "$complete" | $GREP " "`
19202      if test "x$has_space" != x; then
19203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19205      fi
19206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19207    fi
19208  fi
19209
19210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19213  # "foo.exe" is OK but "foo" is an error.
19214  #
19215  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19216  # It is also a way to make sure we got the proper file name for the real test later on.
19217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19218  if test "x$test_shortpath" = x; then
19219    # Short path failed, file does not exist as specified.
19220    # Try adding .exe or .cmd
19221    if test -f "${new_path}.exe"; then
19222      input_to_shortpath="${new_path}.exe"
19223    elif test -f "${new_path}.cmd"; then
19224      input_to_shortpath="${new_path}.cmd"
19225    else
19226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19228      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19229$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19230      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19231    fi
19232  else
19233    input_to_shortpath="$new_path"
19234  fi
19235
19236  # Call helper function which possibly converts this using DOS-style short mode.
19237  # If so, the updated path is stored in $new_path.
19238  new_path="$input_to_shortpath"
19239
19240  input_path="$input_to_shortpath"
19241  # Check if we need to convert this using DOS-style short mode. If the path
19242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19243  # take no chances and rewrite it.
19244  # Note: m4 eats our [], so we need to use [ and ] instead.
19245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19246  if test "x$has_forbidden_chars" != x; then
19247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19251      # Going to short mode and back again did indeed matter. Since short mode is
19252      # case insensitive, let's make it lowercase to improve readability.
19253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19254      # Now convert it back to Unix-style (cygpath)
19255      input_path=`$CYGPATH -u "$shortmode_path"`
19256      new_path="$input_path"
19257    fi
19258  fi
19259
19260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19261  if test "x$test_cygdrive_prefix" = x; then
19262    # As a simple fix, exclude /usr/bin since it's not a real path.
19263    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19265      # a path prefixed by /cygdrive for fixpath to work.
19266      new_path="$CYGWIN_ROOT_PATH$input_path"
19267    fi
19268  fi
19269
19270  # remove trailing .exe if any
19271  new_path="${new_path/%.exe/}"
19272
19273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19274
19275  # First separate the path from the arguments. This will split at the first
19276  # space.
19277  complete="$FOUND_MAKE"
19278  path="${complete%% *}"
19279  tmp="$complete EOL"
19280  arguments="${tmp#* }"
19281
19282  # Input might be given as Windows format, start by converting to
19283  # unix format.
19284  new_path="$path"
19285
19286  windows_path="$new_path"
19287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19288    unix_path=`$CYGPATH -u "$windows_path"`
19289    new_path="$unix_path"
19290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19292    new_path="$unix_path"
19293  fi
19294
19295
19296  # Now try to locate executable using which
19297  new_path=`$WHICH "$new_path" 2> /dev/null`
19298
19299  if test "x$new_path" = x; then
19300    # Oops. Which didn't find the executable.
19301    # The splitting of arguments from the executable at a space might have been incorrect,
19302    # since paths with space are more likely in Windows. Give it another try with the whole
19303    # argument.
19304    path="$complete"
19305    arguments="EOL"
19306    new_path="$path"
19307
19308  windows_path="$new_path"
19309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19310    unix_path=`$CYGPATH -u "$windows_path"`
19311    new_path="$unix_path"
19312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19314    new_path="$unix_path"
19315  fi
19316
19317
19318    new_path=`$WHICH "$new_path" 2> /dev/null`
19319    # bat and cmd files are not always considered executable in MSYS causing which
19320    # to not find them
19321    if test "x$new_path" = x \
19322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19324      new_path="$path"
19325
19326  windows_path="$new_path"
19327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19328    unix_path=`$CYGPATH -u "$windows_path"`
19329    new_path="$unix_path"
19330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19332    new_path="$unix_path"
19333  fi
19334
19335    fi
19336
19337    if test "x$new_path" = x; then
19338      # It's still not found. Now this is an unrecoverable error.
19339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19341      has_space=`$ECHO "$complete" | $GREP " "`
19342      if test "x$has_space" != x; then
19343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19345      fi
19346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19347    fi
19348  fi
19349
19350  # Now new_path has a complete unix path to the binary
19351  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19352    # Keep paths in /bin as-is, but remove trailing .exe if any
19353    new_path="${new_path/%.exe/}"
19354    # Do not save /bin paths to all_fixpath_prefixes!
19355  else
19356    # Not in mixed or Windows style, start by that.
19357    new_path=`cmd //c echo $new_path`
19358
19359  input_path="$new_path"
19360  # Check if we need to convert this using DOS-style short mode. If the path
19361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19362  # take no chances and rewrite it.
19363  # Note: m4 eats our [], so we need to use [ and ] instead.
19364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19365  if test "x$has_forbidden_chars" != x; then
19366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19368  fi
19369
19370    # Output is in $new_path
19371
19372  windows_path="$new_path"
19373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19374    unix_path=`$CYGPATH -u "$windows_path"`
19375    new_path="$unix_path"
19376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19378    new_path="$unix_path"
19379  fi
19380
19381    # remove trailing .exe if any
19382    new_path="${new_path/%.exe/}"
19383
19384    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19385    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19386  fi
19387
19388    else
19389      # We're on a unix platform. Hooray! :)
19390      # First separate the path from the arguments. This will split at the first
19391      # space.
19392      complete="$FOUND_MAKE"
19393      path="${complete%% *}"
19394      tmp="$complete EOL"
19395      arguments="${tmp#* }"
19396
19397      # Cannot rely on the command "which" here since it doesn't always work.
19398      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19399      if test -z "$is_absolute_path"; then
19400        # Path to executable is not absolute. Find it.
19401        IFS_save="$IFS"
19402        IFS=:
19403        for p in $PATH; do
19404          if test -f "$p/$path" && test -x "$p/$path"; then
19405            new_path="$p/$path"
19406            break
19407          fi
19408        done
19409        IFS="$IFS_save"
19410      else
19411        # This is an absolute path, we can use it without further modifications.
19412        new_path="$path"
19413      fi
19414
19415      if test "x$new_path" = x; then
19416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19417$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19418        has_space=`$ECHO "$complete" | $GREP " "`
19419        if test "x$has_space" != x; then
19420          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19421$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19422        fi
19423        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19424      fi
19425    fi
19426
19427    # Now join together the path and the arguments once again
19428    if test "x$arguments" != xEOL; then
19429      new_complete="$new_path ${arguments% *}"
19430    else
19431      new_complete="$new_path"
19432    fi
19433
19434    if test "x$complete" != "x$new_complete"; then
19435      FOUND_MAKE="$new_complete"
19436      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19437$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19438    fi
19439  fi
19440
19441        fi
19442      fi
19443    fi
19444  fi
19445
19446
19447    if test "x$FOUND_MAKE" = x; then
19448      for ac_prog in make
19449do
19450  # Extract the first word of "$ac_prog", so it can be a program name with args.
19451set dummy $ac_prog; ac_word=$2
19452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19453$as_echo_n "checking for $ac_word... " >&6; }
19454if ${ac_cv_path_CHECK_MAKE+:} false; then :
19455  $as_echo_n "(cached) " >&6
19456else
19457  case $CHECK_MAKE in
19458  [\\/]* | ?:[\\/]*)
19459  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19460  ;;
19461  *)
19462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19463for as_dir in $PATH
19464do
19465  IFS=$as_save_IFS
19466  test -z "$as_dir" && as_dir=.
19467    for ac_exec_ext in '' $ac_executable_extensions; do
19468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19469    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19471    break 2
19472  fi
19473done
19474  done
19475IFS=$as_save_IFS
19476
19477  ;;
19478esac
19479fi
19480CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19481if test -n "$CHECK_MAKE"; then
19482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19483$as_echo "$CHECK_MAKE" >&6; }
19484else
19485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19486$as_echo "no" >&6; }
19487fi
19488
19489
19490  test -n "$CHECK_MAKE" && break
19491done
19492
19493
19494  MAKE_CANDIDATE=""$CHECK_MAKE""
19495  DESCRIPTION="make in PATH"
19496
19497  # On Cygwin, we require a newer version of make than on other platforms
19498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19499    MAKE_VERSION_EXPR="-e 4\."
19500    MAKE_REQUIRED_VERSION="4.0"
19501   else
19502    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19503    MAKE_REQUIRED_VERSION="3.81"
19504  fi
19505
19506  if test "x$MAKE_CANDIDATE" != x; then
19507    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19508$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19509    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19510    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19511    if test "x$IS_GNU_MAKE" = x; then
19512      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19513$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19514    else
19515      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19516      if test "x$IS_MODERN_MAKE" = x; then
19517        { $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
19518$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;}
19519      else
19520        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19521          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19522            MAKE_EXPECTED_ENV='cygwin'
19523          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19524            MAKE_EXPECTED_ENV='msys'
19525          else
19526            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19527          fi
19528          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19529          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19530        else
19531          # Not relevant for non-Windows
19532          IS_MAKE_CORRECT_ENV=true
19533        fi
19534        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19535          { $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
19536$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;}
19537        else
19538          FOUND_MAKE=$MAKE_CANDIDATE
19539
19540  # Only process if variable expands to non-empty
19541
19542  if test "x$FOUND_MAKE" != x; then
19543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19544
19545  # First separate the path from the arguments. This will split at the first
19546  # space.
19547  complete="$FOUND_MAKE"
19548  path="${complete%% *}"
19549  tmp="$complete EOL"
19550  arguments="${tmp#* }"
19551
19552  # Input might be given as Windows format, start by converting to
19553  # unix format.
19554  new_path=`$CYGPATH -u "$path"`
19555
19556  # Now try to locate executable using which
19557  new_path=`$WHICH "$new_path" 2> /dev/null`
19558  # bat and cmd files are not always considered executable in cygwin causing which
19559  # to not find them
19560  if test "x$new_path" = x \
19561      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19562      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19563    new_path=`$CYGPATH -u "$path"`
19564  fi
19565  if test "x$new_path" = x; then
19566    # Oops. Which didn't find the executable.
19567    # The splitting of arguments from the executable at a space might have been incorrect,
19568    # since paths with space are more likely in Windows. Give it another try with the whole
19569    # argument.
19570    path="$complete"
19571    arguments="EOL"
19572    new_path=`$CYGPATH -u "$path"`
19573    new_path=`$WHICH "$new_path" 2> /dev/null`
19574    # bat and cmd files are not always considered executable in cygwin causing which
19575    # to not find them
19576    if test "x$new_path" = x \
19577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19579      new_path=`$CYGPATH -u "$path"`
19580    fi
19581    if test "x$new_path" = x; then
19582      # It's still not found. Now this is an unrecoverable error.
19583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19584$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19585      has_space=`$ECHO "$complete" | $GREP " "`
19586      if test "x$has_space" != x; then
19587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19589      fi
19590      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19591    fi
19592  fi
19593
19594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19597  # "foo.exe" is OK but "foo" is an error.
19598  #
19599  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19600  # It is also a way to make sure we got the proper file name for the real test later on.
19601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19602  if test "x$test_shortpath" = x; then
19603    # Short path failed, file does not exist as specified.
19604    # Try adding .exe or .cmd
19605    if test -f "${new_path}.exe"; then
19606      input_to_shortpath="${new_path}.exe"
19607    elif test -f "${new_path}.cmd"; then
19608      input_to_shortpath="${new_path}.cmd"
19609    else
19610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19614      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19615    fi
19616  else
19617    input_to_shortpath="$new_path"
19618  fi
19619
19620  # Call helper function which possibly converts this using DOS-style short mode.
19621  # If so, the updated path is stored in $new_path.
19622  new_path="$input_to_shortpath"
19623
19624  input_path="$input_to_shortpath"
19625  # Check if we need to convert this using DOS-style short mode. If the path
19626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19627  # take no chances and rewrite it.
19628  # Note: m4 eats our [], so we need to use [ and ] instead.
19629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19630  if test "x$has_forbidden_chars" != x; then
19631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19635      # Going to short mode and back again did indeed matter. Since short mode is
19636      # case insensitive, let's make it lowercase to improve readability.
19637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638      # Now convert it back to Unix-style (cygpath)
19639      input_path=`$CYGPATH -u "$shortmode_path"`
19640      new_path="$input_path"
19641    fi
19642  fi
19643
19644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19645  if test "x$test_cygdrive_prefix" = x; then
19646    # As a simple fix, exclude /usr/bin since it's not a real path.
19647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19649      # a path prefixed by /cygdrive for fixpath to work.
19650      new_path="$CYGWIN_ROOT_PATH$input_path"
19651    fi
19652  fi
19653
19654  # remove trailing .exe if any
19655  new_path="${new_path/%.exe/}"
19656
19657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19658
19659  # First separate the path from the arguments. This will split at the first
19660  # space.
19661  complete="$FOUND_MAKE"
19662  path="${complete%% *}"
19663  tmp="$complete EOL"
19664  arguments="${tmp#* }"
19665
19666  # Input might be given as Windows format, start by converting to
19667  # unix format.
19668  new_path="$path"
19669
19670  windows_path="$new_path"
19671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19672    unix_path=`$CYGPATH -u "$windows_path"`
19673    new_path="$unix_path"
19674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19676    new_path="$unix_path"
19677  fi
19678
19679
19680  # Now try to locate executable using which
19681  new_path=`$WHICH "$new_path" 2> /dev/null`
19682
19683  if test "x$new_path" = x; then
19684    # Oops. Which didn't find the executable.
19685    # The splitting of arguments from the executable at a space might have been incorrect,
19686    # since paths with space are more likely in Windows. Give it another try with the whole
19687    # argument.
19688    path="$complete"
19689    arguments="EOL"
19690    new_path="$path"
19691
19692  windows_path="$new_path"
19693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19694    unix_path=`$CYGPATH -u "$windows_path"`
19695    new_path="$unix_path"
19696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19698    new_path="$unix_path"
19699  fi
19700
19701
19702    new_path=`$WHICH "$new_path" 2> /dev/null`
19703    # bat and cmd files are not always considered executable in MSYS causing which
19704    # to not find them
19705    if test "x$new_path" = x \
19706        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19707        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19708      new_path="$path"
19709
19710  windows_path="$new_path"
19711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19712    unix_path=`$CYGPATH -u "$windows_path"`
19713    new_path="$unix_path"
19714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19716    new_path="$unix_path"
19717  fi
19718
19719    fi
19720
19721    if test "x$new_path" = x; then
19722      # It's still not found. Now this is an unrecoverable error.
19723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19725      has_space=`$ECHO "$complete" | $GREP " "`
19726      if test "x$has_space" != x; then
19727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19729      fi
19730      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19731    fi
19732  fi
19733
19734  # Now new_path has a complete unix path to the binary
19735  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19736    # Keep paths in /bin as-is, but remove trailing .exe if any
19737    new_path="${new_path/%.exe/}"
19738    # Do not save /bin paths to all_fixpath_prefixes!
19739  else
19740    # Not in mixed or Windows style, start by that.
19741    new_path=`cmd //c echo $new_path`
19742
19743  input_path="$new_path"
19744  # Check if we need to convert this using DOS-style short mode. If the path
19745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19746  # take no chances and rewrite it.
19747  # Note: m4 eats our [], so we need to use [ and ] instead.
19748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19749  if test "x$has_forbidden_chars" != x; then
19750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19752  fi
19753
19754    # Output is in $new_path
19755
19756  windows_path="$new_path"
19757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19758    unix_path=`$CYGPATH -u "$windows_path"`
19759    new_path="$unix_path"
19760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19762    new_path="$unix_path"
19763  fi
19764
19765    # remove trailing .exe if any
19766    new_path="${new_path/%.exe/}"
19767
19768    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19769    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19770  fi
19771
19772    else
19773      # We're on a unix platform. Hooray! :)
19774      # First separate the path from the arguments. This will split at the first
19775      # space.
19776      complete="$FOUND_MAKE"
19777      path="${complete%% *}"
19778      tmp="$complete EOL"
19779      arguments="${tmp#* }"
19780
19781      # Cannot rely on the command "which" here since it doesn't always work.
19782      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19783      if test -z "$is_absolute_path"; then
19784        # Path to executable is not absolute. Find it.
19785        IFS_save="$IFS"
19786        IFS=:
19787        for p in $PATH; do
19788          if test -f "$p/$path" && test -x "$p/$path"; then
19789            new_path="$p/$path"
19790            break
19791          fi
19792        done
19793        IFS="$IFS_save"
19794      else
19795        # This is an absolute path, we can use it without further modifications.
19796        new_path="$path"
19797      fi
19798
19799      if test "x$new_path" = x; then
19800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19802        has_space=`$ECHO "$complete" | $GREP " "`
19803        if test "x$has_space" != x; then
19804          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19805$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19806        fi
19807        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19808      fi
19809    fi
19810
19811    # Now join together the path and the arguments once again
19812    if test "x$arguments" != xEOL; then
19813      new_complete="$new_path ${arguments% *}"
19814    else
19815      new_complete="$new_path"
19816    fi
19817
19818    if test "x$complete" != "x$new_complete"; then
19819      FOUND_MAKE="$new_complete"
19820      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19821$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19822    fi
19823  fi
19824
19825        fi
19826      fi
19827    fi
19828  fi
19829
19830    fi
19831
19832    if test "x$FOUND_MAKE" = x; then
19833      if test "x$TOOLCHAIN_PATH" != x; then
19834        # We have a toolchain path, check that as well before giving up.
19835        OLD_PATH=$PATH
19836        PATH=$TOOLCHAIN_PATH:$PATH
19837        for ac_prog in gmake
19838do
19839  # Extract the first word of "$ac_prog", so it can be a program name with args.
19840set dummy $ac_prog; ac_word=$2
19841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19842$as_echo_n "checking for $ac_word... " >&6; }
19843if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19844  $as_echo_n "(cached) " >&6
19845else
19846  case $CHECK_TOOLSDIR_GMAKE in
19847  [\\/]* | ?:[\\/]*)
19848  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19849  ;;
19850  *)
19851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19852for as_dir in $PATH
19853do
19854  IFS=$as_save_IFS
19855  test -z "$as_dir" && as_dir=.
19856    for ac_exec_ext in '' $ac_executable_extensions; do
19857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19858    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19860    break 2
19861  fi
19862done
19863  done
19864IFS=$as_save_IFS
19865
19866  ;;
19867esac
19868fi
19869CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19870if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19872$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19873else
19874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19875$as_echo "no" >&6; }
19876fi
19877
19878
19879  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19880done
19881
19882
19883  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19884  DESCRIPTION="gmake in tools-dir"
19885
19886  # On Cygwin, we require a newer version of make than on other platforms
19887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19888    MAKE_VERSION_EXPR="-e 4\."
19889    MAKE_REQUIRED_VERSION="4.0"
19890   else
19891    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19892    MAKE_REQUIRED_VERSION="3.81"
19893  fi
19894
19895  if test "x$MAKE_CANDIDATE" != x; then
19896    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19897$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19898    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19899    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19900    if test "x$IS_GNU_MAKE" = x; then
19901      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19902$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19903    else
19904      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19905      if test "x$IS_MODERN_MAKE" = x; then
19906        { $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
19907$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;}
19908      else
19909        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19910          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19911            MAKE_EXPECTED_ENV='cygwin'
19912          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19913            MAKE_EXPECTED_ENV='msys'
19914          else
19915            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19916          fi
19917          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19918          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19919        else
19920          # Not relevant for non-Windows
19921          IS_MAKE_CORRECT_ENV=true
19922        fi
19923        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19924          { $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
19925$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;}
19926        else
19927          FOUND_MAKE=$MAKE_CANDIDATE
19928
19929  # Only process if variable expands to non-empty
19930
19931  if test "x$FOUND_MAKE" != x; then
19932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19933
19934  # First separate the path from the arguments. This will split at the first
19935  # space.
19936  complete="$FOUND_MAKE"
19937  path="${complete%% *}"
19938  tmp="$complete EOL"
19939  arguments="${tmp#* }"
19940
19941  # Input might be given as Windows format, start by converting to
19942  # unix format.
19943  new_path=`$CYGPATH -u "$path"`
19944
19945  # Now try to locate executable using which
19946  new_path=`$WHICH "$new_path" 2> /dev/null`
19947  # bat and cmd files are not always considered executable in cygwin causing which
19948  # to not find them
19949  if test "x$new_path" = x \
19950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19952    new_path=`$CYGPATH -u "$path"`
19953  fi
19954  if test "x$new_path" = x; then
19955    # Oops. Which didn't find the executable.
19956    # The splitting of arguments from the executable at a space might have been incorrect,
19957    # since paths with space are more likely in Windows. Give it another try with the whole
19958    # argument.
19959    path="$complete"
19960    arguments="EOL"
19961    new_path=`$CYGPATH -u "$path"`
19962    new_path=`$WHICH "$new_path" 2> /dev/null`
19963    # bat and cmd files are not always considered executable in cygwin causing which
19964    # to not find them
19965    if test "x$new_path" = x \
19966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19968      new_path=`$CYGPATH -u "$path"`
19969    fi
19970    if test "x$new_path" = x; then
19971      # It's still not found. Now this is an unrecoverable error.
19972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19974      has_space=`$ECHO "$complete" | $GREP " "`
19975      if test "x$has_space" != x; then
19976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19978      fi
19979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19980    fi
19981  fi
19982
19983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19986  # "foo.exe" is OK but "foo" is an error.
19987  #
19988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19989  # It is also a way to make sure we got the proper file name for the real test later on.
19990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19991  if test "x$test_shortpath" = x; then
19992    # Short path failed, file does not exist as specified.
19993    # Try adding .exe or .cmd
19994    if test -f "${new_path}.exe"; then
19995      input_to_shortpath="${new_path}.exe"
19996    elif test -f "${new_path}.cmd"; then
19997      input_to_shortpath="${new_path}.cmd"
19998    else
19999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20000$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20003      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20004    fi
20005  else
20006    input_to_shortpath="$new_path"
20007  fi
20008
20009  # Call helper function which possibly converts this using DOS-style short mode.
20010  # If so, the updated path is stored in $new_path.
20011  new_path="$input_to_shortpath"
20012
20013  input_path="$input_to_shortpath"
20014  # Check if we need to convert this using DOS-style short mode. If the path
20015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20016  # take no chances and rewrite it.
20017  # Note: m4 eats our [], so we need to use [ and ] instead.
20018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20019  if test "x$has_forbidden_chars" != x; then
20020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20024      # Going to short mode and back again did indeed matter. Since short mode is
20025      # case insensitive, let's make it lowercase to improve readability.
20026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20027      # Now convert it back to Unix-style (cygpath)
20028      input_path=`$CYGPATH -u "$shortmode_path"`
20029      new_path="$input_path"
20030    fi
20031  fi
20032
20033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20034  if test "x$test_cygdrive_prefix" = x; then
20035    # As a simple fix, exclude /usr/bin since it's not a real path.
20036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20038      # a path prefixed by /cygdrive for fixpath to work.
20039      new_path="$CYGWIN_ROOT_PATH$input_path"
20040    fi
20041  fi
20042
20043  # remove trailing .exe if any
20044  new_path="${new_path/%.exe/}"
20045
20046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20047
20048  # First separate the path from the arguments. This will split at the first
20049  # space.
20050  complete="$FOUND_MAKE"
20051  path="${complete%% *}"
20052  tmp="$complete EOL"
20053  arguments="${tmp#* }"
20054
20055  # Input might be given as Windows format, start by converting to
20056  # unix format.
20057  new_path="$path"
20058
20059  windows_path="$new_path"
20060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20061    unix_path=`$CYGPATH -u "$windows_path"`
20062    new_path="$unix_path"
20063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20065    new_path="$unix_path"
20066  fi
20067
20068
20069  # Now try to locate executable using which
20070  new_path=`$WHICH "$new_path" 2> /dev/null`
20071
20072  if test "x$new_path" = x; then
20073    # Oops. Which didn't find the executable.
20074    # The splitting of arguments from the executable at a space might have been incorrect,
20075    # since paths with space are more likely in Windows. Give it another try with the whole
20076    # argument.
20077    path="$complete"
20078    arguments="EOL"
20079    new_path="$path"
20080
20081  windows_path="$new_path"
20082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20083    unix_path=`$CYGPATH -u "$windows_path"`
20084    new_path="$unix_path"
20085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20087    new_path="$unix_path"
20088  fi
20089
20090
20091    new_path=`$WHICH "$new_path" 2> /dev/null`
20092    # bat and cmd files are not always considered executable in MSYS causing which
20093    # to not find them
20094    if test "x$new_path" = x \
20095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20097      new_path="$path"
20098
20099  windows_path="$new_path"
20100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20101    unix_path=`$CYGPATH -u "$windows_path"`
20102    new_path="$unix_path"
20103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20105    new_path="$unix_path"
20106  fi
20107
20108    fi
20109
20110    if test "x$new_path" = x; then
20111      # It's still not found. Now this is an unrecoverable error.
20112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20113$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20114      has_space=`$ECHO "$complete" | $GREP " "`
20115      if test "x$has_space" != x; then
20116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20118      fi
20119      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20120    fi
20121  fi
20122
20123  # Now new_path has a complete unix path to the binary
20124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20125    # Keep paths in /bin as-is, but remove trailing .exe if any
20126    new_path="${new_path/%.exe/}"
20127    # Do not save /bin paths to all_fixpath_prefixes!
20128  else
20129    # Not in mixed or Windows style, start by that.
20130    new_path=`cmd //c echo $new_path`
20131
20132  input_path="$new_path"
20133  # Check if we need to convert this using DOS-style short mode. If the path
20134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20135  # take no chances and rewrite it.
20136  # Note: m4 eats our [], so we need to use [ and ] instead.
20137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20138  if test "x$has_forbidden_chars" != x; then
20139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20141  fi
20142
20143    # Output is in $new_path
20144
20145  windows_path="$new_path"
20146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20147    unix_path=`$CYGPATH -u "$windows_path"`
20148    new_path="$unix_path"
20149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20151    new_path="$unix_path"
20152  fi
20153
20154    # remove trailing .exe if any
20155    new_path="${new_path/%.exe/}"
20156
20157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20159  fi
20160
20161    else
20162      # We're on a unix platform. Hooray! :)
20163      # First separate the path from the arguments. This will split at the first
20164      # space.
20165      complete="$FOUND_MAKE"
20166      path="${complete%% *}"
20167      tmp="$complete EOL"
20168      arguments="${tmp#* }"
20169
20170      # Cannot rely on the command "which" here since it doesn't always work.
20171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20172      if test -z "$is_absolute_path"; then
20173        # Path to executable is not absolute. Find it.
20174        IFS_save="$IFS"
20175        IFS=:
20176        for p in $PATH; do
20177          if test -f "$p/$path" && test -x "$p/$path"; then
20178            new_path="$p/$path"
20179            break
20180          fi
20181        done
20182        IFS="$IFS_save"
20183      else
20184        # This is an absolute path, we can use it without further modifications.
20185        new_path="$path"
20186      fi
20187
20188      if test "x$new_path" = x; then
20189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20190$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20191        has_space=`$ECHO "$complete" | $GREP " "`
20192        if test "x$has_space" != x; then
20193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20195        fi
20196        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20197      fi
20198    fi
20199
20200    # Now join together the path and the arguments once again
20201    if test "x$arguments" != xEOL; then
20202      new_complete="$new_path ${arguments% *}"
20203    else
20204      new_complete="$new_path"
20205    fi
20206
20207    if test "x$complete" != "x$new_complete"; then
20208      FOUND_MAKE="$new_complete"
20209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20210$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20211    fi
20212  fi
20213
20214        fi
20215      fi
20216    fi
20217  fi
20218
20219        if test "x$FOUND_MAKE" = x; then
20220          for ac_prog in make
20221do
20222  # Extract the first word of "$ac_prog", so it can be a program name with args.
20223set dummy $ac_prog; ac_word=$2
20224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20225$as_echo_n "checking for $ac_word... " >&6; }
20226if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20227  $as_echo_n "(cached) " >&6
20228else
20229  case $CHECK_TOOLSDIR_MAKE in
20230  [\\/]* | ?:[\\/]*)
20231  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20232  ;;
20233  *)
20234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20235for as_dir in $PATH
20236do
20237  IFS=$as_save_IFS
20238  test -z "$as_dir" && as_dir=.
20239    for ac_exec_ext in '' $ac_executable_extensions; do
20240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20241    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20243    break 2
20244  fi
20245done
20246  done
20247IFS=$as_save_IFS
20248
20249  ;;
20250esac
20251fi
20252CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20253if test -n "$CHECK_TOOLSDIR_MAKE"; then
20254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20255$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20256else
20257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20258$as_echo "no" >&6; }
20259fi
20260
20261
20262  test -n "$CHECK_TOOLSDIR_MAKE" && break
20263done
20264
20265
20266  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20267  DESCRIPTION="make in tools-dir"
20268
20269  # On Cygwin, we require a newer version of make than on other platforms
20270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20271    MAKE_VERSION_EXPR="-e 4\."
20272    MAKE_REQUIRED_VERSION="4.0"
20273   else
20274    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20275    MAKE_REQUIRED_VERSION="3.81"
20276  fi
20277
20278  if test "x$MAKE_CANDIDATE" != x; then
20279    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20280$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20281    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20282    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20283    if test "x$IS_GNU_MAKE" = x; then
20284      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20285$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20286    else
20287      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20288      if test "x$IS_MODERN_MAKE" = x; then
20289        { $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
20290$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;}
20291      else
20292        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20293          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20294            MAKE_EXPECTED_ENV='cygwin'
20295          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20296            MAKE_EXPECTED_ENV='msys'
20297          else
20298            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20299          fi
20300          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20301          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20302        else
20303          # Not relevant for non-Windows
20304          IS_MAKE_CORRECT_ENV=true
20305        fi
20306        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20307          { $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
20308$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;}
20309        else
20310          FOUND_MAKE=$MAKE_CANDIDATE
20311
20312  # Only process if variable expands to non-empty
20313
20314  if test "x$FOUND_MAKE" != x; then
20315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316
20317  # First separate the path from the arguments. This will split at the first
20318  # space.
20319  complete="$FOUND_MAKE"
20320  path="${complete%% *}"
20321  tmp="$complete EOL"
20322  arguments="${tmp#* }"
20323
20324  # Input might be given as Windows format, start by converting to
20325  # unix format.
20326  new_path=`$CYGPATH -u "$path"`
20327
20328  # Now try to locate executable using which
20329  new_path=`$WHICH "$new_path" 2> /dev/null`
20330  # bat and cmd files are not always considered executable in cygwin causing which
20331  # to not find them
20332  if test "x$new_path" = x \
20333      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20334      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20335    new_path=`$CYGPATH -u "$path"`
20336  fi
20337  if test "x$new_path" = x; then
20338    # Oops. Which didn't find the executable.
20339    # The splitting of arguments from the executable at a space might have been incorrect,
20340    # since paths with space are more likely in Windows. Give it another try with the whole
20341    # argument.
20342    path="$complete"
20343    arguments="EOL"
20344    new_path=`$CYGPATH -u "$path"`
20345    new_path=`$WHICH "$new_path" 2> /dev/null`
20346    # bat and cmd files are not always considered executable in cygwin causing which
20347    # to not find them
20348    if test "x$new_path" = x \
20349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20351      new_path=`$CYGPATH -u "$path"`
20352    fi
20353    if test "x$new_path" = x; then
20354      # It's still not found. Now this is an unrecoverable error.
20355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20357      has_space=`$ECHO "$complete" | $GREP " "`
20358      if test "x$has_space" != x; then
20359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20361      fi
20362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20363    fi
20364  fi
20365
20366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20369  # "foo.exe" is OK but "foo" is an error.
20370  #
20371  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20372  # It is also a way to make sure we got the proper file name for the real test later on.
20373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20374  if test "x$test_shortpath" = x; then
20375    # Short path failed, file does not exist as specified.
20376    # Try adding .exe or .cmd
20377    if test -f "${new_path}.exe"; then
20378      input_to_shortpath="${new_path}.exe"
20379    elif test -f "${new_path}.cmd"; then
20380      input_to_shortpath="${new_path}.cmd"
20381    else
20382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20386      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20387    fi
20388  else
20389    input_to_shortpath="$new_path"
20390  fi
20391
20392  # Call helper function which possibly converts this using DOS-style short mode.
20393  # If so, the updated path is stored in $new_path.
20394  new_path="$input_to_shortpath"
20395
20396  input_path="$input_to_shortpath"
20397  # Check if we need to convert this using DOS-style short mode. If the path
20398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20399  # take no chances and rewrite it.
20400  # Note: m4 eats our [], so we need to use [ and ] instead.
20401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20402  if test "x$has_forbidden_chars" != x; then
20403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20407      # Going to short mode and back again did indeed matter. Since short mode is
20408      # case insensitive, let's make it lowercase to improve readability.
20409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20410      # Now convert it back to Unix-style (cygpath)
20411      input_path=`$CYGPATH -u "$shortmode_path"`
20412      new_path="$input_path"
20413    fi
20414  fi
20415
20416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20417  if test "x$test_cygdrive_prefix" = x; then
20418    # As a simple fix, exclude /usr/bin since it's not a real path.
20419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20421      # a path prefixed by /cygdrive for fixpath to work.
20422      new_path="$CYGWIN_ROOT_PATH$input_path"
20423    fi
20424  fi
20425
20426  # remove trailing .exe if any
20427  new_path="${new_path/%.exe/}"
20428
20429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20430
20431  # First separate the path from the arguments. This will split at the first
20432  # space.
20433  complete="$FOUND_MAKE"
20434  path="${complete%% *}"
20435  tmp="$complete EOL"
20436  arguments="${tmp#* }"
20437
20438  # Input might be given as Windows format, start by converting to
20439  # unix format.
20440  new_path="$path"
20441
20442  windows_path="$new_path"
20443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20444    unix_path=`$CYGPATH -u "$windows_path"`
20445    new_path="$unix_path"
20446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20448    new_path="$unix_path"
20449  fi
20450
20451
20452  # Now try to locate executable using which
20453  new_path=`$WHICH "$new_path" 2> /dev/null`
20454
20455  if test "x$new_path" = x; then
20456    # Oops. Which didn't find the executable.
20457    # The splitting of arguments from the executable at a space might have been incorrect,
20458    # since paths with space are more likely in Windows. Give it another try with the whole
20459    # argument.
20460    path="$complete"
20461    arguments="EOL"
20462    new_path="$path"
20463
20464  windows_path="$new_path"
20465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20466    unix_path=`$CYGPATH -u "$windows_path"`
20467    new_path="$unix_path"
20468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20470    new_path="$unix_path"
20471  fi
20472
20473
20474    new_path=`$WHICH "$new_path" 2> /dev/null`
20475    # bat and cmd files are not always considered executable in MSYS causing which
20476    # to not find them
20477    if test "x$new_path" = x \
20478        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20479        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20480      new_path="$path"
20481
20482  windows_path="$new_path"
20483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20484    unix_path=`$CYGPATH -u "$windows_path"`
20485    new_path="$unix_path"
20486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20488    new_path="$unix_path"
20489  fi
20490
20491    fi
20492
20493    if test "x$new_path" = x; then
20494      # It's still not found. Now this is an unrecoverable error.
20495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20497      has_space=`$ECHO "$complete" | $GREP " "`
20498      if test "x$has_space" != x; then
20499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20501      fi
20502      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20503    fi
20504  fi
20505
20506  # Now new_path has a complete unix path to the binary
20507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20508    # Keep paths in /bin as-is, but remove trailing .exe if any
20509    new_path="${new_path/%.exe/}"
20510    # Do not save /bin paths to all_fixpath_prefixes!
20511  else
20512    # Not in mixed or Windows style, start by that.
20513    new_path=`cmd //c echo $new_path`
20514
20515  input_path="$new_path"
20516  # Check if we need to convert this using DOS-style short mode. If the path
20517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20518  # take no chances and rewrite it.
20519  # Note: m4 eats our [], so we need to use [ and ] instead.
20520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20521  if test "x$has_forbidden_chars" != x; then
20522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20524  fi
20525
20526    # Output is in $new_path
20527
20528  windows_path="$new_path"
20529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20530    unix_path=`$CYGPATH -u "$windows_path"`
20531    new_path="$unix_path"
20532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20534    new_path="$unix_path"
20535  fi
20536
20537    # remove trailing .exe if any
20538    new_path="${new_path/%.exe/}"
20539
20540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20542  fi
20543
20544    else
20545      # We're on a unix platform. Hooray! :)
20546      # First separate the path from the arguments. This will split at the first
20547      # space.
20548      complete="$FOUND_MAKE"
20549      path="${complete%% *}"
20550      tmp="$complete EOL"
20551      arguments="${tmp#* }"
20552
20553      # Cannot rely on the command "which" here since it doesn't always work.
20554      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20555      if test -z "$is_absolute_path"; then
20556        # Path to executable is not absolute. Find it.
20557        IFS_save="$IFS"
20558        IFS=:
20559        for p in $PATH; do
20560          if test -f "$p/$path" && test -x "$p/$path"; then
20561            new_path="$p/$path"
20562            break
20563          fi
20564        done
20565        IFS="$IFS_save"
20566      else
20567        # This is an absolute path, we can use it without further modifications.
20568        new_path="$path"
20569      fi
20570
20571      if test "x$new_path" = x; then
20572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20574        has_space=`$ECHO "$complete" | $GREP " "`
20575        if test "x$has_space" != x; then
20576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20578        fi
20579        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20580      fi
20581    fi
20582
20583    # Now join together the path and the arguments once again
20584    if test "x$arguments" != xEOL; then
20585      new_complete="$new_path ${arguments% *}"
20586    else
20587      new_complete="$new_path"
20588    fi
20589
20590    if test "x$complete" != "x$new_complete"; then
20591      FOUND_MAKE="$new_complete"
20592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20593$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20594    fi
20595  fi
20596
20597        fi
20598      fi
20599    fi
20600  fi
20601
20602        fi
20603        PATH=$OLD_PATH
20604      fi
20605    fi
20606
20607    if test "x$FOUND_MAKE" = x; then
20608      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
20609    fi
20610
20611    else
20612      # If it succeeded, then it was overridden by the user. We will use it
20613      # for the tool.
20614
20615      # First remove it from the list of overridden variables, so we can test
20616      # for unknown variables in the end.
20617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20618
20619      # Check if we try to supply an empty value
20620      if test "x$MAKE" = x; then
20621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20622$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20624$as_echo_n "checking for MAKE... " >&6; }
20625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20626$as_echo "disabled" >&6; }
20627      else
20628        # Check if the provided tool contains a complete path.
20629        tool_specified="$MAKE"
20630        tool_basename="${tool_specified##*/}"
20631        if test "x$tool_basename" = "x$tool_specified"; then
20632          # A command without a complete path is provided, search $PATH.
20633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20634$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20635          # Extract the first word of "$tool_basename", so it can be a program name with args.
20636set dummy $tool_basename; ac_word=$2
20637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20638$as_echo_n "checking for $ac_word... " >&6; }
20639if ${ac_cv_path_MAKE+:} false; then :
20640  $as_echo_n "(cached) " >&6
20641else
20642  case $MAKE in
20643  [\\/]* | ?:[\\/]*)
20644  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20645  ;;
20646  *)
20647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20648for as_dir in $PATH
20649do
20650  IFS=$as_save_IFS
20651  test -z "$as_dir" && as_dir=.
20652    for ac_exec_ext in '' $ac_executable_extensions; do
20653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20654    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20656    break 2
20657  fi
20658done
20659  done
20660IFS=$as_save_IFS
20661
20662  ;;
20663esac
20664fi
20665MAKE=$ac_cv_path_MAKE
20666if test -n "$MAKE"; then
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20668$as_echo "$MAKE" >&6; }
20669else
20670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20671$as_echo "no" >&6; }
20672fi
20673
20674
20675          if test "x$MAKE" = x; then
20676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20677          fi
20678        else
20679          # Otherwise we believe it is a complete path. Use it as it is.
20680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20681$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20683$as_echo_n "checking for MAKE... " >&6; }
20684          if test ! -x "$tool_specified"; then
20685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20686$as_echo "not found" >&6; }
20687            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20688          fi
20689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20690$as_echo "$tool_specified" >&6; }
20691        fi
20692      fi
20693    fi
20694
20695    # If MAKE was set by user, verify the version
20696
20697  MAKE_CANDIDATE=""$MAKE""
20698  DESCRIPTION="user supplied MAKE=$MAKE"
20699
20700  # On Cygwin, we require a newer version of make than on other platforms
20701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20702    MAKE_VERSION_EXPR="-e 4\."
20703    MAKE_REQUIRED_VERSION="4.0"
20704   else
20705    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20706    MAKE_REQUIRED_VERSION="3.81"
20707  fi
20708
20709  if test "x$MAKE_CANDIDATE" != x; then
20710    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20711$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20712    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20713    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20714    if test "x$IS_GNU_MAKE" = x; then
20715      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20716$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20717    else
20718      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20719      if test "x$IS_MODERN_MAKE" = x; then
20720        { $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
20721$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;}
20722      else
20723        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20724          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20725            MAKE_EXPECTED_ENV='cygwin'
20726          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20727            MAKE_EXPECTED_ENV='msys'
20728          else
20729            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20730          fi
20731          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20732          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20733        else
20734          # Not relevant for non-Windows
20735          IS_MAKE_CORRECT_ENV=true
20736        fi
20737        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20738          { $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
20739$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;}
20740        else
20741          FOUND_MAKE=$MAKE_CANDIDATE
20742
20743  # Only process if variable expands to non-empty
20744
20745  if test "x$FOUND_MAKE" != x; then
20746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20747
20748  # First separate the path from the arguments. This will split at the first
20749  # space.
20750  complete="$FOUND_MAKE"
20751  path="${complete%% *}"
20752  tmp="$complete EOL"
20753  arguments="${tmp#* }"
20754
20755  # Input might be given as Windows format, start by converting to
20756  # unix format.
20757  new_path=`$CYGPATH -u "$path"`
20758
20759  # Now try to locate executable using which
20760  new_path=`$WHICH "$new_path" 2> /dev/null`
20761  # bat and cmd files are not always considered executable in cygwin causing which
20762  # to not find them
20763  if test "x$new_path" = x \
20764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20766    new_path=`$CYGPATH -u "$path"`
20767  fi
20768  if test "x$new_path" = x; then
20769    # Oops. Which didn't find the executable.
20770    # The splitting of arguments from the executable at a space might have been incorrect,
20771    # since paths with space are more likely in Windows. Give it another try with the whole
20772    # argument.
20773    path="$complete"
20774    arguments="EOL"
20775    new_path=`$CYGPATH -u "$path"`
20776    new_path=`$WHICH "$new_path" 2> /dev/null`
20777    # bat and cmd files are not always considered executable in cygwin causing which
20778    # to not find them
20779    if test "x$new_path" = x \
20780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20782      new_path=`$CYGPATH -u "$path"`
20783    fi
20784    if test "x$new_path" = x; then
20785      # It's still not found. Now this is an unrecoverable error.
20786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20787$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20788      has_space=`$ECHO "$complete" | $GREP " "`
20789      if test "x$has_space" != x; then
20790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20792      fi
20793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20794    fi
20795  fi
20796
20797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20800  # "foo.exe" is OK but "foo" is an error.
20801  #
20802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20803  # It is also a way to make sure we got the proper file name for the real test later on.
20804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20805  if test "x$test_shortpath" = x; then
20806    # Short path failed, file does not exist as specified.
20807    # Try adding .exe or .cmd
20808    if test -f "${new_path}.exe"; then
20809      input_to_shortpath="${new_path}.exe"
20810    elif test -f "${new_path}.cmd"; then
20811      input_to_shortpath="${new_path}.cmd"
20812    else
20813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20818    fi
20819  else
20820    input_to_shortpath="$new_path"
20821  fi
20822
20823  # Call helper function which possibly converts this using DOS-style short mode.
20824  # If so, the updated path is stored in $new_path.
20825  new_path="$input_to_shortpath"
20826
20827  input_path="$input_to_shortpath"
20828  # Check if we need to convert this using DOS-style short mode. If the path
20829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20830  # take no chances and rewrite it.
20831  # Note: m4 eats our [], so we need to use [ and ] instead.
20832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20833  if test "x$has_forbidden_chars" != x; then
20834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20838      # Going to short mode and back again did indeed matter. Since short mode is
20839      # case insensitive, let's make it lowercase to improve readability.
20840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20841      # Now convert it back to Unix-style (cygpath)
20842      input_path=`$CYGPATH -u "$shortmode_path"`
20843      new_path="$input_path"
20844    fi
20845  fi
20846
20847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20848  if test "x$test_cygdrive_prefix" = x; then
20849    # As a simple fix, exclude /usr/bin since it's not a real path.
20850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20852      # a path prefixed by /cygdrive for fixpath to work.
20853      new_path="$CYGWIN_ROOT_PATH$input_path"
20854    fi
20855  fi
20856
20857  # remove trailing .exe if any
20858  new_path="${new_path/%.exe/}"
20859
20860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20861
20862  # First separate the path from the arguments. This will split at the first
20863  # space.
20864  complete="$FOUND_MAKE"
20865  path="${complete%% *}"
20866  tmp="$complete EOL"
20867  arguments="${tmp#* }"
20868
20869  # Input might be given as Windows format, start by converting to
20870  # unix format.
20871  new_path="$path"
20872
20873  windows_path="$new_path"
20874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20875    unix_path=`$CYGPATH -u "$windows_path"`
20876    new_path="$unix_path"
20877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20879    new_path="$unix_path"
20880  fi
20881
20882
20883  # Now try to locate executable using which
20884  new_path=`$WHICH "$new_path" 2> /dev/null`
20885
20886  if test "x$new_path" = x; then
20887    # Oops. Which didn't find the executable.
20888    # The splitting of arguments from the executable at a space might have been incorrect,
20889    # since paths with space are more likely in Windows. Give it another try with the whole
20890    # argument.
20891    path="$complete"
20892    arguments="EOL"
20893    new_path="$path"
20894
20895  windows_path="$new_path"
20896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20897    unix_path=`$CYGPATH -u "$windows_path"`
20898    new_path="$unix_path"
20899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20901    new_path="$unix_path"
20902  fi
20903
20904
20905    new_path=`$WHICH "$new_path" 2> /dev/null`
20906    # bat and cmd files are not always considered executable in MSYS causing which
20907    # to not find them
20908    if test "x$new_path" = x \
20909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20911      new_path="$path"
20912
20913  windows_path="$new_path"
20914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20915    unix_path=`$CYGPATH -u "$windows_path"`
20916    new_path="$unix_path"
20917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20919    new_path="$unix_path"
20920  fi
20921
20922    fi
20923
20924    if test "x$new_path" = x; then
20925      # It's still not found. Now this is an unrecoverable error.
20926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20928      has_space=`$ECHO "$complete" | $GREP " "`
20929      if test "x$has_space" != x; then
20930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20932      fi
20933      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20934    fi
20935  fi
20936
20937  # Now new_path has a complete unix path to the binary
20938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20939    # Keep paths in /bin as-is, but remove trailing .exe if any
20940    new_path="${new_path/%.exe/}"
20941    # Do not save /bin paths to all_fixpath_prefixes!
20942  else
20943    # Not in mixed or Windows style, start by that.
20944    new_path=`cmd //c echo $new_path`
20945
20946  input_path="$new_path"
20947  # Check if we need to convert this using DOS-style short mode. If the path
20948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20949  # take no chances and rewrite it.
20950  # Note: m4 eats our [], so we need to use [ and ] instead.
20951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20952  if test "x$has_forbidden_chars" != x; then
20953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20955  fi
20956
20957    # Output is in $new_path
20958
20959  windows_path="$new_path"
20960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20961    unix_path=`$CYGPATH -u "$windows_path"`
20962    new_path="$unix_path"
20963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20965    new_path="$unix_path"
20966  fi
20967
20968    # remove trailing .exe if any
20969    new_path="${new_path/%.exe/}"
20970
20971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20973  fi
20974
20975    else
20976      # We're on a unix platform. Hooray! :)
20977      # First separate the path from the arguments. This will split at the first
20978      # space.
20979      complete="$FOUND_MAKE"
20980      path="${complete%% *}"
20981      tmp="$complete EOL"
20982      arguments="${tmp#* }"
20983
20984      # Cannot rely on the command "which" here since it doesn't always work.
20985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20986      if test -z "$is_absolute_path"; then
20987        # Path to executable is not absolute. Find it.
20988        IFS_save="$IFS"
20989        IFS=:
20990        for p in $PATH; do
20991          if test -f "$p/$path" && test -x "$p/$path"; then
20992            new_path="$p/$path"
20993            break
20994          fi
20995        done
20996        IFS="$IFS_save"
20997      else
20998        # This is an absolute path, we can use it without further modifications.
20999        new_path="$path"
21000      fi
21001
21002      if test "x$new_path" = x; then
21003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21005        has_space=`$ECHO "$complete" | $GREP " "`
21006        if test "x$has_space" != x; then
21007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21009        fi
21010        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21011      fi
21012    fi
21013
21014    # Now join together the path and the arguments once again
21015    if test "x$arguments" != xEOL; then
21016      new_complete="$new_path ${arguments% *}"
21017    else
21018      new_complete="$new_path"
21019    fi
21020
21021    if test "x$complete" != "x$new_complete"; then
21022      FOUND_MAKE="$new_complete"
21023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21024$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21025    fi
21026  fi
21027
21028        fi
21029      fi
21030    fi
21031  fi
21032
21033    if test "x$FOUND_MAKE" = x; then
21034      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21035    fi
21036
21037  fi
21038
21039
21040  MAKE=$FOUND_MAKE
21041
21042  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21043$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21044
21045
21046  # Check if make supports the output sync option and if so, setup using it.
21047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21048$as_echo_n "checking if make --output-sync is supported... " >&6; }
21049  if $MAKE --version -O > /dev/null 2>&1; then
21050    OUTPUT_SYNC_SUPPORTED=true
21051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21052$as_echo "yes" >&6; }
21053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21054$as_echo_n "checking for output-sync value... " >&6; }
21055
21056# Check whether --with-output-sync was given.
21057if test "${with_output_sync+set}" = set; then :
21058  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21059fi
21060
21061    if test "x$OUTPUT_SYNC" = "x"; then
21062      OUTPUT_SYNC=none
21063    fi
21064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21065$as_echo "$OUTPUT_SYNC" >&6; }
21066    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21067      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21068    fi
21069  else
21070    OUTPUT_SYNC_SUPPORTED=false
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21072$as_echo "no" >&6; }
21073  fi
21074
21075
21076
21077
21078
21079
21080  # Test if find supports -delete
21081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21082$as_echo_n "checking if find supports -delete... " >&6; }
21083  FIND_DELETE="-delete"
21084
21085  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21086
21087  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21088
21089  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21090  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21091    # No, it does not.
21092    $RM $DELETEDIR/TestIfFindSupportsDelete
21093    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21094      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21095      FIND_DELETE="-print | $XARGS $RM"
21096    else
21097      FIND_DELETE="-exec $RM \{\} \+"
21098    fi
21099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21100$as_echo "no" >&6; }
21101  else
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21103$as_echo "yes" >&6; }
21104  fi
21105  $RMDIR $DELETEDIR
21106
21107
21108
21109  # Test which kind of tar was found
21110  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21111    TAR_TYPE="gnu"
21112  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21113    TAR_TYPE="bsd"
21114  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21115    TAR_TYPE="solaris"
21116  fi
21117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21118$as_echo_n "checking what type of tar was found... " >&6; }
21119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21120$as_echo "$TAR_TYPE" >&6; }
21121
21122  TAR_CREATE_FILE_PARAM=""
21123
21124  if test "x$TAR_TYPE" = "xgnu"; then
21125    TAR_INCLUDE_PARAM="T"
21126    TAR_SUPPORTS_TRANSFORM="true"
21127    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21128      # When using gnu tar for Solaris targets, need to use compatibility mode
21129      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21130    fi
21131  else
21132    TAR_INCLUDE_PARAM="I"
21133    TAR_SUPPORTS_TRANSFORM="false"
21134  fi
21135
21136
21137
21138
21139
21140
21141  # These tools might not be installed by default,
21142  # need hint on how to install them.
21143
21144
21145
21146  # Publish this variable in the help.
21147
21148
21149  if [ -z "${UNZIP+x}" ]; then
21150    # The variable is not set by user, try to locate tool using the code snippet
21151    for ac_prog in unzip
21152do
21153  # Extract the first word of "$ac_prog", so it can be a program name with args.
21154set dummy $ac_prog; ac_word=$2
21155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21156$as_echo_n "checking for $ac_word... " >&6; }
21157if ${ac_cv_path_UNZIP+:} false; then :
21158  $as_echo_n "(cached) " >&6
21159else
21160  case $UNZIP in
21161  [\\/]* | ?:[\\/]*)
21162  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21163  ;;
21164  *)
21165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21166for as_dir in $PATH
21167do
21168  IFS=$as_save_IFS
21169  test -z "$as_dir" && as_dir=.
21170    for ac_exec_ext in '' $ac_executable_extensions; do
21171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21172    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21174    break 2
21175  fi
21176done
21177  done
21178IFS=$as_save_IFS
21179
21180  ;;
21181esac
21182fi
21183UNZIP=$ac_cv_path_UNZIP
21184if test -n "$UNZIP"; then
21185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21186$as_echo "$UNZIP" >&6; }
21187else
21188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21189$as_echo "no" >&6; }
21190fi
21191
21192
21193  test -n "$UNZIP" && break
21194done
21195
21196  else
21197    # The variable is set, but is it from the command line or the environment?
21198
21199    # Try to remove the string !UNZIP! from our list.
21200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21202      # If it failed, the variable was not from the command line. Ignore it,
21203      # but warn the user (except for BASH, which is always set by the calling BASH).
21204      if test "xUNZIP" != xBASH; then
21205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21206$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21207      fi
21208      # Try to locate tool using the code snippet
21209      for ac_prog in unzip
21210do
21211  # Extract the first word of "$ac_prog", so it can be a program name with args.
21212set dummy $ac_prog; ac_word=$2
21213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21214$as_echo_n "checking for $ac_word... " >&6; }
21215if ${ac_cv_path_UNZIP+:} false; then :
21216  $as_echo_n "(cached) " >&6
21217else
21218  case $UNZIP in
21219  [\\/]* | ?:[\\/]*)
21220  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21221  ;;
21222  *)
21223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21224for as_dir in $PATH
21225do
21226  IFS=$as_save_IFS
21227  test -z "$as_dir" && as_dir=.
21228    for ac_exec_ext in '' $ac_executable_extensions; do
21229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21230    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21232    break 2
21233  fi
21234done
21235  done
21236IFS=$as_save_IFS
21237
21238  ;;
21239esac
21240fi
21241UNZIP=$ac_cv_path_UNZIP
21242if test -n "$UNZIP"; then
21243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21244$as_echo "$UNZIP" >&6; }
21245else
21246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21247$as_echo "no" >&6; }
21248fi
21249
21250
21251  test -n "$UNZIP" && break
21252done
21253
21254    else
21255      # If it succeeded, then it was overridden by the user. We will use it
21256      # for the tool.
21257
21258      # First remove it from the list of overridden variables, so we can test
21259      # for unknown variables in the end.
21260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21261
21262      # Check if we try to supply an empty value
21263      if test "x$UNZIP" = x; then
21264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21265$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21267$as_echo_n "checking for UNZIP... " >&6; }
21268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21269$as_echo "disabled" >&6; }
21270      else
21271        # Check if the provided tool contains a complete path.
21272        tool_specified="$UNZIP"
21273        tool_basename="${tool_specified##*/}"
21274        if test "x$tool_basename" = "x$tool_specified"; then
21275          # A command without a complete path is provided, search $PATH.
21276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21277$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21278          # Extract the first word of "$tool_basename", so it can be a program name with args.
21279set dummy $tool_basename; ac_word=$2
21280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21281$as_echo_n "checking for $ac_word... " >&6; }
21282if ${ac_cv_path_UNZIP+:} false; then :
21283  $as_echo_n "(cached) " >&6
21284else
21285  case $UNZIP in
21286  [\\/]* | ?:[\\/]*)
21287  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21288  ;;
21289  *)
21290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21291for as_dir in $PATH
21292do
21293  IFS=$as_save_IFS
21294  test -z "$as_dir" && as_dir=.
21295    for ac_exec_ext in '' $ac_executable_extensions; do
21296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21297    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21299    break 2
21300  fi
21301done
21302  done
21303IFS=$as_save_IFS
21304
21305  ;;
21306esac
21307fi
21308UNZIP=$ac_cv_path_UNZIP
21309if test -n "$UNZIP"; then
21310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21311$as_echo "$UNZIP" >&6; }
21312else
21313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21314$as_echo "no" >&6; }
21315fi
21316
21317
21318          if test "x$UNZIP" = x; then
21319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21320          fi
21321        else
21322          # Otherwise we believe it is a complete path. Use it as it is.
21323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21324$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21326$as_echo_n "checking for UNZIP... " >&6; }
21327          if test ! -x "$tool_specified"; then
21328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21329$as_echo "not found" >&6; }
21330            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21331          fi
21332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21333$as_echo "$tool_specified" >&6; }
21334        fi
21335      fi
21336    fi
21337
21338  fi
21339
21340
21341
21342  if test "x$UNZIP" = x; then
21343    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21344  fi
21345
21346
21347
21348
21349
21350  # Publish this variable in the help.
21351
21352
21353  if [ -z "${ZIP+x}" ]; then
21354    # The variable is not set by user, try to locate tool using the code snippet
21355    for ac_prog in zip
21356do
21357  # Extract the first word of "$ac_prog", so it can be a program name with args.
21358set dummy $ac_prog; ac_word=$2
21359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21360$as_echo_n "checking for $ac_word... " >&6; }
21361if ${ac_cv_path_ZIP+:} false; then :
21362  $as_echo_n "(cached) " >&6
21363else
21364  case $ZIP in
21365  [\\/]* | ?:[\\/]*)
21366  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21367  ;;
21368  *)
21369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21370for as_dir in $PATH
21371do
21372  IFS=$as_save_IFS
21373  test -z "$as_dir" && as_dir=.
21374    for ac_exec_ext in '' $ac_executable_extensions; do
21375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21376    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21378    break 2
21379  fi
21380done
21381  done
21382IFS=$as_save_IFS
21383
21384  ;;
21385esac
21386fi
21387ZIP=$ac_cv_path_ZIP
21388if test -n "$ZIP"; then
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21390$as_echo "$ZIP" >&6; }
21391else
21392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21393$as_echo "no" >&6; }
21394fi
21395
21396
21397  test -n "$ZIP" && break
21398done
21399
21400  else
21401    # The variable is set, but is it from the command line or the environment?
21402
21403    # Try to remove the string !ZIP! from our list.
21404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21406      # If it failed, the variable was not from the command line. Ignore it,
21407      # but warn the user (except for BASH, which is always set by the calling BASH).
21408      if test "xZIP" != xBASH; then
21409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21410$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21411      fi
21412      # Try to locate tool using the code snippet
21413      for ac_prog in zip
21414do
21415  # Extract the first word of "$ac_prog", so it can be a program name with args.
21416set dummy $ac_prog; ac_word=$2
21417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21418$as_echo_n "checking for $ac_word... " >&6; }
21419if ${ac_cv_path_ZIP+:} false; then :
21420  $as_echo_n "(cached) " >&6
21421else
21422  case $ZIP in
21423  [\\/]* | ?:[\\/]*)
21424  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21425  ;;
21426  *)
21427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21428for as_dir in $PATH
21429do
21430  IFS=$as_save_IFS
21431  test -z "$as_dir" && as_dir=.
21432    for ac_exec_ext in '' $ac_executable_extensions; do
21433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21434    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21436    break 2
21437  fi
21438done
21439  done
21440IFS=$as_save_IFS
21441
21442  ;;
21443esac
21444fi
21445ZIP=$ac_cv_path_ZIP
21446if test -n "$ZIP"; then
21447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21448$as_echo "$ZIP" >&6; }
21449else
21450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21451$as_echo "no" >&6; }
21452fi
21453
21454
21455  test -n "$ZIP" && break
21456done
21457
21458    else
21459      # If it succeeded, then it was overridden by the user. We will use it
21460      # for the tool.
21461
21462      # First remove it from the list of overridden variables, so we can test
21463      # for unknown variables in the end.
21464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21465
21466      # Check if we try to supply an empty value
21467      if test "x$ZIP" = x; then
21468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21469$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21471$as_echo_n "checking for ZIP... " >&6; }
21472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21473$as_echo "disabled" >&6; }
21474      else
21475        # Check if the provided tool contains a complete path.
21476        tool_specified="$ZIP"
21477        tool_basename="${tool_specified##*/}"
21478        if test "x$tool_basename" = "x$tool_specified"; then
21479          # A command without a complete path is provided, search $PATH.
21480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21481$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21482          # Extract the first word of "$tool_basename", so it can be a program name with args.
21483set dummy $tool_basename; ac_word=$2
21484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21485$as_echo_n "checking for $ac_word... " >&6; }
21486if ${ac_cv_path_ZIP+:} false; then :
21487  $as_echo_n "(cached) " >&6
21488else
21489  case $ZIP in
21490  [\\/]* | ?:[\\/]*)
21491  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21492  ;;
21493  *)
21494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21495for as_dir in $PATH
21496do
21497  IFS=$as_save_IFS
21498  test -z "$as_dir" && as_dir=.
21499    for ac_exec_ext in '' $ac_executable_extensions; do
21500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21501    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21503    break 2
21504  fi
21505done
21506  done
21507IFS=$as_save_IFS
21508
21509  ;;
21510esac
21511fi
21512ZIP=$ac_cv_path_ZIP
21513if test -n "$ZIP"; then
21514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21515$as_echo "$ZIP" >&6; }
21516else
21517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21518$as_echo "no" >&6; }
21519fi
21520
21521
21522          if test "x$ZIP" = x; then
21523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21524          fi
21525        else
21526          # Otherwise we believe it is a complete path. Use it as it is.
21527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21528$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21530$as_echo_n "checking for ZIP... " >&6; }
21531          if test ! -x "$tool_specified"; then
21532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21533$as_echo "not found" >&6; }
21534            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21535          fi
21536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21537$as_echo "$tool_specified" >&6; }
21538        fi
21539      fi
21540    fi
21541
21542  fi
21543
21544
21545
21546  if test "x$ZIP" = x; then
21547    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21548  fi
21549
21550
21551
21552  # Non-required basic tools
21553
21554
21555
21556  # Publish this variable in the help.
21557
21558
21559  if [ -z "${LDD+x}" ]; then
21560    # The variable is not set by user, try to locate tool using the code snippet
21561    for ac_prog in ldd
21562do
21563  # Extract the first word of "$ac_prog", so it can be a program name with args.
21564set dummy $ac_prog; ac_word=$2
21565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21566$as_echo_n "checking for $ac_word... " >&6; }
21567if ${ac_cv_path_LDD+:} false; then :
21568  $as_echo_n "(cached) " >&6
21569else
21570  case $LDD in
21571  [\\/]* | ?:[\\/]*)
21572  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21573  ;;
21574  *)
21575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21576for as_dir in $PATH
21577do
21578  IFS=$as_save_IFS
21579  test -z "$as_dir" && as_dir=.
21580    for ac_exec_ext in '' $ac_executable_extensions; do
21581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21582    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21584    break 2
21585  fi
21586done
21587  done
21588IFS=$as_save_IFS
21589
21590  ;;
21591esac
21592fi
21593LDD=$ac_cv_path_LDD
21594if test -n "$LDD"; then
21595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21596$as_echo "$LDD" >&6; }
21597else
21598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21599$as_echo "no" >&6; }
21600fi
21601
21602
21603  test -n "$LDD" && break
21604done
21605
21606  else
21607    # The variable is set, but is it from the command line or the environment?
21608
21609    # Try to remove the string !LDD! from our list.
21610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21612      # If it failed, the variable was not from the command line. Ignore it,
21613      # but warn the user (except for BASH, which is always set by the calling BASH).
21614      if test "xLDD" != xBASH; then
21615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21616$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21617      fi
21618      # Try to locate tool using the code snippet
21619      for ac_prog in ldd
21620do
21621  # Extract the first word of "$ac_prog", so it can be a program name with args.
21622set dummy $ac_prog; ac_word=$2
21623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21624$as_echo_n "checking for $ac_word... " >&6; }
21625if ${ac_cv_path_LDD+:} false; then :
21626  $as_echo_n "(cached) " >&6
21627else
21628  case $LDD in
21629  [\\/]* | ?:[\\/]*)
21630  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21631  ;;
21632  *)
21633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21634for as_dir in $PATH
21635do
21636  IFS=$as_save_IFS
21637  test -z "$as_dir" && as_dir=.
21638    for ac_exec_ext in '' $ac_executable_extensions; do
21639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21640    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21642    break 2
21643  fi
21644done
21645  done
21646IFS=$as_save_IFS
21647
21648  ;;
21649esac
21650fi
21651LDD=$ac_cv_path_LDD
21652if test -n "$LDD"; then
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21654$as_echo "$LDD" >&6; }
21655else
21656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21657$as_echo "no" >&6; }
21658fi
21659
21660
21661  test -n "$LDD" && break
21662done
21663
21664    else
21665      # If it succeeded, then it was overridden by the user. We will use it
21666      # for the tool.
21667
21668      # First remove it from the list of overridden variables, so we can test
21669      # for unknown variables in the end.
21670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21671
21672      # Check if we try to supply an empty value
21673      if test "x$LDD" = x; then
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21675$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21677$as_echo_n "checking for LDD... " >&6; }
21678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21679$as_echo "disabled" >&6; }
21680      else
21681        # Check if the provided tool contains a complete path.
21682        tool_specified="$LDD"
21683        tool_basename="${tool_specified##*/}"
21684        if test "x$tool_basename" = "x$tool_specified"; then
21685          # A command without a complete path is provided, search $PATH.
21686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21687$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21688          # Extract the first word of "$tool_basename", so it can be a program name with args.
21689set dummy $tool_basename; ac_word=$2
21690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21691$as_echo_n "checking for $ac_word... " >&6; }
21692if ${ac_cv_path_LDD+:} false; then :
21693  $as_echo_n "(cached) " >&6
21694else
21695  case $LDD in
21696  [\\/]* | ?:[\\/]*)
21697  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21698  ;;
21699  *)
21700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21701for as_dir in $PATH
21702do
21703  IFS=$as_save_IFS
21704  test -z "$as_dir" && as_dir=.
21705    for ac_exec_ext in '' $ac_executable_extensions; do
21706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21707    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21709    break 2
21710  fi
21711done
21712  done
21713IFS=$as_save_IFS
21714
21715  ;;
21716esac
21717fi
21718LDD=$ac_cv_path_LDD
21719if test -n "$LDD"; then
21720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21721$as_echo "$LDD" >&6; }
21722else
21723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21724$as_echo "no" >&6; }
21725fi
21726
21727
21728          if test "x$LDD" = x; then
21729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21730          fi
21731        else
21732          # Otherwise we believe it is a complete path. Use it as it is.
21733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21734$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21736$as_echo_n "checking for LDD... " >&6; }
21737          if test ! -x "$tool_specified"; then
21738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21739$as_echo "not found" >&6; }
21740            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21741          fi
21742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21743$as_echo "$tool_specified" >&6; }
21744        fi
21745      fi
21746    fi
21747
21748  fi
21749
21750
21751  if test "x$LDD" = "x"; then
21752    # List shared lib dependencies is used for
21753    # debug output and checking for forbidden dependencies.
21754    # We can build without it.
21755    LDD="true"
21756  fi
21757
21758
21759  # Publish this variable in the help.
21760
21761
21762  if [ -z "${OTOOL+x}" ]; then
21763    # The variable is not set by user, try to locate tool using the code snippet
21764    for ac_prog in otool
21765do
21766  # Extract the first word of "$ac_prog", so it can be a program name with args.
21767set dummy $ac_prog; ac_word=$2
21768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21769$as_echo_n "checking for $ac_word... " >&6; }
21770if ${ac_cv_path_OTOOL+:} false; then :
21771  $as_echo_n "(cached) " >&6
21772else
21773  case $OTOOL in
21774  [\\/]* | ?:[\\/]*)
21775  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21776  ;;
21777  *)
21778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21779for as_dir in $PATH
21780do
21781  IFS=$as_save_IFS
21782  test -z "$as_dir" && as_dir=.
21783    for ac_exec_ext in '' $ac_executable_extensions; do
21784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21785    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21787    break 2
21788  fi
21789done
21790  done
21791IFS=$as_save_IFS
21792
21793  ;;
21794esac
21795fi
21796OTOOL=$ac_cv_path_OTOOL
21797if test -n "$OTOOL"; then
21798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21799$as_echo "$OTOOL" >&6; }
21800else
21801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21802$as_echo "no" >&6; }
21803fi
21804
21805
21806  test -n "$OTOOL" && break
21807done
21808
21809  else
21810    # The variable is set, but is it from the command line or the environment?
21811
21812    # Try to remove the string !OTOOL! from our list.
21813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21815      # If it failed, the variable was not from the command line. Ignore it,
21816      # but warn the user (except for BASH, which is always set by the calling BASH).
21817      if test "xOTOOL" != xBASH; then
21818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21819$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21820      fi
21821      # Try to locate tool using the code snippet
21822      for ac_prog in otool
21823do
21824  # Extract the first word of "$ac_prog", so it can be a program name with args.
21825set dummy $ac_prog; ac_word=$2
21826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21827$as_echo_n "checking for $ac_word... " >&6; }
21828if ${ac_cv_path_OTOOL+:} false; then :
21829  $as_echo_n "(cached) " >&6
21830else
21831  case $OTOOL in
21832  [\\/]* | ?:[\\/]*)
21833  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21834  ;;
21835  *)
21836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21837for as_dir in $PATH
21838do
21839  IFS=$as_save_IFS
21840  test -z "$as_dir" && as_dir=.
21841    for ac_exec_ext in '' $ac_executable_extensions; do
21842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21843    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21845    break 2
21846  fi
21847done
21848  done
21849IFS=$as_save_IFS
21850
21851  ;;
21852esac
21853fi
21854OTOOL=$ac_cv_path_OTOOL
21855if test -n "$OTOOL"; then
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21857$as_echo "$OTOOL" >&6; }
21858else
21859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21860$as_echo "no" >&6; }
21861fi
21862
21863
21864  test -n "$OTOOL" && break
21865done
21866
21867    else
21868      # If it succeeded, then it was overridden by the user. We will use it
21869      # for the tool.
21870
21871      # First remove it from the list of overridden variables, so we can test
21872      # for unknown variables in the end.
21873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21874
21875      # Check if we try to supply an empty value
21876      if test "x$OTOOL" = x; then
21877        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21878$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21880$as_echo_n "checking for OTOOL... " >&6; }
21881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21882$as_echo "disabled" >&6; }
21883      else
21884        # Check if the provided tool contains a complete path.
21885        tool_specified="$OTOOL"
21886        tool_basename="${tool_specified##*/}"
21887        if test "x$tool_basename" = "x$tool_specified"; then
21888          # A command without a complete path is provided, search $PATH.
21889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21890$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21891          # Extract the first word of "$tool_basename", so it can be a program name with args.
21892set dummy $tool_basename; ac_word=$2
21893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21894$as_echo_n "checking for $ac_word... " >&6; }
21895if ${ac_cv_path_OTOOL+:} false; then :
21896  $as_echo_n "(cached) " >&6
21897else
21898  case $OTOOL in
21899  [\\/]* | ?:[\\/]*)
21900  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21901  ;;
21902  *)
21903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21904for as_dir in $PATH
21905do
21906  IFS=$as_save_IFS
21907  test -z "$as_dir" && as_dir=.
21908    for ac_exec_ext in '' $ac_executable_extensions; do
21909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21910    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21912    break 2
21913  fi
21914done
21915  done
21916IFS=$as_save_IFS
21917
21918  ;;
21919esac
21920fi
21921OTOOL=$ac_cv_path_OTOOL
21922if test -n "$OTOOL"; then
21923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21924$as_echo "$OTOOL" >&6; }
21925else
21926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21927$as_echo "no" >&6; }
21928fi
21929
21930
21931          if test "x$OTOOL" = x; then
21932            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21933          fi
21934        else
21935          # Otherwise we believe it is a complete path. Use it as it is.
21936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21937$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21938          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21939$as_echo_n "checking for OTOOL... " >&6; }
21940          if test ! -x "$tool_specified"; then
21941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21942$as_echo "not found" >&6; }
21943            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21944          fi
21945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21946$as_echo "$tool_specified" >&6; }
21947        fi
21948      fi
21949    fi
21950
21951  fi
21952
21953
21954  if test "x$OTOOL" = "x"; then
21955    OTOOL="true"
21956  fi
21957
21958
21959  # Publish this variable in the help.
21960
21961
21962  if [ -z "${READELF+x}" ]; then
21963    # The variable is not set by user, try to locate tool using the code snippet
21964    for ac_prog in greadelf readelf
21965do
21966  # Extract the first word of "$ac_prog", so it can be a program name with args.
21967set dummy $ac_prog; ac_word=$2
21968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21969$as_echo_n "checking for $ac_word... " >&6; }
21970if ${ac_cv_path_READELF+:} false; then :
21971  $as_echo_n "(cached) " >&6
21972else
21973  case $READELF in
21974  [\\/]* | ?:[\\/]*)
21975  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21976  ;;
21977  *)
21978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21979for as_dir in $PATH
21980do
21981  IFS=$as_save_IFS
21982  test -z "$as_dir" && as_dir=.
21983    for ac_exec_ext in '' $ac_executable_extensions; do
21984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21985    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21987    break 2
21988  fi
21989done
21990  done
21991IFS=$as_save_IFS
21992
21993  ;;
21994esac
21995fi
21996READELF=$ac_cv_path_READELF
21997if test -n "$READELF"; then
21998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21999$as_echo "$READELF" >&6; }
22000else
22001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22002$as_echo "no" >&6; }
22003fi
22004
22005
22006  test -n "$READELF" && break
22007done
22008
22009  else
22010    # The variable is set, but is it from the command line or the environment?
22011
22012    # Try to remove the string !READELF! from our list.
22013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22015      # If it failed, the variable was not from the command line. Ignore it,
22016      # but warn the user (except for BASH, which is always set by the calling BASH).
22017      if test "xREADELF" != xBASH; then
22018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22019$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22020      fi
22021      # Try to locate tool using the code snippet
22022      for ac_prog in greadelf readelf
22023do
22024  # Extract the first word of "$ac_prog", so it can be a program name with args.
22025set dummy $ac_prog; ac_word=$2
22026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22027$as_echo_n "checking for $ac_word... " >&6; }
22028if ${ac_cv_path_READELF+:} false; then :
22029  $as_echo_n "(cached) " >&6
22030else
22031  case $READELF in
22032  [\\/]* | ?:[\\/]*)
22033  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22034  ;;
22035  *)
22036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22037for as_dir in $PATH
22038do
22039  IFS=$as_save_IFS
22040  test -z "$as_dir" && as_dir=.
22041    for ac_exec_ext in '' $ac_executable_extensions; do
22042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22043    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22045    break 2
22046  fi
22047done
22048  done
22049IFS=$as_save_IFS
22050
22051  ;;
22052esac
22053fi
22054READELF=$ac_cv_path_READELF
22055if test -n "$READELF"; then
22056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22057$as_echo "$READELF" >&6; }
22058else
22059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22060$as_echo "no" >&6; }
22061fi
22062
22063
22064  test -n "$READELF" && break
22065done
22066
22067    else
22068      # If it succeeded, then it was overridden by the user. We will use it
22069      # for the tool.
22070
22071      # First remove it from the list of overridden variables, so we can test
22072      # for unknown variables in the end.
22073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22074
22075      # Check if we try to supply an empty value
22076      if test "x$READELF" = x; then
22077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22078$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22080$as_echo_n "checking for READELF... " >&6; }
22081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22082$as_echo "disabled" >&6; }
22083      else
22084        # Check if the provided tool contains a complete path.
22085        tool_specified="$READELF"
22086        tool_basename="${tool_specified##*/}"
22087        if test "x$tool_basename" = "x$tool_specified"; then
22088          # A command without a complete path is provided, search $PATH.
22089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22090$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22091          # Extract the first word of "$tool_basename", so it can be a program name with args.
22092set dummy $tool_basename; ac_word=$2
22093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22094$as_echo_n "checking for $ac_word... " >&6; }
22095if ${ac_cv_path_READELF+:} false; then :
22096  $as_echo_n "(cached) " >&6
22097else
22098  case $READELF in
22099  [\\/]* | ?:[\\/]*)
22100  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22101  ;;
22102  *)
22103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22104for as_dir in $PATH
22105do
22106  IFS=$as_save_IFS
22107  test -z "$as_dir" && as_dir=.
22108    for ac_exec_ext in '' $ac_executable_extensions; do
22109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22110    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22112    break 2
22113  fi
22114done
22115  done
22116IFS=$as_save_IFS
22117
22118  ;;
22119esac
22120fi
22121READELF=$ac_cv_path_READELF
22122if test -n "$READELF"; then
22123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22124$as_echo "$READELF" >&6; }
22125else
22126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22127$as_echo "no" >&6; }
22128fi
22129
22130
22131          if test "x$READELF" = x; then
22132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22133          fi
22134        else
22135          # Otherwise we believe it is a complete path. Use it as it is.
22136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22137$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22139$as_echo_n "checking for READELF... " >&6; }
22140          if test ! -x "$tool_specified"; then
22141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22142$as_echo "not found" >&6; }
22143            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22144          fi
22145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22146$as_echo "$tool_specified" >&6; }
22147        fi
22148      fi
22149    fi
22150
22151  fi
22152
22153
22154
22155
22156  # Publish this variable in the help.
22157
22158
22159  if [ -z "${HG+x}" ]; then
22160    # The variable is not set by user, try to locate tool using the code snippet
22161    for ac_prog in hg
22162do
22163  # Extract the first word of "$ac_prog", so it can be a program name with args.
22164set dummy $ac_prog; ac_word=$2
22165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22166$as_echo_n "checking for $ac_word... " >&6; }
22167if ${ac_cv_path_HG+:} false; then :
22168  $as_echo_n "(cached) " >&6
22169else
22170  case $HG in
22171  [\\/]* | ?:[\\/]*)
22172  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22173  ;;
22174  *)
22175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22176for as_dir in $PATH
22177do
22178  IFS=$as_save_IFS
22179  test -z "$as_dir" && as_dir=.
22180    for ac_exec_ext in '' $ac_executable_extensions; do
22181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22182    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22184    break 2
22185  fi
22186done
22187  done
22188IFS=$as_save_IFS
22189
22190  ;;
22191esac
22192fi
22193HG=$ac_cv_path_HG
22194if test -n "$HG"; then
22195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22196$as_echo "$HG" >&6; }
22197else
22198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22199$as_echo "no" >&6; }
22200fi
22201
22202
22203  test -n "$HG" && break
22204done
22205
22206  else
22207    # The variable is set, but is it from the command line or the environment?
22208
22209    # Try to remove the string !HG! from our list.
22210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22212      # If it failed, the variable was not from the command line. Ignore it,
22213      # but warn the user (except for BASH, which is always set by the calling BASH).
22214      if test "xHG" != xBASH; then
22215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22216$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22217      fi
22218      # Try to locate tool using the code snippet
22219      for ac_prog in hg
22220do
22221  # Extract the first word of "$ac_prog", so it can be a program name with args.
22222set dummy $ac_prog; ac_word=$2
22223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22224$as_echo_n "checking for $ac_word... " >&6; }
22225if ${ac_cv_path_HG+:} false; then :
22226  $as_echo_n "(cached) " >&6
22227else
22228  case $HG in
22229  [\\/]* | ?:[\\/]*)
22230  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22231  ;;
22232  *)
22233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22234for as_dir in $PATH
22235do
22236  IFS=$as_save_IFS
22237  test -z "$as_dir" && as_dir=.
22238    for ac_exec_ext in '' $ac_executable_extensions; do
22239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22240    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22242    break 2
22243  fi
22244done
22245  done
22246IFS=$as_save_IFS
22247
22248  ;;
22249esac
22250fi
22251HG=$ac_cv_path_HG
22252if test -n "$HG"; then
22253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22254$as_echo "$HG" >&6; }
22255else
22256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22257$as_echo "no" >&6; }
22258fi
22259
22260
22261  test -n "$HG" && break
22262done
22263
22264    else
22265      # If it succeeded, then it was overridden by the user. We will use it
22266      # for the tool.
22267
22268      # First remove it from the list of overridden variables, so we can test
22269      # for unknown variables in the end.
22270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22271
22272      # Check if we try to supply an empty value
22273      if test "x$HG" = x; then
22274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22275$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22277$as_echo_n "checking for HG... " >&6; }
22278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22279$as_echo "disabled" >&6; }
22280      else
22281        # Check if the provided tool contains a complete path.
22282        tool_specified="$HG"
22283        tool_basename="${tool_specified##*/}"
22284        if test "x$tool_basename" = "x$tool_specified"; then
22285          # A command without a complete path is provided, search $PATH.
22286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22287$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22288          # Extract the first word of "$tool_basename", so it can be a program name with args.
22289set dummy $tool_basename; ac_word=$2
22290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22291$as_echo_n "checking for $ac_word... " >&6; }
22292if ${ac_cv_path_HG+:} false; then :
22293  $as_echo_n "(cached) " >&6
22294else
22295  case $HG in
22296  [\\/]* | ?:[\\/]*)
22297  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22298  ;;
22299  *)
22300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22301for as_dir in $PATH
22302do
22303  IFS=$as_save_IFS
22304  test -z "$as_dir" && as_dir=.
22305    for ac_exec_ext in '' $ac_executable_extensions; do
22306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22307    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22309    break 2
22310  fi
22311done
22312  done
22313IFS=$as_save_IFS
22314
22315  ;;
22316esac
22317fi
22318HG=$ac_cv_path_HG
22319if test -n "$HG"; then
22320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22321$as_echo "$HG" >&6; }
22322else
22323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22324$as_echo "no" >&6; }
22325fi
22326
22327
22328          if test "x$HG" = x; then
22329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22330          fi
22331        else
22332          # Otherwise we believe it is a complete path. Use it as it is.
22333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22334$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22336$as_echo_n "checking for HG... " >&6; }
22337          if test ! -x "$tool_specified"; then
22338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22339$as_echo "not found" >&6; }
22340            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22341          fi
22342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22343$as_echo "$tool_specified" >&6; }
22344        fi
22345      fi
22346    fi
22347
22348  fi
22349
22350
22351
22352
22353  # Publish this variable in the help.
22354
22355
22356  if [ -z "${STAT+x}" ]; then
22357    # The variable is not set by user, try to locate tool using the code snippet
22358    for ac_prog in stat
22359do
22360  # Extract the first word of "$ac_prog", so it can be a program name with args.
22361set dummy $ac_prog; ac_word=$2
22362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22363$as_echo_n "checking for $ac_word... " >&6; }
22364if ${ac_cv_path_STAT+:} false; then :
22365  $as_echo_n "(cached) " >&6
22366else
22367  case $STAT in
22368  [\\/]* | ?:[\\/]*)
22369  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22370  ;;
22371  *)
22372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22373for as_dir in $PATH
22374do
22375  IFS=$as_save_IFS
22376  test -z "$as_dir" && as_dir=.
22377    for ac_exec_ext in '' $ac_executable_extensions; do
22378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22379    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22381    break 2
22382  fi
22383done
22384  done
22385IFS=$as_save_IFS
22386
22387  ;;
22388esac
22389fi
22390STAT=$ac_cv_path_STAT
22391if test -n "$STAT"; then
22392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22393$as_echo "$STAT" >&6; }
22394else
22395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22396$as_echo "no" >&6; }
22397fi
22398
22399
22400  test -n "$STAT" && break
22401done
22402
22403  else
22404    # The variable is set, but is it from the command line or the environment?
22405
22406    # Try to remove the string !STAT! from our list.
22407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22409      # If it failed, the variable was not from the command line. Ignore it,
22410      # but warn the user (except for BASH, which is always set by the calling BASH).
22411      if test "xSTAT" != xBASH; then
22412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22413$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22414      fi
22415      # Try to locate tool using the code snippet
22416      for ac_prog in stat
22417do
22418  # Extract the first word of "$ac_prog", so it can be a program name with args.
22419set dummy $ac_prog; ac_word=$2
22420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22421$as_echo_n "checking for $ac_word... " >&6; }
22422if ${ac_cv_path_STAT+:} false; then :
22423  $as_echo_n "(cached) " >&6
22424else
22425  case $STAT in
22426  [\\/]* | ?:[\\/]*)
22427  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22428  ;;
22429  *)
22430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22431for as_dir in $PATH
22432do
22433  IFS=$as_save_IFS
22434  test -z "$as_dir" && as_dir=.
22435    for ac_exec_ext in '' $ac_executable_extensions; do
22436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22437    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22439    break 2
22440  fi
22441done
22442  done
22443IFS=$as_save_IFS
22444
22445  ;;
22446esac
22447fi
22448STAT=$ac_cv_path_STAT
22449if test -n "$STAT"; then
22450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22451$as_echo "$STAT" >&6; }
22452else
22453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22454$as_echo "no" >&6; }
22455fi
22456
22457
22458  test -n "$STAT" && break
22459done
22460
22461    else
22462      # If it succeeded, then it was overridden by the user. We will use it
22463      # for the tool.
22464
22465      # First remove it from the list of overridden variables, so we can test
22466      # for unknown variables in the end.
22467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22468
22469      # Check if we try to supply an empty value
22470      if test "x$STAT" = x; then
22471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22472$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22474$as_echo_n "checking for STAT... " >&6; }
22475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22476$as_echo "disabled" >&6; }
22477      else
22478        # Check if the provided tool contains a complete path.
22479        tool_specified="$STAT"
22480        tool_basename="${tool_specified##*/}"
22481        if test "x$tool_basename" = "x$tool_specified"; then
22482          # A command without a complete path is provided, search $PATH.
22483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22484$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22485          # Extract the first word of "$tool_basename", so it can be a program name with args.
22486set dummy $tool_basename; ac_word=$2
22487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22488$as_echo_n "checking for $ac_word... " >&6; }
22489if ${ac_cv_path_STAT+:} false; then :
22490  $as_echo_n "(cached) " >&6
22491else
22492  case $STAT in
22493  [\\/]* | ?:[\\/]*)
22494  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22495  ;;
22496  *)
22497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22498for as_dir in $PATH
22499do
22500  IFS=$as_save_IFS
22501  test -z "$as_dir" && as_dir=.
22502    for ac_exec_ext in '' $ac_executable_extensions; do
22503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22504    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22506    break 2
22507  fi
22508done
22509  done
22510IFS=$as_save_IFS
22511
22512  ;;
22513esac
22514fi
22515STAT=$ac_cv_path_STAT
22516if test -n "$STAT"; then
22517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22518$as_echo "$STAT" >&6; }
22519else
22520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22521$as_echo "no" >&6; }
22522fi
22523
22524
22525          if test "x$STAT" = x; then
22526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22527          fi
22528        else
22529          # Otherwise we believe it is a complete path. Use it as it is.
22530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22531$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22533$as_echo_n "checking for STAT... " >&6; }
22534          if test ! -x "$tool_specified"; then
22535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22536$as_echo "not found" >&6; }
22537            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22538          fi
22539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22540$as_echo "$tool_specified" >&6; }
22541        fi
22542      fi
22543    fi
22544
22545  fi
22546
22547
22548
22549
22550  # Publish this variable in the help.
22551
22552
22553  if [ -z "${TIME+x}" ]; then
22554    # The variable is not set by user, try to locate tool using the code snippet
22555    for ac_prog in time
22556do
22557  # Extract the first word of "$ac_prog", so it can be a program name with args.
22558set dummy $ac_prog; ac_word=$2
22559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22560$as_echo_n "checking for $ac_word... " >&6; }
22561if ${ac_cv_path_TIME+:} false; then :
22562  $as_echo_n "(cached) " >&6
22563else
22564  case $TIME in
22565  [\\/]* | ?:[\\/]*)
22566  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22567  ;;
22568  *)
22569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22570for as_dir in $PATH
22571do
22572  IFS=$as_save_IFS
22573  test -z "$as_dir" && as_dir=.
22574    for ac_exec_ext in '' $ac_executable_extensions; do
22575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22576    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22578    break 2
22579  fi
22580done
22581  done
22582IFS=$as_save_IFS
22583
22584  ;;
22585esac
22586fi
22587TIME=$ac_cv_path_TIME
22588if test -n "$TIME"; then
22589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22590$as_echo "$TIME" >&6; }
22591else
22592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22593$as_echo "no" >&6; }
22594fi
22595
22596
22597  test -n "$TIME" && break
22598done
22599
22600  else
22601    # The variable is set, but is it from the command line or the environment?
22602
22603    # Try to remove the string !TIME! from our list.
22604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22606      # If it failed, the variable was not from the command line. Ignore it,
22607      # but warn the user (except for BASH, which is always set by the calling BASH).
22608      if test "xTIME" != xBASH; then
22609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22610$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22611      fi
22612      # Try to locate tool using the code snippet
22613      for ac_prog in time
22614do
22615  # Extract the first word of "$ac_prog", so it can be a program name with args.
22616set dummy $ac_prog; ac_word=$2
22617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22618$as_echo_n "checking for $ac_word... " >&6; }
22619if ${ac_cv_path_TIME+:} false; then :
22620  $as_echo_n "(cached) " >&6
22621else
22622  case $TIME in
22623  [\\/]* | ?:[\\/]*)
22624  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22625  ;;
22626  *)
22627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22628for as_dir in $PATH
22629do
22630  IFS=$as_save_IFS
22631  test -z "$as_dir" && as_dir=.
22632    for ac_exec_ext in '' $ac_executable_extensions; do
22633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22634    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22636    break 2
22637  fi
22638done
22639  done
22640IFS=$as_save_IFS
22641
22642  ;;
22643esac
22644fi
22645TIME=$ac_cv_path_TIME
22646if test -n "$TIME"; then
22647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22648$as_echo "$TIME" >&6; }
22649else
22650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22651$as_echo "no" >&6; }
22652fi
22653
22654
22655  test -n "$TIME" && break
22656done
22657
22658    else
22659      # If it succeeded, then it was overridden by the user. We will use it
22660      # for the tool.
22661
22662      # First remove it from the list of overridden variables, so we can test
22663      # for unknown variables in the end.
22664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22665
22666      # Check if we try to supply an empty value
22667      if test "x$TIME" = x; then
22668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22669$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22671$as_echo_n "checking for TIME... " >&6; }
22672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22673$as_echo "disabled" >&6; }
22674      else
22675        # Check if the provided tool contains a complete path.
22676        tool_specified="$TIME"
22677        tool_basename="${tool_specified##*/}"
22678        if test "x$tool_basename" = "x$tool_specified"; then
22679          # A command without a complete path is provided, search $PATH.
22680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22681$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22682          # Extract the first word of "$tool_basename", so it can be a program name with args.
22683set dummy $tool_basename; ac_word=$2
22684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22685$as_echo_n "checking for $ac_word... " >&6; }
22686if ${ac_cv_path_TIME+:} false; then :
22687  $as_echo_n "(cached) " >&6
22688else
22689  case $TIME in
22690  [\\/]* | ?:[\\/]*)
22691  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22692  ;;
22693  *)
22694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22695for as_dir in $PATH
22696do
22697  IFS=$as_save_IFS
22698  test -z "$as_dir" && as_dir=.
22699    for ac_exec_ext in '' $ac_executable_extensions; do
22700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22701    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22703    break 2
22704  fi
22705done
22706  done
22707IFS=$as_save_IFS
22708
22709  ;;
22710esac
22711fi
22712TIME=$ac_cv_path_TIME
22713if test -n "$TIME"; then
22714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22715$as_echo "$TIME" >&6; }
22716else
22717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22718$as_echo "no" >&6; }
22719fi
22720
22721
22722          if test "x$TIME" = x; then
22723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22724          fi
22725        else
22726          # Otherwise we believe it is a complete path. Use it as it is.
22727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22728$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22730$as_echo_n "checking for TIME... " >&6; }
22731          if test ! -x "$tool_specified"; then
22732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22733$as_echo "not found" >&6; }
22734            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22735          fi
22736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22737$as_echo "$tool_specified" >&6; }
22738        fi
22739      fi
22740    fi
22741
22742  fi
22743
22744
22745  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22746  # be in the user path.
22747
22748
22749  # Publish this variable in the help.
22750
22751
22752  if [ -z "${DTRACE+x}" ]; then
22753    # The variable is not set by user, try to locate tool using the code snippet
22754    for ac_prog in dtrace
22755do
22756  # Extract the first word of "$ac_prog", so it can be a program name with args.
22757set dummy $ac_prog; ac_word=$2
22758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22759$as_echo_n "checking for $ac_word... " >&6; }
22760if ${ac_cv_path_DTRACE+:} false; then :
22761  $as_echo_n "(cached) " >&6
22762else
22763  case $DTRACE in
22764  [\\/]* | ?:[\\/]*)
22765  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22766  ;;
22767  *)
22768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22769as_dummy="$PATH:/usr/sbin"
22770for as_dir in $as_dummy
22771do
22772  IFS=$as_save_IFS
22773  test -z "$as_dir" && as_dir=.
22774    for ac_exec_ext in '' $ac_executable_extensions; do
22775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22776    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22778    break 2
22779  fi
22780done
22781  done
22782IFS=$as_save_IFS
22783
22784  ;;
22785esac
22786fi
22787DTRACE=$ac_cv_path_DTRACE
22788if test -n "$DTRACE"; then
22789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22790$as_echo "$DTRACE" >&6; }
22791else
22792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22793$as_echo "no" >&6; }
22794fi
22795
22796
22797  test -n "$DTRACE" && break
22798done
22799
22800  else
22801    # The variable is set, but is it from the command line or the environment?
22802
22803    # Try to remove the string !DTRACE! from our list.
22804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22806      # If it failed, the variable was not from the command line. Ignore it,
22807      # but warn the user (except for BASH, which is always set by the calling BASH).
22808      if test "xDTRACE" != xBASH; then
22809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22810$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22811      fi
22812      # Try to locate tool using the code snippet
22813      for ac_prog in dtrace
22814do
22815  # Extract the first word of "$ac_prog", so it can be a program name with args.
22816set dummy $ac_prog; ac_word=$2
22817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22818$as_echo_n "checking for $ac_word... " >&6; }
22819if ${ac_cv_path_DTRACE+:} false; then :
22820  $as_echo_n "(cached) " >&6
22821else
22822  case $DTRACE in
22823  [\\/]* | ?:[\\/]*)
22824  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22825  ;;
22826  *)
22827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22828as_dummy="$PATH:/usr/sbin"
22829for as_dir in $as_dummy
22830do
22831  IFS=$as_save_IFS
22832  test -z "$as_dir" && as_dir=.
22833    for ac_exec_ext in '' $ac_executable_extensions; do
22834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22835    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22837    break 2
22838  fi
22839done
22840  done
22841IFS=$as_save_IFS
22842
22843  ;;
22844esac
22845fi
22846DTRACE=$ac_cv_path_DTRACE
22847if test -n "$DTRACE"; then
22848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22849$as_echo "$DTRACE" >&6; }
22850else
22851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22852$as_echo "no" >&6; }
22853fi
22854
22855
22856  test -n "$DTRACE" && break
22857done
22858
22859    else
22860      # If it succeeded, then it was overridden by the user. We will use it
22861      # for the tool.
22862
22863      # First remove it from the list of overridden variables, so we can test
22864      # for unknown variables in the end.
22865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22866
22867      # Check if we try to supply an empty value
22868      if test "x$DTRACE" = x; then
22869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22870$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22872$as_echo_n "checking for DTRACE... " >&6; }
22873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22874$as_echo "disabled" >&6; }
22875      else
22876        # Check if the provided tool contains a complete path.
22877        tool_specified="$DTRACE"
22878        tool_basename="${tool_specified##*/}"
22879        if test "x$tool_basename" = "x$tool_specified"; then
22880          # A command without a complete path is provided, search $PATH.
22881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22882$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22883          # Extract the first word of "$tool_basename", so it can be a program name with args.
22884set dummy $tool_basename; ac_word=$2
22885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22886$as_echo_n "checking for $ac_word... " >&6; }
22887if ${ac_cv_path_DTRACE+:} false; then :
22888  $as_echo_n "(cached) " >&6
22889else
22890  case $DTRACE in
22891  [\\/]* | ?:[\\/]*)
22892  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22893  ;;
22894  *)
22895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22896for as_dir in $PATH
22897do
22898  IFS=$as_save_IFS
22899  test -z "$as_dir" && as_dir=.
22900    for ac_exec_ext in '' $ac_executable_extensions; do
22901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22902    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22904    break 2
22905  fi
22906done
22907  done
22908IFS=$as_save_IFS
22909
22910  ;;
22911esac
22912fi
22913DTRACE=$ac_cv_path_DTRACE
22914if test -n "$DTRACE"; then
22915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22916$as_echo "$DTRACE" >&6; }
22917else
22918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22919$as_echo "no" >&6; }
22920fi
22921
22922
22923          if test "x$DTRACE" = x; then
22924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22925          fi
22926        else
22927          # Otherwise we believe it is a complete path. Use it as it is.
22928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22929$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22931$as_echo_n "checking for DTRACE... " >&6; }
22932          if test ! -x "$tool_specified"; then
22933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22934$as_echo "not found" >&6; }
22935            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22936          fi
22937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22938$as_echo "$tool_specified" >&6; }
22939        fi
22940      fi
22941    fi
22942
22943  fi
22944
22945
22946
22947
22948  # Publish this variable in the help.
22949
22950
22951  if [ -z "${PATCH+x}" ]; then
22952    # The variable is not set by user, try to locate tool using the code snippet
22953    for ac_prog in gpatch patch
22954do
22955  # Extract the first word of "$ac_prog", so it can be a program name with args.
22956set dummy $ac_prog; ac_word=$2
22957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22958$as_echo_n "checking for $ac_word... " >&6; }
22959if ${ac_cv_path_PATCH+:} false; then :
22960  $as_echo_n "(cached) " >&6
22961else
22962  case $PATCH in
22963  [\\/]* | ?:[\\/]*)
22964  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22965  ;;
22966  *)
22967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22968for as_dir in $PATH
22969do
22970  IFS=$as_save_IFS
22971  test -z "$as_dir" && as_dir=.
22972    for ac_exec_ext in '' $ac_executable_extensions; do
22973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22974    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22976    break 2
22977  fi
22978done
22979  done
22980IFS=$as_save_IFS
22981
22982  ;;
22983esac
22984fi
22985PATCH=$ac_cv_path_PATCH
22986if test -n "$PATCH"; then
22987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22988$as_echo "$PATCH" >&6; }
22989else
22990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22991$as_echo "no" >&6; }
22992fi
22993
22994
22995  test -n "$PATCH" && break
22996done
22997
22998  else
22999    # The variable is set, but is it from the command line or the environment?
23000
23001    # Try to remove the string !PATCH! from our list.
23002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23004      # If it failed, the variable was not from the command line. Ignore it,
23005      # but warn the user (except for BASH, which is always set by the calling BASH).
23006      if test "xPATCH" != xBASH; then
23007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23008$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23009      fi
23010      # Try to locate tool using the code snippet
23011      for ac_prog in gpatch patch
23012do
23013  # Extract the first word of "$ac_prog", so it can be a program name with args.
23014set dummy $ac_prog; ac_word=$2
23015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23016$as_echo_n "checking for $ac_word... " >&6; }
23017if ${ac_cv_path_PATCH+:} false; then :
23018  $as_echo_n "(cached) " >&6
23019else
23020  case $PATCH in
23021  [\\/]* | ?:[\\/]*)
23022  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23023  ;;
23024  *)
23025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23026for as_dir in $PATH
23027do
23028  IFS=$as_save_IFS
23029  test -z "$as_dir" && as_dir=.
23030    for ac_exec_ext in '' $ac_executable_extensions; do
23031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23032    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23034    break 2
23035  fi
23036done
23037  done
23038IFS=$as_save_IFS
23039
23040  ;;
23041esac
23042fi
23043PATCH=$ac_cv_path_PATCH
23044if test -n "$PATCH"; then
23045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23046$as_echo "$PATCH" >&6; }
23047else
23048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23049$as_echo "no" >&6; }
23050fi
23051
23052
23053  test -n "$PATCH" && break
23054done
23055
23056    else
23057      # If it succeeded, then it was overridden by the user. We will use it
23058      # for the tool.
23059
23060      # First remove it from the list of overridden variables, so we can test
23061      # for unknown variables in the end.
23062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23063
23064      # Check if we try to supply an empty value
23065      if test "x$PATCH" = x; then
23066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23067$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23069$as_echo_n "checking for PATCH... " >&6; }
23070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23071$as_echo "disabled" >&6; }
23072      else
23073        # Check if the provided tool contains a complete path.
23074        tool_specified="$PATCH"
23075        tool_basename="${tool_specified##*/}"
23076        if test "x$tool_basename" = "x$tool_specified"; then
23077          # A command without a complete path is provided, search $PATH.
23078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23079$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23080          # Extract the first word of "$tool_basename", so it can be a program name with args.
23081set dummy $tool_basename; ac_word=$2
23082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23083$as_echo_n "checking for $ac_word... " >&6; }
23084if ${ac_cv_path_PATCH+:} false; then :
23085  $as_echo_n "(cached) " >&6
23086else
23087  case $PATCH in
23088  [\\/]* | ?:[\\/]*)
23089  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23090  ;;
23091  *)
23092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23093for as_dir in $PATH
23094do
23095  IFS=$as_save_IFS
23096  test -z "$as_dir" && as_dir=.
23097    for ac_exec_ext in '' $ac_executable_extensions; do
23098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23099    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23101    break 2
23102  fi
23103done
23104  done
23105IFS=$as_save_IFS
23106
23107  ;;
23108esac
23109fi
23110PATCH=$ac_cv_path_PATCH
23111if test -n "$PATCH"; then
23112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23113$as_echo "$PATCH" >&6; }
23114else
23115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23116$as_echo "no" >&6; }
23117fi
23118
23119
23120          if test "x$PATCH" = x; then
23121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23122          fi
23123        else
23124          # Otherwise we believe it is a complete path. Use it as it is.
23125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23126$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23128$as_echo_n "checking for PATCH... " >&6; }
23129          if test ! -x "$tool_specified"; then
23130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23131$as_echo "not found" >&6; }
23132            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23133          fi
23134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23135$as_echo "$tool_specified" >&6; }
23136        fi
23137      fi
23138    fi
23139
23140  fi
23141
23142
23143  # Check if it's GNU time
23144  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23145  if test "x$IS_GNU_TIME" != x; then
23146    IS_GNU_TIME=yes
23147  else
23148    IS_GNU_TIME=no
23149  fi
23150
23151
23152  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23153
23154
23155
23156  # Publish this variable in the help.
23157
23158
23159  if [ -z "${DSYMUTIL+x}" ]; then
23160    # The variable is not set by user, try to locate tool using the code snippet
23161    for ac_prog in dsymutil
23162do
23163  # Extract the first word of "$ac_prog", so it can be a program name with args.
23164set dummy $ac_prog; ac_word=$2
23165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23166$as_echo_n "checking for $ac_word... " >&6; }
23167if ${ac_cv_path_DSYMUTIL+:} false; then :
23168  $as_echo_n "(cached) " >&6
23169else
23170  case $DSYMUTIL in
23171  [\\/]* | ?:[\\/]*)
23172  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23173  ;;
23174  *)
23175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23176for as_dir in $PATH
23177do
23178  IFS=$as_save_IFS
23179  test -z "$as_dir" && as_dir=.
23180    for ac_exec_ext in '' $ac_executable_extensions; do
23181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23182    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23184    break 2
23185  fi
23186done
23187  done
23188IFS=$as_save_IFS
23189
23190  ;;
23191esac
23192fi
23193DSYMUTIL=$ac_cv_path_DSYMUTIL
23194if test -n "$DSYMUTIL"; then
23195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23196$as_echo "$DSYMUTIL" >&6; }
23197else
23198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23199$as_echo "no" >&6; }
23200fi
23201
23202
23203  test -n "$DSYMUTIL" && break
23204done
23205
23206  else
23207    # The variable is set, but is it from the command line or the environment?
23208
23209    # Try to remove the string !DSYMUTIL! from our list.
23210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23212      # If it failed, the variable was not from the command line. Ignore it,
23213      # but warn the user (except for BASH, which is always set by the calling BASH).
23214      if test "xDSYMUTIL" != xBASH; then
23215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23216$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23217      fi
23218      # Try to locate tool using the code snippet
23219      for ac_prog in dsymutil
23220do
23221  # Extract the first word of "$ac_prog", so it can be a program name with args.
23222set dummy $ac_prog; ac_word=$2
23223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23224$as_echo_n "checking for $ac_word... " >&6; }
23225if ${ac_cv_path_DSYMUTIL+:} false; then :
23226  $as_echo_n "(cached) " >&6
23227else
23228  case $DSYMUTIL in
23229  [\\/]* | ?:[\\/]*)
23230  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23231  ;;
23232  *)
23233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23234for as_dir in $PATH
23235do
23236  IFS=$as_save_IFS
23237  test -z "$as_dir" && as_dir=.
23238    for ac_exec_ext in '' $ac_executable_extensions; do
23239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23240    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23242    break 2
23243  fi
23244done
23245  done
23246IFS=$as_save_IFS
23247
23248  ;;
23249esac
23250fi
23251DSYMUTIL=$ac_cv_path_DSYMUTIL
23252if test -n "$DSYMUTIL"; then
23253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23254$as_echo "$DSYMUTIL" >&6; }
23255else
23256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23257$as_echo "no" >&6; }
23258fi
23259
23260
23261  test -n "$DSYMUTIL" && break
23262done
23263
23264    else
23265      # If it succeeded, then it was overridden by the user. We will use it
23266      # for the tool.
23267
23268      # First remove it from the list of overridden variables, so we can test
23269      # for unknown variables in the end.
23270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23271
23272      # Check if we try to supply an empty value
23273      if test "x$DSYMUTIL" = x; then
23274        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23275$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23277$as_echo_n "checking for DSYMUTIL... " >&6; }
23278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23279$as_echo "disabled" >&6; }
23280      else
23281        # Check if the provided tool contains a complete path.
23282        tool_specified="$DSYMUTIL"
23283        tool_basename="${tool_specified##*/}"
23284        if test "x$tool_basename" = "x$tool_specified"; then
23285          # A command without a complete path is provided, search $PATH.
23286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23287$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23288          # Extract the first word of "$tool_basename", so it can be a program name with args.
23289set dummy $tool_basename; ac_word=$2
23290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23291$as_echo_n "checking for $ac_word... " >&6; }
23292if ${ac_cv_path_DSYMUTIL+:} false; then :
23293  $as_echo_n "(cached) " >&6
23294else
23295  case $DSYMUTIL in
23296  [\\/]* | ?:[\\/]*)
23297  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23298  ;;
23299  *)
23300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23301for as_dir in $PATH
23302do
23303  IFS=$as_save_IFS
23304  test -z "$as_dir" && as_dir=.
23305    for ac_exec_ext in '' $ac_executable_extensions; do
23306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23307    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23309    break 2
23310  fi
23311done
23312  done
23313IFS=$as_save_IFS
23314
23315  ;;
23316esac
23317fi
23318DSYMUTIL=$ac_cv_path_DSYMUTIL
23319if test -n "$DSYMUTIL"; then
23320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23321$as_echo "$DSYMUTIL" >&6; }
23322else
23323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23324$as_echo "no" >&6; }
23325fi
23326
23327
23328          if test "x$DSYMUTIL" = x; then
23329            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23330          fi
23331        else
23332          # Otherwise we believe it is a complete path. Use it as it is.
23333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23334$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23336$as_echo_n "checking for DSYMUTIL... " >&6; }
23337          if test ! -x "$tool_specified"; then
23338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23339$as_echo "not found" >&6; }
23340            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23341          fi
23342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23343$as_echo "$tool_specified" >&6; }
23344        fi
23345      fi
23346    fi
23347
23348  fi
23349
23350
23351
23352  if test "x$DSYMUTIL" = x; then
23353    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23354  fi
23355
23356
23357
23358
23359
23360  # Publish this variable in the help.
23361
23362
23363  if [ -z "${XATTR+x}" ]; then
23364    # The variable is not set by user, try to locate tool using the code snippet
23365    for ac_prog in xattr
23366do
23367  # Extract the first word of "$ac_prog", so it can be a program name with args.
23368set dummy $ac_prog; ac_word=$2
23369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23370$as_echo_n "checking for $ac_word... " >&6; }
23371if ${ac_cv_path_XATTR+:} false; then :
23372  $as_echo_n "(cached) " >&6
23373else
23374  case $XATTR in
23375  [\\/]* | ?:[\\/]*)
23376  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23377  ;;
23378  *)
23379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23380for as_dir in $PATH
23381do
23382  IFS=$as_save_IFS
23383  test -z "$as_dir" && as_dir=.
23384    for ac_exec_ext in '' $ac_executable_extensions; do
23385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23386    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23388    break 2
23389  fi
23390done
23391  done
23392IFS=$as_save_IFS
23393
23394  ;;
23395esac
23396fi
23397XATTR=$ac_cv_path_XATTR
23398if test -n "$XATTR"; then
23399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23400$as_echo "$XATTR" >&6; }
23401else
23402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23403$as_echo "no" >&6; }
23404fi
23405
23406
23407  test -n "$XATTR" && break
23408done
23409
23410  else
23411    # The variable is set, but is it from the command line or the environment?
23412
23413    # Try to remove the string !XATTR! from our list.
23414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23416      # If it failed, the variable was not from the command line. Ignore it,
23417      # but warn the user (except for BASH, which is always set by the calling BASH).
23418      if test "xXATTR" != xBASH; then
23419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23420$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23421      fi
23422      # Try to locate tool using the code snippet
23423      for ac_prog in xattr
23424do
23425  # Extract the first word of "$ac_prog", so it can be a program name with args.
23426set dummy $ac_prog; ac_word=$2
23427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23428$as_echo_n "checking for $ac_word... " >&6; }
23429if ${ac_cv_path_XATTR+:} false; then :
23430  $as_echo_n "(cached) " >&6
23431else
23432  case $XATTR in
23433  [\\/]* | ?:[\\/]*)
23434  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23435  ;;
23436  *)
23437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23438for as_dir in $PATH
23439do
23440  IFS=$as_save_IFS
23441  test -z "$as_dir" && as_dir=.
23442    for ac_exec_ext in '' $ac_executable_extensions; do
23443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23444    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23446    break 2
23447  fi
23448done
23449  done
23450IFS=$as_save_IFS
23451
23452  ;;
23453esac
23454fi
23455XATTR=$ac_cv_path_XATTR
23456if test -n "$XATTR"; then
23457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23458$as_echo "$XATTR" >&6; }
23459else
23460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23461$as_echo "no" >&6; }
23462fi
23463
23464
23465  test -n "$XATTR" && break
23466done
23467
23468    else
23469      # If it succeeded, then it was overridden by the user. We will use it
23470      # for the tool.
23471
23472      # First remove it from the list of overridden variables, so we can test
23473      # for unknown variables in the end.
23474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23475
23476      # Check if we try to supply an empty value
23477      if test "x$XATTR" = x; then
23478        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23479$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23481$as_echo_n "checking for XATTR... " >&6; }
23482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23483$as_echo "disabled" >&6; }
23484      else
23485        # Check if the provided tool contains a complete path.
23486        tool_specified="$XATTR"
23487        tool_basename="${tool_specified##*/}"
23488        if test "x$tool_basename" = "x$tool_specified"; then
23489          # A command without a complete path is provided, search $PATH.
23490          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23491$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23492          # Extract the first word of "$tool_basename", so it can be a program name with args.
23493set dummy $tool_basename; ac_word=$2
23494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23495$as_echo_n "checking for $ac_word... " >&6; }
23496if ${ac_cv_path_XATTR+:} false; then :
23497  $as_echo_n "(cached) " >&6
23498else
23499  case $XATTR in
23500  [\\/]* | ?:[\\/]*)
23501  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23502  ;;
23503  *)
23504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23505for as_dir in $PATH
23506do
23507  IFS=$as_save_IFS
23508  test -z "$as_dir" && as_dir=.
23509    for ac_exec_ext in '' $ac_executable_extensions; do
23510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23511    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23513    break 2
23514  fi
23515done
23516  done
23517IFS=$as_save_IFS
23518
23519  ;;
23520esac
23521fi
23522XATTR=$ac_cv_path_XATTR
23523if test -n "$XATTR"; then
23524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23525$as_echo "$XATTR" >&6; }
23526else
23527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23528$as_echo "no" >&6; }
23529fi
23530
23531
23532          if test "x$XATTR" = x; then
23533            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23534          fi
23535        else
23536          # Otherwise we believe it is a complete path. Use it as it is.
23537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23538$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23539          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23540$as_echo_n "checking for XATTR... " >&6; }
23541          if test ! -x "$tool_specified"; then
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23543$as_echo "not found" >&6; }
23544            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23545          fi
23546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23547$as_echo "$tool_specified" >&6; }
23548        fi
23549      fi
23550    fi
23551
23552  fi
23553
23554
23555
23556  if test "x$XATTR" = x; then
23557    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23558  fi
23559
23560
23561
23562
23563  # Publish this variable in the help.
23564
23565
23566  if [ -z "${CODESIGN+x}" ]; then
23567    # The variable is not set by user, try to locate tool using the code snippet
23568    for ac_prog in codesign
23569do
23570  # Extract the first word of "$ac_prog", so it can be a program name with args.
23571set dummy $ac_prog; ac_word=$2
23572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23573$as_echo_n "checking for $ac_word... " >&6; }
23574if ${ac_cv_path_CODESIGN+:} false; then :
23575  $as_echo_n "(cached) " >&6
23576else
23577  case $CODESIGN in
23578  [\\/]* | ?:[\\/]*)
23579  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23580  ;;
23581  *)
23582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23583for as_dir in $PATH
23584do
23585  IFS=$as_save_IFS
23586  test -z "$as_dir" && as_dir=.
23587    for ac_exec_ext in '' $ac_executable_extensions; do
23588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23589    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23591    break 2
23592  fi
23593done
23594  done
23595IFS=$as_save_IFS
23596
23597  ;;
23598esac
23599fi
23600CODESIGN=$ac_cv_path_CODESIGN
23601if test -n "$CODESIGN"; then
23602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23603$as_echo "$CODESIGN" >&6; }
23604else
23605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23606$as_echo "no" >&6; }
23607fi
23608
23609
23610  test -n "$CODESIGN" && break
23611done
23612
23613  else
23614    # The variable is set, but is it from the command line or the environment?
23615
23616    # Try to remove the string !CODESIGN! from our list.
23617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23619      # If it failed, the variable was not from the command line. Ignore it,
23620      # but warn the user (except for BASH, which is always set by the calling BASH).
23621      if test "xCODESIGN" != xBASH; then
23622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23623$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23624      fi
23625      # Try to locate tool using the code snippet
23626      for ac_prog in codesign
23627do
23628  # Extract the first word of "$ac_prog", so it can be a program name with args.
23629set dummy $ac_prog; ac_word=$2
23630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23631$as_echo_n "checking for $ac_word... " >&6; }
23632if ${ac_cv_path_CODESIGN+:} false; then :
23633  $as_echo_n "(cached) " >&6
23634else
23635  case $CODESIGN in
23636  [\\/]* | ?:[\\/]*)
23637  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23638  ;;
23639  *)
23640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23641for as_dir in $PATH
23642do
23643  IFS=$as_save_IFS
23644  test -z "$as_dir" && as_dir=.
23645    for ac_exec_ext in '' $ac_executable_extensions; do
23646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23647    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23649    break 2
23650  fi
23651done
23652  done
23653IFS=$as_save_IFS
23654
23655  ;;
23656esac
23657fi
23658CODESIGN=$ac_cv_path_CODESIGN
23659if test -n "$CODESIGN"; then
23660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23661$as_echo "$CODESIGN" >&6; }
23662else
23663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23664$as_echo "no" >&6; }
23665fi
23666
23667
23668  test -n "$CODESIGN" && break
23669done
23670
23671    else
23672      # If it succeeded, then it was overridden by the user. We will use it
23673      # for the tool.
23674
23675      # First remove it from the list of overridden variables, so we can test
23676      # for unknown variables in the end.
23677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23678
23679      # Check if we try to supply an empty value
23680      if test "x$CODESIGN" = x; then
23681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23682$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23684$as_echo_n "checking for CODESIGN... " >&6; }
23685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23686$as_echo "disabled" >&6; }
23687      else
23688        # Check if the provided tool contains a complete path.
23689        tool_specified="$CODESIGN"
23690        tool_basename="${tool_specified##*/}"
23691        if test "x$tool_basename" = "x$tool_specified"; then
23692          # A command without a complete path is provided, search $PATH.
23693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23694$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23695          # Extract the first word of "$tool_basename", so it can be a program name with args.
23696set dummy $tool_basename; ac_word=$2
23697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23698$as_echo_n "checking for $ac_word... " >&6; }
23699if ${ac_cv_path_CODESIGN+:} false; then :
23700  $as_echo_n "(cached) " >&6
23701else
23702  case $CODESIGN in
23703  [\\/]* | ?:[\\/]*)
23704  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23705  ;;
23706  *)
23707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23708for as_dir in $PATH
23709do
23710  IFS=$as_save_IFS
23711  test -z "$as_dir" && as_dir=.
23712    for ac_exec_ext in '' $ac_executable_extensions; do
23713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23714    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23716    break 2
23717  fi
23718done
23719  done
23720IFS=$as_save_IFS
23721
23722  ;;
23723esac
23724fi
23725CODESIGN=$ac_cv_path_CODESIGN
23726if test -n "$CODESIGN"; then
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23728$as_echo "$CODESIGN" >&6; }
23729else
23730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23731$as_echo "no" >&6; }
23732fi
23733
23734
23735          if test "x$CODESIGN" = x; then
23736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23737          fi
23738        else
23739          # Otherwise we believe it is a complete path. Use it as it is.
23740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23741$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23743$as_echo_n "checking for CODESIGN... " >&6; }
23744          if test ! -x "$tool_specified"; then
23745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23746$as_echo "not found" >&6; }
23747            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23748          fi
23749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23750$as_echo "$tool_specified" >&6; }
23751        fi
23752      fi
23753    fi
23754
23755  fi
23756
23757
23758    if test "x$CODESIGN" != "x"; then
23759      # Verify that the openjdk_codesign certificate is present
23760      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23761$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23762      $RM codesign-testfile
23763      $TOUCH codesign-testfile
23764      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23765      $RM codesign-testfile
23766      if test "x$CODESIGN" = x; then
23767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23768$as_echo "no" >&6; }
23769      else
23770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23771$as_echo "yes" >&6; }
23772      fi
23773    fi
23774
23775
23776
23777  # Publish this variable in the help.
23778
23779
23780  if [ -z "${SETFILE+x}" ]; then
23781    # The variable is not set by user, try to locate tool using the code snippet
23782    for ac_prog in SetFile
23783do
23784  # Extract the first word of "$ac_prog", so it can be a program name with args.
23785set dummy $ac_prog; ac_word=$2
23786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23787$as_echo_n "checking for $ac_word... " >&6; }
23788if ${ac_cv_path_SETFILE+:} false; then :
23789  $as_echo_n "(cached) " >&6
23790else
23791  case $SETFILE in
23792  [\\/]* | ?:[\\/]*)
23793  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23794  ;;
23795  *)
23796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23797for as_dir in $PATH
23798do
23799  IFS=$as_save_IFS
23800  test -z "$as_dir" && as_dir=.
23801    for ac_exec_ext in '' $ac_executable_extensions; do
23802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23803    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23805    break 2
23806  fi
23807done
23808  done
23809IFS=$as_save_IFS
23810
23811  ;;
23812esac
23813fi
23814SETFILE=$ac_cv_path_SETFILE
23815if test -n "$SETFILE"; then
23816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23817$as_echo "$SETFILE" >&6; }
23818else
23819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23820$as_echo "no" >&6; }
23821fi
23822
23823
23824  test -n "$SETFILE" && break
23825done
23826
23827  else
23828    # The variable is set, but is it from the command line or the environment?
23829
23830    # Try to remove the string !SETFILE! from our list.
23831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23833      # If it failed, the variable was not from the command line. Ignore it,
23834      # but warn the user (except for BASH, which is always set by the calling BASH).
23835      if test "xSETFILE" != xBASH; then
23836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23837$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23838      fi
23839      # Try to locate tool using the code snippet
23840      for ac_prog in SetFile
23841do
23842  # Extract the first word of "$ac_prog", so it can be a program name with args.
23843set dummy $ac_prog; ac_word=$2
23844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23845$as_echo_n "checking for $ac_word... " >&6; }
23846if ${ac_cv_path_SETFILE+:} false; then :
23847  $as_echo_n "(cached) " >&6
23848else
23849  case $SETFILE in
23850  [\\/]* | ?:[\\/]*)
23851  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23852  ;;
23853  *)
23854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23855for as_dir in $PATH
23856do
23857  IFS=$as_save_IFS
23858  test -z "$as_dir" && as_dir=.
23859    for ac_exec_ext in '' $ac_executable_extensions; do
23860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23861    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23863    break 2
23864  fi
23865done
23866  done
23867IFS=$as_save_IFS
23868
23869  ;;
23870esac
23871fi
23872SETFILE=$ac_cv_path_SETFILE
23873if test -n "$SETFILE"; then
23874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23875$as_echo "$SETFILE" >&6; }
23876else
23877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23878$as_echo "no" >&6; }
23879fi
23880
23881
23882  test -n "$SETFILE" && break
23883done
23884
23885    else
23886      # If it succeeded, then it was overridden by the user. We will use it
23887      # for the tool.
23888
23889      # First remove it from the list of overridden variables, so we can test
23890      # for unknown variables in the end.
23891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23892
23893      # Check if we try to supply an empty value
23894      if test "x$SETFILE" = x; then
23895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23896$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23898$as_echo_n "checking for SETFILE... " >&6; }
23899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23900$as_echo "disabled" >&6; }
23901      else
23902        # Check if the provided tool contains a complete path.
23903        tool_specified="$SETFILE"
23904        tool_basename="${tool_specified##*/}"
23905        if test "x$tool_basename" = "x$tool_specified"; then
23906          # A command without a complete path is provided, search $PATH.
23907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23908$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23909          # Extract the first word of "$tool_basename", so it can be a program name with args.
23910set dummy $tool_basename; ac_word=$2
23911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23912$as_echo_n "checking for $ac_word... " >&6; }
23913if ${ac_cv_path_SETFILE+:} false; then :
23914  $as_echo_n "(cached) " >&6
23915else
23916  case $SETFILE in
23917  [\\/]* | ?:[\\/]*)
23918  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23919  ;;
23920  *)
23921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23922for as_dir in $PATH
23923do
23924  IFS=$as_save_IFS
23925  test -z "$as_dir" && as_dir=.
23926    for ac_exec_ext in '' $ac_executable_extensions; do
23927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23928    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23930    break 2
23931  fi
23932done
23933  done
23934IFS=$as_save_IFS
23935
23936  ;;
23937esac
23938fi
23939SETFILE=$ac_cv_path_SETFILE
23940if test -n "$SETFILE"; then
23941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23942$as_echo "$SETFILE" >&6; }
23943else
23944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23945$as_echo "no" >&6; }
23946fi
23947
23948
23949          if test "x$SETFILE" = x; then
23950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23951          fi
23952        else
23953          # Otherwise we believe it is a complete path. Use it as it is.
23954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23955$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23957$as_echo_n "checking for SETFILE... " >&6; }
23958          if test ! -x "$tool_specified"; then
23959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23960$as_echo "not found" >&6; }
23961            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23962          fi
23963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23964$as_echo "$tool_specified" >&6; }
23965        fi
23966      fi
23967    fi
23968
23969  fi
23970
23971
23972
23973  if test "x$SETFILE" = x; then
23974    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23975  fi
23976
23977
23978  fi
23979
23980
23981  # Test if bash supports pipefail.
23982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23983$as_echo_n "checking if bash supports pipefail... " >&6; }
23984  if ${BASH} -c 'set -o pipefail'; then
23985    BASH_ARGS="$BASH_ARGS -o pipefail"
23986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23987$as_echo "yes" >&6; }
23988  else
23989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23990$as_echo "no" >&6; }
23991  fi
23992
23993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23994$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23995  if ${BASH} -e -c 'true'; then
23996    BASH_ARGS="$BASH_ARGS -e"
23997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23998$as_echo "yes" >&6; }
23999  else
24000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24001$as_echo "no" >&6; }
24002  fi
24003
24004
24005
24006
24007# Check if pkg-config is available.
24008
24009
24010if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24011	if test -n "$ac_tool_prefix"; then
24012  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24013set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24015$as_echo_n "checking for $ac_word... " >&6; }
24016if ${ac_cv_path_PKG_CONFIG+:} false; then :
24017  $as_echo_n "(cached) " >&6
24018else
24019  case $PKG_CONFIG in
24020  [\\/]* | ?:[\\/]*)
24021  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24022  ;;
24023  *)
24024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24025for as_dir in $PATH
24026do
24027  IFS=$as_save_IFS
24028  test -z "$as_dir" && as_dir=.
24029    for ac_exec_ext in '' $ac_executable_extensions; do
24030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24031    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24033    break 2
24034  fi
24035done
24036  done
24037IFS=$as_save_IFS
24038
24039  ;;
24040esac
24041fi
24042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24043if test -n "$PKG_CONFIG"; then
24044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24045$as_echo "$PKG_CONFIG" >&6; }
24046else
24047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24048$as_echo "no" >&6; }
24049fi
24050
24051
24052fi
24053if test -z "$ac_cv_path_PKG_CONFIG"; then
24054  ac_pt_PKG_CONFIG=$PKG_CONFIG
24055  # Extract the first word of "pkg-config", so it can be a program name with args.
24056set dummy pkg-config; ac_word=$2
24057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24058$as_echo_n "checking for $ac_word... " >&6; }
24059if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24060  $as_echo_n "(cached) " >&6
24061else
24062  case $ac_pt_PKG_CONFIG in
24063  [\\/]* | ?:[\\/]*)
24064  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24065  ;;
24066  *)
24067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24068for as_dir in $PATH
24069do
24070  IFS=$as_save_IFS
24071  test -z "$as_dir" && as_dir=.
24072    for ac_exec_ext in '' $ac_executable_extensions; do
24073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24074    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24076    break 2
24077  fi
24078done
24079  done
24080IFS=$as_save_IFS
24081
24082  ;;
24083esac
24084fi
24085ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24086if test -n "$ac_pt_PKG_CONFIG"; then
24087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24088$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24089else
24090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24091$as_echo "no" >&6; }
24092fi
24093
24094  if test "x$ac_pt_PKG_CONFIG" = x; then
24095    PKG_CONFIG=""
24096  else
24097    case $cross_compiling:$ac_tool_warned in
24098yes:)
24099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24101ac_tool_warned=yes ;;
24102esac
24103    PKG_CONFIG=$ac_pt_PKG_CONFIG
24104  fi
24105else
24106  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24107fi
24108
24109fi
24110if test -n "$PKG_CONFIG"; then
24111	_pkg_min_version=0.9.0
24112	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24113$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24114	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24115		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24116$as_echo "yes" >&6; }
24117	else
24118		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24119$as_echo "no" >&6; }
24120		PKG_CONFIG=""
24121	fi
24122
24123fi
24124
24125# After basic tools have been setup, we can check build os specific details.
24126
24127  ###############################################################################
24128
24129  # Note that this is the build platform OS version!
24130
24131  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24132  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24133  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24134  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24135
24136
24137
24138
24139
24140# Misc basic settings
24141
24142
24143# Check whether --with-default-make-target was given.
24144if test "${with_default_make_target+set}" = set; then :
24145  withval=$with_default_make_target;
24146fi
24147
24148  if test "x$with_default_make_target" = "x" \
24149      || test "x$with_default_make_target" = "xyes"; then
24150    DEFAULT_MAKE_TARGET="exploded-image"
24151  elif test "x$with_default_make_target" = "xno"; then
24152    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24153  else
24154    DEFAULT_MAKE_TARGET="$with_default_make_target"
24155  fi
24156
24157
24158
24159
24160###############################################################################
24161#
24162# Determine OpenJDK variants, options and version numbers.
24163#
24164###############################################################################
24165
24166# We need build & target for this.
24167
24168  # Should we build a JDK without a graphical UI?
24169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24170$as_echo_n "checking headless only... " >&6; }
24171  # Check whether --enable-headless-only was given.
24172if test "${enable_headless_only+set}" = set; then :
24173  enableval=$enable_headless_only;
24174fi
24175
24176
24177  if test "x$enable_headless_only" = "xyes"; then
24178    ENABLE_HEADLESS_ONLY="true"
24179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24180$as_echo "yes" >&6; }
24181  elif test "x$enable_headless_only" = "xno"; then
24182    ENABLE_HEADLESS_ONLY="false"
24183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24184$as_echo "no" >&6; }
24185  elif test "x$enable_headless_only" = "x"; then
24186    ENABLE_HEADLESS_ONLY="false"
24187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24188$as_echo "no" >&6; }
24189  else
24190    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24191  fi
24192
24193
24194
24195  # Choose cacerts source file
24196
24197# Check whether --with-cacerts-file was given.
24198if test "${with_cacerts_file+set}" = set; then :
24199  withval=$with_cacerts_file;
24200fi
24201
24202  if test "x$with_cacerts_file" != x; then
24203    CACERTS_FILE=$with_cacerts_file
24204  fi
24205
24206
24207  # Enable or disable unlimited crypto
24208  # Check whether --enable-unlimited-crypto was given.
24209if test "${enable_unlimited_crypto+set}" = set; then :
24210  enableval=$enable_unlimited_crypto;
24211else
24212  enable_unlimited_crypto=no
24213fi
24214
24215  if test "x$enable_unlimited_crypto" = "xyes"; then
24216    UNLIMITED_CRYPTO=true
24217  else
24218    UNLIMITED_CRYPTO=false
24219  fi
24220
24221
24222  # Should we build the serviceability agent (SA)?
24223  INCLUDE_SA=true
24224  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24225    INCLUDE_SA=false
24226  fi
24227  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24228    INCLUDE_SA=false
24229  fi
24230
24231
24232  # Compress jars
24233  COMPRESS_JARS=false
24234
24235
24236
24237  # Setup default copyright year. Mostly overridden when building close to a new year.
24238
24239# Check whether --with-copyright-year was given.
24240if test "${with_copyright_year+set}" = set; then :
24241  withval=$with_copyright_year;
24242fi
24243
24244  if test "x$with_copyright_year" = xyes; then
24245    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24246  elif test "x$with_copyright_year" != x; then
24247    COPYRIGHT_YEAR="$with_copyright_year"
24248  else
24249    COPYRIGHT_YEAR=`$DATE +'%Y'`
24250  fi
24251
24252
24253
24254  # Check whether --enable-keep-packaged-modules was given.
24255if test "${enable_keep_packaged_modules+set}" = set; then :
24256  enableval=$enable_keep_packaged_modules;
24257fi
24258
24259
24260  if test "x$enable_keep_packaged_modules" = "xyes"; then
24261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24262$as_echo_n "checking if packaged modules are kept... " >&6; }
24263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24264$as_echo "yes" >&6; }
24265    JLINK_KEEP_PACKAGED_MODULES=true
24266  elif test "x$enable_keep_packaged_modules" = "xno"; then
24267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24268$as_echo_n "checking if packaged modules are kept... " >&6; }
24269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24270$as_echo "no" >&6; }
24271    JLINK_KEEP_PACKAGED_MODULES=false
24272  elif test "x$enable_keep_packaged_modules" = "x"; then
24273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24274$as_echo "yes (default)" >&6; }
24275    JLINK_KEEP_PACKAGED_MODULES=true
24276  else
24277    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24278  fi
24279
24280
24281
24282
24283  # Warn user that old version arguments are deprecated.
24284
24285
24286# Check whether --with-milestone was given.
24287if test "${with_milestone+set}" = set; then :
24288  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24289$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24290fi
24291
24292
24293
24294
24295# Check whether --with-update-version was given.
24296if test "${with_update_version+set}" = set; then :
24297  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24298$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24299fi
24300
24301
24302
24303
24304# Check whether --with-user-release-suffix was given.
24305if test "${with_user_release_suffix+set}" = set; then :
24306  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
24307$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24308fi
24309
24310
24311
24312
24313# Check whether --with-build-number was given.
24314if test "${with_build_number+set}" = set; then :
24315  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24316$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24317fi
24318
24319
24320
24321  # Source the version numbers file
24322  . $AUTOCONF_DIR/version-numbers
24323
24324  # Some non-version number information is set in that file
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334  # Override version from arguments
24335
24336  # If --with-version-string is set, process it first. It is possible to
24337  # override parts with more specific flags, since these are processed later.
24338
24339# Check whether --with-version-string was given.
24340if test "${with_version_string+set}" = set; then :
24341  withval=$with_version_string;
24342fi
24343
24344  if test "x$with_version_string" = xyes; then
24345    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24346  elif test "x$with_version_string" != x; then
24347    # Additional [] needed to keep m4 from mangling shell constructs.
24348    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24349      VERSION_MAJOR=${BASH_REMATCH[1]}
24350      VERSION_MINOR=${BASH_REMATCH[3]}
24351      VERSION_SECURITY=${BASH_REMATCH[5]}
24352      VERSION_PATCH=${BASH_REMATCH[7]}
24353      VERSION_PRE=${BASH_REMATCH[9]}
24354      version_plus_separator=${BASH_REMATCH[11]}
24355      VERSION_BUILD=${BASH_REMATCH[12]}
24356      VERSION_OPT=${BASH_REMATCH[14]}
24357      # Unspecified numerical fields are interpreted as 0.
24358      if test "x$VERSION_MINOR" = x; then
24359        VERSION_MINOR=0
24360      fi
24361      if test "x$VERSION_SECURITY" = x; then
24362        VERSION_SECURITY=0
24363      fi
24364      if test "x$VERSION_PATCH" = x; then
24365        VERSION_PATCH=0
24366      fi
24367      if test "x$version_plus_separator" != x \
24368          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24369        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24370      fi
24371      # Stop the version part process from setting default values.
24372      # We still allow them to explicitely override though.
24373      NO_DEFAULT_VERSION_PARTS=true
24374    else
24375      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24376    fi
24377  fi
24378
24379
24380# Check whether --with-version-pre was given.
24381if test "${with_version_pre+set}" = set; then :
24382  withval=$with_version_pre; with_version_pre_present=true
24383else
24384  with_version_pre_present=false
24385fi
24386
24387
24388  if test "x$with_version_pre_present" = xtrue; then
24389    if test "x$with_version_pre" = xyes; then
24390      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24391    elif test "x$with_version_pre" = xno; then
24392      # Interpret --without-* as empty string instead of the literal "no"
24393      VERSION_PRE=
24394    else
24395      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24396       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24397      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24399$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24400      fi
24401    fi
24402  else
24403    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24404      # Default is to use "internal" as pre
24405      VERSION_PRE="internal"
24406    fi
24407  fi
24408
24409
24410# Check whether --with-version-opt was given.
24411if test "${with_version_opt+set}" = set; then :
24412  withval=$with_version_opt; with_version_opt_present=true
24413else
24414  with_version_opt_present=false
24415fi
24416
24417
24418  if test "x$with_version_opt_present" = xtrue; then
24419    if test "x$with_version_opt" = xyes; then
24420      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24421    elif test "x$with_version_opt" = xno; then
24422      # Interpret --without-* as empty string instead of the literal "no"
24423      VERSION_OPT=
24424    else
24425      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24426       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24427      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24428        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24429$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24430      fi
24431    fi
24432  else
24433    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24434      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24435      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24436      # Outer [ ] to quote m4.
24437       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24438      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24439    fi
24440  fi
24441
24442
24443# Check whether --with-version-build was given.
24444if test "${with_version_build+set}" = set; then :
24445  withval=$with_version_build; with_version_build_present=true
24446else
24447  with_version_build_present=false
24448fi
24449
24450
24451  if test "x$with_version_build_present" = xtrue; then
24452    if test "x$with_version_build" = xyes; then
24453      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24454    elif test "x$with_version_build" = xno; then
24455      # Interpret --without-* as empty string instead of the literal "no"
24456      VERSION_BUILD=
24457    elif test "x$with_version_build" = x; then
24458      VERSION_BUILD=
24459    else
24460
24461  # Additional [] needed to keep m4 from mangling shell constructs.
24462  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24463    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24464  fi
24465  # Extract the version number without leading zeros.
24466  cleaned_value=${BASH_REMATCH[1]}
24467  if test "x$cleaned_value" = x; then
24468    # Special case for zero
24469    cleaned_value=${BASH_REMATCH[2]}
24470  fi
24471
24472  if test $cleaned_value -gt 255; then
24473    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24474  fi
24475  if test "x$cleaned_value" != "x$with_version_build"; then
24476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24477$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24478  fi
24479  VERSION_BUILD=$cleaned_value
24480
24481    fi
24482  else
24483    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24484      # Default is to not have a build number.
24485      VERSION_BUILD=""
24486      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24487      VERSION_BUILD=0
24488    fi
24489  fi
24490
24491
24492# Check whether --with-version-major was given.
24493if test "${with_version_major+set}" = set; then :
24494  withval=$with_version_major; with_version_major_present=true
24495else
24496  with_version_major_present=false
24497fi
24498
24499
24500  if test "x$with_version_major_present" = xtrue; then
24501    if test "x$with_version_major" = xyes; then
24502      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24503    else
24504
24505  # Additional [] needed to keep m4 from mangling shell constructs.
24506  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24507    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24508  fi
24509  # Extract the version number without leading zeros.
24510  cleaned_value=${BASH_REMATCH[1]}
24511  if test "x$cleaned_value" = x; then
24512    # Special case for zero
24513    cleaned_value=${BASH_REMATCH[2]}
24514  fi
24515
24516  if test $cleaned_value -gt 255; then
24517    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24518  fi
24519  if test "x$cleaned_value" != "x$with_version_major"; then
24520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24521$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24522  fi
24523  VERSION_MAJOR=$cleaned_value
24524
24525    fi
24526  else
24527    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24528      # Default is to get value from version-numbers
24529      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24530    fi
24531  fi
24532
24533
24534# Check whether --with-version-minor was given.
24535if test "${with_version_minor+set}" = set; then :
24536  withval=$with_version_minor; with_version_minor_present=true
24537else
24538  with_version_minor_present=false
24539fi
24540
24541
24542  if test "x$with_version_minor_present" = xtrue; then
24543    if test "x$with_version_minor" = xyes; then
24544      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24545    elif test "x$with_version_minor" = xno; then
24546      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24547      VERSION_MINOR=0
24548    elif test "x$with_version_minor" = x; then
24549      VERSION_MINOR=0
24550    else
24551
24552  # Additional [] needed to keep m4 from mangling shell constructs.
24553  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24554    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24555  fi
24556  # Extract the version number without leading zeros.
24557  cleaned_value=${BASH_REMATCH[1]}
24558  if test "x$cleaned_value" = x; then
24559    # Special case for zero
24560    cleaned_value=${BASH_REMATCH[2]}
24561  fi
24562
24563  if test $cleaned_value -gt 255; then
24564    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24565  fi
24566  if test "x$cleaned_value" != "x$with_version_minor"; then
24567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24568$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24569  fi
24570  VERSION_MINOR=$cleaned_value
24571
24572    fi
24573  else
24574    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24575      # Default is 0, if unspecified
24576      VERSION_MINOR=0
24577    fi
24578  fi
24579
24580
24581# Check whether --with-version-security was given.
24582if test "${with_version_security+set}" = set; then :
24583  withval=$with_version_security; with_version_security_present=true
24584else
24585  with_version_security_present=false
24586fi
24587
24588
24589  if test "x$with_version_security_present" = xtrue; then
24590    if test "x$with_version_security" = xyes; then
24591      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24592    elif test "x$with_version_security" = xno; then
24593      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24594      VERSION_SECURITY=0
24595    elif test "x$with_version_security" = x; then
24596      VERSION_SECURITY=0
24597    else
24598
24599  # Additional [] needed to keep m4 from mangling shell constructs.
24600  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24601    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24602  fi
24603  # Extract the version number without leading zeros.
24604  cleaned_value=${BASH_REMATCH[1]}
24605  if test "x$cleaned_value" = x; then
24606    # Special case for zero
24607    cleaned_value=${BASH_REMATCH[2]}
24608  fi
24609
24610  if test $cleaned_value -gt 255; then
24611    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24612  fi
24613  if test "x$cleaned_value" != "x$with_version_security"; then
24614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24615$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24616  fi
24617  VERSION_SECURITY=$cleaned_value
24618
24619    fi
24620  else
24621    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24622      # Default is 0, if unspecified
24623      VERSION_SECURITY=0
24624    fi
24625  fi
24626
24627
24628# Check whether --with-version-patch was given.
24629if test "${with_version_patch+set}" = set; then :
24630  withval=$with_version_patch; with_version_patch_present=true
24631else
24632  with_version_patch_present=false
24633fi
24634
24635
24636  if test "x$with_version_patch_present" = xtrue; then
24637    if test "x$with_version_patch" = xyes; then
24638      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24639    elif test "x$with_version_patch" = xno; then
24640      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24641      VERSION_PATCH=0
24642    elif test "x$with_version_patch" = x; then
24643      VERSION_PATCH=0
24644    else
24645
24646  # Additional [] needed to keep m4 from mangling shell constructs.
24647  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24648    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24649  fi
24650  # Extract the version number without leading zeros.
24651  cleaned_value=${BASH_REMATCH[1]}
24652  if test "x$cleaned_value" = x; then
24653    # Special case for zero
24654    cleaned_value=${BASH_REMATCH[2]}
24655  fi
24656
24657  if test $cleaned_value -gt 255; then
24658    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24659  fi
24660  if test "x$cleaned_value" != "x$with_version_patch"; then
24661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24662$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24663  fi
24664  VERSION_PATCH=$cleaned_value
24665
24666    fi
24667  else
24668    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24669      # Default is 0, if unspecified
24670      VERSION_PATCH=0
24671    fi
24672  fi
24673
24674  # Calculate derived version properties
24675
24676  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24677  if test "x$VERSION_PRE" = x; then
24678    VERSION_IS_GA=true
24679  else
24680    VERSION_IS_GA=false
24681  fi
24682
24683  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24684  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24685
24686  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24687  # Strip trailing zeroes from stripped_version_number
24688  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24689  VERSION_NUMBER=$stripped_version_number
24690
24691  # The complete version string, with additional build information
24692  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24693    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24694  else
24695    # If either build or opt is set, we need a + separator
24696    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24697  fi
24698
24699  # The short version string, just VERSION_NUMBER and PRE, if present.
24700  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24701
24702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24703$as_echo_n "checking for version string... " >&6; }
24704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24705$as_echo "$VERSION_STRING" >&6; }
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721###############################################################################
24722#
24723# Setup BootJDK, used to bootstrap the build.
24724#
24725###############################################################################
24726
24727
24728  BOOT_JDK_FOUND=no
24729
24730# Check whether --with-boot-jdk was given.
24731if test "${with_boot_jdk+set}" = set; then :
24732  withval=$with_boot_jdk;
24733fi
24734
24735
24736  # We look for the Boot JDK through various means, going from more certain to
24737  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24738  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24739  # must check if this is indeed valid; otherwise we'll continue looking.
24740
24741  # Test: Is bootjdk explicitely set by command line arguments?
24742
24743  if test "x$BOOT_JDK_FOUND" = xno; then
24744    # Now execute the test
24745
24746  if test "x$with_boot_jdk" != x; then
24747    BOOT_JDK=$with_boot_jdk
24748    BOOT_JDK_FOUND=maybe
24749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24750$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24751  fi
24752
24753
24754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24756      # Do we have a bin/java?
24757      if test ! -x "$BOOT_JDK/bin/java"; then
24758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24760        BOOT_JDK_FOUND=no
24761      else
24762        # Do we have a bin/javac?
24763        if test ! -x "$BOOT_JDK/bin/javac"; then
24764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24768          BOOT_JDK_FOUND=no
24769        else
24770          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24771          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24772
24773          # Extra M4 quote needed to protect [] in grep expression.
24774          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24775          if test "x$FOUND_CORRECT_VERSION" = x; then
24776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24778            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24779$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24780            BOOT_JDK_FOUND=no
24781          else
24782            # We're done! :-)
24783            BOOT_JDK_FOUND=yes
24784
24785  # Only process if variable expands to non-empty
24786
24787  if test "x$BOOT_JDK" != x; then
24788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24789
24790  # Input might be given as Windows format, start by converting to
24791  # unix format.
24792  path="$BOOT_JDK"
24793  new_path=`$CYGPATH -u "$path"`
24794
24795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24798  # "foo.exe" is OK but "foo" is an error.
24799  #
24800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24801  # It is also a way to make sure we got the proper file name for the real test later on.
24802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24803  if test "x$test_shortpath" = x; then
24804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24807  fi
24808
24809  # Call helper function which possibly converts this using DOS-style short mode.
24810  # If so, the updated path is stored in $new_path.
24811
24812  input_path="$new_path"
24813  # Check if we need to convert this using DOS-style short mode. If the path
24814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24815  # take no chances and rewrite it.
24816  # Note: m4 eats our [], so we need to use [ and ] instead.
24817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24818  if test "x$has_forbidden_chars" != x; then
24819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24823      # Going to short mode and back again did indeed matter. Since short mode is
24824      # case insensitive, let's make it lowercase to improve readability.
24825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24826      # Now convert it back to Unix-style (cygpath)
24827      input_path=`$CYGPATH -u "$shortmode_path"`
24828      new_path="$input_path"
24829    fi
24830  fi
24831
24832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24833  if test "x$test_cygdrive_prefix" = x; then
24834    # As a simple fix, exclude /usr/bin since it's not a real path.
24835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24837      # a path prefixed by /cygdrive for fixpath to work.
24838      new_path="$CYGWIN_ROOT_PATH$input_path"
24839    fi
24840  fi
24841
24842
24843  if test "x$path" != "x$new_path"; then
24844    BOOT_JDK="$new_path"
24845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24847  fi
24848
24849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24850
24851  path="$BOOT_JDK"
24852  has_colon=`$ECHO $path | $GREP ^.:`
24853  new_path="$path"
24854  if test "x$has_colon" = x; then
24855    # Not in mixed or Windows style, start by that.
24856    new_path=`cmd //c echo $path`
24857  fi
24858
24859
24860  input_path="$new_path"
24861  # Check if we need to convert this using DOS-style short mode. If the path
24862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24863  # take no chances and rewrite it.
24864  # Note: m4 eats our [], so we need to use [ and ] instead.
24865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24866  if test "x$has_forbidden_chars" != x; then
24867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24869  fi
24870
24871
24872  windows_path="$new_path"
24873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24874    unix_path=`$CYGPATH -u "$windows_path"`
24875    new_path="$unix_path"
24876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24878    new_path="$unix_path"
24879  fi
24880
24881  if test "x$path" != "x$new_path"; then
24882    BOOT_JDK="$new_path"
24883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24885  fi
24886
24887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24889
24890    else
24891      # We're on a unix platform. Hooray! :)
24892      path="$BOOT_JDK"
24893      has_space=`$ECHO "$path" | $GREP " "`
24894      if test "x$has_space" != x; then
24895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24898      fi
24899
24900      # Use eval to expand a potential ~
24901      eval path="$path"
24902      if test ! -f "$path" && test ! -d "$path"; then
24903        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24904      fi
24905
24906      if test -d "$path"; then
24907        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24908      else
24909        dir="`$DIRNAME "$path"`"
24910        base="`$BASENAME "$path"`"
24911        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24912      fi
24913    fi
24914  fi
24915
24916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24917$as_echo_n "checking for Boot JDK... " >&6; }
24918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24919$as_echo "$BOOT_JDK" >&6; }
24920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24921$as_echo_n "checking Boot JDK version... " >&6; }
24922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24924$as_echo "$BOOT_JDK_VERSION" >&6; }
24925          fi # end check jdk version
24926        fi # end check javac
24927      fi # end check java
24928    fi # end check boot jdk found
24929  fi
24930
24931  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24932    # Having specified an argument which is incorrect will produce an instant failure;
24933    # we should not go on looking
24934    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24935  fi
24936
24937  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24938
24939  if test "x$BOOT_JDK_FOUND" = xno; then
24940    # Now execute the test
24941
24942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24943    # First check at user selected default
24944
24945  if test "x$BOOT_JDK_FOUND" = xno; then
24946    # Now execute the test
24947
24948  if test -x /usr/libexec/java_home; then
24949    BOOT_JDK=`/usr/libexec/java_home `
24950    BOOT_JDK_FOUND=maybe
24951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24952$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24953  fi
24954
24955
24956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24958      # Do we have a bin/java?
24959      if test ! -x "$BOOT_JDK/bin/java"; then
24960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24962        BOOT_JDK_FOUND=no
24963      else
24964        # Do we have a bin/javac?
24965        if test ! -x "$BOOT_JDK/bin/javac"; then
24966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24970          BOOT_JDK_FOUND=no
24971        else
24972          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24973          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24974
24975          # Extra M4 quote needed to protect [] in grep expression.
24976          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24977          if test "x$FOUND_CORRECT_VERSION" = x; then
24978            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24980            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24981$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24982            BOOT_JDK_FOUND=no
24983          else
24984            # We're done! :-)
24985            BOOT_JDK_FOUND=yes
24986
24987  # Only process if variable expands to non-empty
24988
24989  if test "x$BOOT_JDK" != x; then
24990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24991
24992  # Input might be given as Windows format, start by converting to
24993  # unix format.
24994  path="$BOOT_JDK"
24995  new_path=`$CYGPATH -u "$path"`
24996
24997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25000  # "foo.exe" is OK but "foo" is an error.
25001  #
25002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25003  # It is also a way to make sure we got the proper file name for the real test later on.
25004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25005  if test "x$test_shortpath" = x; then
25006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25008    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25009  fi
25010
25011  # Call helper function which possibly converts this using DOS-style short mode.
25012  # If so, the updated path is stored in $new_path.
25013
25014  input_path="$new_path"
25015  # Check if we need to convert this using DOS-style short mode. If the path
25016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25017  # take no chances and rewrite it.
25018  # Note: m4 eats our [], so we need to use [ and ] instead.
25019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25020  if test "x$has_forbidden_chars" != x; then
25021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25025      # Going to short mode and back again did indeed matter. Since short mode is
25026      # case insensitive, let's make it lowercase to improve readability.
25027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25028      # Now convert it back to Unix-style (cygpath)
25029      input_path=`$CYGPATH -u "$shortmode_path"`
25030      new_path="$input_path"
25031    fi
25032  fi
25033
25034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25035  if test "x$test_cygdrive_prefix" = x; then
25036    # As a simple fix, exclude /usr/bin since it's not a real path.
25037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25039      # a path prefixed by /cygdrive for fixpath to work.
25040      new_path="$CYGWIN_ROOT_PATH$input_path"
25041    fi
25042  fi
25043
25044
25045  if test "x$path" != "x$new_path"; then
25046    BOOT_JDK="$new_path"
25047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25049  fi
25050
25051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25052
25053  path="$BOOT_JDK"
25054  has_colon=`$ECHO $path | $GREP ^.:`
25055  new_path="$path"
25056  if test "x$has_colon" = x; then
25057    # Not in mixed or Windows style, start by that.
25058    new_path=`cmd //c echo $path`
25059  fi
25060
25061
25062  input_path="$new_path"
25063  # Check if we need to convert this using DOS-style short mode. If the path
25064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25065  # take no chances and rewrite it.
25066  # Note: m4 eats our [], so we need to use [ and ] instead.
25067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25068  if test "x$has_forbidden_chars" != x; then
25069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25071  fi
25072
25073
25074  windows_path="$new_path"
25075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25076    unix_path=`$CYGPATH -u "$windows_path"`
25077    new_path="$unix_path"
25078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25080    new_path="$unix_path"
25081  fi
25082
25083  if test "x$path" != "x$new_path"; then
25084    BOOT_JDK="$new_path"
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25087  fi
25088
25089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25091
25092    else
25093      # We're on a unix platform. Hooray! :)
25094      path="$BOOT_JDK"
25095      has_space=`$ECHO "$path" | $GREP " "`
25096      if test "x$has_space" != x; then
25097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25100      fi
25101
25102      # Use eval to expand a potential ~
25103      eval path="$path"
25104      if test ! -f "$path" && test ! -d "$path"; then
25105        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25106      fi
25107
25108      if test -d "$path"; then
25109        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25110      else
25111        dir="`$DIRNAME "$path"`"
25112        base="`$BASENAME "$path"`"
25113        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25114      fi
25115    fi
25116  fi
25117
25118            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25119$as_echo_n "checking for Boot JDK... " >&6; }
25120            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25121$as_echo "$BOOT_JDK" >&6; }
25122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25123$as_echo_n "checking Boot JDK version... " >&6; }
25124            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25126$as_echo "$BOOT_JDK_VERSION" >&6; }
25127          fi # end check jdk version
25128        fi # end check javac
25129      fi # end check java
25130    fi # end check boot jdk found
25131  fi
25132
25133    # If that did not work out (e.g. too old), try explicit versions instead
25134
25135  if test "x$BOOT_JDK_FOUND" = xno; then
25136    # Now execute the test
25137
25138  if test -x /usr/libexec/java_home; then
25139    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25140    BOOT_JDK_FOUND=maybe
25141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25142$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25143  fi
25144
25145
25146    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25147    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25148      # Do we have a bin/java?
25149      if test ! -x "$BOOT_JDK/bin/java"; then
25150        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25152        BOOT_JDK_FOUND=no
25153      else
25154        # Do we have a bin/javac?
25155        if test ! -x "$BOOT_JDK/bin/javac"; then
25156          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25158          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25159$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25160          BOOT_JDK_FOUND=no
25161        else
25162          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25163          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25164
25165          # Extra M4 quote needed to protect [] in grep expression.
25166          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25167          if test "x$FOUND_CORRECT_VERSION" = x; then
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25170            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25171$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25172            BOOT_JDK_FOUND=no
25173          else
25174            # We're done! :-)
25175            BOOT_JDK_FOUND=yes
25176
25177  # Only process if variable expands to non-empty
25178
25179  if test "x$BOOT_JDK" != x; then
25180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25181
25182  # Input might be given as Windows format, start by converting to
25183  # unix format.
25184  path="$BOOT_JDK"
25185  new_path=`$CYGPATH -u "$path"`
25186
25187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25190  # "foo.exe" is OK but "foo" is an error.
25191  #
25192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25193  # It is also a way to make sure we got the proper file name for the real test later on.
25194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25195  if test "x$test_shortpath" = x; then
25196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25198    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25199  fi
25200
25201  # Call helper function which possibly converts this using DOS-style short mode.
25202  # If so, the updated path is stored in $new_path.
25203
25204  input_path="$new_path"
25205  # Check if we need to convert this using DOS-style short mode. If the path
25206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25207  # take no chances and rewrite it.
25208  # Note: m4 eats our [], so we need to use [ and ] instead.
25209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25210  if test "x$has_forbidden_chars" != x; then
25211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25215      # Going to short mode and back again did indeed matter. Since short mode is
25216      # case insensitive, let's make it lowercase to improve readability.
25217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25218      # Now convert it back to Unix-style (cygpath)
25219      input_path=`$CYGPATH -u "$shortmode_path"`
25220      new_path="$input_path"
25221    fi
25222  fi
25223
25224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25225  if test "x$test_cygdrive_prefix" = x; then
25226    # As a simple fix, exclude /usr/bin since it's not a real path.
25227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25229      # a path prefixed by /cygdrive for fixpath to work.
25230      new_path="$CYGWIN_ROOT_PATH$input_path"
25231    fi
25232  fi
25233
25234
25235  if test "x$path" != "x$new_path"; then
25236    BOOT_JDK="$new_path"
25237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25239  fi
25240
25241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25242
25243  path="$BOOT_JDK"
25244  has_colon=`$ECHO $path | $GREP ^.:`
25245  new_path="$path"
25246  if test "x$has_colon" = x; then
25247    # Not in mixed or Windows style, start by that.
25248    new_path=`cmd //c echo $path`
25249  fi
25250
25251
25252  input_path="$new_path"
25253  # Check if we need to convert this using DOS-style short mode. If the path
25254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25255  # take no chances and rewrite it.
25256  # Note: m4 eats our [], so we need to use [ and ] instead.
25257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25258  if test "x$has_forbidden_chars" != x; then
25259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25261  fi
25262
25263
25264  windows_path="$new_path"
25265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25266    unix_path=`$CYGPATH -u "$windows_path"`
25267    new_path="$unix_path"
25268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25270    new_path="$unix_path"
25271  fi
25272
25273  if test "x$path" != "x$new_path"; then
25274    BOOT_JDK="$new_path"
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25277  fi
25278
25279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25281
25282    else
25283      # We're on a unix platform. Hooray! :)
25284      path="$BOOT_JDK"
25285      has_space=`$ECHO "$path" | $GREP " "`
25286      if test "x$has_space" != x; then
25287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25290      fi
25291
25292      # Use eval to expand a potential ~
25293      eval path="$path"
25294      if test ! -f "$path" && test ! -d "$path"; then
25295        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25296      fi
25297
25298      if test -d "$path"; then
25299        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25300      else
25301        dir="`$DIRNAME "$path"`"
25302        base="`$BASENAME "$path"`"
25303        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25304      fi
25305    fi
25306  fi
25307
25308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25309$as_echo_n "checking for Boot JDK... " >&6; }
25310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25311$as_echo "$BOOT_JDK" >&6; }
25312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25313$as_echo_n "checking Boot JDK version... " >&6; }
25314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25316$as_echo "$BOOT_JDK_VERSION" >&6; }
25317          fi # end check jdk version
25318        fi # end check javac
25319      fi # end check java
25320    fi # end check boot jdk found
25321  fi
25322
25323
25324  if test "x$BOOT_JDK_FOUND" = xno; then
25325    # Now execute the test
25326
25327  if test -x /usr/libexec/java_home; then
25328    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25329    BOOT_JDK_FOUND=maybe
25330    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25331$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25332  fi
25333
25334
25335    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25336    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25337      # Do we have a bin/java?
25338      if test ! -x "$BOOT_JDK/bin/java"; then
25339        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25341        BOOT_JDK_FOUND=no
25342      else
25343        # Do we have a bin/javac?
25344        if test ! -x "$BOOT_JDK/bin/javac"; then
25345          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25347          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25348$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25349          BOOT_JDK_FOUND=no
25350        else
25351          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25352          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25353
25354          # Extra M4 quote needed to protect [] in grep expression.
25355          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25356          if test "x$FOUND_CORRECT_VERSION" = x; then
25357            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25359            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25360$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25361            BOOT_JDK_FOUND=no
25362          else
25363            # We're done! :-)
25364            BOOT_JDK_FOUND=yes
25365
25366  # Only process if variable expands to non-empty
25367
25368  if test "x$BOOT_JDK" != x; then
25369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25370
25371  # Input might be given as Windows format, start by converting to
25372  # unix format.
25373  path="$BOOT_JDK"
25374  new_path=`$CYGPATH -u "$path"`
25375
25376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25379  # "foo.exe" is OK but "foo" is an error.
25380  #
25381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25382  # It is also a way to make sure we got the proper file name for the real test later on.
25383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25384  if test "x$test_shortpath" = x; then
25385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25387    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25388  fi
25389
25390  # Call helper function which possibly converts this using DOS-style short mode.
25391  # If so, the updated path is stored in $new_path.
25392
25393  input_path="$new_path"
25394  # Check if we need to convert this using DOS-style short mode. If the path
25395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25396  # take no chances and rewrite it.
25397  # Note: m4 eats our [], so we need to use [ and ] instead.
25398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25399  if test "x$has_forbidden_chars" != x; then
25400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25404      # Going to short mode and back again did indeed matter. Since short mode is
25405      # case insensitive, let's make it lowercase to improve readability.
25406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25407      # Now convert it back to Unix-style (cygpath)
25408      input_path=`$CYGPATH -u "$shortmode_path"`
25409      new_path="$input_path"
25410    fi
25411  fi
25412
25413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25414  if test "x$test_cygdrive_prefix" = x; then
25415    # As a simple fix, exclude /usr/bin since it's not a real path.
25416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25418      # a path prefixed by /cygdrive for fixpath to work.
25419      new_path="$CYGWIN_ROOT_PATH$input_path"
25420    fi
25421  fi
25422
25423
25424  if test "x$path" != "x$new_path"; then
25425    BOOT_JDK="$new_path"
25426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25428  fi
25429
25430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25431
25432  path="$BOOT_JDK"
25433  has_colon=`$ECHO $path | $GREP ^.:`
25434  new_path="$path"
25435  if test "x$has_colon" = x; then
25436    # Not in mixed or Windows style, start by that.
25437    new_path=`cmd //c echo $path`
25438  fi
25439
25440
25441  input_path="$new_path"
25442  # Check if we need to convert this using DOS-style short mode. If the path
25443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25444  # take no chances and rewrite it.
25445  # Note: m4 eats our [], so we need to use [ and ] instead.
25446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25447  if test "x$has_forbidden_chars" != x; then
25448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25450  fi
25451
25452
25453  windows_path="$new_path"
25454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25455    unix_path=`$CYGPATH -u "$windows_path"`
25456    new_path="$unix_path"
25457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25459    new_path="$unix_path"
25460  fi
25461
25462  if test "x$path" != "x$new_path"; then
25463    BOOT_JDK="$new_path"
25464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25466  fi
25467
25468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25470
25471    else
25472      # We're on a unix platform. Hooray! :)
25473      path="$BOOT_JDK"
25474      has_space=`$ECHO "$path" | $GREP " "`
25475      if test "x$has_space" != x; then
25476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25479      fi
25480
25481      # Use eval to expand a potential ~
25482      eval path="$path"
25483      if test ! -f "$path" && test ! -d "$path"; then
25484        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25485      fi
25486
25487      if test -d "$path"; then
25488        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25489      else
25490        dir="`$DIRNAME "$path"`"
25491        base="`$BASENAME "$path"`"
25492        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25493      fi
25494    fi
25495  fi
25496
25497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25498$as_echo_n "checking for Boot JDK... " >&6; }
25499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25500$as_echo "$BOOT_JDK" >&6; }
25501            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25502$as_echo_n "checking Boot JDK version... " >&6; }
25503            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25505$as_echo "$BOOT_JDK_VERSION" >&6; }
25506          fi # end check jdk version
25507        fi # end check javac
25508      fi # end check java
25509    fi # end check boot jdk found
25510  fi
25511
25512
25513  if test "x$BOOT_JDK_FOUND" = xno; then
25514    # Now execute the test
25515
25516  if test -x /usr/libexec/java_home; then
25517    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25518    BOOT_JDK_FOUND=maybe
25519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25520$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25521  fi
25522
25523
25524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25526      # Do we have a bin/java?
25527      if test ! -x "$BOOT_JDK/bin/java"; then
25528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25530        BOOT_JDK_FOUND=no
25531      else
25532        # Do we have a bin/javac?
25533        if test ! -x "$BOOT_JDK/bin/javac"; then
25534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25538          BOOT_JDK_FOUND=no
25539        else
25540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25542
25543          # Extra M4 quote needed to protect [] in grep expression.
25544          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25545          if test "x$FOUND_CORRECT_VERSION" = x; then
25546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25550            BOOT_JDK_FOUND=no
25551          else
25552            # We're done! :-)
25553            BOOT_JDK_FOUND=yes
25554
25555  # Only process if variable expands to non-empty
25556
25557  if test "x$BOOT_JDK" != x; then
25558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25559
25560  # Input might be given as Windows format, start by converting to
25561  # unix format.
25562  path="$BOOT_JDK"
25563  new_path=`$CYGPATH -u "$path"`
25564
25565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25568  # "foo.exe" is OK but "foo" is an error.
25569  #
25570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25571  # It is also a way to make sure we got the proper file name for the real test later on.
25572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25573  if test "x$test_shortpath" = x; then
25574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25577  fi
25578
25579  # Call helper function which possibly converts this using DOS-style short mode.
25580  # If so, the updated path is stored in $new_path.
25581
25582  input_path="$new_path"
25583  # Check if we need to convert this using DOS-style short mode. If the path
25584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25585  # take no chances and rewrite it.
25586  # Note: m4 eats our [], so we need to use [ and ] instead.
25587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25588  if test "x$has_forbidden_chars" != x; then
25589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25593      # Going to short mode and back again did indeed matter. Since short mode is
25594      # case insensitive, let's make it lowercase to improve readability.
25595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25596      # Now convert it back to Unix-style (cygpath)
25597      input_path=`$CYGPATH -u "$shortmode_path"`
25598      new_path="$input_path"
25599    fi
25600  fi
25601
25602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25603  if test "x$test_cygdrive_prefix" = x; then
25604    # As a simple fix, exclude /usr/bin since it's not a real path.
25605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25607      # a path prefixed by /cygdrive for fixpath to work.
25608      new_path="$CYGWIN_ROOT_PATH$input_path"
25609    fi
25610  fi
25611
25612
25613  if test "x$path" != "x$new_path"; then
25614    BOOT_JDK="$new_path"
25615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25617  fi
25618
25619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25620
25621  path="$BOOT_JDK"
25622  has_colon=`$ECHO $path | $GREP ^.:`
25623  new_path="$path"
25624  if test "x$has_colon" = x; then
25625    # Not in mixed or Windows style, start by that.
25626    new_path=`cmd //c echo $path`
25627  fi
25628
25629
25630  input_path="$new_path"
25631  # Check if we need to convert this using DOS-style short mode. If the path
25632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25633  # take no chances and rewrite it.
25634  # Note: m4 eats our [], so we need to use [ and ] instead.
25635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25636  if test "x$has_forbidden_chars" != x; then
25637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25639  fi
25640
25641
25642  windows_path="$new_path"
25643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25644    unix_path=`$CYGPATH -u "$windows_path"`
25645    new_path="$unix_path"
25646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25648    new_path="$unix_path"
25649  fi
25650
25651  if test "x$path" != "x$new_path"; then
25652    BOOT_JDK="$new_path"
25653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25655  fi
25656
25657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25659
25660    else
25661      # We're on a unix platform. Hooray! :)
25662      path="$BOOT_JDK"
25663      has_space=`$ECHO "$path" | $GREP " "`
25664      if test "x$has_space" != x; then
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25668      fi
25669
25670      # Use eval to expand a potential ~
25671      eval path="$path"
25672      if test ! -f "$path" && test ! -d "$path"; then
25673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25674      fi
25675
25676      if test -d "$path"; then
25677        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25678      else
25679        dir="`$DIRNAME "$path"`"
25680        base="`$BASENAME "$path"`"
25681        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25682      fi
25683    fi
25684  fi
25685
25686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25687$as_echo_n "checking for Boot JDK... " >&6; }
25688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25689$as_echo "$BOOT_JDK" >&6; }
25690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25691$as_echo_n "checking Boot JDK version... " >&6; }
25692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25694$as_echo "$BOOT_JDK_VERSION" >&6; }
25695          fi # end check jdk version
25696        fi # end check javac
25697      fi # end check java
25698    fi # end check boot jdk found
25699  fi
25700
25701  fi
25702
25703
25704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25706      # Do we have a bin/java?
25707      if test ! -x "$BOOT_JDK/bin/java"; then
25708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25710        BOOT_JDK_FOUND=no
25711      else
25712        # Do we have a bin/javac?
25713        if test ! -x "$BOOT_JDK/bin/javac"; then
25714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25718          BOOT_JDK_FOUND=no
25719        else
25720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25722
25723          # Extra M4 quote needed to protect [] in grep expression.
25724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25725          if test "x$FOUND_CORRECT_VERSION" = x; then
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25730            BOOT_JDK_FOUND=no
25731          else
25732            # We're done! :-)
25733            BOOT_JDK_FOUND=yes
25734
25735  # Only process if variable expands to non-empty
25736
25737  if test "x$BOOT_JDK" != x; then
25738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25739
25740  # Input might be given as Windows format, start by converting to
25741  # unix format.
25742  path="$BOOT_JDK"
25743  new_path=`$CYGPATH -u "$path"`
25744
25745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25748  # "foo.exe" is OK but "foo" is an error.
25749  #
25750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25751  # It is also a way to make sure we got the proper file name for the real test later on.
25752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25753  if test "x$test_shortpath" = x; then
25754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25757  fi
25758
25759  # Call helper function which possibly converts this using DOS-style short mode.
25760  # If so, the updated path is stored in $new_path.
25761
25762  input_path="$new_path"
25763  # Check if we need to convert this using DOS-style short mode. If the path
25764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25765  # take no chances and rewrite it.
25766  # Note: m4 eats our [], so we need to use [ and ] instead.
25767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25768  if test "x$has_forbidden_chars" != x; then
25769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25773      # Going to short mode and back again did indeed matter. Since short mode is
25774      # case insensitive, let's make it lowercase to improve readability.
25775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25776      # Now convert it back to Unix-style (cygpath)
25777      input_path=`$CYGPATH -u "$shortmode_path"`
25778      new_path="$input_path"
25779    fi
25780  fi
25781
25782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25783  if test "x$test_cygdrive_prefix" = x; then
25784    # As a simple fix, exclude /usr/bin since it's not a real path.
25785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25787      # a path prefixed by /cygdrive for fixpath to work.
25788      new_path="$CYGWIN_ROOT_PATH$input_path"
25789    fi
25790  fi
25791
25792
25793  if test "x$path" != "x$new_path"; then
25794    BOOT_JDK="$new_path"
25795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25797  fi
25798
25799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25800
25801  path="$BOOT_JDK"
25802  has_colon=`$ECHO $path | $GREP ^.:`
25803  new_path="$path"
25804  if test "x$has_colon" = x; then
25805    # Not in mixed or Windows style, start by that.
25806    new_path=`cmd //c echo $path`
25807  fi
25808
25809
25810  input_path="$new_path"
25811  # Check if we need to convert this using DOS-style short mode. If the path
25812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25813  # take no chances and rewrite it.
25814  # Note: m4 eats our [], so we need to use [ and ] instead.
25815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25816  if test "x$has_forbidden_chars" != x; then
25817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25819  fi
25820
25821
25822  windows_path="$new_path"
25823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25824    unix_path=`$CYGPATH -u "$windows_path"`
25825    new_path="$unix_path"
25826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25828    new_path="$unix_path"
25829  fi
25830
25831  if test "x$path" != "x$new_path"; then
25832    BOOT_JDK="$new_path"
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25835  fi
25836
25837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25839
25840    else
25841      # We're on a unix platform. Hooray! :)
25842      path="$BOOT_JDK"
25843      has_space=`$ECHO "$path" | $GREP " "`
25844      if test "x$has_space" != x; then
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25848      fi
25849
25850      # Use eval to expand a potential ~
25851      eval path="$path"
25852      if test ! -f "$path" && test ! -d "$path"; then
25853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25854      fi
25855
25856      if test -d "$path"; then
25857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25858      else
25859        dir="`$DIRNAME "$path"`"
25860        base="`$BASENAME "$path"`"
25861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25862      fi
25863    fi
25864  fi
25865
25866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25867$as_echo_n "checking for Boot JDK... " >&6; }
25868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25869$as_echo "$BOOT_JDK" >&6; }
25870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25871$as_echo_n "checking Boot JDK version... " >&6; }
25872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25874$as_echo "$BOOT_JDK_VERSION" >&6; }
25875          fi # end check jdk version
25876        fi # end check javac
25877      fi # end check java
25878    fi # end check boot jdk found
25879  fi
25880
25881
25882  # Test: Is $JAVA_HOME set?
25883
25884  if test "x$BOOT_JDK_FOUND" = xno; then
25885    # Now execute the test
25886
25887  if test "x$JAVA_HOME" != x; then
25888    JAVA_HOME_PROCESSED="$JAVA_HOME"
25889
25890  # Only process if variable expands to non-empty
25891
25892  if test "x$JAVA_HOME_PROCESSED" != x; then
25893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25894
25895  # Input might be given as Windows format, start by converting to
25896  # unix format.
25897  path="$JAVA_HOME_PROCESSED"
25898  new_path=`$CYGPATH -u "$path"`
25899
25900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25903  # "foo.exe" is OK but "foo" is an error.
25904  #
25905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25906  # It is also a way to make sure we got the proper file name for the real test later on.
25907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25908  if test "x$test_shortpath" = x; then
25909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25910$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25911    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25912  fi
25913
25914  # Call helper function which possibly converts this using DOS-style short mode.
25915  # If so, the updated path is stored in $new_path.
25916
25917  input_path="$new_path"
25918  # Check if we need to convert this using DOS-style short mode. If the path
25919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25920  # take no chances and rewrite it.
25921  # Note: m4 eats our [], so we need to use [ and ] instead.
25922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25923  if test "x$has_forbidden_chars" != x; then
25924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25928      # Going to short mode and back again did indeed matter. Since short mode is
25929      # case insensitive, let's make it lowercase to improve readability.
25930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25931      # Now convert it back to Unix-style (cygpath)
25932      input_path=`$CYGPATH -u "$shortmode_path"`
25933      new_path="$input_path"
25934    fi
25935  fi
25936
25937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25938  if test "x$test_cygdrive_prefix" = x; then
25939    # As a simple fix, exclude /usr/bin since it's not a real path.
25940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25942      # a path prefixed by /cygdrive for fixpath to work.
25943      new_path="$CYGWIN_ROOT_PATH$input_path"
25944    fi
25945  fi
25946
25947
25948  if test "x$path" != "x$new_path"; then
25949    JAVA_HOME_PROCESSED="$new_path"
25950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25951$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25952  fi
25953
25954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25955
25956  path="$JAVA_HOME_PROCESSED"
25957  has_colon=`$ECHO $path | $GREP ^.:`
25958  new_path="$path"
25959  if test "x$has_colon" = x; then
25960    # Not in mixed or Windows style, start by that.
25961    new_path=`cmd //c echo $path`
25962  fi
25963
25964
25965  input_path="$new_path"
25966  # Check if we need to convert this using DOS-style short mode. If the path
25967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25968  # take no chances and rewrite it.
25969  # Note: m4 eats our [], so we need to use [ and ] instead.
25970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25971  if test "x$has_forbidden_chars" != x; then
25972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25974  fi
25975
25976
25977  windows_path="$new_path"
25978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25979    unix_path=`$CYGPATH -u "$windows_path"`
25980    new_path="$unix_path"
25981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25983    new_path="$unix_path"
25984  fi
25985
25986  if test "x$path" != "x$new_path"; then
25987    JAVA_HOME_PROCESSED="$new_path"
25988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25989$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25990  fi
25991
25992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25994
25995    else
25996      # We're on a unix platform. Hooray! :)
25997      path="$JAVA_HOME_PROCESSED"
25998      has_space=`$ECHO "$path" | $GREP " "`
25999      if test "x$has_space" != x; then
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26001$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26003      fi
26004
26005      # Use eval to expand a potential ~
26006      eval path="$path"
26007      if test ! -f "$path" && test ! -d "$path"; then
26008        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26009      fi
26010
26011      if test -d "$path"; then
26012        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26013      else
26014        dir="`$DIRNAME "$path"`"
26015        base="`$BASENAME "$path"`"
26016        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26017      fi
26018    fi
26019  fi
26020
26021    if test ! -d "$JAVA_HOME_PROCESSED"; then
26022      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26023$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26024    else
26025      # Aha, the user has set a JAVA_HOME
26026      # let us use that as the Boot JDK.
26027      BOOT_JDK="$JAVA_HOME_PROCESSED"
26028      BOOT_JDK_FOUND=maybe
26029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26030$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26031    fi
26032  fi
26033
26034
26035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26037      # Do we have a bin/java?
26038      if test ! -x "$BOOT_JDK/bin/java"; then
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26041        BOOT_JDK_FOUND=no
26042      else
26043        # Do we have a bin/javac?
26044        if test ! -x "$BOOT_JDK/bin/javac"; then
26045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26049          BOOT_JDK_FOUND=no
26050        else
26051          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26052          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26053
26054          # Extra M4 quote needed to protect [] in grep expression.
26055          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26056          if test "x$FOUND_CORRECT_VERSION" = x; then
26057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26059            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26061            BOOT_JDK_FOUND=no
26062          else
26063            # We're done! :-)
26064            BOOT_JDK_FOUND=yes
26065
26066  # Only process if variable expands to non-empty
26067
26068  if test "x$BOOT_JDK" != x; then
26069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26070
26071  # Input might be given as Windows format, start by converting to
26072  # unix format.
26073  path="$BOOT_JDK"
26074  new_path=`$CYGPATH -u "$path"`
26075
26076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26079  # "foo.exe" is OK but "foo" is an error.
26080  #
26081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26082  # It is also a way to make sure we got the proper file name for the real test later on.
26083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26084  if test "x$test_shortpath" = x; then
26085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26088  fi
26089
26090  # Call helper function which possibly converts this using DOS-style short mode.
26091  # If so, the updated path is stored in $new_path.
26092
26093  input_path="$new_path"
26094  # Check if we need to convert this using DOS-style short mode. If the path
26095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26096  # take no chances and rewrite it.
26097  # Note: m4 eats our [], so we need to use [ and ] instead.
26098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26099  if test "x$has_forbidden_chars" != x; then
26100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26104      # Going to short mode and back again did indeed matter. Since short mode is
26105      # case insensitive, let's make it lowercase to improve readability.
26106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26107      # Now convert it back to Unix-style (cygpath)
26108      input_path=`$CYGPATH -u "$shortmode_path"`
26109      new_path="$input_path"
26110    fi
26111  fi
26112
26113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26114  if test "x$test_cygdrive_prefix" = x; then
26115    # As a simple fix, exclude /usr/bin since it's not a real path.
26116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26118      # a path prefixed by /cygdrive for fixpath to work.
26119      new_path="$CYGWIN_ROOT_PATH$input_path"
26120    fi
26121  fi
26122
26123
26124  if test "x$path" != "x$new_path"; then
26125    BOOT_JDK="$new_path"
26126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26128  fi
26129
26130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26131
26132  path="$BOOT_JDK"
26133  has_colon=`$ECHO $path | $GREP ^.:`
26134  new_path="$path"
26135  if test "x$has_colon" = x; then
26136    # Not in mixed or Windows style, start by that.
26137    new_path=`cmd //c echo $path`
26138  fi
26139
26140
26141  input_path="$new_path"
26142  # Check if we need to convert this using DOS-style short mode. If the path
26143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26144  # take no chances and rewrite it.
26145  # Note: m4 eats our [], so we need to use [ and ] instead.
26146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26147  if test "x$has_forbidden_chars" != x; then
26148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26150  fi
26151
26152
26153  windows_path="$new_path"
26154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26155    unix_path=`$CYGPATH -u "$windows_path"`
26156    new_path="$unix_path"
26157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26159    new_path="$unix_path"
26160  fi
26161
26162  if test "x$path" != "x$new_path"; then
26163    BOOT_JDK="$new_path"
26164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26166  fi
26167
26168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26170
26171    else
26172      # We're on a unix platform. Hooray! :)
26173      path="$BOOT_JDK"
26174      has_space=`$ECHO "$path" | $GREP " "`
26175      if test "x$has_space" != x; then
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26179      fi
26180
26181      # Use eval to expand a potential ~
26182      eval path="$path"
26183      if test ! -f "$path" && test ! -d "$path"; then
26184        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26185      fi
26186
26187      if test -d "$path"; then
26188        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26189      else
26190        dir="`$DIRNAME "$path"`"
26191        base="`$BASENAME "$path"`"
26192        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26193      fi
26194    fi
26195  fi
26196
26197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26198$as_echo_n "checking for Boot JDK... " >&6; }
26199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26200$as_echo "$BOOT_JDK" >&6; }
26201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26202$as_echo_n "checking Boot JDK version... " >&6; }
26203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26205$as_echo "$BOOT_JDK_VERSION" >&6; }
26206          fi # end check jdk version
26207        fi # end check javac
26208      fi # end check java
26209    fi # end check boot jdk found
26210  fi
26211
26212
26213  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26214
26215  if test "x$BOOT_JDK_FOUND" = xno; then
26216    # Now execute the test
26217
26218  # Extract the first word of "javac", so it can be a program name with args.
26219set dummy javac; ac_word=$2
26220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26221$as_echo_n "checking for $ac_word... " >&6; }
26222if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26223  $as_echo_n "(cached) " >&6
26224else
26225  case $JAVAC_CHECK in
26226  [\\/]* | ?:[\\/]*)
26227  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26228  ;;
26229  *)
26230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26231for as_dir in $PATH
26232do
26233  IFS=$as_save_IFS
26234  test -z "$as_dir" && as_dir=.
26235    for ac_exec_ext in '' $ac_executable_extensions; do
26236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26237    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26239    break 2
26240  fi
26241done
26242  done
26243IFS=$as_save_IFS
26244
26245  ;;
26246esac
26247fi
26248JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26249if test -n "$JAVAC_CHECK"; then
26250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26251$as_echo "$JAVAC_CHECK" >&6; }
26252else
26253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26254$as_echo "no" >&6; }
26255fi
26256
26257
26258  # Extract the first word of "java", so it can be a program name with args.
26259set dummy java; ac_word=$2
26260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26261$as_echo_n "checking for $ac_word... " >&6; }
26262if ${ac_cv_path_JAVA_CHECK+:} false; then :
26263  $as_echo_n "(cached) " >&6
26264else
26265  case $JAVA_CHECK in
26266  [\\/]* | ?:[\\/]*)
26267  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26268  ;;
26269  *)
26270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26271for as_dir in $PATH
26272do
26273  IFS=$as_save_IFS
26274  test -z "$as_dir" && as_dir=.
26275    for ac_exec_ext in '' $ac_executable_extensions; do
26276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26277    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26279    break 2
26280  fi
26281done
26282  done
26283IFS=$as_save_IFS
26284
26285  ;;
26286esac
26287fi
26288JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26289if test -n "$JAVA_CHECK"; then
26290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26291$as_echo "$JAVA_CHECK" >&6; }
26292else
26293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26294$as_echo "no" >&6; }
26295fi
26296
26297
26298  BINARY="$JAVAC_CHECK"
26299  if test "x$JAVAC_CHECK" = x; then
26300    BINARY="$JAVA_CHECK"
26301  fi
26302  if test "x$BINARY" != x; then
26303    # So there is a java(c) binary, it might be part of a JDK.
26304    # Lets find the JDK/JRE directory by following symbolic links.
26305    # Linux/GNU systems often have links from /usr/bin/java to
26306    # /etc/alternatives/java to the real JDK binary.
26307
26308  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26309    # Follow a chain of symbolic links. Use readlink
26310    # where it exists, else fall back to horribly
26311    # complicated shell code.
26312    if test "x$READLINK_TESTED" != yes; then
26313      # On MacOSX there is a readlink tool with a different
26314      # purpose than the GNU readlink tool. Check the found readlink.
26315      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26316      if test "x$ISGNU" = x; then
26317        # A readlink that we do not know how to use.
26318        # Are there other non-GNU readlinks out there?
26319        READLINK_TESTED=yes
26320        READLINK=
26321      fi
26322    fi
26323
26324    if test "x$READLINK" != x; then
26325      BINARY=`$READLINK -f $BINARY`
26326    else
26327      # Save the current directory for restoring afterwards
26328      STARTDIR=$PWD
26329      COUNTER=0
26330      sym_link_dir=`$DIRNAME $BINARY`
26331      sym_link_file=`$BASENAME $BINARY`
26332      cd $sym_link_dir
26333      # Use -P flag to resolve symlinks in directories.
26334      cd `$THEPWDCMD -P`
26335      sym_link_dir=`$THEPWDCMD -P`
26336      # Resolve file symlinks
26337      while test $COUNTER -lt 20; do
26338        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26339        if test "x$ISLINK" == x; then
26340          # This is not a symbolic link! We are done!
26341          break
26342        fi
26343        # Again resolve directory symlinks since the target of the just found
26344        # link could be in a different directory
26345        cd `$DIRNAME $ISLINK`
26346        sym_link_dir=`$THEPWDCMD -P`
26347        sym_link_file=`$BASENAME $ISLINK`
26348        let COUNTER=COUNTER+1
26349      done
26350      cd $STARTDIR
26351      BINARY=$sym_link_dir/$sym_link_file
26352    fi
26353  fi
26354
26355    BOOT_JDK=`dirname "$BINARY"`
26356    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26357    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26358      # Looks like we found ourselves an JDK
26359      BOOT_JDK_FOUND=maybe
26360      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26361$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26362    fi
26363  fi
26364
26365
26366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26368      # Do we have a bin/java?
26369      if test ! -x "$BOOT_JDK/bin/java"; then
26370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26372        BOOT_JDK_FOUND=no
26373      else
26374        # Do we have a bin/javac?
26375        if test ! -x "$BOOT_JDK/bin/javac"; then
26376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26380          BOOT_JDK_FOUND=no
26381        else
26382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26384
26385          # Extra M4 quote needed to protect [] in grep expression.
26386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26387          if test "x$FOUND_CORRECT_VERSION" = x; then
26388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26392            BOOT_JDK_FOUND=no
26393          else
26394            # We're done! :-)
26395            BOOT_JDK_FOUND=yes
26396
26397  # Only process if variable expands to non-empty
26398
26399  if test "x$BOOT_JDK" != x; then
26400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26401
26402  # Input might be given as Windows format, start by converting to
26403  # unix format.
26404  path="$BOOT_JDK"
26405  new_path=`$CYGPATH -u "$path"`
26406
26407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26410  # "foo.exe" is OK but "foo" is an error.
26411  #
26412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26413  # It is also a way to make sure we got the proper file name for the real test later on.
26414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26415  if test "x$test_shortpath" = x; then
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26419  fi
26420
26421  # Call helper function which possibly converts this using DOS-style short mode.
26422  # If so, the updated path is stored in $new_path.
26423
26424  input_path="$new_path"
26425  # Check if we need to convert this using DOS-style short mode. If the path
26426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26427  # take no chances and rewrite it.
26428  # Note: m4 eats our [], so we need to use [ and ] instead.
26429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26430  if test "x$has_forbidden_chars" != x; then
26431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26435      # Going to short mode and back again did indeed matter. Since short mode is
26436      # case insensitive, let's make it lowercase to improve readability.
26437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26438      # Now convert it back to Unix-style (cygpath)
26439      input_path=`$CYGPATH -u "$shortmode_path"`
26440      new_path="$input_path"
26441    fi
26442  fi
26443
26444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26445  if test "x$test_cygdrive_prefix" = x; then
26446    # As a simple fix, exclude /usr/bin since it's not a real path.
26447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26449      # a path prefixed by /cygdrive for fixpath to work.
26450      new_path="$CYGWIN_ROOT_PATH$input_path"
26451    fi
26452  fi
26453
26454
26455  if test "x$path" != "x$new_path"; then
26456    BOOT_JDK="$new_path"
26457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26459  fi
26460
26461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26462
26463  path="$BOOT_JDK"
26464  has_colon=`$ECHO $path | $GREP ^.:`
26465  new_path="$path"
26466  if test "x$has_colon" = x; then
26467    # Not in mixed or Windows style, start by that.
26468    new_path=`cmd //c echo $path`
26469  fi
26470
26471
26472  input_path="$new_path"
26473  # Check if we need to convert this using DOS-style short mode. If the path
26474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26475  # take no chances and rewrite it.
26476  # Note: m4 eats our [], so we need to use [ and ] instead.
26477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26478  if test "x$has_forbidden_chars" != x; then
26479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26481  fi
26482
26483
26484  windows_path="$new_path"
26485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26486    unix_path=`$CYGPATH -u "$windows_path"`
26487    new_path="$unix_path"
26488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26490    new_path="$unix_path"
26491  fi
26492
26493  if test "x$path" != "x$new_path"; then
26494    BOOT_JDK="$new_path"
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26497  fi
26498
26499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26501
26502    else
26503      # We're on a unix platform. Hooray! :)
26504      path="$BOOT_JDK"
26505      has_space=`$ECHO "$path" | $GREP " "`
26506      if test "x$has_space" != x; then
26507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26510      fi
26511
26512      # Use eval to expand a potential ~
26513      eval path="$path"
26514      if test ! -f "$path" && test ! -d "$path"; then
26515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26516      fi
26517
26518      if test -d "$path"; then
26519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26520      else
26521        dir="`$DIRNAME "$path"`"
26522        base="`$BASENAME "$path"`"
26523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26524      fi
26525    fi
26526  fi
26527
26528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26529$as_echo_n "checking for Boot JDK... " >&6; }
26530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26531$as_echo "$BOOT_JDK" >&6; }
26532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26533$as_echo_n "checking Boot JDK version... " >&6; }
26534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26536$as_echo "$BOOT_JDK_VERSION" >&6; }
26537          fi # end check jdk version
26538        fi # end check javac
26539      fi # end check java
26540    fi # end check boot jdk found
26541  fi
26542
26543
26544  # Test: Is there a JDK installed in default, well-known locations?
26545
26546  if test "x$BOOT_JDK_FOUND" = xno; then
26547    # Now execute the test
26548
26549  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26550
26551  if test "x$BOOT_JDK_FOUND" = xno; then
26552    # Now execute the test
26553
26554  if test "x$ProgramW6432" != x; then
26555    VIRTUAL_DIR="$ProgramW6432/Java"
26556
26557  windows_path="$VIRTUAL_DIR"
26558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26559    unix_path=`$CYGPATH -u "$windows_path"`
26560    VIRTUAL_DIR="$unix_path"
26561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26563    VIRTUAL_DIR="$unix_path"
26564  fi
26565
26566
26567  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26568  BOOT_JDK_SUFFIX=""
26569  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26570  if test "x$ALL_JDKS_FOUND" != x; then
26571    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26572
26573  if test "x$BOOT_JDK_FOUND" = xno; then
26574    # Now execute the test
26575
26576        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26577        if test -d "$BOOT_JDK"; then
26578          BOOT_JDK_FOUND=maybe
26579          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26580$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26581        fi
26582
26583
26584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26586      # Do we have a bin/java?
26587      if test ! -x "$BOOT_JDK/bin/java"; then
26588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26590        BOOT_JDK_FOUND=no
26591      else
26592        # Do we have a bin/javac?
26593        if test ! -x "$BOOT_JDK/bin/javac"; then
26594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26598          BOOT_JDK_FOUND=no
26599        else
26600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26602
26603          # Extra M4 quote needed to protect [] in grep expression.
26604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26605          if test "x$FOUND_CORRECT_VERSION" = x; then
26606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26610            BOOT_JDK_FOUND=no
26611          else
26612            # We're done! :-)
26613            BOOT_JDK_FOUND=yes
26614
26615  # Only process if variable expands to non-empty
26616
26617  if test "x$BOOT_JDK" != x; then
26618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619
26620  # Input might be given as Windows format, start by converting to
26621  # unix format.
26622  path="$BOOT_JDK"
26623  new_path=`$CYGPATH -u "$path"`
26624
26625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26628  # "foo.exe" is OK but "foo" is an error.
26629  #
26630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26631  # It is also a way to make sure we got the proper file name for the real test later on.
26632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26633  if test "x$test_shortpath" = x; then
26634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26637  fi
26638
26639  # Call helper function which possibly converts this using DOS-style short mode.
26640  # If so, the updated path is stored in $new_path.
26641
26642  input_path="$new_path"
26643  # Check if we need to convert this using DOS-style short mode. If the path
26644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26645  # take no chances and rewrite it.
26646  # Note: m4 eats our [], so we need to use [ and ] instead.
26647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26648  if test "x$has_forbidden_chars" != x; then
26649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26653      # Going to short mode and back again did indeed matter. Since short mode is
26654      # case insensitive, let's make it lowercase to improve readability.
26655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26656      # Now convert it back to Unix-style (cygpath)
26657      input_path=`$CYGPATH -u "$shortmode_path"`
26658      new_path="$input_path"
26659    fi
26660  fi
26661
26662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26663  if test "x$test_cygdrive_prefix" = x; then
26664    # As a simple fix, exclude /usr/bin since it's not a real path.
26665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26667      # a path prefixed by /cygdrive for fixpath to work.
26668      new_path="$CYGWIN_ROOT_PATH$input_path"
26669    fi
26670  fi
26671
26672
26673  if test "x$path" != "x$new_path"; then
26674    BOOT_JDK="$new_path"
26675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26677  fi
26678
26679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26680
26681  path="$BOOT_JDK"
26682  has_colon=`$ECHO $path | $GREP ^.:`
26683  new_path="$path"
26684  if test "x$has_colon" = x; then
26685    # Not in mixed or Windows style, start by that.
26686    new_path=`cmd //c echo $path`
26687  fi
26688
26689
26690  input_path="$new_path"
26691  # Check if we need to convert this using DOS-style short mode. If the path
26692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26693  # take no chances and rewrite it.
26694  # Note: m4 eats our [], so we need to use [ and ] instead.
26695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26696  if test "x$has_forbidden_chars" != x; then
26697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26699  fi
26700
26701
26702  windows_path="$new_path"
26703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26704    unix_path=`$CYGPATH -u "$windows_path"`
26705    new_path="$unix_path"
26706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26708    new_path="$unix_path"
26709  fi
26710
26711  if test "x$path" != "x$new_path"; then
26712    BOOT_JDK="$new_path"
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26715  fi
26716
26717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26719
26720    else
26721      # We're on a unix platform. Hooray! :)
26722      path="$BOOT_JDK"
26723      has_space=`$ECHO "$path" | $GREP " "`
26724      if test "x$has_space" != x; then
26725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26728      fi
26729
26730      # Use eval to expand a potential ~
26731      eval path="$path"
26732      if test ! -f "$path" && test ! -d "$path"; then
26733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26734      fi
26735
26736      if test -d "$path"; then
26737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26738      else
26739        dir="`$DIRNAME "$path"`"
26740        base="`$BASENAME "$path"`"
26741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26742      fi
26743    fi
26744  fi
26745
26746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26747$as_echo_n "checking for Boot JDK... " >&6; }
26748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26749$as_echo "$BOOT_JDK" >&6; }
26750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26751$as_echo_n "checking Boot JDK version... " >&6; }
26752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26754$as_echo "$BOOT_JDK_VERSION" >&6; }
26755          fi # end check jdk version
26756        fi # end check javac
26757      fi # end check java
26758    fi # end check boot jdk found
26759  fi
26760
26761    done
26762  fi
26763
26764  fi
26765
26766
26767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26769      # Do we have a bin/java?
26770      if test ! -x "$BOOT_JDK/bin/java"; then
26771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26773        BOOT_JDK_FOUND=no
26774      else
26775        # Do we have a bin/javac?
26776        if test ! -x "$BOOT_JDK/bin/javac"; then
26777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26781          BOOT_JDK_FOUND=no
26782        else
26783          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26784          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26785
26786          # Extra M4 quote needed to protect [] in grep expression.
26787          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26788          if test "x$FOUND_CORRECT_VERSION" = x; then
26789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26792$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26793            BOOT_JDK_FOUND=no
26794          else
26795            # We're done! :-)
26796            BOOT_JDK_FOUND=yes
26797
26798  # Only process if variable expands to non-empty
26799
26800  if test "x$BOOT_JDK" != x; then
26801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26802
26803  # Input might be given as Windows format, start by converting to
26804  # unix format.
26805  path="$BOOT_JDK"
26806  new_path=`$CYGPATH -u "$path"`
26807
26808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26811  # "foo.exe" is OK but "foo" is an error.
26812  #
26813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26814  # It is also a way to make sure we got the proper file name for the real test later on.
26815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26816  if test "x$test_shortpath" = x; then
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26819    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26820  fi
26821
26822  # Call helper function which possibly converts this using DOS-style short mode.
26823  # If so, the updated path is stored in $new_path.
26824
26825  input_path="$new_path"
26826  # Check if we need to convert this using DOS-style short mode. If the path
26827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26828  # take no chances and rewrite it.
26829  # Note: m4 eats our [], so we need to use [ and ] instead.
26830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26831  if test "x$has_forbidden_chars" != x; then
26832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26836      # Going to short mode and back again did indeed matter. Since short mode is
26837      # case insensitive, let's make it lowercase to improve readability.
26838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26839      # Now convert it back to Unix-style (cygpath)
26840      input_path=`$CYGPATH -u "$shortmode_path"`
26841      new_path="$input_path"
26842    fi
26843  fi
26844
26845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26846  if test "x$test_cygdrive_prefix" = x; then
26847    # As a simple fix, exclude /usr/bin since it's not a real path.
26848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26850      # a path prefixed by /cygdrive for fixpath to work.
26851      new_path="$CYGWIN_ROOT_PATH$input_path"
26852    fi
26853  fi
26854
26855
26856  if test "x$path" != "x$new_path"; then
26857    BOOT_JDK="$new_path"
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26860  fi
26861
26862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26863
26864  path="$BOOT_JDK"
26865  has_colon=`$ECHO $path | $GREP ^.:`
26866  new_path="$path"
26867  if test "x$has_colon" = x; then
26868    # Not in mixed or Windows style, start by that.
26869    new_path=`cmd //c echo $path`
26870  fi
26871
26872
26873  input_path="$new_path"
26874  # Check if we need to convert this using DOS-style short mode. If the path
26875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26876  # take no chances and rewrite it.
26877  # Note: m4 eats our [], so we need to use [ and ] instead.
26878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26879  if test "x$has_forbidden_chars" != x; then
26880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26882  fi
26883
26884
26885  windows_path="$new_path"
26886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26887    unix_path=`$CYGPATH -u "$windows_path"`
26888    new_path="$unix_path"
26889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26891    new_path="$unix_path"
26892  fi
26893
26894  if test "x$path" != "x$new_path"; then
26895    BOOT_JDK="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26898  fi
26899
26900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26902
26903    else
26904      # We're on a unix platform. Hooray! :)
26905      path="$BOOT_JDK"
26906      has_space=`$ECHO "$path" | $GREP " "`
26907      if test "x$has_space" != x; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26911      fi
26912
26913      # Use eval to expand a potential ~
26914      eval path="$path"
26915      if test ! -f "$path" && test ! -d "$path"; then
26916        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26917      fi
26918
26919      if test -d "$path"; then
26920        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26921      else
26922        dir="`$DIRNAME "$path"`"
26923        base="`$BASENAME "$path"`"
26924        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26925      fi
26926    fi
26927  fi
26928
26929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26930$as_echo_n "checking for Boot JDK... " >&6; }
26931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26932$as_echo "$BOOT_JDK" >&6; }
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26934$as_echo_n "checking Boot JDK version... " >&6; }
26935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26937$as_echo "$BOOT_JDK_VERSION" >&6; }
26938          fi # end check jdk version
26939        fi # end check javac
26940      fi # end check java
26941    fi # end check boot jdk found
26942  fi
26943
26944
26945  if test "x$BOOT_JDK_FOUND" = xno; then
26946    # Now execute the test
26947
26948  if test "x$PROGRAMW6432" != x; then
26949    VIRTUAL_DIR="$PROGRAMW6432/Java"
26950
26951  windows_path="$VIRTUAL_DIR"
26952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26953    unix_path=`$CYGPATH -u "$windows_path"`
26954    VIRTUAL_DIR="$unix_path"
26955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26957    VIRTUAL_DIR="$unix_path"
26958  fi
26959
26960
26961  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26962  BOOT_JDK_SUFFIX=""
26963  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26964  if test "x$ALL_JDKS_FOUND" != x; then
26965    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26966
26967  if test "x$BOOT_JDK_FOUND" = xno; then
26968    # Now execute the test
26969
26970        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26971        if test -d "$BOOT_JDK"; then
26972          BOOT_JDK_FOUND=maybe
26973          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26974$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26975        fi
26976
26977
26978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26980      # Do we have a bin/java?
26981      if test ! -x "$BOOT_JDK/bin/java"; then
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26984        BOOT_JDK_FOUND=no
26985      else
26986        # Do we have a bin/javac?
26987        if test ! -x "$BOOT_JDK/bin/javac"; then
26988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26992          BOOT_JDK_FOUND=no
26993        else
26994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26996
26997          # Extra M4 quote needed to protect [] in grep expression.
26998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26999          if test "x$FOUND_CORRECT_VERSION" = x; then
27000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27004            BOOT_JDK_FOUND=no
27005          else
27006            # We're done! :-)
27007            BOOT_JDK_FOUND=yes
27008
27009  # Only process if variable expands to non-empty
27010
27011  if test "x$BOOT_JDK" != x; then
27012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27013
27014  # Input might be given as Windows format, start by converting to
27015  # unix format.
27016  path="$BOOT_JDK"
27017  new_path=`$CYGPATH -u "$path"`
27018
27019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27022  # "foo.exe" is OK but "foo" is an error.
27023  #
27024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27025  # It is also a way to make sure we got the proper file name for the real test later on.
27026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27027  if test "x$test_shortpath" = x; then
27028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27031  fi
27032
27033  # Call helper function which possibly converts this using DOS-style short mode.
27034  # If so, the updated path is stored in $new_path.
27035
27036  input_path="$new_path"
27037  # Check if we need to convert this using DOS-style short mode. If the path
27038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27039  # take no chances and rewrite it.
27040  # Note: m4 eats our [], so we need to use [ and ] instead.
27041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27042  if test "x$has_forbidden_chars" != x; then
27043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27047      # Going to short mode and back again did indeed matter. Since short mode is
27048      # case insensitive, let's make it lowercase to improve readability.
27049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27050      # Now convert it back to Unix-style (cygpath)
27051      input_path=`$CYGPATH -u "$shortmode_path"`
27052      new_path="$input_path"
27053    fi
27054  fi
27055
27056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27057  if test "x$test_cygdrive_prefix" = x; then
27058    # As a simple fix, exclude /usr/bin since it's not a real path.
27059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27061      # a path prefixed by /cygdrive for fixpath to work.
27062      new_path="$CYGWIN_ROOT_PATH$input_path"
27063    fi
27064  fi
27065
27066
27067  if test "x$path" != "x$new_path"; then
27068    BOOT_JDK="$new_path"
27069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27071  fi
27072
27073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27074
27075  path="$BOOT_JDK"
27076  has_colon=`$ECHO $path | $GREP ^.:`
27077  new_path="$path"
27078  if test "x$has_colon" = x; then
27079    # Not in mixed or Windows style, start by that.
27080    new_path=`cmd //c echo $path`
27081  fi
27082
27083
27084  input_path="$new_path"
27085  # Check if we need to convert this using DOS-style short mode. If the path
27086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27087  # take no chances and rewrite it.
27088  # Note: m4 eats our [], so we need to use [ and ] instead.
27089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27090  if test "x$has_forbidden_chars" != x; then
27091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27093  fi
27094
27095
27096  windows_path="$new_path"
27097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27098    unix_path=`$CYGPATH -u "$windows_path"`
27099    new_path="$unix_path"
27100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27102    new_path="$unix_path"
27103  fi
27104
27105  if test "x$path" != "x$new_path"; then
27106    BOOT_JDK="$new_path"
27107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27109  fi
27110
27111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27113
27114    else
27115      # We're on a unix platform. Hooray! :)
27116      path="$BOOT_JDK"
27117      has_space=`$ECHO "$path" | $GREP " "`
27118      if test "x$has_space" != x; then
27119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27122      fi
27123
27124      # Use eval to expand a potential ~
27125      eval path="$path"
27126      if test ! -f "$path" && test ! -d "$path"; then
27127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27128      fi
27129
27130      if test -d "$path"; then
27131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27132      else
27133        dir="`$DIRNAME "$path"`"
27134        base="`$BASENAME "$path"`"
27135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27136      fi
27137    fi
27138  fi
27139
27140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27141$as_echo_n "checking for Boot JDK... " >&6; }
27142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27143$as_echo "$BOOT_JDK" >&6; }
27144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27145$as_echo_n "checking Boot JDK version... " >&6; }
27146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27148$as_echo "$BOOT_JDK_VERSION" >&6; }
27149          fi # end check jdk version
27150        fi # end check javac
27151      fi # end check java
27152    fi # end check boot jdk found
27153  fi
27154
27155    done
27156  fi
27157
27158  fi
27159
27160
27161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27163      # Do we have a bin/java?
27164      if test ! -x "$BOOT_JDK/bin/java"; then
27165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27167        BOOT_JDK_FOUND=no
27168      else
27169        # Do we have a bin/javac?
27170        if test ! -x "$BOOT_JDK/bin/javac"; then
27171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27175          BOOT_JDK_FOUND=no
27176        else
27177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27179
27180          # Extra M4 quote needed to protect [] in grep expression.
27181          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27182          if test "x$FOUND_CORRECT_VERSION" = x; then
27183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27187            BOOT_JDK_FOUND=no
27188          else
27189            # We're done! :-)
27190            BOOT_JDK_FOUND=yes
27191
27192  # Only process if variable expands to non-empty
27193
27194  if test "x$BOOT_JDK" != x; then
27195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196
27197  # Input might be given as Windows format, start by converting to
27198  # unix format.
27199  path="$BOOT_JDK"
27200  new_path=`$CYGPATH -u "$path"`
27201
27202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27205  # "foo.exe" is OK but "foo" is an error.
27206  #
27207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27208  # It is also a way to make sure we got the proper file name for the real test later on.
27209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27210  if test "x$test_shortpath" = x; then
27211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27214  fi
27215
27216  # Call helper function which possibly converts this using DOS-style short mode.
27217  # If so, the updated path is stored in $new_path.
27218
27219  input_path="$new_path"
27220  # Check if we need to convert this using DOS-style short mode. If the path
27221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27222  # take no chances and rewrite it.
27223  # Note: m4 eats our [], so we need to use [ and ] instead.
27224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27225  if test "x$has_forbidden_chars" != x; then
27226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27230      # Going to short mode and back again did indeed matter. Since short mode is
27231      # case insensitive, let's make it lowercase to improve readability.
27232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27233      # Now convert it back to Unix-style (cygpath)
27234      input_path=`$CYGPATH -u "$shortmode_path"`
27235      new_path="$input_path"
27236    fi
27237  fi
27238
27239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27240  if test "x$test_cygdrive_prefix" = x; then
27241    # As a simple fix, exclude /usr/bin since it's not a real path.
27242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27244      # a path prefixed by /cygdrive for fixpath to work.
27245      new_path="$CYGWIN_ROOT_PATH$input_path"
27246    fi
27247  fi
27248
27249
27250  if test "x$path" != "x$new_path"; then
27251    BOOT_JDK="$new_path"
27252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27254  fi
27255
27256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27257
27258  path="$BOOT_JDK"
27259  has_colon=`$ECHO $path | $GREP ^.:`
27260  new_path="$path"
27261  if test "x$has_colon" = x; then
27262    # Not in mixed or Windows style, start by that.
27263    new_path=`cmd //c echo $path`
27264  fi
27265
27266
27267  input_path="$new_path"
27268  # Check if we need to convert this using DOS-style short mode. If the path
27269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27270  # take no chances and rewrite it.
27271  # Note: m4 eats our [], so we need to use [ and ] instead.
27272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27273  if test "x$has_forbidden_chars" != x; then
27274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27276  fi
27277
27278
27279  windows_path="$new_path"
27280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27281    unix_path=`$CYGPATH -u "$windows_path"`
27282    new_path="$unix_path"
27283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27285    new_path="$unix_path"
27286  fi
27287
27288  if test "x$path" != "x$new_path"; then
27289    BOOT_JDK="$new_path"
27290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27292  fi
27293
27294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27296
27297    else
27298      # We're on a unix platform. Hooray! :)
27299      path="$BOOT_JDK"
27300      has_space=`$ECHO "$path" | $GREP " "`
27301      if test "x$has_space" != x; then
27302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27305      fi
27306
27307      # Use eval to expand a potential ~
27308      eval path="$path"
27309      if test ! -f "$path" && test ! -d "$path"; then
27310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27311      fi
27312
27313      if test -d "$path"; then
27314        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27315      else
27316        dir="`$DIRNAME "$path"`"
27317        base="`$BASENAME "$path"`"
27318        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27319      fi
27320    fi
27321  fi
27322
27323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27324$as_echo_n "checking for Boot JDK... " >&6; }
27325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27326$as_echo "$BOOT_JDK" >&6; }
27327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27328$as_echo_n "checking Boot JDK version... " >&6; }
27329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27331$as_echo "$BOOT_JDK_VERSION" >&6; }
27332          fi # end check jdk version
27333        fi # end check javac
27334      fi # end check java
27335    fi # end check boot jdk found
27336  fi
27337
27338
27339  if test "x$BOOT_JDK_FOUND" = xno; then
27340    # Now execute the test
27341
27342  if test "x$PROGRAMFILES" != x; then
27343    VIRTUAL_DIR="$PROGRAMFILES/Java"
27344
27345  windows_path="$VIRTUAL_DIR"
27346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27347    unix_path=`$CYGPATH -u "$windows_path"`
27348    VIRTUAL_DIR="$unix_path"
27349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27351    VIRTUAL_DIR="$unix_path"
27352  fi
27353
27354
27355  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27356  BOOT_JDK_SUFFIX=""
27357  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27358  if test "x$ALL_JDKS_FOUND" != x; then
27359    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27360
27361  if test "x$BOOT_JDK_FOUND" = xno; then
27362    # Now execute the test
27363
27364        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27365        if test -d "$BOOT_JDK"; then
27366          BOOT_JDK_FOUND=maybe
27367          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27368$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27369        fi
27370
27371
27372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27374      # Do we have a bin/java?
27375      if test ! -x "$BOOT_JDK/bin/java"; then
27376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27378        BOOT_JDK_FOUND=no
27379      else
27380        # Do we have a bin/javac?
27381        if test ! -x "$BOOT_JDK/bin/javac"; then
27382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27386          BOOT_JDK_FOUND=no
27387        else
27388          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27389          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27390
27391          # Extra M4 quote needed to protect [] in grep expression.
27392          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27393          if test "x$FOUND_CORRECT_VERSION" = x; then
27394            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27396            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27397$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27398            BOOT_JDK_FOUND=no
27399          else
27400            # We're done! :-)
27401            BOOT_JDK_FOUND=yes
27402
27403  # Only process if variable expands to non-empty
27404
27405  if test "x$BOOT_JDK" != x; then
27406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27407
27408  # Input might be given as Windows format, start by converting to
27409  # unix format.
27410  path="$BOOT_JDK"
27411  new_path=`$CYGPATH -u "$path"`
27412
27413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27416  # "foo.exe" is OK but "foo" is an error.
27417  #
27418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27419  # It is also a way to make sure we got the proper file name for the real test later on.
27420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27421  if test "x$test_shortpath" = x; then
27422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27424    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27425  fi
27426
27427  # Call helper function which possibly converts this using DOS-style short mode.
27428  # If so, the updated path is stored in $new_path.
27429
27430  input_path="$new_path"
27431  # Check if we need to convert this using DOS-style short mode. If the path
27432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27433  # take no chances and rewrite it.
27434  # Note: m4 eats our [], so we need to use [ and ] instead.
27435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27436  if test "x$has_forbidden_chars" != x; then
27437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27441      # Going to short mode and back again did indeed matter. Since short mode is
27442      # case insensitive, let's make it lowercase to improve readability.
27443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27444      # Now convert it back to Unix-style (cygpath)
27445      input_path=`$CYGPATH -u "$shortmode_path"`
27446      new_path="$input_path"
27447    fi
27448  fi
27449
27450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27451  if test "x$test_cygdrive_prefix" = x; then
27452    # As a simple fix, exclude /usr/bin since it's not a real path.
27453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27455      # a path prefixed by /cygdrive for fixpath to work.
27456      new_path="$CYGWIN_ROOT_PATH$input_path"
27457    fi
27458  fi
27459
27460
27461  if test "x$path" != "x$new_path"; then
27462    BOOT_JDK="$new_path"
27463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27465  fi
27466
27467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27468
27469  path="$BOOT_JDK"
27470  has_colon=`$ECHO $path | $GREP ^.:`
27471  new_path="$path"
27472  if test "x$has_colon" = x; then
27473    # Not in mixed or Windows style, start by that.
27474    new_path=`cmd //c echo $path`
27475  fi
27476
27477
27478  input_path="$new_path"
27479  # Check if we need to convert this using DOS-style short mode. If the path
27480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27481  # take no chances and rewrite it.
27482  # Note: m4 eats our [], so we need to use [ and ] instead.
27483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27484  if test "x$has_forbidden_chars" != x; then
27485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27487  fi
27488
27489
27490  windows_path="$new_path"
27491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27492    unix_path=`$CYGPATH -u "$windows_path"`
27493    new_path="$unix_path"
27494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27496    new_path="$unix_path"
27497  fi
27498
27499  if test "x$path" != "x$new_path"; then
27500    BOOT_JDK="$new_path"
27501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27503  fi
27504
27505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27507
27508    else
27509      # We're on a unix platform. Hooray! :)
27510      path="$BOOT_JDK"
27511      has_space=`$ECHO "$path" | $GREP " "`
27512      if test "x$has_space" != x; then
27513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27516      fi
27517
27518      # Use eval to expand a potential ~
27519      eval path="$path"
27520      if test ! -f "$path" && test ! -d "$path"; then
27521        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27522      fi
27523
27524      if test -d "$path"; then
27525        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27526      else
27527        dir="`$DIRNAME "$path"`"
27528        base="`$BASENAME "$path"`"
27529        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27530      fi
27531    fi
27532  fi
27533
27534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27535$as_echo_n "checking for Boot JDK... " >&6; }
27536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27537$as_echo "$BOOT_JDK" >&6; }
27538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27539$as_echo_n "checking Boot JDK version... " >&6; }
27540            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27542$as_echo "$BOOT_JDK_VERSION" >&6; }
27543          fi # end check jdk version
27544        fi # end check javac
27545      fi # end check java
27546    fi # end check boot jdk found
27547  fi
27548
27549    done
27550  fi
27551
27552  fi
27553
27554
27555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27557      # Do we have a bin/java?
27558      if test ! -x "$BOOT_JDK/bin/java"; then
27559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27561        BOOT_JDK_FOUND=no
27562      else
27563        # Do we have a bin/javac?
27564        if test ! -x "$BOOT_JDK/bin/javac"; then
27565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27569          BOOT_JDK_FOUND=no
27570        else
27571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27573
27574          # Extra M4 quote needed to protect [] in grep expression.
27575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27576          if test "x$FOUND_CORRECT_VERSION" = x; then
27577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27581            BOOT_JDK_FOUND=no
27582          else
27583            # We're done! :-)
27584            BOOT_JDK_FOUND=yes
27585
27586  # Only process if variable expands to non-empty
27587
27588  if test "x$BOOT_JDK" != x; then
27589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590
27591  # Input might be given as Windows format, start by converting to
27592  # unix format.
27593  path="$BOOT_JDK"
27594  new_path=`$CYGPATH -u "$path"`
27595
27596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27599  # "foo.exe" is OK but "foo" is an error.
27600  #
27601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27602  # It is also a way to make sure we got the proper file name for the real test later on.
27603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27604  if test "x$test_shortpath" = x; then
27605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27608  fi
27609
27610  # Call helper function which possibly converts this using DOS-style short mode.
27611  # If so, the updated path is stored in $new_path.
27612
27613  input_path="$new_path"
27614  # Check if we need to convert this using DOS-style short mode. If the path
27615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27616  # take no chances and rewrite it.
27617  # Note: m4 eats our [], so we need to use [ and ] instead.
27618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27619  if test "x$has_forbidden_chars" != x; then
27620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27624      # Going to short mode and back again did indeed matter. Since short mode is
27625      # case insensitive, let's make it lowercase to improve readability.
27626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27627      # Now convert it back to Unix-style (cygpath)
27628      input_path=`$CYGPATH -u "$shortmode_path"`
27629      new_path="$input_path"
27630    fi
27631  fi
27632
27633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27634  if test "x$test_cygdrive_prefix" = x; then
27635    # As a simple fix, exclude /usr/bin since it's not a real path.
27636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27638      # a path prefixed by /cygdrive for fixpath to work.
27639      new_path="$CYGWIN_ROOT_PATH$input_path"
27640    fi
27641  fi
27642
27643
27644  if test "x$path" != "x$new_path"; then
27645    BOOT_JDK="$new_path"
27646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27648  fi
27649
27650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27651
27652  path="$BOOT_JDK"
27653  has_colon=`$ECHO $path | $GREP ^.:`
27654  new_path="$path"
27655  if test "x$has_colon" = x; then
27656    # Not in mixed or Windows style, start by that.
27657    new_path=`cmd //c echo $path`
27658  fi
27659
27660
27661  input_path="$new_path"
27662  # Check if we need to convert this using DOS-style short mode. If the path
27663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27664  # take no chances and rewrite it.
27665  # Note: m4 eats our [], so we need to use [ and ] instead.
27666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27667  if test "x$has_forbidden_chars" != x; then
27668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27670  fi
27671
27672
27673  windows_path="$new_path"
27674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675    unix_path=`$CYGPATH -u "$windows_path"`
27676    new_path="$unix_path"
27677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27679    new_path="$unix_path"
27680  fi
27681
27682  if test "x$path" != "x$new_path"; then
27683    BOOT_JDK="$new_path"
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27686  fi
27687
27688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27690
27691    else
27692      # We're on a unix platform. Hooray! :)
27693      path="$BOOT_JDK"
27694      has_space=`$ECHO "$path" | $GREP " "`
27695      if test "x$has_space" != x; then
27696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27699      fi
27700
27701      # Use eval to expand a potential ~
27702      eval path="$path"
27703      if test ! -f "$path" && test ! -d "$path"; then
27704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27705      fi
27706
27707      if test -d "$path"; then
27708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27709      else
27710        dir="`$DIRNAME "$path"`"
27711        base="`$BASENAME "$path"`"
27712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27713      fi
27714    fi
27715  fi
27716
27717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27718$as_echo_n "checking for Boot JDK... " >&6; }
27719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27720$as_echo "$BOOT_JDK" >&6; }
27721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27722$as_echo_n "checking Boot JDK version... " >&6; }
27723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27725$as_echo "$BOOT_JDK_VERSION" >&6; }
27726          fi # end check jdk version
27727        fi # end check javac
27728      fi # end check java
27729    fi # end check boot jdk found
27730  fi
27731
27732
27733  if test "x$BOOT_JDK_FOUND" = xno; then
27734    # Now execute the test
27735
27736  if test "x$ProgramFiles" != x; then
27737    VIRTUAL_DIR="$ProgramFiles/Java"
27738
27739  windows_path="$VIRTUAL_DIR"
27740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27741    unix_path=`$CYGPATH -u "$windows_path"`
27742    VIRTUAL_DIR="$unix_path"
27743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27745    VIRTUAL_DIR="$unix_path"
27746  fi
27747
27748
27749  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27750  BOOT_JDK_SUFFIX=""
27751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27752  if test "x$ALL_JDKS_FOUND" != x; then
27753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27754
27755  if test "x$BOOT_JDK_FOUND" = xno; then
27756    # Now execute the test
27757
27758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27759        if test -d "$BOOT_JDK"; then
27760          BOOT_JDK_FOUND=maybe
27761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27763        fi
27764
27765
27766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27768      # Do we have a bin/java?
27769      if test ! -x "$BOOT_JDK/bin/java"; then
27770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27772        BOOT_JDK_FOUND=no
27773      else
27774        # Do we have a bin/javac?
27775        if test ! -x "$BOOT_JDK/bin/javac"; then
27776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27780          BOOT_JDK_FOUND=no
27781        else
27782          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27783          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27784
27785          # Extra M4 quote needed to protect [] in grep expression.
27786          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27787          if test "x$FOUND_CORRECT_VERSION" = x; then
27788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27790            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27791$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27792            BOOT_JDK_FOUND=no
27793          else
27794            # We're done! :-)
27795            BOOT_JDK_FOUND=yes
27796
27797  # Only process if variable expands to non-empty
27798
27799  if test "x$BOOT_JDK" != x; then
27800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27801
27802  # Input might be given as Windows format, start by converting to
27803  # unix format.
27804  path="$BOOT_JDK"
27805  new_path=`$CYGPATH -u "$path"`
27806
27807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27810  # "foo.exe" is OK but "foo" is an error.
27811  #
27812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27813  # It is also a way to make sure we got the proper file name for the real test later on.
27814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27815  if test "x$test_shortpath" = x; then
27816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27819  fi
27820
27821  # Call helper function which possibly converts this using DOS-style short mode.
27822  # If so, the updated path is stored in $new_path.
27823
27824  input_path="$new_path"
27825  # Check if we need to convert this using DOS-style short mode. If the path
27826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27827  # take no chances and rewrite it.
27828  # Note: m4 eats our [], so we need to use [ and ] instead.
27829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27830  if test "x$has_forbidden_chars" != x; then
27831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27835      # Going to short mode and back again did indeed matter. Since short mode is
27836      # case insensitive, let's make it lowercase to improve readability.
27837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27838      # Now convert it back to Unix-style (cygpath)
27839      input_path=`$CYGPATH -u "$shortmode_path"`
27840      new_path="$input_path"
27841    fi
27842  fi
27843
27844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27845  if test "x$test_cygdrive_prefix" = x; then
27846    # As a simple fix, exclude /usr/bin since it's not a real path.
27847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27849      # a path prefixed by /cygdrive for fixpath to work.
27850      new_path="$CYGWIN_ROOT_PATH$input_path"
27851    fi
27852  fi
27853
27854
27855  if test "x$path" != "x$new_path"; then
27856    BOOT_JDK="$new_path"
27857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27859  fi
27860
27861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27862
27863  path="$BOOT_JDK"
27864  has_colon=`$ECHO $path | $GREP ^.:`
27865  new_path="$path"
27866  if test "x$has_colon" = x; then
27867    # Not in mixed or Windows style, start by that.
27868    new_path=`cmd //c echo $path`
27869  fi
27870
27871
27872  input_path="$new_path"
27873  # Check if we need to convert this using DOS-style short mode. If the path
27874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27875  # take no chances and rewrite it.
27876  # Note: m4 eats our [], so we need to use [ and ] instead.
27877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27878  if test "x$has_forbidden_chars" != x; then
27879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27881  fi
27882
27883
27884  windows_path="$new_path"
27885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27886    unix_path=`$CYGPATH -u "$windows_path"`
27887    new_path="$unix_path"
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27890    new_path="$unix_path"
27891  fi
27892
27893  if test "x$path" != "x$new_path"; then
27894    BOOT_JDK="$new_path"
27895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27897  fi
27898
27899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27901
27902    else
27903      # We're on a unix platform. Hooray! :)
27904      path="$BOOT_JDK"
27905      has_space=`$ECHO "$path" | $GREP " "`
27906      if test "x$has_space" != x; then
27907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27910      fi
27911
27912      # Use eval to expand a potential ~
27913      eval path="$path"
27914      if test ! -f "$path" && test ! -d "$path"; then
27915        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27916      fi
27917
27918      if test -d "$path"; then
27919        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27920      else
27921        dir="`$DIRNAME "$path"`"
27922        base="`$BASENAME "$path"`"
27923        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27924      fi
27925    fi
27926  fi
27927
27928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27929$as_echo_n "checking for Boot JDK... " >&6; }
27930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27931$as_echo "$BOOT_JDK" >&6; }
27932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27933$as_echo_n "checking Boot JDK version... " >&6; }
27934            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27936$as_echo "$BOOT_JDK_VERSION" >&6; }
27937          fi # end check jdk version
27938        fi # end check javac
27939      fi # end check java
27940    fi # end check boot jdk found
27941  fi
27942
27943    done
27944  fi
27945
27946  fi
27947
27948
27949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27951      # Do we have a bin/java?
27952      if test ! -x "$BOOT_JDK/bin/java"; then
27953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27955        BOOT_JDK_FOUND=no
27956      else
27957        # Do we have a bin/javac?
27958        if test ! -x "$BOOT_JDK/bin/javac"; then
27959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27963          BOOT_JDK_FOUND=no
27964        else
27965          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27966          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27967
27968          # Extra M4 quote needed to protect [] in grep expression.
27969          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27970          if test "x$FOUND_CORRECT_VERSION" = x; then
27971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27973            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27974$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27975            BOOT_JDK_FOUND=no
27976          else
27977            # We're done! :-)
27978            BOOT_JDK_FOUND=yes
27979
27980  # Only process if variable expands to non-empty
27981
27982  if test "x$BOOT_JDK" != x; then
27983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27984
27985  # Input might be given as Windows format, start by converting to
27986  # unix format.
27987  path="$BOOT_JDK"
27988  new_path=`$CYGPATH -u "$path"`
27989
27990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27993  # "foo.exe" is OK but "foo" is an error.
27994  #
27995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27996  # It is also a way to make sure we got the proper file name for the real test later on.
27997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27998  if test "x$test_shortpath" = x; then
27999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28002  fi
28003
28004  # Call helper function which possibly converts this using DOS-style short mode.
28005  # If so, the updated path is stored in $new_path.
28006
28007  input_path="$new_path"
28008  # Check if we need to convert this using DOS-style short mode. If the path
28009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28010  # take no chances and rewrite it.
28011  # Note: m4 eats our [], so we need to use [ and ] instead.
28012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28013  if test "x$has_forbidden_chars" != x; then
28014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28018      # Going to short mode and back again did indeed matter. Since short mode is
28019      # case insensitive, let's make it lowercase to improve readability.
28020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28021      # Now convert it back to Unix-style (cygpath)
28022      input_path=`$CYGPATH -u "$shortmode_path"`
28023      new_path="$input_path"
28024    fi
28025  fi
28026
28027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28028  if test "x$test_cygdrive_prefix" = x; then
28029    # As a simple fix, exclude /usr/bin since it's not a real path.
28030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28032      # a path prefixed by /cygdrive for fixpath to work.
28033      new_path="$CYGWIN_ROOT_PATH$input_path"
28034    fi
28035  fi
28036
28037
28038  if test "x$path" != "x$new_path"; then
28039    BOOT_JDK="$new_path"
28040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28042  fi
28043
28044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28045
28046  path="$BOOT_JDK"
28047  has_colon=`$ECHO $path | $GREP ^.:`
28048  new_path="$path"
28049  if test "x$has_colon" = x; then
28050    # Not in mixed or Windows style, start by that.
28051    new_path=`cmd //c echo $path`
28052  fi
28053
28054
28055  input_path="$new_path"
28056  # Check if we need to convert this using DOS-style short mode. If the path
28057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28058  # take no chances and rewrite it.
28059  # Note: m4 eats our [], so we need to use [ and ] instead.
28060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28061  if test "x$has_forbidden_chars" != x; then
28062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28064  fi
28065
28066
28067  windows_path="$new_path"
28068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28069    unix_path=`$CYGPATH -u "$windows_path"`
28070    new_path="$unix_path"
28071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28073    new_path="$unix_path"
28074  fi
28075
28076  if test "x$path" != "x$new_path"; then
28077    BOOT_JDK="$new_path"
28078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28080  fi
28081
28082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28084
28085    else
28086      # We're on a unix platform. Hooray! :)
28087      path="$BOOT_JDK"
28088      has_space=`$ECHO "$path" | $GREP " "`
28089      if test "x$has_space" != x; then
28090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28093      fi
28094
28095      # Use eval to expand a potential ~
28096      eval path="$path"
28097      if test ! -f "$path" && test ! -d "$path"; then
28098        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28099      fi
28100
28101      if test -d "$path"; then
28102        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28103      else
28104        dir="`$DIRNAME "$path"`"
28105        base="`$BASENAME "$path"`"
28106        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28107      fi
28108    fi
28109  fi
28110
28111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28112$as_echo_n "checking for Boot JDK... " >&6; }
28113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28114$as_echo "$BOOT_JDK" >&6; }
28115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28116$as_echo_n "checking Boot JDK version... " >&6; }
28117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28119$as_echo "$BOOT_JDK_VERSION" >&6; }
28120          fi # end check jdk version
28121        fi # end check javac
28122      fi # end check java
28123    fi # end check boot jdk found
28124  fi
28125
28126
28127  if test "x$BOOT_JDK_FOUND" = xno; then
28128    # Now execute the test
28129
28130  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28131  BOOT_JDK_SUFFIX=""
28132  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28133  if test "x$ALL_JDKS_FOUND" != x; then
28134    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28135
28136  if test "x$BOOT_JDK_FOUND" = xno; then
28137    # Now execute the test
28138
28139        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28140        if test -d "$BOOT_JDK"; then
28141          BOOT_JDK_FOUND=maybe
28142          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28143$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28144        fi
28145
28146
28147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28149      # Do we have a bin/java?
28150      if test ! -x "$BOOT_JDK/bin/java"; then
28151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28153        BOOT_JDK_FOUND=no
28154      else
28155        # Do we have a bin/javac?
28156        if test ! -x "$BOOT_JDK/bin/javac"; then
28157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28161          BOOT_JDK_FOUND=no
28162        else
28163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28165
28166          # Extra M4 quote needed to protect [] in grep expression.
28167          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28168          if test "x$FOUND_CORRECT_VERSION" = x; then
28169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28173            BOOT_JDK_FOUND=no
28174          else
28175            # We're done! :-)
28176            BOOT_JDK_FOUND=yes
28177
28178  # Only process if variable expands to non-empty
28179
28180  if test "x$BOOT_JDK" != x; then
28181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28182
28183  # Input might be given as Windows format, start by converting to
28184  # unix format.
28185  path="$BOOT_JDK"
28186  new_path=`$CYGPATH -u "$path"`
28187
28188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28191  # "foo.exe" is OK but "foo" is an error.
28192  #
28193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28194  # It is also a way to make sure we got the proper file name for the real test later on.
28195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28196  if test "x$test_shortpath" = x; then
28197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28199    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28200  fi
28201
28202  # Call helper function which possibly converts this using DOS-style short mode.
28203  # If so, the updated path is stored in $new_path.
28204
28205  input_path="$new_path"
28206  # Check if we need to convert this using DOS-style short mode. If the path
28207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28208  # take no chances and rewrite it.
28209  # Note: m4 eats our [], so we need to use [ and ] instead.
28210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28211  if test "x$has_forbidden_chars" != x; then
28212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28216      # Going to short mode and back again did indeed matter. Since short mode is
28217      # case insensitive, let's make it lowercase to improve readability.
28218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28219      # Now convert it back to Unix-style (cygpath)
28220      input_path=`$CYGPATH -u "$shortmode_path"`
28221      new_path="$input_path"
28222    fi
28223  fi
28224
28225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28226  if test "x$test_cygdrive_prefix" = x; then
28227    # As a simple fix, exclude /usr/bin since it's not a real path.
28228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28230      # a path prefixed by /cygdrive for fixpath to work.
28231      new_path="$CYGWIN_ROOT_PATH$input_path"
28232    fi
28233  fi
28234
28235
28236  if test "x$path" != "x$new_path"; then
28237    BOOT_JDK="$new_path"
28238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28240  fi
28241
28242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28243
28244  path="$BOOT_JDK"
28245  has_colon=`$ECHO $path | $GREP ^.:`
28246  new_path="$path"
28247  if test "x$has_colon" = x; then
28248    # Not in mixed or Windows style, start by that.
28249    new_path=`cmd //c echo $path`
28250  fi
28251
28252
28253  input_path="$new_path"
28254  # Check if we need to convert this using DOS-style short mode. If the path
28255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28256  # take no chances and rewrite it.
28257  # Note: m4 eats our [], so we need to use [ and ] instead.
28258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28259  if test "x$has_forbidden_chars" != x; then
28260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28262  fi
28263
28264
28265  windows_path="$new_path"
28266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28267    unix_path=`$CYGPATH -u "$windows_path"`
28268    new_path="$unix_path"
28269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28271    new_path="$unix_path"
28272  fi
28273
28274  if test "x$path" != "x$new_path"; then
28275    BOOT_JDK="$new_path"
28276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28278  fi
28279
28280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28282
28283    else
28284      # We're on a unix platform. Hooray! :)
28285      path="$BOOT_JDK"
28286      has_space=`$ECHO "$path" | $GREP " "`
28287      if test "x$has_space" != x; then
28288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28291      fi
28292
28293      # Use eval to expand a potential ~
28294      eval path="$path"
28295      if test ! -f "$path" && test ! -d "$path"; then
28296        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28297      fi
28298
28299      if test -d "$path"; then
28300        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28301      else
28302        dir="`$DIRNAME "$path"`"
28303        base="`$BASENAME "$path"`"
28304        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28305      fi
28306    fi
28307  fi
28308
28309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28310$as_echo_n "checking for Boot JDK... " >&6; }
28311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28312$as_echo "$BOOT_JDK" >&6; }
28313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28314$as_echo_n "checking Boot JDK version... " >&6; }
28315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28317$as_echo "$BOOT_JDK_VERSION" >&6; }
28318          fi # end check jdk version
28319        fi # end check javac
28320      fi # end check java
28321    fi # end check boot jdk found
28322  fi
28323
28324    done
28325  fi
28326
28327
28328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28330      # Do we have a bin/java?
28331      if test ! -x "$BOOT_JDK/bin/java"; then
28332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28334        BOOT_JDK_FOUND=no
28335      else
28336        # Do we have a bin/javac?
28337        if test ! -x "$BOOT_JDK/bin/javac"; then
28338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28342          BOOT_JDK_FOUND=no
28343        else
28344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28346
28347          # Extra M4 quote needed to protect [] in grep expression.
28348          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28349          if test "x$FOUND_CORRECT_VERSION" = x; then
28350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28354            BOOT_JDK_FOUND=no
28355          else
28356            # We're done! :-)
28357            BOOT_JDK_FOUND=yes
28358
28359  # Only process if variable expands to non-empty
28360
28361  if test "x$BOOT_JDK" != x; then
28362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28363
28364  # Input might be given as Windows format, start by converting to
28365  # unix format.
28366  path="$BOOT_JDK"
28367  new_path=`$CYGPATH -u "$path"`
28368
28369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28372  # "foo.exe" is OK but "foo" is an error.
28373  #
28374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28375  # It is also a way to make sure we got the proper file name for the real test later on.
28376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28377  if test "x$test_shortpath" = x; then
28378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28381  fi
28382
28383  # Call helper function which possibly converts this using DOS-style short mode.
28384  # If so, the updated path is stored in $new_path.
28385
28386  input_path="$new_path"
28387  # Check if we need to convert this using DOS-style short mode. If the path
28388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28389  # take no chances and rewrite it.
28390  # Note: m4 eats our [], so we need to use [ and ] instead.
28391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28392  if test "x$has_forbidden_chars" != x; then
28393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28397      # Going to short mode and back again did indeed matter. Since short mode is
28398      # case insensitive, let's make it lowercase to improve readability.
28399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28400      # Now convert it back to Unix-style (cygpath)
28401      input_path=`$CYGPATH -u "$shortmode_path"`
28402      new_path="$input_path"
28403    fi
28404  fi
28405
28406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28407  if test "x$test_cygdrive_prefix" = x; then
28408    # As a simple fix, exclude /usr/bin since it's not a real path.
28409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28411      # a path prefixed by /cygdrive for fixpath to work.
28412      new_path="$CYGWIN_ROOT_PATH$input_path"
28413    fi
28414  fi
28415
28416
28417  if test "x$path" != "x$new_path"; then
28418    BOOT_JDK="$new_path"
28419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28421  fi
28422
28423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28424
28425  path="$BOOT_JDK"
28426  has_colon=`$ECHO $path | $GREP ^.:`
28427  new_path="$path"
28428  if test "x$has_colon" = x; then
28429    # Not in mixed or Windows style, start by that.
28430    new_path=`cmd //c echo $path`
28431  fi
28432
28433
28434  input_path="$new_path"
28435  # Check if we need to convert this using DOS-style short mode. If the path
28436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28437  # take no chances and rewrite it.
28438  # Note: m4 eats our [], so we need to use [ and ] instead.
28439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28440  if test "x$has_forbidden_chars" != x; then
28441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28443  fi
28444
28445
28446  windows_path="$new_path"
28447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28448    unix_path=`$CYGPATH -u "$windows_path"`
28449    new_path="$unix_path"
28450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28452    new_path="$unix_path"
28453  fi
28454
28455  if test "x$path" != "x$new_path"; then
28456    BOOT_JDK="$new_path"
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28459  fi
28460
28461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28463
28464    else
28465      # We're on a unix platform. Hooray! :)
28466      path="$BOOT_JDK"
28467      has_space=`$ECHO "$path" | $GREP " "`
28468      if test "x$has_space" != x; then
28469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28472      fi
28473
28474      # Use eval to expand a potential ~
28475      eval path="$path"
28476      if test ! -f "$path" && test ! -d "$path"; then
28477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28478      fi
28479
28480      if test -d "$path"; then
28481        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28482      else
28483        dir="`$DIRNAME "$path"`"
28484        base="`$BASENAME "$path"`"
28485        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28486      fi
28487    fi
28488  fi
28489
28490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28491$as_echo_n "checking for Boot JDK... " >&6; }
28492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28493$as_echo "$BOOT_JDK" >&6; }
28494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28495$as_echo_n "checking Boot JDK version... " >&6; }
28496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28498$as_echo "$BOOT_JDK_VERSION" >&6; }
28499          fi # end check jdk version
28500        fi # end check javac
28501      fi # end check java
28502    fi # end check boot jdk found
28503  fi
28504
28505  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28506
28507  if test "x$BOOT_JDK_FOUND" = xno; then
28508    # Now execute the test
28509
28510  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28511  BOOT_JDK_SUFFIX="/Contents/Home"
28512  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28513  if test "x$ALL_JDKS_FOUND" != x; then
28514    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28515
28516  if test "x$BOOT_JDK_FOUND" = xno; then
28517    # Now execute the test
28518
28519        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28520        if test -d "$BOOT_JDK"; then
28521          BOOT_JDK_FOUND=maybe
28522          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28523$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28524        fi
28525
28526
28527    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28528    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28529      # Do we have a bin/java?
28530      if test ! -x "$BOOT_JDK/bin/java"; then
28531        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28533        BOOT_JDK_FOUND=no
28534      else
28535        # Do we have a bin/javac?
28536        if test ! -x "$BOOT_JDK/bin/javac"; then
28537          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28539          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28540$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28541          BOOT_JDK_FOUND=no
28542        else
28543          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28544          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28545
28546          # Extra M4 quote needed to protect [] in grep expression.
28547          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28548          if test "x$FOUND_CORRECT_VERSION" = x; then
28549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28551            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28553            BOOT_JDK_FOUND=no
28554          else
28555            # We're done! :-)
28556            BOOT_JDK_FOUND=yes
28557
28558  # Only process if variable expands to non-empty
28559
28560  if test "x$BOOT_JDK" != x; then
28561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28562
28563  # Input might be given as Windows format, start by converting to
28564  # unix format.
28565  path="$BOOT_JDK"
28566  new_path=`$CYGPATH -u "$path"`
28567
28568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28571  # "foo.exe" is OK but "foo" is an error.
28572  #
28573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28574  # It is also a way to make sure we got the proper file name for the real test later on.
28575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28576  if test "x$test_shortpath" = x; then
28577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28580  fi
28581
28582  # Call helper function which possibly converts this using DOS-style short mode.
28583  # If so, the updated path is stored in $new_path.
28584
28585  input_path="$new_path"
28586  # Check if we need to convert this using DOS-style short mode. If the path
28587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28588  # take no chances and rewrite it.
28589  # Note: m4 eats our [], so we need to use [ and ] instead.
28590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28591  if test "x$has_forbidden_chars" != x; then
28592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28596      # Going to short mode and back again did indeed matter. Since short mode is
28597      # case insensitive, let's make it lowercase to improve readability.
28598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28599      # Now convert it back to Unix-style (cygpath)
28600      input_path=`$CYGPATH -u "$shortmode_path"`
28601      new_path="$input_path"
28602    fi
28603  fi
28604
28605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28606  if test "x$test_cygdrive_prefix" = x; then
28607    # As a simple fix, exclude /usr/bin since it's not a real path.
28608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28610      # a path prefixed by /cygdrive for fixpath to work.
28611      new_path="$CYGWIN_ROOT_PATH$input_path"
28612    fi
28613  fi
28614
28615
28616  if test "x$path" != "x$new_path"; then
28617    BOOT_JDK="$new_path"
28618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28620  fi
28621
28622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28623
28624  path="$BOOT_JDK"
28625  has_colon=`$ECHO $path | $GREP ^.:`
28626  new_path="$path"
28627  if test "x$has_colon" = x; then
28628    # Not in mixed or Windows style, start by that.
28629    new_path=`cmd //c echo $path`
28630  fi
28631
28632
28633  input_path="$new_path"
28634  # Check if we need to convert this using DOS-style short mode. If the path
28635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28636  # take no chances and rewrite it.
28637  # Note: m4 eats our [], so we need to use [ and ] instead.
28638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28639  if test "x$has_forbidden_chars" != x; then
28640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28642  fi
28643
28644
28645  windows_path="$new_path"
28646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28647    unix_path=`$CYGPATH -u "$windows_path"`
28648    new_path="$unix_path"
28649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28651    new_path="$unix_path"
28652  fi
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28662
28663    else
28664      # We're on a unix platform. Hooray! :)
28665      path="$BOOT_JDK"
28666      has_space=`$ECHO "$path" | $GREP " "`
28667      if test "x$has_space" != x; then
28668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28671      fi
28672
28673      # Use eval to expand a potential ~
28674      eval path="$path"
28675      if test ! -f "$path" && test ! -d "$path"; then
28676        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28677      fi
28678
28679      if test -d "$path"; then
28680        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28681      else
28682        dir="`$DIRNAME "$path"`"
28683        base="`$BASENAME "$path"`"
28684        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28685      fi
28686    fi
28687  fi
28688
28689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28690$as_echo_n "checking for Boot JDK... " >&6; }
28691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28692$as_echo "$BOOT_JDK" >&6; }
28693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28694$as_echo_n "checking Boot JDK version... " >&6; }
28695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28697$as_echo "$BOOT_JDK_VERSION" >&6; }
28698          fi # end check jdk version
28699        fi # end check javac
28700      fi # end check java
28701    fi # end check boot jdk found
28702  fi
28703
28704    done
28705  fi
28706
28707
28708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28710      # Do we have a bin/java?
28711      if test ! -x "$BOOT_JDK/bin/java"; then
28712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28714        BOOT_JDK_FOUND=no
28715      else
28716        # Do we have a bin/javac?
28717        if test ! -x "$BOOT_JDK/bin/javac"; then
28718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28722          BOOT_JDK_FOUND=no
28723        else
28724          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28725          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28726
28727          # Extra M4 quote needed to protect [] in grep expression.
28728          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28729          if test "x$FOUND_CORRECT_VERSION" = x; then
28730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28732            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28733$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28734            BOOT_JDK_FOUND=no
28735          else
28736            # We're done! :-)
28737            BOOT_JDK_FOUND=yes
28738
28739  # Only process if variable expands to non-empty
28740
28741  if test "x$BOOT_JDK" != x; then
28742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28743
28744  # Input might be given as Windows format, start by converting to
28745  # unix format.
28746  path="$BOOT_JDK"
28747  new_path=`$CYGPATH -u "$path"`
28748
28749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28752  # "foo.exe" is OK but "foo" is an error.
28753  #
28754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28755  # It is also a way to make sure we got the proper file name for the real test later on.
28756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28757  if test "x$test_shortpath" = x; then
28758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28760    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28761  fi
28762
28763  # Call helper function which possibly converts this using DOS-style short mode.
28764  # If so, the updated path is stored in $new_path.
28765
28766  input_path="$new_path"
28767  # Check if we need to convert this using DOS-style short mode. If the path
28768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28769  # take no chances and rewrite it.
28770  # Note: m4 eats our [], so we need to use [ and ] instead.
28771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28772  if test "x$has_forbidden_chars" != x; then
28773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28777      # Going to short mode and back again did indeed matter. Since short mode is
28778      # case insensitive, let's make it lowercase to improve readability.
28779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28780      # Now convert it back to Unix-style (cygpath)
28781      input_path=`$CYGPATH -u "$shortmode_path"`
28782      new_path="$input_path"
28783    fi
28784  fi
28785
28786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28787  if test "x$test_cygdrive_prefix" = x; then
28788    # As a simple fix, exclude /usr/bin since it's not a real path.
28789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28791      # a path prefixed by /cygdrive for fixpath to work.
28792      new_path="$CYGWIN_ROOT_PATH$input_path"
28793    fi
28794  fi
28795
28796
28797  if test "x$path" != "x$new_path"; then
28798    BOOT_JDK="$new_path"
28799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28801  fi
28802
28803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28804
28805  path="$BOOT_JDK"
28806  has_colon=`$ECHO $path | $GREP ^.:`
28807  new_path="$path"
28808  if test "x$has_colon" = x; then
28809    # Not in mixed or Windows style, start by that.
28810    new_path=`cmd //c echo $path`
28811  fi
28812
28813
28814  input_path="$new_path"
28815  # Check if we need to convert this using DOS-style short mode. If the path
28816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28817  # take no chances and rewrite it.
28818  # Note: m4 eats our [], so we need to use [ and ] instead.
28819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28820  if test "x$has_forbidden_chars" != x; then
28821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28823  fi
28824
28825
28826  windows_path="$new_path"
28827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28828    unix_path=`$CYGPATH -u "$windows_path"`
28829    new_path="$unix_path"
28830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28832    new_path="$unix_path"
28833  fi
28834
28835  if test "x$path" != "x$new_path"; then
28836    BOOT_JDK="$new_path"
28837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28839  fi
28840
28841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28843
28844    else
28845      # We're on a unix platform. Hooray! :)
28846      path="$BOOT_JDK"
28847      has_space=`$ECHO "$path" | $GREP " "`
28848      if test "x$has_space" != x; then
28849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28852      fi
28853
28854      # Use eval to expand a potential ~
28855      eval path="$path"
28856      if test ! -f "$path" && test ! -d "$path"; then
28857        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28858      fi
28859
28860      if test -d "$path"; then
28861        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28862      else
28863        dir="`$DIRNAME "$path"`"
28864        base="`$BASENAME "$path"`"
28865        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28866      fi
28867    fi
28868  fi
28869
28870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28871$as_echo_n "checking for Boot JDK... " >&6; }
28872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28873$as_echo "$BOOT_JDK" >&6; }
28874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28875$as_echo_n "checking Boot JDK version... " >&6; }
28876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28878$as_echo "$BOOT_JDK_VERSION" >&6; }
28879          fi # end check jdk version
28880        fi # end check javac
28881      fi # end check java
28882    fi # end check boot jdk found
28883  fi
28884
28885
28886  if test "x$BOOT_JDK_FOUND" = xno; then
28887    # Now execute the test
28888
28889  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28890  BOOT_JDK_SUFFIX="/Contents/Home"
28891  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28892  if test "x$ALL_JDKS_FOUND" != x; then
28893    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28894
28895  if test "x$BOOT_JDK_FOUND" = xno; then
28896    # Now execute the test
28897
28898        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28899        if test -d "$BOOT_JDK"; then
28900          BOOT_JDK_FOUND=maybe
28901          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28902$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28903        fi
28904
28905
28906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28908      # Do we have a bin/java?
28909      if test ! -x "$BOOT_JDK/bin/java"; then
28910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28912        BOOT_JDK_FOUND=no
28913      else
28914        # Do we have a bin/javac?
28915        if test ! -x "$BOOT_JDK/bin/javac"; then
28916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28920          BOOT_JDK_FOUND=no
28921        else
28922          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28923          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28924
28925          # Extra M4 quote needed to protect [] in grep expression.
28926          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28927          if test "x$FOUND_CORRECT_VERSION" = x; then
28928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28930            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28931$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28932            BOOT_JDK_FOUND=no
28933          else
28934            # We're done! :-)
28935            BOOT_JDK_FOUND=yes
28936
28937  # Only process if variable expands to non-empty
28938
28939  if test "x$BOOT_JDK" != x; then
28940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28941
28942  # Input might be given as Windows format, start by converting to
28943  # unix format.
28944  path="$BOOT_JDK"
28945  new_path=`$CYGPATH -u "$path"`
28946
28947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28950  # "foo.exe" is OK but "foo" is an error.
28951  #
28952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28953  # It is also a way to make sure we got the proper file name for the real test later on.
28954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28955  if test "x$test_shortpath" = x; then
28956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28959  fi
28960
28961  # Call helper function which possibly converts this using DOS-style short mode.
28962  # If so, the updated path is stored in $new_path.
28963
28964  input_path="$new_path"
28965  # Check if we need to convert this using DOS-style short mode. If the path
28966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28967  # take no chances and rewrite it.
28968  # Note: m4 eats our [], so we need to use [ and ] instead.
28969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28970  if test "x$has_forbidden_chars" != x; then
28971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28975      # Going to short mode and back again did indeed matter. Since short mode is
28976      # case insensitive, let's make it lowercase to improve readability.
28977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28978      # Now convert it back to Unix-style (cygpath)
28979      input_path=`$CYGPATH -u "$shortmode_path"`
28980      new_path="$input_path"
28981    fi
28982  fi
28983
28984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28985  if test "x$test_cygdrive_prefix" = x; then
28986    # As a simple fix, exclude /usr/bin since it's not a real path.
28987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28989      # a path prefixed by /cygdrive for fixpath to work.
28990      new_path="$CYGWIN_ROOT_PATH$input_path"
28991    fi
28992  fi
28993
28994
28995  if test "x$path" != "x$new_path"; then
28996    BOOT_JDK="$new_path"
28997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28999  fi
29000
29001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29002
29003  path="$BOOT_JDK"
29004  has_colon=`$ECHO $path | $GREP ^.:`
29005  new_path="$path"
29006  if test "x$has_colon" = x; then
29007    # Not in mixed or Windows style, start by that.
29008    new_path=`cmd //c echo $path`
29009  fi
29010
29011
29012  input_path="$new_path"
29013  # Check if we need to convert this using DOS-style short mode. If the path
29014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29015  # take no chances and rewrite it.
29016  # Note: m4 eats our [], so we need to use [ and ] instead.
29017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29018  if test "x$has_forbidden_chars" != x; then
29019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29021  fi
29022
29023
29024  windows_path="$new_path"
29025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29026    unix_path=`$CYGPATH -u "$windows_path"`
29027    new_path="$unix_path"
29028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29030    new_path="$unix_path"
29031  fi
29032
29033  if test "x$path" != "x$new_path"; then
29034    BOOT_JDK="$new_path"
29035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29037  fi
29038
29039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29041
29042    else
29043      # We're on a unix platform. Hooray! :)
29044      path="$BOOT_JDK"
29045      has_space=`$ECHO "$path" | $GREP " "`
29046      if test "x$has_space" != x; then
29047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29050      fi
29051
29052      # Use eval to expand a potential ~
29053      eval path="$path"
29054      if test ! -f "$path" && test ! -d "$path"; then
29055        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29056      fi
29057
29058      if test -d "$path"; then
29059        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29060      else
29061        dir="`$DIRNAME "$path"`"
29062        base="`$BASENAME "$path"`"
29063        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29064      fi
29065    fi
29066  fi
29067
29068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29069$as_echo_n "checking for Boot JDK... " >&6; }
29070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29071$as_echo "$BOOT_JDK" >&6; }
29072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29073$as_echo_n "checking Boot JDK version... " >&6; }
29074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29076$as_echo "$BOOT_JDK_VERSION" >&6; }
29077          fi # end check jdk version
29078        fi # end check javac
29079      fi # end check java
29080    fi # end check boot jdk found
29081  fi
29082
29083    done
29084  fi
29085
29086
29087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29089      # Do we have a bin/java?
29090      if test ! -x "$BOOT_JDK/bin/java"; then
29091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29093        BOOT_JDK_FOUND=no
29094      else
29095        # Do we have a bin/javac?
29096        if test ! -x "$BOOT_JDK/bin/javac"; then
29097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29101          BOOT_JDK_FOUND=no
29102        else
29103          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29104          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29105
29106          # Extra M4 quote needed to protect [] in grep expression.
29107          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29108          if test "x$FOUND_CORRECT_VERSION" = x; then
29109            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29111            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29113            BOOT_JDK_FOUND=no
29114          else
29115            # We're done! :-)
29116            BOOT_JDK_FOUND=yes
29117
29118  # Only process if variable expands to non-empty
29119
29120  if test "x$BOOT_JDK" != x; then
29121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29122
29123  # Input might be given as Windows format, start by converting to
29124  # unix format.
29125  path="$BOOT_JDK"
29126  new_path=`$CYGPATH -u "$path"`
29127
29128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29131  # "foo.exe" is OK but "foo" is an error.
29132  #
29133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29134  # It is also a way to make sure we got the proper file name for the real test later on.
29135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29136  if test "x$test_shortpath" = x; then
29137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29139    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29140  fi
29141
29142  # Call helper function which possibly converts this using DOS-style short mode.
29143  # If so, the updated path is stored in $new_path.
29144
29145  input_path="$new_path"
29146  # Check if we need to convert this using DOS-style short mode. If the path
29147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29148  # take no chances and rewrite it.
29149  # Note: m4 eats our [], so we need to use [ and ] instead.
29150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29151  if test "x$has_forbidden_chars" != x; then
29152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29156      # Going to short mode and back again did indeed matter. Since short mode is
29157      # case insensitive, let's make it lowercase to improve readability.
29158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29159      # Now convert it back to Unix-style (cygpath)
29160      input_path=`$CYGPATH -u "$shortmode_path"`
29161      new_path="$input_path"
29162    fi
29163  fi
29164
29165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29166  if test "x$test_cygdrive_prefix" = x; then
29167    # As a simple fix, exclude /usr/bin since it's not a real path.
29168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29170      # a path prefixed by /cygdrive for fixpath to work.
29171      new_path="$CYGWIN_ROOT_PATH$input_path"
29172    fi
29173  fi
29174
29175
29176  if test "x$path" != "x$new_path"; then
29177    BOOT_JDK="$new_path"
29178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29180  fi
29181
29182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29183
29184  path="$BOOT_JDK"
29185  has_colon=`$ECHO $path | $GREP ^.:`
29186  new_path="$path"
29187  if test "x$has_colon" = x; then
29188    # Not in mixed or Windows style, start by that.
29189    new_path=`cmd //c echo $path`
29190  fi
29191
29192
29193  input_path="$new_path"
29194  # Check if we need to convert this using DOS-style short mode. If the path
29195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29196  # take no chances and rewrite it.
29197  # Note: m4 eats our [], so we need to use [ and ] instead.
29198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29199  if test "x$has_forbidden_chars" != x; then
29200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29202  fi
29203
29204
29205  windows_path="$new_path"
29206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29207    unix_path=`$CYGPATH -u "$windows_path"`
29208    new_path="$unix_path"
29209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29211    new_path="$unix_path"
29212  fi
29213
29214  if test "x$path" != "x$new_path"; then
29215    BOOT_JDK="$new_path"
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29218  fi
29219
29220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29222
29223    else
29224      # We're on a unix platform. Hooray! :)
29225      path="$BOOT_JDK"
29226      has_space=`$ECHO "$path" | $GREP " "`
29227      if test "x$has_space" != x; then
29228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29231      fi
29232
29233      # Use eval to expand a potential ~
29234      eval path="$path"
29235      if test ! -f "$path" && test ! -d "$path"; then
29236        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29237      fi
29238
29239      if test -d "$path"; then
29240        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29241      else
29242        dir="`$DIRNAME "$path"`"
29243        base="`$BASENAME "$path"`"
29244        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29245      fi
29246    fi
29247  fi
29248
29249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29250$as_echo_n "checking for Boot JDK... " >&6; }
29251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29252$as_echo "$BOOT_JDK" >&6; }
29253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29254$as_echo_n "checking Boot JDK version... " >&6; }
29255            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29257$as_echo "$BOOT_JDK_VERSION" >&6; }
29258          fi # end check jdk version
29259        fi # end check javac
29260      fi # end check java
29261    fi # end check boot jdk found
29262  fi
29263
29264  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29265
29266  if test "x$BOOT_JDK_FOUND" = xno; then
29267    # Now execute the test
29268
29269  BOOT_JDK_PREFIX="/usr/lib/jvm"
29270  BOOT_JDK_SUFFIX=""
29271  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29272  if test "x$ALL_JDKS_FOUND" != x; then
29273    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29274
29275  if test "x$BOOT_JDK_FOUND" = xno; then
29276    # Now execute the test
29277
29278        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29279        if test -d "$BOOT_JDK"; then
29280          BOOT_JDK_FOUND=maybe
29281          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29282$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29283        fi
29284
29285
29286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29288      # Do we have a bin/java?
29289      if test ! -x "$BOOT_JDK/bin/java"; then
29290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29292        BOOT_JDK_FOUND=no
29293      else
29294        # Do we have a bin/javac?
29295        if test ! -x "$BOOT_JDK/bin/javac"; then
29296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29300          BOOT_JDK_FOUND=no
29301        else
29302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29304
29305          # Extra M4 quote needed to protect [] in grep expression.
29306          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29307          if test "x$FOUND_CORRECT_VERSION" = x; then
29308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29312            BOOT_JDK_FOUND=no
29313          else
29314            # We're done! :-)
29315            BOOT_JDK_FOUND=yes
29316
29317  # Only process if variable expands to non-empty
29318
29319  if test "x$BOOT_JDK" != x; then
29320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29321
29322  # Input might be given as Windows format, start by converting to
29323  # unix format.
29324  path="$BOOT_JDK"
29325  new_path=`$CYGPATH -u "$path"`
29326
29327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29330  # "foo.exe" is OK but "foo" is an error.
29331  #
29332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29333  # It is also a way to make sure we got the proper file name for the real test later on.
29334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29335  if test "x$test_shortpath" = x; then
29336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29339  fi
29340
29341  # Call helper function which possibly converts this using DOS-style short mode.
29342  # If so, the updated path is stored in $new_path.
29343
29344  input_path="$new_path"
29345  # Check if we need to convert this using DOS-style short mode. If the path
29346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29347  # take no chances and rewrite it.
29348  # Note: m4 eats our [], so we need to use [ and ] instead.
29349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29350  if test "x$has_forbidden_chars" != x; then
29351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29355      # Going to short mode and back again did indeed matter. Since short mode is
29356      # case insensitive, let's make it lowercase to improve readability.
29357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29358      # Now convert it back to Unix-style (cygpath)
29359      input_path=`$CYGPATH -u "$shortmode_path"`
29360      new_path="$input_path"
29361    fi
29362  fi
29363
29364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29365  if test "x$test_cygdrive_prefix" = x; then
29366    # As a simple fix, exclude /usr/bin since it's not a real path.
29367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29369      # a path prefixed by /cygdrive for fixpath to work.
29370      new_path="$CYGWIN_ROOT_PATH$input_path"
29371    fi
29372  fi
29373
29374
29375  if test "x$path" != "x$new_path"; then
29376    BOOT_JDK="$new_path"
29377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29379  fi
29380
29381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29382
29383  path="$BOOT_JDK"
29384  has_colon=`$ECHO $path | $GREP ^.:`
29385  new_path="$path"
29386  if test "x$has_colon" = x; then
29387    # Not in mixed or Windows style, start by that.
29388    new_path=`cmd //c echo $path`
29389  fi
29390
29391
29392  input_path="$new_path"
29393  # Check if we need to convert this using DOS-style short mode. If the path
29394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29395  # take no chances and rewrite it.
29396  # Note: m4 eats our [], so we need to use [ and ] instead.
29397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29398  if test "x$has_forbidden_chars" != x; then
29399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29401  fi
29402
29403
29404  windows_path="$new_path"
29405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29406    unix_path=`$CYGPATH -u "$windows_path"`
29407    new_path="$unix_path"
29408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29410    new_path="$unix_path"
29411  fi
29412
29413  if test "x$path" != "x$new_path"; then
29414    BOOT_JDK="$new_path"
29415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29417  fi
29418
29419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29421
29422    else
29423      # We're on a unix platform. Hooray! :)
29424      path="$BOOT_JDK"
29425      has_space=`$ECHO "$path" | $GREP " "`
29426      if test "x$has_space" != x; then
29427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29430      fi
29431
29432      # Use eval to expand a potential ~
29433      eval path="$path"
29434      if test ! -f "$path" && test ! -d "$path"; then
29435        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29436      fi
29437
29438      if test -d "$path"; then
29439        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29440      else
29441        dir="`$DIRNAME "$path"`"
29442        base="`$BASENAME "$path"`"
29443        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29444      fi
29445    fi
29446  fi
29447
29448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29449$as_echo_n "checking for Boot JDK... " >&6; }
29450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29451$as_echo "$BOOT_JDK" >&6; }
29452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29453$as_echo_n "checking Boot JDK version... " >&6; }
29454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29456$as_echo "$BOOT_JDK_VERSION" >&6; }
29457          fi # end check jdk version
29458        fi # end check javac
29459      fi # end check java
29460    fi # end check boot jdk found
29461  fi
29462
29463    done
29464  fi
29465
29466
29467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29469      # Do we have a bin/java?
29470      if test ! -x "$BOOT_JDK/bin/java"; then
29471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29473        BOOT_JDK_FOUND=no
29474      else
29475        # Do we have a bin/javac?
29476        if test ! -x "$BOOT_JDK/bin/javac"; then
29477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29481          BOOT_JDK_FOUND=no
29482        else
29483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29485
29486          # Extra M4 quote needed to protect [] in grep expression.
29487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29488          if test "x$FOUND_CORRECT_VERSION" = x; then
29489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29493            BOOT_JDK_FOUND=no
29494          else
29495            # We're done! :-)
29496            BOOT_JDK_FOUND=yes
29497
29498  # Only process if variable expands to non-empty
29499
29500  if test "x$BOOT_JDK" != x; then
29501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29502
29503  # Input might be given as Windows format, start by converting to
29504  # unix format.
29505  path="$BOOT_JDK"
29506  new_path=`$CYGPATH -u "$path"`
29507
29508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29511  # "foo.exe" is OK but "foo" is an error.
29512  #
29513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29514  # It is also a way to make sure we got the proper file name for the real test later on.
29515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29516  if test "x$test_shortpath" = x; then
29517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29520  fi
29521
29522  # Call helper function which possibly converts this using DOS-style short mode.
29523  # If so, the updated path is stored in $new_path.
29524
29525  input_path="$new_path"
29526  # Check if we need to convert this using DOS-style short mode. If the path
29527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29528  # take no chances and rewrite it.
29529  # Note: m4 eats our [], so we need to use [ and ] instead.
29530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29531  if test "x$has_forbidden_chars" != x; then
29532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29536      # Going to short mode and back again did indeed matter. Since short mode is
29537      # case insensitive, let's make it lowercase to improve readability.
29538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29539      # Now convert it back to Unix-style (cygpath)
29540      input_path=`$CYGPATH -u "$shortmode_path"`
29541      new_path="$input_path"
29542    fi
29543  fi
29544
29545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29546  if test "x$test_cygdrive_prefix" = x; then
29547    # As a simple fix, exclude /usr/bin since it's not a real path.
29548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29550      # a path prefixed by /cygdrive for fixpath to work.
29551      new_path="$CYGWIN_ROOT_PATH$input_path"
29552    fi
29553  fi
29554
29555
29556  if test "x$path" != "x$new_path"; then
29557    BOOT_JDK="$new_path"
29558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29560  fi
29561
29562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29563
29564  path="$BOOT_JDK"
29565  has_colon=`$ECHO $path | $GREP ^.:`
29566  new_path="$path"
29567  if test "x$has_colon" = x; then
29568    # Not in mixed or Windows style, start by that.
29569    new_path=`cmd //c echo $path`
29570  fi
29571
29572
29573  input_path="$new_path"
29574  # Check if we need to convert this using DOS-style short mode. If the path
29575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29576  # take no chances and rewrite it.
29577  # Note: m4 eats our [], so we need to use [ and ] instead.
29578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29579  if test "x$has_forbidden_chars" != x; then
29580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29582  fi
29583
29584
29585  windows_path="$new_path"
29586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29587    unix_path=`$CYGPATH -u "$windows_path"`
29588    new_path="$unix_path"
29589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29591    new_path="$unix_path"
29592  fi
29593
29594  if test "x$path" != "x$new_path"; then
29595    BOOT_JDK="$new_path"
29596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29598  fi
29599
29600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29602
29603    else
29604      # We're on a unix platform. Hooray! :)
29605      path="$BOOT_JDK"
29606      has_space=`$ECHO "$path" | $GREP " "`
29607      if test "x$has_space" != x; then
29608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29611      fi
29612
29613      # Use eval to expand a potential ~
29614      eval path="$path"
29615      if test ! -f "$path" && test ! -d "$path"; then
29616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29617      fi
29618
29619      if test -d "$path"; then
29620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29621      else
29622        dir="`$DIRNAME "$path"`"
29623        base="`$BASENAME "$path"`"
29624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29625      fi
29626    fi
29627  fi
29628
29629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29630$as_echo_n "checking for Boot JDK... " >&6; }
29631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29632$as_echo "$BOOT_JDK" >&6; }
29633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29634$as_echo_n "checking Boot JDK version... " >&6; }
29635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29637$as_echo "$BOOT_JDK_VERSION" >&6; }
29638          fi # end check jdk version
29639        fi # end check javac
29640      fi # end check java
29641    fi # end check boot jdk found
29642  fi
29643
29644  fi
29645
29646
29647    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29648    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29649      # Do we have a bin/java?
29650      if test ! -x "$BOOT_JDK/bin/java"; then
29651        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29653        BOOT_JDK_FOUND=no
29654      else
29655        # Do we have a bin/javac?
29656        if test ! -x "$BOOT_JDK/bin/javac"; then
29657          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29659          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29660$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29661          BOOT_JDK_FOUND=no
29662        else
29663          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29664          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29665
29666          # Extra M4 quote needed to protect [] in grep expression.
29667          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29668          if test "x$FOUND_CORRECT_VERSION" = x; then
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29672$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29673            BOOT_JDK_FOUND=no
29674          else
29675            # We're done! :-)
29676            BOOT_JDK_FOUND=yes
29677
29678  # Only process if variable expands to non-empty
29679
29680  if test "x$BOOT_JDK" != x; then
29681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29682
29683  # Input might be given as Windows format, start by converting to
29684  # unix format.
29685  path="$BOOT_JDK"
29686  new_path=`$CYGPATH -u "$path"`
29687
29688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29691  # "foo.exe" is OK but "foo" is an error.
29692  #
29693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29694  # It is also a way to make sure we got the proper file name for the real test later on.
29695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29696  if test "x$test_shortpath" = x; then
29697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29700  fi
29701
29702  # Call helper function which possibly converts this using DOS-style short mode.
29703  # If so, the updated path is stored in $new_path.
29704
29705  input_path="$new_path"
29706  # Check if we need to convert this using DOS-style short mode. If the path
29707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29708  # take no chances and rewrite it.
29709  # Note: m4 eats our [], so we need to use [ and ] instead.
29710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29711  if test "x$has_forbidden_chars" != x; then
29712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29716      # Going to short mode and back again did indeed matter. Since short mode is
29717      # case insensitive, let's make it lowercase to improve readability.
29718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29719      # Now convert it back to Unix-style (cygpath)
29720      input_path=`$CYGPATH -u "$shortmode_path"`
29721      new_path="$input_path"
29722    fi
29723  fi
29724
29725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29726  if test "x$test_cygdrive_prefix" = x; then
29727    # As a simple fix, exclude /usr/bin since it's not a real path.
29728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29730      # a path prefixed by /cygdrive for fixpath to work.
29731      new_path="$CYGWIN_ROOT_PATH$input_path"
29732    fi
29733  fi
29734
29735
29736  if test "x$path" != "x$new_path"; then
29737    BOOT_JDK="$new_path"
29738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29740  fi
29741
29742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29743
29744  path="$BOOT_JDK"
29745  has_colon=`$ECHO $path | $GREP ^.:`
29746  new_path="$path"
29747  if test "x$has_colon" = x; then
29748    # Not in mixed or Windows style, start by that.
29749    new_path=`cmd //c echo $path`
29750  fi
29751
29752
29753  input_path="$new_path"
29754  # Check if we need to convert this using DOS-style short mode. If the path
29755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29756  # take no chances and rewrite it.
29757  # Note: m4 eats our [], so we need to use [ and ] instead.
29758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29759  if test "x$has_forbidden_chars" != x; then
29760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29762  fi
29763
29764
29765  windows_path="$new_path"
29766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29767    unix_path=`$CYGPATH -u "$windows_path"`
29768    new_path="$unix_path"
29769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29771    new_path="$unix_path"
29772  fi
29773
29774  if test "x$path" != "x$new_path"; then
29775    BOOT_JDK="$new_path"
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29778  fi
29779
29780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29782
29783    else
29784      # We're on a unix platform. Hooray! :)
29785      path="$BOOT_JDK"
29786      has_space=`$ECHO "$path" | $GREP " "`
29787      if test "x$has_space" != x; then
29788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29791      fi
29792
29793      # Use eval to expand a potential ~
29794      eval path="$path"
29795      if test ! -f "$path" && test ! -d "$path"; then
29796        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29797      fi
29798
29799      if test -d "$path"; then
29800        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29801      else
29802        dir="`$DIRNAME "$path"`"
29803        base="`$BASENAME "$path"`"
29804        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29805      fi
29806    fi
29807  fi
29808
29809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29810$as_echo_n "checking for Boot JDK... " >&6; }
29811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29812$as_echo "$BOOT_JDK" >&6; }
29813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29814$as_echo_n "checking Boot JDK version... " >&6; }
29815            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29817$as_echo "$BOOT_JDK_VERSION" >&6; }
29818          fi # end check jdk version
29819        fi # end check javac
29820      fi # end check java
29821    fi # end check boot jdk found
29822  fi
29823
29824
29825  # If we haven't found anything yet, we've truly lost. Give up.
29826  if test "x$BOOT_JDK_FOUND" = xno; then
29827
29828  # Print a helpful message on how to acquire the necessary build dependency.
29829  # openjdk is the help tag: freetype, cups, alsa etc
29830  MISSING_DEPENDENCY=openjdk
29831
29832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29833    cygwin_help $MISSING_DEPENDENCY
29834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29835    msys_help $MISSING_DEPENDENCY
29836  else
29837    PKGHANDLER_COMMAND=
29838
29839    case $PKGHANDLER in
29840      apt-get)
29841        apt_help     $MISSING_DEPENDENCY ;;
29842      yum)
29843        yum_help     $MISSING_DEPENDENCY ;;
29844      port)
29845        port_help    $MISSING_DEPENDENCY ;;
29846      pkgutil)
29847        pkgutil_help $MISSING_DEPENDENCY ;;
29848      pkgadd)
29849        pkgadd_help  $MISSING_DEPENDENCY ;;
29850    esac
29851
29852    if test "x$PKGHANDLER_COMMAND" != x; then
29853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29854    fi
29855  fi
29856
29857    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29858$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29859    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29860$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29861    as_fn_error $? "Cannot continue" "$LINENO" 5
29862  fi
29863
29864
29865
29866  # Setup tools from the Boot JDK.
29867
29868  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29869
29870  # Publish this variable in the help.
29871
29872
29873  if [ -z "${JAVA+x}" ]; then
29874    # The variable is not set by user, try to locate tool using the code snippet
29875
29876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29877$as_echo_n "checking for java in Boot JDK... " >&6; }
29878      JAVA=$BOOT_JDK/bin/java
29879      if test ! -x $JAVA; then
29880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29881$as_echo "not found" >&6; }
29882        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29883$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29884        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29885      fi
29886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29887$as_echo "ok" >&6; }
29888
29889
29890  else
29891    # The variable is set, but is it from the command line or the environment?
29892
29893    # Try to remove the string !JAVA! from our list.
29894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29896      # If it failed, the variable was not from the command line. Ignore it,
29897      # but warn the user (except for BASH, which is always set by the calling BASH).
29898      if test "xJAVA" != xBASH; then
29899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29900$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29901      fi
29902      # Try to locate tool using the code snippet
29903
29904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29905$as_echo_n "checking for java in Boot JDK... " >&6; }
29906      JAVA=$BOOT_JDK/bin/java
29907      if test ! -x $JAVA; then
29908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29909$as_echo "not found" >&6; }
29910        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29911$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29912        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29913      fi
29914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29915$as_echo "ok" >&6; }
29916
29917
29918    else
29919      # If it succeeded, then it was overridden by the user. We will use it
29920      # for the tool.
29921
29922      # First remove it from the list of overridden variables, so we can test
29923      # for unknown variables in the end.
29924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29925
29926      # Check if we try to supply an empty value
29927      if test "x$JAVA" = x; then
29928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29929$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29931$as_echo_n "checking for JAVA... " >&6; }
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29933$as_echo "disabled" >&6; }
29934      else
29935        # Check if the provided tool contains a complete path.
29936        tool_specified="$JAVA"
29937        tool_basename="${tool_specified##*/}"
29938        if test "x$tool_basename" = "x$tool_specified"; then
29939          # A command without a complete path is provided, search $PATH.
29940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29941$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29942          # Extract the first word of "$tool_basename", so it can be a program name with args.
29943set dummy $tool_basename; ac_word=$2
29944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29945$as_echo_n "checking for $ac_word... " >&6; }
29946if ${ac_cv_path_JAVA+:} false; then :
29947  $as_echo_n "(cached) " >&6
29948else
29949  case $JAVA in
29950  [\\/]* | ?:[\\/]*)
29951  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29952  ;;
29953  *)
29954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29955for as_dir in $PATH
29956do
29957  IFS=$as_save_IFS
29958  test -z "$as_dir" && as_dir=.
29959    for ac_exec_ext in '' $ac_executable_extensions; do
29960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29961    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29963    break 2
29964  fi
29965done
29966  done
29967IFS=$as_save_IFS
29968
29969  ;;
29970esac
29971fi
29972JAVA=$ac_cv_path_JAVA
29973if test -n "$JAVA"; then
29974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29975$as_echo "$JAVA" >&6; }
29976else
29977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29978$as_echo "no" >&6; }
29979fi
29980
29981
29982          if test "x$JAVA" = x; then
29983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29984          fi
29985        else
29986          # Otherwise we believe it is a complete path. Use it as it is.
29987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29988$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29990$as_echo_n "checking for JAVA... " >&6; }
29991          if test ! -x "$tool_specified"; then
29992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29993$as_echo "not found" >&6; }
29994            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29995          fi
29996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29997$as_echo "$tool_specified" >&6; }
29998        fi
29999      fi
30000    fi
30001
30002  fi
30003
30004
30005
30006  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30007
30008  # Publish this variable in the help.
30009
30010
30011  if [ -z "${JAVAC+x}" ]; then
30012    # The variable is not set by user, try to locate tool using the code snippet
30013
30014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30015$as_echo_n "checking for javac in Boot JDK... " >&6; }
30016      JAVAC=$BOOT_JDK/bin/javac
30017      if test ! -x $JAVAC; then
30018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30019$as_echo "not found" >&6; }
30020        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30021$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30022        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30023      fi
30024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30025$as_echo "ok" >&6; }
30026
30027
30028  else
30029    # The variable is set, but is it from the command line or the environment?
30030
30031    # Try to remove the string !JAVAC! from our list.
30032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30034      # If it failed, the variable was not from the command line. Ignore it,
30035      # but warn the user (except for BASH, which is always set by the calling BASH).
30036      if test "xJAVAC" != xBASH; then
30037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30038$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30039      fi
30040      # Try to locate tool using the code snippet
30041
30042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30043$as_echo_n "checking for javac in Boot JDK... " >&6; }
30044      JAVAC=$BOOT_JDK/bin/javac
30045      if test ! -x $JAVAC; then
30046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30047$as_echo "not found" >&6; }
30048        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30049$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30050        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30051      fi
30052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30053$as_echo "ok" >&6; }
30054
30055
30056    else
30057      # If it succeeded, then it was overridden by the user. We will use it
30058      # for the tool.
30059
30060      # First remove it from the list of overridden variables, so we can test
30061      # for unknown variables in the end.
30062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30063
30064      # Check if we try to supply an empty value
30065      if test "x$JAVAC" = x; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30067$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30069$as_echo_n "checking for JAVAC... " >&6; }
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30071$as_echo "disabled" >&6; }
30072      else
30073        # Check if the provided tool contains a complete path.
30074        tool_specified="$JAVAC"
30075        tool_basename="${tool_specified##*/}"
30076        if test "x$tool_basename" = "x$tool_specified"; then
30077          # A command without a complete path is provided, search $PATH.
30078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30079$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30080          # Extract the first word of "$tool_basename", so it can be a program name with args.
30081set dummy $tool_basename; ac_word=$2
30082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30083$as_echo_n "checking for $ac_word... " >&6; }
30084if ${ac_cv_path_JAVAC+:} false; then :
30085  $as_echo_n "(cached) " >&6
30086else
30087  case $JAVAC in
30088  [\\/]* | ?:[\\/]*)
30089  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30090  ;;
30091  *)
30092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30093for as_dir in $PATH
30094do
30095  IFS=$as_save_IFS
30096  test -z "$as_dir" && as_dir=.
30097    for ac_exec_ext in '' $ac_executable_extensions; do
30098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30099    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30101    break 2
30102  fi
30103done
30104  done
30105IFS=$as_save_IFS
30106
30107  ;;
30108esac
30109fi
30110JAVAC=$ac_cv_path_JAVAC
30111if test -n "$JAVAC"; then
30112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30113$as_echo "$JAVAC" >&6; }
30114else
30115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30116$as_echo "no" >&6; }
30117fi
30118
30119
30120          if test "x$JAVAC" = x; then
30121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30122          fi
30123        else
30124          # Otherwise we believe it is a complete path. Use it as it is.
30125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30126$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30128$as_echo_n "checking for JAVAC... " >&6; }
30129          if test ! -x "$tool_specified"; then
30130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30131$as_echo "not found" >&6; }
30132            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30133          fi
30134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30135$as_echo "$tool_specified" >&6; }
30136        fi
30137      fi
30138    fi
30139
30140  fi
30141
30142
30143
30144  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30145
30146  # Publish this variable in the help.
30147
30148
30149  if [ -z "${JAVAH+x}" ]; then
30150    # The variable is not set by user, try to locate tool using the code snippet
30151
30152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30153$as_echo_n "checking for javah in Boot JDK... " >&6; }
30154      JAVAH=$BOOT_JDK/bin/javah
30155      if test ! -x $JAVAH; then
30156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30157$as_echo "not found" >&6; }
30158        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30159$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30160        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30161      fi
30162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30163$as_echo "ok" >&6; }
30164
30165
30166  else
30167    # The variable is set, but is it from the command line or the environment?
30168
30169    # Try to remove the string !JAVAH! from our list.
30170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30172      # If it failed, the variable was not from the command line. Ignore it,
30173      # but warn the user (except for BASH, which is always set by the calling BASH).
30174      if test "xJAVAH" != xBASH; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30176$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30177      fi
30178      # Try to locate tool using the code snippet
30179
30180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30181$as_echo_n "checking for javah in Boot JDK... " >&6; }
30182      JAVAH=$BOOT_JDK/bin/javah
30183      if test ! -x $JAVAH; then
30184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30185$as_echo "not found" >&6; }
30186        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30187$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30188        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30189      fi
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30191$as_echo "ok" >&6; }
30192
30193
30194    else
30195      # If it succeeded, then it was overridden by the user. We will use it
30196      # for the tool.
30197
30198      # First remove it from the list of overridden variables, so we can test
30199      # for unknown variables in the end.
30200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30201
30202      # Check if we try to supply an empty value
30203      if test "x$JAVAH" = x; then
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30205$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30207$as_echo_n "checking for JAVAH... " >&6; }
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30209$as_echo "disabled" >&6; }
30210      else
30211        # Check if the provided tool contains a complete path.
30212        tool_specified="$JAVAH"
30213        tool_basename="${tool_specified##*/}"
30214        if test "x$tool_basename" = "x$tool_specified"; then
30215          # A command without a complete path is provided, search $PATH.
30216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30217$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30218          # Extract the first word of "$tool_basename", so it can be a program name with args.
30219set dummy $tool_basename; ac_word=$2
30220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30221$as_echo_n "checking for $ac_word... " >&6; }
30222if ${ac_cv_path_JAVAH+:} false; then :
30223  $as_echo_n "(cached) " >&6
30224else
30225  case $JAVAH in
30226  [\\/]* | ?:[\\/]*)
30227  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30228  ;;
30229  *)
30230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30231for as_dir in $PATH
30232do
30233  IFS=$as_save_IFS
30234  test -z "$as_dir" && as_dir=.
30235    for ac_exec_ext in '' $ac_executable_extensions; do
30236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30237    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30239    break 2
30240  fi
30241done
30242  done
30243IFS=$as_save_IFS
30244
30245  ;;
30246esac
30247fi
30248JAVAH=$ac_cv_path_JAVAH
30249if test -n "$JAVAH"; then
30250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30251$as_echo "$JAVAH" >&6; }
30252else
30253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30254$as_echo "no" >&6; }
30255fi
30256
30257
30258          if test "x$JAVAH" = x; then
30259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30260          fi
30261        else
30262          # Otherwise we believe it is a complete path. Use it as it is.
30263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30264$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30266$as_echo_n "checking for JAVAH... " >&6; }
30267          if test ! -x "$tool_specified"; then
30268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30269$as_echo "not found" >&6; }
30270            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30271          fi
30272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30273$as_echo "$tool_specified" >&6; }
30274        fi
30275      fi
30276    fi
30277
30278  fi
30279
30280
30281
30282  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30283
30284  # Publish this variable in the help.
30285
30286
30287  if [ -z "${JAR+x}" ]; then
30288    # The variable is not set by user, try to locate tool using the code snippet
30289
30290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30291$as_echo_n "checking for jar in Boot JDK... " >&6; }
30292      JAR=$BOOT_JDK/bin/jar
30293      if test ! -x $JAR; then
30294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30295$as_echo "not found" >&6; }
30296        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30297$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30298        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30299      fi
30300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30301$as_echo "ok" >&6; }
30302
30303
30304  else
30305    # The variable is set, but is it from the command line or the environment?
30306
30307    # Try to remove the string !JAR! from our list.
30308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30310      # If it failed, the variable was not from the command line. Ignore it,
30311      # but warn the user (except for BASH, which is always set by the calling BASH).
30312      if test "xJAR" != xBASH; then
30313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30314$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30315      fi
30316      # Try to locate tool using the code snippet
30317
30318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30319$as_echo_n "checking for jar in Boot JDK... " >&6; }
30320      JAR=$BOOT_JDK/bin/jar
30321      if test ! -x $JAR; then
30322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30323$as_echo "not found" >&6; }
30324        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30325$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30326        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30327      fi
30328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30329$as_echo "ok" >&6; }
30330
30331
30332    else
30333      # If it succeeded, then it was overridden by the user. We will use it
30334      # for the tool.
30335
30336      # First remove it from the list of overridden variables, so we can test
30337      # for unknown variables in the end.
30338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30339
30340      # Check if we try to supply an empty value
30341      if test "x$JAR" = x; then
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30343$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30345$as_echo_n "checking for JAR... " >&6; }
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30347$as_echo "disabled" >&6; }
30348      else
30349        # Check if the provided tool contains a complete path.
30350        tool_specified="$JAR"
30351        tool_basename="${tool_specified##*/}"
30352        if test "x$tool_basename" = "x$tool_specified"; then
30353          # A command without a complete path is provided, search $PATH.
30354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30355$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30356          # Extract the first word of "$tool_basename", so it can be a program name with args.
30357set dummy $tool_basename; ac_word=$2
30358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30359$as_echo_n "checking for $ac_word... " >&6; }
30360if ${ac_cv_path_JAR+:} false; then :
30361  $as_echo_n "(cached) " >&6
30362else
30363  case $JAR in
30364  [\\/]* | ?:[\\/]*)
30365  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30366  ;;
30367  *)
30368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30369for as_dir in $PATH
30370do
30371  IFS=$as_save_IFS
30372  test -z "$as_dir" && as_dir=.
30373    for ac_exec_ext in '' $ac_executable_extensions; do
30374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30375    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30377    break 2
30378  fi
30379done
30380  done
30381IFS=$as_save_IFS
30382
30383  ;;
30384esac
30385fi
30386JAR=$ac_cv_path_JAR
30387if test -n "$JAR"; then
30388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30389$as_echo "$JAR" >&6; }
30390else
30391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30392$as_echo "no" >&6; }
30393fi
30394
30395
30396          if test "x$JAR" = x; then
30397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30398          fi
30399        else
30400          # Otherwise we believe it is a complete path. Use it as it is.
30401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30402$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30404$as_echo_n "checking for JAR... " >&6; }
30405          if test ! -x "$tool_specified"; then
30406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30407$as_echo "not found" >&6; }
30408            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30409          fi
30410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30411$as_echo "$tool_specified" >&6; }
30412        fi
30413      fi
30414    fi
30415
30416  fi
30417
30418
30419
30420  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30421
30422  # Publish this variable in the help.
30423
30424
30425  if [ -z "${JARSIGNER+x}" ]; then
30426    # The variable is not set by user, try to locate tool using the code snippet
30427
30428      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30429$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30430      JARSIGNER=$BOOT_JDK/bin/jarsigner
30431      if test ! -x $JARSIGNER; then
30432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30433$as_echo "not found" >&6; }
30434        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30435$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30436        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30437      fi
30438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30439$as_echo "ok" >&6; }
30440
30441
30442  else
30443    # The variable is set, but is it from the command line or the environment?
30444
30445    # Try to remove the string !JARSIGNER! from our list.
30446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30448      # If it failed, the variable was not from the command line. Ignore it,
30449      # but warn the user (except for BASH, which is always set by the calling BASH).
30450      if test "xJARSIGNER" != xBASH; then
30451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30452$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30453      fi
30454      # Try to locate tool using the code snippet
30455
30456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30457$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30458      JARSIGNER=$BOOT_JDK/bin/jarsigner
30459      if test ! -x $JARSIGNER; then
30460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30461$as_echo "not found" >&6; }
30462        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30464        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30465      fi
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30467$as_echo "ok" >&6; }
30468
30469
30470    else
30471      # If it succeeded, then it was overridden by the user. We will use it
30472      # for the tool.
30473
30474      # First remove it from the list of overridden variables, so we can test
30475      # for unknown variables in the end.
30476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30477
30478      # Check if we try to supply an empty value
30479      if test "x$JARSIGNER" = x; then
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30481$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30483$as_echo_n "checking for JARSIGNER... " >&6; }
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30485$as_echo "disabled" >&6; }
30486      else
30487        # Check if the provided tool contains a complete path.
30488        tool_specified="$JARSIGNER"
30489        tool_basename="${tool_specified##*/}"
30490        if test "x$tool_basename" = "x$tool_specified"; then
30491          # A command without a complete path is provided, search $PATH.
30492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30493$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30494          # Extract the first word of "$tool_basename", so it can be a program name with args.
30495set dummy $tool_basename; ac_word=$2
30496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30497$as_echo_n "checking for $ac_word... " >&6; }
30498if ${ac_cv_path_JARSIGNER+:} false; then :
30499  $as_echo_n "(cached) " >&6
30500else
30501  case $JARSIGNER in
30502  [\\/]* | ?:[\\/]*)
30503  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30504  ;;
30505  *)
30506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30507for as_dir in $PATH
30508do
30509  IFS=$as_save_IFS
30510  test -z "$as_dir" && as_dir=.
30511    for ac_exec_ext in '' $ac_executable_extensions; do
30512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30513    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30515    break 2
30516  fi
30517done
30518  done
30519IFS=$as_save_IFS
30520
30521  ;;
30522esac
30523fi
30524JARSIGNER=$ac_cv_path_JARSIGNER
30525if test -n "$JARSIGNER"; then
30526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30527$as_echo "$JARSIGNER" >&6; }
30528else
30529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30530$as_echo "no" >&6; }
30531fi
30532
30533
30534          if test "x$JARSIGNER" = x; then
30535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30536          fi
30537        else
30538          # Otherwise we believe it is a complete path. Use it as it is.
30539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30540$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30542$as_echo_n "checking for JARSIGNER... " >&6; }
30543          if test ! -x "$tool_specified"; then
30544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30545$as_echo "not found" >&6; }
30546            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30547          fi
30548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30549$as_echo "$tool_specified" >&6; }
30550        fi
30551      fi
30552    fi
30553
30554  fi
30555
30556
30557
30558  # Finally, set some other options...
30559
30560  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30561  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30562
30563
30564
30565  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30566  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30567  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30568  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30569  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30570  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30571    dummy="$dummy --patch-module foo=bar"
30572    JVM_ARG_OK=true
30573  else
30574    $ECHO "Arg failed:" >&5
30575    $ECHO "$OUTPUT" >&5
30576    JVM_ARG_OK=false
30577  fi
30578
30579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30580$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30581  if test "x$JVM_ARG_OK" = "xtrue"; then
30582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30583$as_echo "yes" >&6; }
30584    BOOT_JDK_MODULAR="true"
30585  else
30586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30587$as_echo "no" >&6; }
30588    BOOT_JDK_MODULAR="false"
30589  fi
30590
30591
30592
30593
30594  # Check if the boot jdk is 32 or 64 bit
30595  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30596    BOOT_JDK_BITS="64"
30597  else
30598    BOOT_JDK_BITS="32"
30599  fi
30600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30601$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30603$as_echo "$BOOT_JDK_BITS" >&6; }
30604
30605
30606
30607
30608# Check whether --with-build-jdk was given.
30609if test "${with_build_jdk+set}" = set; then :
30610  withval=$with_build_jdk;
30611fi
30612
30613
30614  CREATE_BUILDJDK=false
30615  EXTERNAL_BUILDJDK=false
30616  BUILD_JDK_FOUND="no"
30617  if test "x$with_build_jdk" != "x"; then
30618
30619  if test "x$BUILD_JDK_FOUND" = xno; then
30620    # Execute the test
30621
30622       if test "x$with_build_jdk" != x; then
30623         BUILD_JDK=$with_build_jdk
30624         BUILD_JDK_FOUND=maybe
30625         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30626$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30627       fi
30628
30629    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30630    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30631      # Do we have a bin/java?
30632      if test ! -x "$BUILD_JDK/bin/java"; then
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30634$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30635        BUILD_JDK_FOUND=no
30636      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30638$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30639        BUILD_JDK_FOUND=no
30640      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30641        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30642$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30643        BUILD_JDK_FOUND=no
30644      elif test ! -x "$BUILD_JDK/bin/javac"; then
30645        # Do we have a bin/javac?
30646        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30647$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30648        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30649$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30650        BUILD_JDK_FOUND=no
30651      else
30652        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30653        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30654
30655        # Extra M4 quote needed to protect [] in grep expression.
30656        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30657        if test "x$FOUND_CORRECT_VERSION" = x; then
30658          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30659$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30660          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30661$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30662          BUILD_JDK_FOUND=no
30663        else
30664          # We're done!
30665          BUILD_JDK_FOUND=yes
30666
30667  # Only process if variable expands to non-empty
30668
30669  if test "x$BUILD_JDK" != x; then
30670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30671
30672  # Input might be given as Windows format, start by converting to
30673  # unix format.
30674  path="$BUILD_JDK"
30675  new_path=`$CYGPATH -u "$path"`
30676
30677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30680  # "foo.exe" is OK but "foo" is an error.
30681  #
30682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30683  # It is also a way to make sure we got the proper file name for the real test later on.
30684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30685  if test "x$test_shortpath" = x; then
30686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30687$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30688    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30689  fi
30690
30691  # Call helper function which possibly converts this using DOS-style short mode.
30692  # If so, the updated path is stored in $new_path.
30693
30694  input_path="$new_path"
30695  # Check if we need to convert this using DOS-style short mode. If the path
30696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30697  # take no chances and rewrite it.
30698  # Note: m4 eats our [], so we need to use [ and ] instead.
30699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30700  if test "x$has_forbidden_chars" != x; then
30701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30705      # Going to short mode and back again did indeed matter. Since short mode is
30706      # case insensitive, let's make it lowercase to improve readability.
30707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30708      # Now convert it back to Unix-style (cygpath)
30709      input_path=`$CYGPATH -u "$shortmode_path"`
30710      new_path="$input_path"
30711    fi
30712  fi
30713
30714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30715  if test "x$test_cygdrive_prefix" = x; then
30716    # As a simple fix, exclude /usr/bin since it's not a real path.
30717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30719      # a path prefixed by /cygdrive for fixpath to work.
30720      new_path="$CYGWIN_ROOT_PATH$input_path"
30721    fi
30722  fi
30723
30724
30725  if test "x$path" != "x$new_path"; then
30726    BUILD_JDK="$new_path"
30727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30728$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30729  fi
30730
30731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30732
30733  path="$BUILD_JDK"
30734  has_colon=`$ECHO $path | $GREP ^.:`
30735  new_path="$path"
30736  if test "x$has_colon" = x; then
30737    # Not in mixed or Windows style, start by that.
30738    new_path=`cmd //c echo $path`
30739  fi
30740
30741
30742  input_path="$new_path"
30743  # Check if we need to convert this using DOS-style short mode. If the path
30744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30745  # take no chances and rewrite it.
30746  # Note: m4 eats our [], so we need to use [ and ] instead.
30747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30748  if test "x$has_forbidden_chars" != x; then
30749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30751  fi
30752
30753
30754  windows_path="$new_path"
30755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30756    unix_path=`$CYGPATH -u "$windows_path"`
30757    new_path="$unix_path"
30758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30760    new_path="$unix_path"
30761  fi
30762
30763  if test "x$path" != "x$new_path"; then
30764    BUILD_JDK="$new_path"
30765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30766$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30767  fi
30768
30769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30771
30772    else
30773      # We're on a unix platform. Hooray! :)
30774      path="$BUILD_JDK"
30775      has_space=`$ECHO "$path" | $GREP " "`
30776      if test "x$has_space" != x; then
30777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30778$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30780      fi
30781
30782      # Use eval to expand a potential ~
30783      eval path="$path"
30784      if test ! -f "$path" && test ! -d "$path"; then
30785        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30786      fi
30787
30788      if test -d "$path"; then
30789        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30790      else
30791        dir="`$DIRNAME "$path"`"
30792        base="`$BASENAME "$path"`"
30793        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30794      fi
30795    fi
30796  fi
30797
30798          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30799$as_echo_n "checking for Build JDK... " >&6; }
30800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30801$as_echo "$BUILD_JDK" >&6; }
30802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30803$as_echo_n "checking Build JDK version... " >&6; }
30804          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30806$as_echo "$BUILD_JDK_VERSION" >&6; }
30807        fi # end check jdk version
30808      fi # end check java
30809    fi # end check build jdk found
30810  fi
30811
30812    EXTERNAL_BUILDJDK=true
30813  else
30814    if test "x$COMPILE_TYPE" = "xcross"; then
30815      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30816      BUILD_JDK_FOUND=yes
30817      CREATE_BUILDJDK=true
30818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30819$as_echo_n "checking for Build JDK... " >&6; }
30820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30821$as_echo "yes, will build it for the host platform" >&6; }
30822    else
30823      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30824      BUILD_JDK_FOUND=yes
30825      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30826$as_echo_n "checking for Build JDK... " >&6; }
30827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30828$as_echo "yes, will use output dir" >&6; }
30829    fi
30830  fi
30831
30832  JMOD="$BUILD_JDK/bin/jmod"
30833  JLINK="$BUILD_JDK/bin/jlink"
30834
30835
30836
30837  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30839$as_echo_n "checking for Build JDK... " >&6; }
30840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30841$as_echo "no" >&6; }
30842    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30843  fi
30844
30845
30846
30847
30848
30849
30850###############################################################################
30851#
30852# Configure the sources to use. We can add or override individual directories.
30853#
30854###############################################################################
30855
30856
30857  # Where are the sources.
30858  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30859  CORBA_TOPDIR="$SRC_ROOT/corba"
30860  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30861  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30862  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30863  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30864  JDK_TOPDIR="$SRC_ROOT/jdk"
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874  # This feature is no longer supported.
30875
30876
30877
30878# Check whether --with-add-source-root was given.
30879if test "${with_add_source_root+set}" = set; then :
30880  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
30881$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30882fi
30883
30884
30885
30886
30887# Check whether --with-override-source-root was given.
30888if test "${with_override_source_root+set}" = set; then :
30889  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
30890$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30891fi
30892
30893
30894
30895
30896# Check whether --with-adds-and-overrides was given.
30897if test "${with_adds_and_overrides+set}" = set; then :
30898  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
30899$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30900fi
30901
30902
30903
30904
30905# Check whether --with-override-langtools was given.
30906if test "${with_override_langtools+set}" = set; then :
30907  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30908$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30909fi
30910
30911
30912
30913
30914# Check whether --with-override-corba was given.
30915if test "${with_override_corba+set}" = set; then :
30916  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30917$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30918fi
30919
30920
30921
30922
30923# Check whether --with-override-jaxp was given.
30924if test "${with_override_jaxp+set}" = set; then :
30925  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30926$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30927fi
30928
30929
30930
30931
30932# Check whether --with-override-jaxws was given.
30933if test "${with_override_jaxws+set}" = set; then :
30934  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30935$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30936fi
30937
30938
30939
30940
30941# Check whether --with-override-hotspot was given.
30942if test "${with_override_hotspot+set}" = set; then :
30943  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30944$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30945fi
30946
30947
30948
30949
30950# Check whether --with-override-nashorn was given.
30951if test "${with_override_nashorn+set}" = set; then :
30952  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30953$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30954fi
30955
30956
30957
30958
30959# Check whether --with-override-jdk was given.
30960if test "${with_override_jdk+set}" = set; then :
30961  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30962$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30963fi
30964
30965
30966
30967
30968  BUILD_OUTPUT="$OUTPUT_ROOT"
30969
30970  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30971
30972
30973
30974# Check whether --with-import_hotspot was given.
30975if test "${with_import_hotspot+set}" = set; then :
30976  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
30977$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
30978fi
30979
30980
30981
30982
30983
30984
30985# Check whether --with-import-modules was given.
30986if test "${with_import_modules+set}" = set; then :
30987  withval=$with_import_modules;
30988fi
30989
30990
30991  if test "x$with_import_modules" != x \
30992      && test "x$with_import_modules" != "xno"; then
30993    if test -d "$with_import_modules"; then
30994      IMPORT_MODULES_TOPDIR="$with_import_modules"
30995
30996  # Only process if variable expands to non-empty
30997
30998  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31000
31001  # Input might be given as Windows format, start by converting to
31002  # unix format.
31003  path="$IMPORT_MODULES_TOPDIR"
31004  new_path=`$CYGPATH -u "$path"`
31005
31006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31009  # "foo.exe" is OK but "foo" is an error.
31010  #
31011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31012  # It is also a way to make sure we got the proper file name for the real test later on.
31013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31014  if test "x$test_shortpath" = x; then
31015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31016$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31017    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31018  fi
31019
31020  # Call helper function which possibly converts this using DOS-style short mode.
31021  # If so, the updated path is stored in $new_path.
31022
31023  input_path="$new_path"
31024  # Check if we need to convert this using DOS-style short mode. If the path
31025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31026  # take no chances and rewrite it.
31027  # Note: m4 eats our [], so we need to use [ and ] instead.
31028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31029  if test "x$has_forbidden_chars" != x; then
31030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31034      # Going to short mode and back again did indeed matter. Since short mode is
31035      # case insensitive, let's make it lowercase to improve readability.
31036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31037      # Now convert it back to Unix-style (cygpath)
31038      input_path=`$CYGPATH -u "$shortmode_path"`
31039      new_path="$input_path"
31040    fi
31041  fi
31042
31043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31044  if test "x$test_cygdrive_prefix" = x; then
31045    # As a simple fix, exclude /usr/bin since it's not a real path.
31046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31048      # a path prefixed by /cygdrive for fixpath to work.
31049      new_path="$CYGWIN_ROOT_PATH$input_path"
31050    fi
31051  fi
31052
31053
31054  if test "x$path" != "x$new_path"; then
31055    IMPORT_MODULES_TOPDIR="$new_path"
31056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31057$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31058  fi
31059
31060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31061
31062  path="$IMPORT_MODULES_TOPDIR"
31063  has_colon=`$ECHO $path | $GREP ^.:`
31064  new_path="$path"
31065  if test "x$has_colon" = x; then
31066    # Not in mixed or Windows style, start by that.
31067    new_path=`cmd //c echo $path`
31068  fi
31069
31070
31071  input_path="$new_path"
31072  # Check if we need to convert this using DOS-style short mode. If the path
31073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31074  # take no chances and rewrite it.
31075  # Note: m4 eats our [], so we need to use [ and ] instead.
31076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31077  if test "x$has_forbidden_chars" != x; then
31078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31080  fi
31081
31082
31083  windows_path="$new_path"
31084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31085    unix_path=`$CYGPATH -u "$windows_path"`
31086    new_path="$unix_path"
31087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31089    new_path="$unix_path"
31090  fi
31091
31092  if test "x$path" != "x$new_path"; then
31093    IMPORT_MODULES_TOPDIR="$new_path"
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31095$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31096  fi
31097
31098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31100
31101    else
31102      # We're on a unix platform. Hooray! :)
31103      path="$IMPORT_MODULES_TOPDIR"
31104      has_space=`$ECHO "$path" | $GREP " "`
31105      if test "x$has_space" != x; then
31106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31107$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31109      fi
31110
31111      # Use eval to expand a potential ~
31112      eval path="$path"
31113      if test ! -f "$path" && test ! -d "$path"; then
31114        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31115      fi
31116
31117      if test -d "$path"; then
31118        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31119      else
31120        dir="`$DIRNAME "$path"`"
31121        base="`$BASENAME "$path"`"
31122        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31123      fi
31124    fi
31125  fi
31126
31127    elif test -e "$with_import_modules"; then
31128      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31129      $RM -rf "$IMPORT_MODULES_TOPDIR"
31130      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31131      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31132        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31133      fi
31134    else
31135      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31136    fi
31137  fi
31138
31139  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31140    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31141  fi
31142  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31143    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31144  fi
31145  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31146    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31147  fi
31148  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31149    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31150  fi
31151  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31152    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31153  fi
31154  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31155    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31156  fi
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166###############################################################################
31167#
31168# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31169# native code.
31170#
31171###############################################################################
31172
31173# See if we are doing a complete static build or not
31174
31175  # Check whether --enable-static-build was given.
31176if test "${enable_static_build+set}" = set; then :
31177  enableval=$enable_static_build;
31178fi
31179
31180  STATIC_BUILD=false
31181  if test "x$enable_static_build" = "xyes"; then
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31183$as_echo_n "checking if static build is enabled... " >&6; }
31184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31185$as_echo "yes" >&6; }
31186    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31187      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31188    fi
31189    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31190    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31191    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31192    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31193    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31194    STATIC_BUILD=true
31195  elif test "x$enable_static_build" = "xno"; then
31196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31197$as_echo_n "checking if static build is enabled... " >&6; }
31198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31199$as_echo "no" >&6; }
31200  elif test "x$enable_static_build" != "x"; then
31201    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31202  fi
31203
31204
31205
31206
31207# First determine the toolchain type (compiler family)
31208
31209
31210# Check whether --with-toolchain-type was given.
31211if test "${with_toolchain_type+set}" = set; then :
31212  withval=$with_toolchain_type;
31213fi
31214
31215
31216  # Use indirect variable referencing
31217  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31218  VALID_TOOLCHAINS=${!toolchain_var_name}
31219
31220  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31221    if test -n "$XCODEBUILD"; then
31222      # On Mac OS X, default toolchain to clang after Xcode 5
31223      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31224      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31225      if test $? -ne 0; then
31226        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31227      fi
31228      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31229          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31230          $CUT -f 1 -d .`
31231      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31232$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31233      if test $XCODE_MAJOR_VERSION -ge 5; then
31234          DEFAULT_TOOLCHAIN="clang"
31235      else
31236          DEFAULT_TOOLCHAIN="gcc"
31237      fi
31238    else
31239      # If Xcode is not installed, but the command line tools are
31240      # then we can't run xcodebuild. On these systems we should
31241      # default to clang
31242      DEFAULT_TOOLCHAIN="clang"
31243    fi
31244  else
31245    # First toolchain type in the list is the default
31246    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31247  fi
31248
31249  if test "x$with_toolchain_type" = xlist; then
31250    # List all toolchains
31251    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31252$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31253    for toolchain in $VALID_TOOLCHAINS; do
31254      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31255      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31256      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31257    done
31258
31259    exit 0
31260  elif test "x$with_toolchain_type" != x; then
31261    # User override; check that it is valid
31262    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31263      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31264$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31265      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31266$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31267      as_fn_error $? "Cannot continue." "$LINENO" 5
31268    fi
31269    TOOLCHAIN_TYPE=$with_toolchain_type
31270  else
31271    # No flag given, use default
31272    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31273  fi
31274
31275
31276  TOOLCHAIN_CC_BINARY_clang="clang"
31277  TOOLCHAIN_CC_BINARY_gcc="gcc"
31278  TOOLCHAIN_CC_BINARY_microsoft="cl"
31279  TOOLCHAIN_CC_BINARY_solstudio="cc"
31280  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31281
31282  TOOLCHAIN_CXX_BINARY_clang="clang++"
31283  TOOLCHAIN_CXX_BINARY_gcc="g++"
31284  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31285  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31286  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31287
31288  # Use indirect variable referencing
31289  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31290  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31291  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31292  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31293  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31294  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31295  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31296  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31297
31298
31299  # Define filename patterns
31300  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31301    LIBRARY_PREFIX=
31302    SHARED_LIBRARY_SUFFIX='.dll'
31303    STATIC_LIBRARY_SUFFIX='.lib'
31304    SHARED_LIBRARY='$1.dll'
31305    STATIC_LIBRARY='$1.lib'
31306    OBJ_SUFFIX='.obj'
31307    EXE_SUFFIX='.exe'
31308  else
31309    LIBRARY_PREFIX=lib
31310    SHARED_LIBRARY_SUFFIX='.so'
31311    STATIC_LIBRARY_SUFFIX='.a'
31312    SHARED_LIBRARY='lib$1.so'
31313    STATIC_LIBRARY='lib$1.a'
31314    OBJ_SUFFIX='.o'
31315    EXE_SUFFIX=''
31316    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31317      # For full static builds, we're overloading the SHARED_LIBRARY
31318      # variables in order to limit the amount of changes required.
31319      # It would be better to remove SHARED and just use LIBRARY and
31320      # LIBRARY_SUFFIX for libraries that can be built either
31321      # shared or static and use STATIC_* for libraries that are
31322      # always built statically.
31323      if test "x$STATIC_BUILD" = xtrue; then
31324        SHARED_LIBRARY='lib$1.a'
31325        SHARED_LIBRARY_SUFFIX='.a'
31326      else
31327        SHARED_LIBRARY='lib$1.dylib'
31328        SHARED_LIBRARY_SUFFIX='.dylib'
31329      fi
31330    fi
31331  fi
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31343    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31344$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31345  else
31346    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31347$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31348  fi
31349
31350
31351# User supplied flags should be used when configure detects compilers
31352
31353  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31354    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31355$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31356  fi
31357
31358  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31359    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31360$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31361  fi
31362
31363  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31364    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31365$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31366  fi
31367
31368
31369# Check whether --with-extra-cflags was given.
31370if test "${with_extra_cflags+set}" = set; then :
31371  withval=$with_extra_cflags;
31372fi
31373
31374
31375
31376# Check whether --with-extra-cxxflags was given.
31377if test "${with_extra_cxxflags+set}" = set; then :
31378  withval=$with_extra_cxxflags;
31379fi
31380
31381
31382
31383# Check whether --with-extra-ldflags was given.
31384if test "${with_extra_ldflags+set}" = set; then :
31385  withval=$with_extra_ldflags;
31386fi
31387
31388
31389  EXTRA_CFLAGS="$with_extra_cflags"
31390  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31391  EXTRA_LDFLAGS="$with_extra_ldflags"
31392
31393  # Hotspot needs these set in their legacy form
31394  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31395  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31396  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406  # The global CFLAGS and LDLAGS variables are used by configure tests and
31407  # should include the extra parameters
31408  CFLAGS="$EXTRA_CFLAGS"
31409  CXXFLAGS="$EXTRA_CXXFLAGS"
31410  LDFLAGS="$EXTRA_LDFLAGS"
31411  CPPFLAGS=""
31412
31413# The sysroot cflags are needed for configure to be able to run the compilers
31414
31415  if test "x$SYSROOT" != "x"; then
31416    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31417      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31418        # Solaris Studio does not have a concept of sysroot. Instead we must
31419        # make sure the default include and lib dirs are appended to each
31420        # compile and link command line. Must also add -I-xbuiltin to enable
31421        # inlining of system functions and intrinsics.
31422        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31423        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31424            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31425      fi
31426    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31427      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31428      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31429    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31430      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31431      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31432    fi
31433    # Propagate the sysroot args to hotspot
31434    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31435    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31436    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31437    # The global CFLAGS and LDFLAGS variables need these for configure to function
31438    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31439    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31440    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31441    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31442  fi
31443
31444  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31445    # We also need -iframework<path>/System/Library/Frameworks
31446    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31447    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31448    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31449    # set this here so it doesn't have to be peppered throughout the forest
31450    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31451    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31452  fi
31453
31454
31455
31456
31457
31458# Then detect the actual binaries needed
31459
31460  # FIXME: Is this needed?
31461  ac_ext=cpp
31462ac_cpp='$CXXCPP $CPPFLAGS'
31463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31466
31467
31468  # Store the CFLAGS etc passed to the configure script.
31469  ORG_CFLAGS="$CFLAGS"
31470  ORG_CXXFLAGS="$CXXFLAGS"
31471
31472  # autoconf magic only relies on PATH, so update it if tools dir is specified
31473  OLD_PATH="$PATH"
31474
31475  # On Windows, we need to detect the visual studio installation first.
31476  # This will change the PATH, but we need to keep that new PATH even
31477  # after toolchain detection is done, since the compiler (on x86) uses
31478  # it for DLL resolution in runtime.
31479  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31480      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31481
31482  # Store path to cygwin link.exe to help excluding it when searching for
31483  # VS linker. This must be done before changing the PATH when looking for VS.
31484  # Extract the first word of "link", so it can be a program name with args.
31485set dummy link; ac_word=$2
31486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31487$as_echo_n "checking for $ac_word... " >&6; }
31488if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31489  $as_echo_n "(cached) " >&6
31490else
31491  case $CYGWIN_LINK in
31492  [\\/]* | ?:[\\/]*)
31493  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31494  ;;
31495  *)
31496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31497for as_dir in $PATH
31498do
31499  IFS=$as_save_IFS
31500  test -z "$as_dir" && as_dir=.
31501    for ac_exec_ext in '' $ac_executable_extensions; do
31502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31503    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31505    break 2
31506  fi
31507done
31508  done
31509IFS=$as_save_IFS
31510
31511  ;;
31512esac
31513fi
31514CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31515if test -n "$CYGWIN_LINK"; then
31516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31517$as_echo "$CYGWIN_LINK" >&6; }
31518else
31519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31520$as_echo "no" >&6; }
31521fi
31522
31523
31524  if test "x$CYGWIN_LINK" != x; then
31525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31526$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31527    "$CYGWIN_LINK" --version > /dev/null
31528    if test $? -eq 0 ; then
31529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31530$as_echo "yes" >&6; }
31531    else
31532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31533$as_echo "no" >&6; }
31534      # This might be the VS linker. Don't exclude it later on.
31535      CYGWIN_LINK=""
31536    fi
31537  fi
31538
31539  # First-hand choice is to locate and run the vsvars bat file.
31540
31541
31542# Check whether --with-toolchain-version was given.
31543if test "${with_toolchain_version+set}" = set; then :
31544  withval=$with_toolchain_version;
31545fi
31546
31547
31548  if test "x$with_toolchain_version" = xlist; then
31549    # List all toolchains
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31551$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31552    for version in $VALID_VS_VERSIONS; do
31553      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31554      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31555    done
31556
31557    exit 0
31558  elif test "x$DEVKIT_VS_VERSION" != x; then
31559    VS_VERSION=$DEVKIT_VS_VERSION
31560    TOOLCHAIN_VERSION=$VS_VERSION
31561    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31562    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31563    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31564    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31565    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31566    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31567
31568    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31569    # can still be exported as INCLUDE for compiler invocations without
31570    # SYSROOT_CFLAGS
31571    OLDIFS="$IFS"
31572    IFS=";"
31573    for i in $DEVKIT_VS_INCLUDE; do
31574      ipath=$i
31575
31576  unix_path="$ipath"
31577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578    windows_path=`$CYGPATH -m "$unix_path"`
31579    ipath="$windows_path"
31580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31581    windows_path=`cmd //c echo $unix_path`
31582    ipath="$windows_path"
31583  fi
31584
31585      VS_INCLUDE="$VS_INCLUDE;$ipath"
31586    done
31587    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31588    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31589    for i in $DEVKIT_VS_LIB; do
31590      libpath=$i
31591
31592  unix_path="$libpath"
31593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31594    windows_path=`$CYGPATH -m "$unix_path"`
31595    libpath="$windows_path"
31596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31597    windows_path=`cmd //c echo $unix_path`
31598    libpath="$windows_path"
31599  fi
31600
31601      VS_LIB="$VS_LIB;$libpath"
31602    done
31603    IFS="$OLDIFS"
31604
31605    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31606$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31607
31608  elif test "x$with_toolchain_version" != x; then
31609    # User override; check that it is valid
31610    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31611      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31612$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31613      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31614$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31615      as_fn_error $? "Cannot continue." "$LINENO" 5
31616    fi
31617    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31618  else
31619    # No flag given, use default
31620    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31621  fi
31622
31623  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31624
31625  VS_VERSION="$VS_VERSION"
31626  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31627  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31628  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31629  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31630
31631  # When using --with-tools-dir, assume it points to the correct and default
31632  # version of Visual Studio or that --with-toolchain-version was also set.
31633  if test "x$with_tools_dir" != x; then
31634
31635  if test "x$VS_ENV_CMD" = x; then
31636    VS_VERSION="${VS_VERSION}"
31637    VS_BASE="$with_tools_dir/../.."
31638    METHOD="--with-tools-dir"
31639
31640    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31641      VCVARSFILE="vc/bin/vcvars32.bat"
31642    else
31643      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31644    fi
31645
31646
31647  windows_path="$VS_BASE"
31648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31649    unix_path=`$CYGPATH -u "$windows_path"`
31650    VS_BASE="$unix_path"
31651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31653    VS_BASE="$unix_path"
31654  fi
31655
31656    if test -d "$VS_BASE"; then
31657      if test -f "$VS_BASE/$VCVARSFILE"; then
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31659$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31660        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31661        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31662        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31663        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31664      else
31665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31666$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31668$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31669      fi
31670    fi
31671  fi
31672
31673
31674  if test "x$VS_ENV_CMD" = x; then
31675    VS_VERSION="${VS_VERSION}"
31676    VS_BASE="$with_tools_dir/../../.."
31677    METHOD="--with-tools-dir"
31678
31679    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31680      VCVARSFILE="vc/bin/vcvars32.bat"
31681    else
31682      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31683    fi
31684
31685
31686  windows_path="$VS_BASE"
31687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31688    unix_path=`$CYGPATH -u "$windows_path"`
31689    VS_BASE="$unix_path"
31690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31692    VS_BASE="$unix_path"
31693  fi
31694
31695    if test -d "$VS_BASE"; then
31696      if test -f "$VS_BASE/$VCVARSFILE"; then
31697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31698$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31699        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31700        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31701        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31702        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31703      else
31704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31705$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31706        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31707$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31708      fi
31709    fi
31710  fi
31711
31712    if test "x$VS_ENV_CMD" = x; then
31713      # Having specified an argument which is incorrect will produce an instant failure;
31714      # we should not go on looking
31715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31716$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31717      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31718$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31719      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31720$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31721      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31722    fi
31723  fi
31724
31725  VS_ENV_CMD=""
31726  VS_ENV_ARGS=""
31727
31728  if test "x$VS_COMNTOOLS" != x; then
31729
31730  if test "x$VS_ENV_CMD" = x; then
31731    VS_VERSION="${VS_VERSION}"
31732    VS_BASE="$VS_COMNTOOLS/../.."
31733    METHOD="$VS_COMNTOOLS_VAR variable"
31734
31735    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31736      VCVARSFILE="vc/bin/vcvars32.bat"
31737    else
31738      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31739    fi
31740
31741
31742  windows_path="$VS_BASE"
31743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31744    unix_path=`$CYGPATH -u "$windows_path"`
31745    VS_BASE="$unix_path"
31746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31748    VS_BASE="$unix_path"
31749  fi
31750
31751    if test -d "$VS_BASE"; then
31752      if test -f "$VS_BASE/$VCVARSFILE"; then
31753        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31754$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31755        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31756        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31757        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31758        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31759      else
31760        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31761$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31762        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31763$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31764      fi
31765    fi
31766  fi
31767
31768  fi
31769  if test "x$PROGRAMFILES" != x; then
31770
31771  if test "x$VS_ENV_CMD" = x; then
31772    VS_VERSION="${VS_VERSION}"
31773    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31774    METHOD="well-known name"
31775
31776    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31777      VCVARSFILE="vc/bin/vcvars32.bat"
31778    else
31779      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31780    fi
31781
31782
31783  windows_path="$VS_BASE"
31784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785    unix_path=`$CYGPATH -u "$windows_path"`
31786    VS_BASE="$unix_path"
31787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31789    VS_BASE="$unix_path"
31790  fi
31791
31792    if test -d "$VS_BASE"; then
31793      if test -f "$VS_BASE/$VCVARSFILE"; then
31794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31795$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31796        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31797        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31798        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31799        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31800      else
31801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31802$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31804$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31805      fi
31806    fi
31807  fi
31808
31809  fi
31810  # Work around the insanely named ProgramFiles(x86) env variable
31811  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31812  if test "x$PROGRAMFILES_X86" != x; then
31813
31814  if test "x$VS_ENV_CMD" = x; then
31815    VS_VERSION="${VS_VERSION}"
31816    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31817    METHOD="well-known name"
31818
31819    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31820      VCVARSFILE="vc/bin/vcvars32.bat"
31821    else
31822      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31823    fi
31824
31825
31826  windows_path="$VS_BASE"
31827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31828    unix_path=`$CYGPATH -u "$windows_path"`
31829    VS_BASE="$unix_path"
31830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31832    VS_BASE="$unix_path"
31833  fi
31834
31835    if test -d "$VS_BASE"; then
31836      if test -f "$VS_BASE/$VCVARSFILE"; then
31837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31838$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31839        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31840        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31841        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31842        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31843      else
31844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31845$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31846        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31847$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31848      fi
31849    fi
31850  fi
31851
31852  fi
31853
31854  if test "x$VS_ENV_CMD" = x; then
31855    VS_VERSION="${VS_VERSION}"
31856    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31857    METHOD="well-known name"
31858
31859    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31860      VCVARSFILE="vc/bin/vcvars32.bat"
31861    else
31862      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31863    fi
31864
31865
31866  windows_path="$VS_BASE"
31867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31868    unix_path=`$CYGPATH -u "$windows_path"`
31869    VS_BASE="$unix_path"
31870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31872    VS_BASE="$unix_path"
31873  fi
31874
31875    if test -d "$VS_BASE"; then
31876      if test -f "$VS_BASE/$VCVARSFILE"; then
31877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31878$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31879        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31880        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31881        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31882        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31883      else
31884        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31885$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31887$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31888      fi
31889    fi
31890  fi
31891
31892
31893  if test "x$VS_ENV_CMD" = x; then
31894    VS_VERSION="${VS_VERSION}"
31895    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31896    METHOD="well-known name"
31897
31898    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31899      VCVARSFILE="vc/bin/vcvars32.bat"
31900    else
31901      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31902    fi
31903
31904
31905  windows_path="$VS_BASE"
31906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31907    unix_path=`$CYGPATH -u "$windows_path"`
31908    VS_BASE="$unix_path"
31909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31911    VS_BASE="$unix_path"
31912  fi
31913
31914    if test -d "$VS_BASE"; then
31915      if test -f "$VS_BASE/$VCVARSFILE"; then
31916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31917$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31918        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31919        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31920        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31921        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31922      else
31923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31924$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31926$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31927      fi
31928    fi
31929  fi
31930
31931
31932  if test "x$SDK_INSTALL_DIR" != x; then
31933    if test "x$ProgramW6432" != x; then
31934
31935  if test "x$VS_ENV_CMD" = x; then
31936    VS_VERSION="${VS_VERSION}"
31937    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31938    METHOD="well-known name"
31939
31940  windows_path="$WIN_SDK_BASE"
31941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31942    unix_path=`$CYGPATH -u "$windows_path"`
31943    WIN_SDK_BASE="$unix_path"
31944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31946    WIN_SDK_BASE="$unix_path"
31947  fi
31948
31949    if test -d "$WIN_SDK_BASE"; then
31950      # There have been cases of partial or broken SDK installations. A missing
31951      # lib dir is not going to work.
31952      if test ! -d "$WIN_SDK_BASE/lib"; then
31953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31956$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31957      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31959$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31960        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31961        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31962          VS_ENV_ARGS="/x86"
31963        else
31964          VS_ENV_ARGS="/x64"
31965        fi
31966        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31967        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31968        # TODO: improve detection for other versions of SDK
31969        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31970      else
31971        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31972$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31973        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31974$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31975      fi
31976    fi
31977  fi
31978
31979    fi
31980    if test "x$PROGRAMW6432" != x; then
31981
31982  if test "x$VS_ENV_CMD" = x; then
31983    VS_VERSION="${VS_VERSION}"
31984    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31985    METHOD="well-known name"
31986
31987  windows_path="$WIN_SDK_BASE"
31988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989    unix_path=`$CYGPATH -u "$windows_path"`
31990    WIN_SDK_BASE="$unix_path"
31991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31993    WIN_SDK_BASE="$unix_path"
31994  fi
31995
31996    if test -d "$WIN_SDK_BASE"; then
31997      # There have been cases of partial or broken SDK installations. A missing
31998      # lib dir is not going to work.
31999      if test ! -d "$WIN_SDK_BASE/lib"; then
32000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32001$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32003$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32004      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32005        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32006$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32007        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32008        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32009          VS_ENV_ARGS="/x86"
32010        else
32011          VS_ENV_ARGS="/x64"
32012        fi
32013        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32014        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32015        # TODO: improve detection for other versions of SDK
32016        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32017      else
32018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32019$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32020        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32021$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32022      fi
32023    fi
32024  fi
32025
32026    fi
32027    if test "x$PROGRAMFILES" != x; then
32028
32029  if test "x$VS_ENV_CMD" = x; then
32030    VS_VERSION="${VS_VERSION}"
32031    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32032    METHOD="well-known name"
32033
32034  windows_path="$WIN_SDK_BASE"
32035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32036    unix_path=`$CYGPATH -u "$windows_path"`
32037    WIN_SDK_BASE="$unix_path"
32038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32040    WIN_SDK_BASE="$unix_path"
32041  fi
32042
32043    if test -d "$WIN_SDK_BASE"; then
32044      # There have been cases of partial or broken SDK installations. A missing
32045      # lib dir is not going to work.
32046      if test ! -d "$WIN_SDK_BASE/lib"; then
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32048$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32049        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32050$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32051      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32052        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32053$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32054        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32055        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32056          VS_ENV_ARGS="/x86"
32057        else
32058          VS_ENV_ARGS="/x64"
32059        fi
32060        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32061        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32062        # TODO: improve detection for other versions of SDK
32063        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32064      else
32065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32066$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32067        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32068$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32069      fi
32070    fi
32071  fi
32072
32073    fi
32074
32075  if test "x$VS_ENV_CMD" = x; then
32076    VS_VERSION="${VS_VERSION}"
32077    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32078    METHOD="well-known name"
32079
32080  windows_path="$WIN_SDK_BASE"
32081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32082    unix_path=`$CYGPATH -u "$windows_path"`
32083    WIN_SDK_BASE="$unix_path"
32084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32086    WIN_SDK_BASE="$unix_path"
32087  fi
32088
32089    if test -d "$WIN_SDK_BASE"; then
32090      # There have been cases of partial or broken SDK installations. A missing
32091      # lib dir is not going to work.
32092      if test ! -d "$WIN_SDK_BASE/lib"; then
32093        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32094$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32095        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32096$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32097      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32099$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32100        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32101        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32102          VS_ENV_ARGS="/x86"
32103        else
32104          VS_ENV_ARGS="/x64"
32105        fi
32106        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32107        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32108        # TODO: improve detection for other versions of SDK
32109        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32110      else
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32114$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32115      fi
32116    fi
32117  fi
32118
32119
32120  if test "x$VS_ENV_CMD" = x; then
32121    VS_VERSION="${VS_VERSION}"
32122    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32123    METHOD="well-known name"
32124
32125  windows_path="$WIN_SDK_BASE"
32126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32127    unix_path=`$CYGPATH -u "$windows_path"`
32128    WIN_SDK_BASE="$unix_path"
32129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32131    WIN_SDK_BASE="$unix_path"
32132  fi
32133
32134    if test -d "$WIN_SDK_BASE"; then
32135      # There have been cases of partial or broken SDK installations. A missing
32136      # lib dir is not going to work.
32137      if test ! -d "$WIN_SDK_BASE/lib"; then
32138        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32139$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32141$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32142      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32146        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32147          VS_ENV_ARGS="/x86"
32148        else
32149          VS_ENV_ARGS="/x64"
32150        fi
32151        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32152        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32153        # TODO: improve detection for other versions of SDK
32154        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32155      else
32156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32159$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32160      fi
32161    fi
32162  fi
32163
32164  fi
32165
32166    if test "x$VS_ENV_CMD" != x; then
32167      TOOLCHAIN_VERSION=$VS_VERSION
32168      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32169      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32170      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32171      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32172      # The rest of the variables are already evaled while probing
32173      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32174$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32175      break
32176    fi
32177  done
32178
32179
32180  # If we have a devkit, skip all of the below.
32181  if test "x$DEVKIT_VS_VERSION" = x; then
32182    if test "x$VS_ENV_CMD" != x; then
32183      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32184
32185  # Only process if variable expands to non-empty
32186
32187  if test "x$VS_ENV_CMD" != x; then
32188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32189
32190  # First separate the path from the arguments. This will split at the first
32191  # space.
32192  complete="$VS_ENV_CMD"
32193  path="${complete%% *}"
32194  tmp="$complete EOL"
32195  arguments="${tmp#* }"
32196
32197  # Input might be given as Windows format, start by converting to
32198  # unix format.
32199  new_path=`$CYGPATH -u "$path"`
32200
32201  # Now try to locate executable using which
32202  new_path=`$WHICH "$new_path" 2> /dev/null`
32203  # bat and cmd files are not always considered executable in cygwin causing which
32204  # to not find them
32205  if test "x$new_path" = x \
32206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32208    new_path=`$CYGPATH -u "$path"`
32209  fi
32210  if test "x$new_path" = x; then
32211    # Oops. Which didn't find the executable.
32212    # The splitting of arguments from the executable at a space might have been incorrect,
32213    # since paths with space are more likely in Windows. Give it another try with the whole
32214    # argument.
32215    path="$complete"
32216    arguments="EOL"
32217    new_path=`$CYGPATH -u "$path"`
32218    new_path=`$WHICH "$new_path" 2> /dev/null`
32219    # bat and cmd files are not always considered executable in cygwin causing which
32220    # to not find them
32221    if test "x$new_path" = x \
32222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32224      new_path=`$CYGPATH -u "$path"`
32225    fi
32226    if test "x$new_path" = x; then
32227      # It's still not found. Now this is an unrecoverable error.
32228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32229$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32230      has_space=`$ECHO "$complete" | $GREP " "`
32231      if test "x$has_space" != x; then
32232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32234      fi
32235      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32236    fi
32237  fi
32238
32239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32242  # "foo.exe" is OK but "foo" is an error.
32243  #
32244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32245  # It is also a way to make sure we got the proper file name for the real test later on.
32246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32247  if test "x$test_shortpath" = x; then
32248    # Short path failed, file does not exist as specified.
32249    # Try adding .exe or .cmd
32250    if test -f "${new_path}.exe"; then
32251      input_to_shortpath="${new_path}.exe"
32252    elif test -f "${new_path}.cmd"; then
32253      input_to_shortpath="${new_path}.cmd"
32254    else
32255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32256$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32259      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32260    fi
32261  else
32262    input_to_shortpath="$new_path"
32263  fi
32264
32265  # Call helper function which possibly converts this using DOS-style short mode.
32266  # If so, the updated path is stored in $new_path.
32267  new_path="$input_to_shortpath"
32268
32269  input_path="$input_to_shortpath"
32270  # Check if we need to convert this using DOS-style short mode. If the path
32271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32272  # take no chances and rewrite it.
32273  # Note: m4 eats our [], so we need to use [ and ] instead.
32274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32275  if test "x$has_forbidden_chars" != x; then
32276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32280      # Going to short mode and back again did indeed matter. Since short mode is
32281      # case insensitive, let's make it lowercase to improve readability.
32282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32283      # Now convert it back to Unix-style (cygpath)
32284      input_path=`$CYGPATH -u "$shortmode_path"`
32285      new_path="$input_path"
32286    fi
32287  fi
32288
32289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32290  if test "x$test_cygdrive_prefix" = x; then
32291    # As a simple fix, exclude /usr/bin since it's not a real path.
32292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32294      # a path prefixed by /cygdrive for fixpath to work.
32295      new_path="$CYGWIN_ROOT_PATH$input_path"
32296    fi
32297  fi
32298
32299  # remove trailing .exe if any
32300  new_path="${new_path/%.exe/}"
32301
32302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32303
32304  # First separate the path from the arguments. This will split at the first
32305  # space.
32306  complete="$VS_ENV_CMD"
32307  path="${complete%% *}"
32308  tmp="$complete EOL"
32309  arguments="${tmp#* }"
32310
32311  # Input might be given as Windows format, start by converting to
32312  # unix format.
32313  new_path="$path"
32314
32315  windows_path="$new_path"
32316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32317    unix_path=`$CYGPATH -u "$windows_path"`
32318    new_path="$unix_path"
32319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32321    new_path="$unix_path"
32322  fi
32323
32324
32325  # Now try to locate executable using which
32326  new_path=`$WHICH "$new_path" 2> /dev/null`
32327
32328  if test "x$new_path" = x; then
32329    # Oops. Which didn't find the executable.
32330    # The splitting of arguments from the executable at a space might have been incorrect,
32331    # since paths with space are more likely in Windows. Give it another try with the whole
32332    # argument.
32333    path="$complete"
32334    arguments="EOL"
32335    new_path="$path"
32336
32337  windows_path="$new_path"
32338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32339    unix_path=`$CYGPATH -u "$windows_path"`
32340    new_path="$unix_path"
32341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32343    new_path="$unix_path"
32344  fi
32345
32346
32347    new_path=`$WHICH "$new_path" 2> /dev/null`
32348    # bat and cmd files are not always considered executable in MSYS causing which
32349    # to not find them
32350    if test "x$new_path" = x \
32351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32353      new_path="$path"
32354
32355  windows_path="$new_path"
32356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32357    unix_path=`$CYGPATH -u "$windows_path"`
32358    new_path="$unix_path"
32359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32361    new_path="$unix_path"
32362  fi
32363
32364    fi
32365
32366    if test "x$new_path" = x; then
32367      # It's still not found. Now this is an unrecoverable error.
32368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32369$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32370      has_space=`$ECHO "$complete" | $GREP " "`
32371      if test "x$has_space" != x; then
32372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32374      fi
32375      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32376    fi
32377  fi
32378
32379  # Now new_path has a complete unix path to the binary
32380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32381    # Keep paths in /bin as-is, but remove trailing .exe if any
32382    new_path="${new_path/%.exe/}"
32383    # Do not save /bin paths to all_fixpath_prefixes!
32384  else
32385    # Not in mixed or Windows style, start by that.
32386    new_path=`cmd //c echo $new_path`
32387
32388  input_path="$new_path"
32389  # Check if we need to convert this using DOS-style short mode. If the path
32390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32391  # take no chances and rewrite it.
32392  # Note: m4 eats our [], so we need to use [ and ] instead.
32393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32394  if test "x$has_forbidden_chars" != x; then
32395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32397  fi
32398
32399    # Output is in $new_path
32400
32401  windows_path="$new_path"
32402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32403    unix_path=`$CYGPATH -u "$windows_path"`
32404    new_path="$unix_path"
32405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32407    new_path="$unix_path"
32408  fi
32409
32410    # remove trailing .exe if any
32411    new_path="${new_path/%.exe/}"
32412
32413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32415  fi
32416
32417    else
32418      # We're on a unix platform. Hooray! :)
32419      # First separate the path from the arguments. This will split at the first
32420      # space.
32421      complete="$VS_ENV_CMD"
32422      path="${complete%% *}"
32423      tmp="$complete EOL"
32424      arguments="${tmp#* }"
32425
32426      # Cannot rely on the command "which" here since it doesn't always work.
32427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32428      if test -z "$is_absolute_path"; then
32429        # Path to executable is not absolute. Find it.
32430        IFS_save="$IFS"
32431        IFS=:
32432        for p in $PATH; do
32433          if test -f "$p/$path" && test -x "$p/$path"; then
32434            new_path="$p/$path"
32435            break
32436          fi
32437        done
32438        IFS="$IFS_save"
32439      else
32440        # This is an absolute path, we can use it without further modifications.
32441        new_path="$path"
32442      fi
32443
32444      if test "x$new_path" = x; then
32445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32446$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32447        has_space=`$ECHO "$complete" | $GREP " "`
32448        if test "x$has_space" != x; then
32449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32451        fi
32452        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32453      fi
32454    fi
32455
32456    # Now join together the path and the arguments once again
32457    if test "x$arguments" != xEOL; then
32458      new_complete="$new_path ${arguments% *}"
32459    else
32460      new_complete="$new_path"
32461    fi
32462
32463    if test "x$complete" != "x$new_complete"; then
32464      VS_ENV_CMD="$new_complete"
32465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32466$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32467    fi
32468  fi
32469
32470
32471      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32472      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32473$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32474
32475      # We need to create a couple of temporary files.
32476      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32477      $MKDIR -p $VS_ENV_TMP_DIR
32478
32479      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32480      # Instead create a shell script which will set the relevant variables when run.
32481      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32482
32483  unix_path="$WINPATH_VS_ENV_CMD"
32484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32485    windows_path=`$CYGPATH -m "$unix_path"`
32486    WINPATH_VS_ENV_CMD="$windows_path"
32487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32488    windows_path=`cmd //c echo $unix_path`
32489    WINPATH_VS_ENV_CMD="$windows_path"
32490  fi
32491
32492      WINPATH_BASH="$BASH"
32493
32494  unix_path="$WINPATH_BASH"
32495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32496    windows_path=`$CYGPATH -m "$unix_path"`
32497    WINPATH_BASH="$windows_path"
32498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32499    windows_path=`cmd //c echo $unix_path`
32500    WINPATH_BASH="$windows_path"
32501  fi
32502
32503
32504      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32505      # script (executable by bash) that will setup the important variables.
32506      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32507      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32508      # This will end up something like:
32509      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32510      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32511      # These will end up something like:
32512      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32513      # The trailing space for everyone except PATH is no typo, but is needed due
32514      # to trailing \ in the Windows paths. These will be stripped later.
32515      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32516          >> $EXTRACT_VC_ENV_BAT_FILE
32517      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32518          >> $EXTRACT_VC_ENV_BAT_FILE
32519      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32520          >> $EXTRACT_VC_ENV_BAT_FILE
32521      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32522          >> $EXTRACT_VC_ENV_BAT_FILE
32523      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32524          >> $EXTRACT_VC_ENV_BAT_FILE
32525      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32526          >> $EXTRACT_VC_ENV_BAT_FILE
32527
32528      # Now execute the newly created bat file.
32529      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32530      # Change directory so we don't need to mess with Windows paths in redirects.
32531      cd $VS_ENV_TMP_DIR
32532      cmd /c extract-vs-env.bat | $CAT
32533      cd $CURDIR
32534
32535      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32536        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32537$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32539$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32541$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32542        as_fn_error $? "Cannot continue" "$LINENO" 5
32543      fi
32544
32545      # Now set all paths and other env variables. This will allow the rest of
32546      # the configure script to find and run the compiler in the proper way.
32547      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32548$as_echo "$as_me: Setting extracted environment variables" >&6;}
32549      . $VS_ENV_TMP_DIR/set-vs-env.sh
32550      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32551      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32552    else
32553      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32554      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32555$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32556    fi
32557  fi
32558
32559  # At this point, we should have correct variables in the environment, or we can't continue.
32560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32561$as_echo_n "checking for Visual Studio variables... " >&6; }
32562
32563  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32564      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32565    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32567$as_echo "present but broken" >&6; }
32568      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32569    else
32570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32571$as_echo "ok" >&6; }
32572      # Remove any trailing "\" ";" and " " from the variables.
32573      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32574      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32575      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32576      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32577      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32578      # Remove any paths containing # (typically F#) as that messes up make. This
32579      # is needed if visual studio was installed with F# support.
32580      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32581
32582
32583
32584
32585
32586      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32587      OLDIFS="$IFS"
32588      IFS=";"
32589      for i in $VS_INCLUDE; do
32590        ipath=$i
32591        # Only process non-empty elements
32592        if test "x$ipath" != x; then
32593          IFS="$OLDIFS"
32594          # Check that directory exists before calling fixup_path
32595          testpath=$ipath
32596
32597  windows_path="$testpath"
32598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32599    unix_path=`$CYGPATH -u "$windows_path"`
32600    testpath="$unix_path"
32601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32603    testpath="$unix_path"
32604  fi
32605
32606          if test -d "$testpath"; then
32607
32608  # Only process if variable expands to non-empty
32609
32610  if test "x$ipath" != x; then
32611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32612
32613  # Input might be given as Windows format, start by converting to
32614  # unix format.
32615  path="$ipath"
32616  new_path=`$CYGPATH -u "$path"`
32617
32618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32621  # "foo.exe" is OK but "foo" is an error.
32622  #
32623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32624  # It is also a way to make sure we got the proper file name for the real test later on.
32625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32626  if test "x$test_shortpath" = x; then
32627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32628$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32629    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32630  fi
32631
32632  # Call helper function which possibly converts this using DOS-style short mode.
32633  # If so, the updated path is stored in $new_path.
32634
32635  input_path="$new_path"
32636  # Check if we need to convert this using DOS-style short mode. If the path
32637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32638  # take no chances and rewrite it.
32639  # Note: m4 eats our [], so we need to use [ and ] instead.
32640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32641  if test "x$has_forbidden_chars" != x; then
32642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32646      # Going to short mode and back again did indeed matter. Since short mode is
32647      # case insensitive, let's make it lowercase to improve readability.
32648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32649      # Now convert it back to Unix-style (cygpath)
32650      input_path=`$CYGPATH -u "$shortmode_path"`
32651      new_path="$input_path"
32652    fi
32653  fi
32654
32655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32656  if test "x$test_cygdrive_prefix" = x; then
32657    # As a simple fix, exclude /usr/bin since it's not a real path.
32658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32660      # a path prefixed by /cygdrive for fixpath to work.
32661      new_path="$CYGWIN_ROOT_PATH$input_path"
32662    fi
32663  fi
32664
32665
32666  if test "x$path" != "x$new_path"; then
32667    ipath="$new_path"
32668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32669$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32670  fi
32671
32672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32673
32674  path="$ipath"
32675  has_colon=`$ECHO $path | $GREP ^.:`
32676  new_path="$path"
32677  if test "x$has_colon" = x; then
32678    # Not in mixed or Windows style, start by that.
32679    new_path=`cmd //c echo $path`
32680  fi
32681
32682
32683  input_path="$new_path"
32684  # Check if we need to convert this using DOS-style short mode. If the path
32685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32686  # take no chances and rewrite it.
32687  # Note: m4 eats our [], so we need to use [ and ] instead.
32688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32689  if test "x$has_forbidden_chars" != x; then
32690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32692  fi
32693
32694
32695  windows_path="$new_path"
32696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32697    unix_path=`$CYGPATH -u "$windows_path"`
32698    new_path="$unix_path"
32699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32701    new_path="$unix_path"
32702  fi
32703
32704  if test "x$path" != "x$new_path"; then
32705    ipath="$new_path"
32706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32707$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32708  fi
32709
32710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32712
32713    else
32714      # We're on a unix platform. Hooray! :)
32715      path="$ipath"
32716      has_space=`$ECHO "$path" | $GREP " "`
32717      if test "x$has_space" != x; then
32718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32719$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32720        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32721      fi
32722
32723      # Use eval to expand a potential ~
32724      eval path="$path"
32725      if test ! -f "$path" && test ! -d "$path"; then
32726        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32727      fi
32728
32729      if test -d "$path"; then
32730        ipath="`cd "$path"; $THEPWDCMD -L`"
32731      else
32732        dir="`$DIRNAME "$path"`"
32733        base="`$BASENAME "$path"`"
32734        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32735      fi
32736    fi
32737  fi
32738
32739            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32740          fi
32741          IFS=";"
32742        fi
32743      done
32744      # Convert VS_LIB into SYSROOT_LDFLAGS
32745      for i in $VS_LIB; do
32746        libpath=$i
32747        # Only process non-empty elements
32748        if test "x$libpath" != x; then
32749          IFS="$OLDIFS"
32750          # Check that directory exists before calling fixup_path
32751          testpath=$libpath
32752
32753  windows_path="$testpath"
32754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32755    unix_path=`$CYGPATH -u "$windows_path"`
32756    testpath="$unix_path"
32757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32759    testpath="$unix_path"
32760  fi
32761
32762          if test -d "$testpath"; then
32763
32764  # Only process if variable expands to non-empty
32765
32766  if test "x$libpath" != x; then
32767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32768
32769  # Input might be given as Windows format, start by converting to
32770  # unix format.
32771  path="$libpath"
32772  new_path=`$CYGPATH -u "$path"`
32773
32774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32777  # "foo.exe" is OK but "foo" is an error.
32778  #
32779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32780  # It is also a way to make sure we got the proper file name for the real test later on.
32781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32782  if test "x$test_shortpath" = x; then
32783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32784$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32785    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32786  fi
32787
32788  # Call helper function which possibly converts this using DOS-style short mode.
32789  # If so, the updated path is stored in $new_path.
32790
32791  input_path="$new_path"
32792  # Check if we need to convert this using DOS-style short mode. If the path
32793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32794  # take no chances and rewrite it.
32795  # Note: m4 eats our [], so we need to use [ and ] instead.
32796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32797  if test "x$has_forbidden_chars" != x; then
32798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32802      # Going to short mode and back again did indeed matter. Since short mode is
32803      # case insensitive, let's make it lowercase to improve readability.
32804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32805      # Now convert it back to Unix-style (cygpath)
32806      input_path=`$CYGPATH -u "$shortmode_path"`
32807      new_path="$input_path"
32808    fi
32809  fi
32810
32811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32812  if test "x$test_cygdrive_prefix" = x; then
32813    # As a simple fix, exclude /usr/bin since it's not a real path.
32814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32816      # a path prefixed by /cygdrive for fixpath to work.
32817      new_path="$CYGWIN_ROOT_PATH$input_path"
32818    fi
32819  fi
32820
32821
32822  if test "x$path" != "x$new_path"; then
32823    libpath="$new_path"
32824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32825$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32826  fi
32827
32828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32829
32830  path="$libpath"
32831  has_colon=`$ECHO $path | $GREP ^.:`
32832  new_path="$path"
32833  if test "x$has_colon" = x; then
32834    # Not in mixed or Windows style, start by that.
32835    new_path=`cmd //c echo $path`
32836  fi
32837
32838
32839  input_path="$new_path"
32840  # Check if we need to convert this using DOS-style short mode. If the path
32841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32842  # take no chances and rewrite it.
32843  # Note: m4 eats our [], so we need to use [ and ] instead.
32844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32845  if test "x$has_forbidden_chars" != x; then
32846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32848  fi
32849
32850
32851  windows_path="$new_path"
32852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32853    unix_path=`$CYGPATH -u "$windows_path"`
32854    new_path="$unix_path"
32855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32857    new_path="$unix_path"
32858  fi
32859
32860  if test "x$path" != "x$new_path"; then
32861    libpath="$new_path"
32862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32863$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32864  fi
32865
32866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32868
32869    else
32870      # We're on a unix platform. Hooray! :)
32871      path="$libpath"
32872      has_space=`$ECHO "$path" | $GREP " "`
32873      if test "x$has_space" != x; then
32874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32875$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32877      fi
32878
32879      # Use eval to expand a potential ~
32880      eval path="$path"
32881      if test ! -f "$path" && test ! -d "$path"; then
32882        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32883      fi
32884
32885      if test -d "$path"; then
32886        libpath="`cd "$path"; $THEPWDCMD -L`"
32887      else
32888        dir="`$DIRNAME "$path"`"
32889        base="`$BASENAME "$path"`"
32890        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32891      fi
32892    fi
32893  fi
32894
32895            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32896          fi
32897          IFS=";"
32898        fi
32899      done
32900      IFS="$OLDIFS"
32901    fi
32902  else
32903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32904$as_echo "not found" >&6; }
32905
32906    if test "x$VS_ENV_CMD" = x; then
32907      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32908$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32909      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32910$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32911    else
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32913$as_echo "$as_me: Running the extraction script failed." >&6;}
32914    fi
32915    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32916$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32917    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32918$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32919    as_fn_error $? "Cannot continue" "$LINENO" 5
32920  fi
32921
32922    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32923    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32924    PATH="$VS_PATH"
32925    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32926    export INCLUDE="$VS_INCLUDE"
32927    export LIB="$VS_LIB"
32928  else
32929    if test "x$XCODE_VERSION_OUTPUT" != x; then
32930      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32931      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32932      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32933    else
32934      # Currently we do not define this for other toolchains. This might change as the need arise.
32935      TOOLCHAIN_VERSION=
32936    fi
32937  fi
32938
32939
32940  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32941  # override all other locations.
32942  if test "x$TOOLCHAIN_PATH" != x; then
32943    PATH=$TOOLCHAIN_PATH:$PATH
32944  fi
32945
32946
32947  #
32948  # Setup the compilers (CC and CXX)
32949  #
32950
32951  COMPILER_NAME=C
32952  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32953
32954  if test "x$CC" != x; then
32955    # User has supplied compiler name already, always let that override.
32956    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32957$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32958    if test "x`basename $CC`" = "x$CC"; then
32959      # A command without a complete path is provided, search $PATH.
32960
32961      for ac_prog in $CC
32962do
32963  # Extract the first word of "$ac_prog", so it can be a program name with args.
32964set dummy $ac_prog; ac_word=$2
32965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32966$as_echo_n "checking for $ac_word... " >&6; }
32967if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32968  $as_echo_n "(cached) " >&6
32969else
32970  case $POTENTIAL_CC in
32971  [\\/]* | ?:[\\/]*)
32972  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32973  ;;
32974  *)
32975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32976for as_dir in $PATH
32977do
32978  IFS=$as_save_IFS
32979  test -z "$as_dir" && as_dir=.
32980    for ac_exec_ext in '' $ac_executable_extensions; do
32981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32982    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32984    break 2
32985  fi
32986done
32987  done
32988IFS=$as_save_IFS
32989
32990  ;;
32991esac
32992fi
32993POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32994if test -n "$POTENTIAL_CC"; then
32995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32996$as_echo "$POTENTIAL_CC" >&6; }
32997else
32998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32999$as_echo "no" >&6; }
33000fi
33001
33002
33003  test -n "$POTENTIAL_CC" && break
33004done
33005
33006      if test "x$POTENTIAL_CC" != x; then
33007        CC=$POTENTIAL_CC
33008      else
33009        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33010      fi
33011    else
33012      # Otherwise it might already be a complete path
33013      if test ! -x "$CC"; then
33014        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33015      fi
33016    fi
33017  else
33018    # No user supplied value. Locate compiler ourselves.
33019
33020    # If we are cross compiling, assume cross compilation tools follows the
33021    # cross compilation standard where they are prefixed with the autoconf
33022    # standard name for the target. For example the binary
33023    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33024    # If we are not cross compiling, then the default compiler name will be
33025    # used.
33026
33027    CC=
33028    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33029    # before checking the rest of the PATH.
33030    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33031    # step, this should not be necessary.
33032    if test -n "$TOOLCHAIN_PATH"; then
33033      PATH_save="$PATH"
33034      PATH="$TOOLCHAIN_PATH"
33035      for ac_prog in $SEARCH_LIST
33036do
33037  # Extract the first word of "$ac_prog", so it can be a program name with args.
33038set dummy $ac_prog; ac_word=$2
33039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33040$as_echo_n "checking for $ac_word... " >&6; }
33041if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33042  $as_echo_n "(cached) " >&6
33043else
33044  case $TOOLCHAIN_PATH_CC in
33045  [\\/]* | ?:[\\/]*)
33046  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33047  ;;
33048  *)
33049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33050for as_dir in $PATH
33051do
33052  IFS=$as_save_IFS
33053  test -z "$as_dir" && as_dir=.
33054    for ac_exec_ext in '' $ac_executable_extensions; do
33055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33056    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33058    break 2
33059  fi
33060done
33061  done
33062IFS=$as_save_IFS
33063
33064  ;;
33065esac
33066fi
33067TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33068if test -n "$TOOLCHAIN_PATH_CC"; then
33069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33070$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33071else
33072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33073$as_echo "no" >&6; }
33074fi
33075
33076
33077  test -n "$TOOLCHAIN_PATH_CC" && break
33078done
33079
33080      CC=$TOOLCHAIN_PATH_CC
33081      PATH="$PATH_save"
33082    fi
33083
33084    # AC_PATH_PROGS can't be run multiple times with the same variable,
33085    # so create a new name for this run.
33086    if test "x$CC" = x; then
33087      for ac_prog in $SEARCH_LIST
33088do
33089  # Extract the first word of "$ac_prog", so it can be a program name with args.
33090set dummy $ac_prog; ac_word=$2
33091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33092$as_echo_n "checking for $ac_word... " >&6; }
33093if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33094  $as_echo_n "(cached) " >&6
33095else
33096  case $POTENTIAL_CC in
33097  [\\/]* | ?:[\\/]*)
33098  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33099  ;;
33100  *)
33101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33102for as_dir in $PATH
33103do
33104  IFS=$as_save_IFS
33105  test -z "$as_dir" && as_dir=.
33106    for ac_exec_ext in '' $ac_executable_extensions; do
33107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33108    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33110    break 2
33111  fi
33112done
33113  done
33114IFS=$as_save_IFS
33115
33116  ;;
33117esac
33118fi
33119POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33120if test -n "$POTENTIAL_CC"; then
33121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33122$as_echo "$POTENTIAL_CC" >&6; }
33123else
33124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33125$as_echo "no" >&6; }
33126fi
33127
33128
33129  test -n "$POTENTIAL_CC" && break
33130done
33131
33132      CC=$POTENTIAL_CC
33133    fi
33134
33135    if test "x$CC" = x; then
33136
33137  # Print a helpful message on how to acquire the necessary build dependency.
33138  # devkit is the help tag: freetype, cups, alsa etc
33139  MISSING_DEPENDENCY=devkit
33140
33141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33142    cygwin_help $MISSING_DEPENDENCY
33143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33144    msys_help $MISSING_DEPENDENCY
33145  else
33146    PKGHANDLER_COMMAND=
33147
33148    case $PKGHANDLER in
33149      apt-get)
33150        apt_help     $MISSING_DEPENDENCY ;;
33151      yum)
33152        yum_help     $MISSING_DEPENDENCY ;;
33153      port)
33154        port_help    $MISSING_DEPENDENCY ;;
33155      pkgutil)
33156        pkgutil_help $MISSING_DEPENDENCY ;;
33157      pkgadd)
33158        pkgadd_help  $MISSING_DEPENDENCY ;;
33159    esac
33160
33161    if test "x$PKGHANDLER_COMMAND" != x; then
33162      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33163    fi
33164  fi
33165
33166      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33167    fi
33168  fi
33169
33170  # Now we have a compiler binary in CC. Make sure it's okay.
33171
33172  # Only process if variable expands to non-empty
33173
33174  if test "x$CC" != x; then
33175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33176
33177  # First separate the path from the arguments. This will split at the first
33178  # space.
33179  complete="$CC"
33180  path="${complete%% *}"
33181  tmp="$complete EOL"
33182  arguments="${tmp#* }"
33183
33184  # Input might be given as Windows format, start by converting to
33185  # unix format.
33186  new_path=`$CYGPATH -u "$path"`
33187
33188  # Now try to locate executable using which
33189  new_path=`$WHICH "$new_path" 2> /dev/null`
33190  # bat and cmd files are not always considered executable in cygwin causing which
33191  # to not find them
33192  if test "x$new_path" = x \
33193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33195    new_path=`$CYGPATH -u "$path"`
33196  fi
33197  if test "x$new_path" = x; then
33198    # Oops. Which didn't find the executable.
33199    # The splitting of arguments from the executable at a space might have been incorrect,
33200    # since paths with space are more likely in Windows. Give it another try with the whole
33201    # argument.
33202    path="$complete"
33203    arguments="EOL"
33204    new_path=`$CYGPATH -u "$path"`
33205    new_path=`$WHICH "$new_path" 2> /dev/null`
33206    # bat and cmd files are not always considered executable in cygwin causing which
33207    # to not find them
33208    if test "x$new_path" = x \
33209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33211      new_path=`$CYGPATH -u "$path"`
33212    fi
33213    if test "x$new_path" = x; then
33214      # It's still not found. Now this is an unrecoverable error.
33215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33216$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33217      has_space=`$ECHO "$complete" | $GREP " "`
33218      if test "x$has_space" != x; then
33219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33221      fi
33222      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33223    fi
33224  fi
33225
33226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33229  # "foo.exe" is OK but "foo" is an error.
33230  #
33231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33232  # It is also a way to make sure we got the proper file name for the real test later on.
33233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33234  if test "x$test_shortpath" = x; then
33235    # Short path failed, file does not exist as specified.
33236    # Try adding .exe or .cmd
33237    if test -f "${new_path}.exe"; then
33238      input_to_shortpath="${new_path}.exe"
33239    elif test -f "${new_path}.cmd"; then
33240      input_to_shortpath="${new_path}.cmd"
33241    else
33242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33243$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33246      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33247    fi
33248  else
33249    input_to_shortpath="$new_path"
33250  fi
33251
33252  # Call helper function which possibly converts this using DOS-style short mode.
33253  # If so, the updated path is stored in $new_path.
33254  new_path="$input_to_shortpath"
33255
33256  input_path="$input_to_shortpath"
33257  # Check if we need to convert this using DOS-style short mode. If the path
33258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33259  # take no chances and rewrite it.
33260  # Note: m4 eats our [], so we need to use [ and ] instead.
33261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33262  if test "x$has_forbidden_chars" != x; then
33263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33267      # Going to short mode and back again did indeed matter. Since short mode is
33268      # case insensitive, let's make it lowercase to improve readability.
33269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33270      # Now convert it back to Unix-style (cygpath)
33271      input_path=`$CYGPATH -u "$shortmode_path"`
33272      new_path="$input_path"
33273    fi
33274  fi
33275
33276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33277  if test "x$test_cygdrive_prefix" = x; then
33278    # As a simple fix, exclude /usr/bin since it's not a real path.
33279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33281      # a path prefixed by /cygdrive for fixpath to work.
33282      new_path="$CYGWIN_ROOT_PATH$input_path"
33283    fi
33284  fi
33285
33286  # remove trailing .exe if any
33287  new_path="${new_path/%.exe/}"
33288
33289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33290
33291  # First separate the path from the arguments. This will split at the first
33292  # space.
33293  complete="$CC"
33294  path="${complete%% *}"
33295  tmp="$complete EOL"
33296  arguments="${tmp#* }"
33297
33298  # Input might be given as Windows format, start by converting to
33299  # unix format.
33300  new_path="$path"
33301
33302  windows_path="$new_path"
33303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33304    unix_path=`$CYGPATH -u "$windows_path"`
33305    new_path="$unix_path"
33306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33308    new_path="$unix_path"
33309  fi
33310
33311
33312  # Now try to locate executable using which
33313  new_path=`$WHICH "$new_path" 2> /dev/null`
33314
33315  if test "x$new_path" = x; then
33316    # Oops. Which didn't find the executable.
33317    # The splitting of arguments from the executable at a space might have been incorrect,
33318    # since paths with space are more likely in Windows. Give it another try with the whole
33319    # argument.
33320    path="$complete"
33321    arguments="EOL"
33322    new_path="$path"
33323
33324  windows_path="$new_path"
33325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33326    unix_path=`$CYGPATH -u "$windows_path"`
33327    new_path="$unix_path"
33328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33330    new_path="$unix_path"
33331  fi
33332
33333
33334    new_path=`$WHICH "$new_path" 2> /dev/null`
33335    # bat and cmd files are not always considered executable in MSYS causing which
33336    # to not find them
33337    if test "x$new_path" = x \
33338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33340      new_path="$path"
33341
33342  windows_path="$new_path"
33343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33344    unix_path=`$CYGPATH -u "$windows_path"`
33345    new_path="$unix_path"
33346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33348    new_path="$unix_path"
33349  fi
33350
33351    fi
33352
33353    if test "x$new_path" = x; then
33354      # It's still not found. Now this is an unrecoverable error.
33355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33356$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33357      has_space=`$ECHO "$complete" | $GREP " "`
33358      if test "x$has_space" != x; then
33359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33361      fi
33362      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33363    fi
33364  fi
33365
33366  # Now new_path has a complete unix path to the binary
33367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33368    # Keep paths in /bin as-is, but remove trailing .exe if any
33369    new_path="${new_path/%.exe/}"
33370    # Do not save /bin paths to all_fixpath_prefixes!
33371  else
33372    # Not in mixed or Windows style, start by that.
33373    new_path=`cmd //c echo $new_path`
33374
33375  input_path="$new_path"
33376  # Check if we need to convert this using DOS-style short mode. If the path
33377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33378  # take no chances and rewrite it.
33379  # Note: m4 eats our [], so we need to use [ and ] instead.
33380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33381  if test "x$has_forbidden_chars" != x; then
33382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33384  fi
33385
33386    # Output is in $new_path
33387
33388  windows_path="$new_path"
33389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390    unix_path=`$CYGPATH -u "$windows_path"`
33391    new_path="$unix_path"
33392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33394    new_path="$unix_path"
33395  fi
33396
33397    # remove trailing .exe if any
33398    new_path="${new_path/%.exe/}"
33399
33400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33402  fi
33403
33404    else
33405      # We're on a unix platform. Hooray! :)
33406      # First separate the path from the arguments. This will split at the first
33407      # space.
33408      complete="$CC"
33409      path="${complete%% *}"
33410      tmp="$complete EOL"
33411      arguments="${tmp#* }"
33412
33413      # Cannot rely on the command "which" here since it doesn't always work.
33414      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33415      if test -z "$is_absolute_path"; then
33416        # Path to executable is not absolute. Find it.
33417        IFS_save="$IFS"
33418        IFS=:
33419        for p in $PATH; do
33420          if test -f "$p/$path" && test -x "$p/$path"; then
33421            new_path="$p/$path"
33422            break
33423          fi
33424        done
33425        IFS="$IFS_save"
33426      else
33427        # This is an absolute path, we can use it without further modifications.
33428        new_path="$path"
33429      fi
33430
33431      if test "x$new_path" = x; then
33432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33433$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33434        has_space=`$ECHO "$complete" | $GREP " "`
33435        if test "x$has_space" != x; then
33436          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33437$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33438        fi
33439        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33440      fi
33441    fi
33442
33443    # Now join together the path and the arguments once again
33444    if test "x$arguments" != xEOL; then
33445      new_complete="$new_path ${arguments% *}"
33446    else
33447      new_complete="$new_path"
33448    fi
33449
33450    if test "x$complete" != "x$new_complete"; then
33451      CC="$new_complete"
33452      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33453$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33454    fi
33455  fi
33456
33457  TEST_COMPILER="$CC"
33458
33459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33460$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33461  SYMLINK_ORIGINAL="$TEST_COMPILER"
33462
33463  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33464    # Follow a chain of symbolic links. Use readlink
33465    # where it exists, else fall back to horribly
33466    # complicated shell code.
33467    if test "x$READLINK_TESTED" != yes; then
33468      # On MacOSX there is a readlink tool with a different
33469      # purpose than the GNU readlink tool. Check the found readlink.
33470      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33471      if test "x$ISGNU" = x; then
33472        # A readlink that we do not know how to use.
33473        # Are there other non-GNU readlinks out there?
33474        READLINK_TESTED=yes
33475        READLINK=
33476      fi
33477    fi
33478
33479    if test "x$READLINK" != x; then
33480      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33481    else
33482      # Save the current directory for restoring afterwards
33483      STARTDIR=$PWD
33484      COUNTER=0
33485      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33486      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33487      cd $sym_link_dir
33488      # Use -P flag to resolve symlinks in directories.
33489      cd `$THEPWDCMD -P`
33490      sym_link_dir=`$THEPWDCMD -P`
33491      # Resolve file symlinks
33492      while test $COUNTER -lt 20; do
33493        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33494        if test "x$ISLINK" == x; then
33495          # This is not a symbolic link! We are done!
33496          break
33497        fi
33498        # Again resolve directory symlinks since the target of the just found
33499        # link could be in a different directory
33500        cd `$DIRNAME $ISLINK`
33501        sym_link_dir=`$THEPWDCMD -P`
33502        sym_link_file=`$BASENAME $ISLINK`
33503        let COUNTER=COUNTER+1
33504      done
33505      cd $STARTDIR
33506      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33507    fi
33508  fi
33509
33510  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33512$as_echo "no symlink" >&6; }
33513  else
33514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33515$as_echo "$SYMLINK_ORIGINAL" >&6; }
33516
33517    # We can't handle ccache by gcc wrappers, since we need to know if we're
33518    # using ccache. Instead ccache usage must be controlled by a configure option.
33519    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33520    if test "x$COMPILER_BASENAME" = "xccache"; then
33521      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33522$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33523      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33524    fi
33525  fi
33526
33527
33528  COMPILER=$CC
33529  COMPILER_NAME=$COMPILER_NAME
33530
33531  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33532    # cc -V output typically looks like
33533    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33534    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33535    # Check that this is likely to be the Solaris Studio cc.
33536    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33537    if test $? -ne 0; then
33538      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33539      { $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
33540$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33541      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33542$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33543      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33544$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33545      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33546    fi
33547    # Remove usage instructions (if present), and
33548    # collapse compiler output into a single line
33549    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33550        $SED -e 's/ *[Uu]sage:.*//'`
33551    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33552        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33553  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33554    # xlc -qversion output typically looks like
33555    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33556    #     Version: 11.01.0000.0015
33557    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33558    # Check that this is likely to be the IBM XL C compiler.
33559    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33560    if test $? -ne 0; then
33561      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33562      { $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
33563$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33564      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33565$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33566      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33567$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33568      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33569    fi
33570    # Collapse compiler output into a single line
33571    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33572    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33573        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33574  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33575    # There is no specific version flag, but all output starts with a version string.
33576    # First line typically looks something like:
33577    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33578    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33579    # Check that this is likely to be Microsoft CL.EXE.
33580    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33581    if test $? -ne 0; then
33582      { $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
33583$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33585$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33586      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33587    fi
33588    # Collapse compiler output into a single line
33589    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33590    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33591        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33592  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33593    # gcc --version output typically looks like
33594    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33595    #     Copyright (C) 2013 Free Software Foundation, Inc.
33596    #     This is free software; see the source for copying conditions.  There is NO
33597    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33598    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33599    # Check that this is likely to be GCC.
33600    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33601    if test $? -ne 0; then
33602      { $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
33603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33605$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33606      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33607    fi
33608    # Remove Copyright and legalese from version string, and
33609    # collapse into a single line
33610    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33611        $SED -e 's/ *Copyright .*//'`
33612    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33613        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33614  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33615    # clang --version output typically looks like
33616    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33617    #    clang version 3.3 (tags/RELEASE_33/final)
33618    # or
33619    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33620    #    Target: x86_64-pc-linux-gnu
33621    #    Thread model: posix
33622    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33623    # Check that this is likely to be clang
33624    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33625    if test $? -ne 0; then
33626      { $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
33627$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33628      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33629$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33630      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33631    fi
33632    # Collapse compiler output into a single line
33633    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33634    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33635        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33636  else
33637      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33638  fi
33639  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33640  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33641  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33642  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33643
33644  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33645$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33646
33647
33648  # Now that we have resolved CC ourself, let autoconf have its go at it
33649  ac_ext=c
33650ac_cpp='$CPP $CPPFLAGS'
33651ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33652ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33653ac_compiler_gnu=$ac_cv_c_compiler_gnu
33654if test -n "$ac_tool_prefix"; then
33655  for ac_prog in $CC
33656  do
33657    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33658set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33660$as_echo_n "checking for $ac_word... " >&6; }
33661if ${ac_cv_prog_CC+:} false; then :
33662  $as_echo_n "(cached) " >&6
33663else
33664  if test -n "$CC"; then
33665  ac_cv_prog_CC="$CC" # Let the user override the test.
33666else
33667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33668for as_dir in $PATH
33669do
33670  IFS=$as_save_IFS
33671  test -z "$as_dir" && as_dir=.
33672    for ac_exec_ext in '' $ac_executable_extensions; do
33673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33674    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33676    break 2
33677  fi
33678done
33679  done
33680IFS=$as_save_IFS
33681
33682fi
33683fi
33684CC=$ac_cv_prog_CC
33685if test -n "$CC"; then
33686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33687$as_echo "$CC" >&6; }
33688else
33689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33690$as_echo "no" >&6; }
33691fi
33692
33693
33694    test -n "$CC" && break
33695  done
33696fi
33697if test -z "$CC"; then
33698  ac_ct_CC=$CC
33699  for ac_prog in $CC
33700do
33701  # Extract the first word of "$ac_prog", so it can be a program name with args.
33702set dummy $ac_prog; ac_word=$2
33703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33704$as_echo_n "checking for $ac_word... " >&6; }
33705if ${ac_cv_prog_ac_ct_CC+:} false; then :
33706  $as_echo_n "(cached) " >&6
33707else
33708  if test -n "$ac_ct_CC"; then
33709  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33710else
33711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33712for as_dir in $PATH
33713do
33714  IFS=$as_save_IFS
33715  test -z "$as_dir" && as_dir=.
33716    for ac_exec_ext in '' $ac_executable_extensions; do
33717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33718    ac_cv_prog_ac_ct_CC="$ac_prog"
33719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33720    break 2
33721  fi
33722done
33723  done
33724IFS=$as_save_IFS
33725
33726fi
33727fi
33728ac_ct_CC=$ac_cv_prog_ac_ct_CC
33729if test -n "$ac_ct_CC"; then
33730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33731$as_echo "$ac_ct_CC" >&6; }
33732else
33733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33734$as_echo "no" >&6; }
33735fi
33736
33737
33738  test -n "$ac_ct_CC" && break
33739done
33740
33741  if test "x$ac_ct_CC" = x; then
33742    CC=""
33743  else
33744    case $cross_compiling:$ac_tool_warned in
33745yes:)
33746{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33748ac_tool_warned=yes ;;
33749esac
33750    CC=$ac_ct_CC
33751  fi
33752fi
33753
33754
33755test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33757as_fn_error $? "no acceptable C compiler found in \$PATH
33758See \`config.log' for more details" "$LINENO" 5; }
33759
33760# Provide some information about the compiler.
33761$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33762set X $ac_compile
33763ac_compiler=$2
33764for ac_option in --version -v -V -qversion; do
33765  { { ac_try="$ac_compiler $ac_option >&5"
33766case "(($ac_try" in
33767  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33768  *) ac_try_echo=$ac_try;;
33769esac
33770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33771$as_echo "$ac_try_echo"; } >&5
33772  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33773  ac_status=$?
33774  if test -s conftest.err; then
33775    sed '10a\
33776... rest of stderr output deleted ...
33777         10q' conftest.err >conftest.er1
33778    cat conftest.er1 >&5
33779  fi
33780  rm -f conftest.er1 conftest.err
33781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33782  test $ac_status = 0; }
33783done
33784
33785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33786/* end confdefs.h.  */
33787
33788int
33789main ()
33790{
33791
33792  ;
33793  return 0;
33794}
33795_ACEOF
33796ac_clean_files_save=$ac_clean_files
33797ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33798# Try to create an executable without -o first, disregard a.out.
33799# It will help us diagnose broken compilers, and finding out an intuition
33800# of exeext.
33801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33802$as_echo_n "checking whether the C compiler works... " >&6; }
33803ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33804
33805# The possible output files:
33806ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33807
33808ac_rmfiles=
33809for ac_file in $ac_files
33810do
33811  case $ac_file in
33812    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33813    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33814  esac
33815done
33816rm -f $ac_rmfiles
33817
33818if { { ac_try="$ac_link_default"
33819case "(($ac_try" in
33820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33821  *) ac_try_echo=$ac_try;;
33822esac
33823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33824$as_echo "$ac_try_echo"; } >&5
33825  (eval "$ac_link_default") 2>&5
33826  ac_status=$?
33827  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33828  test $ac_status = 0; }; then :
33829  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33830# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33831# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33832# so that the user can short-circuit this test for compilers unknown to
33833# Autoconf.
33834for ac_file in $ac_files ''
33835do
33836  test -f "$ac_file" || continue
33837  case $ac_file in
33838    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33839	;;
33840    [ab].out )
33841	# We found the default executable, but exeext='' is most
33842	# certainly right.
33843	break;;
33844    *.* )
33845	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33846	then :; else
33847	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33848	fi
33849	# We set ac_cv_exeext here because the later test for it is not
33850	# safe: cross compilers may not add the suffix if given an `-o'
33851	# argument, so we may need to know it at that point already.
33852	# Even if this section looks crufty: it has the advantage of
33853	# actually working.
33854	break;;
33855    * )
33856	break;;
33857  esac
33858done
33859test "$ac_cv_exeext" = no && ac_cv_exeext=
33860
33861else
33862  ac_file=''
33863fi
33864if test -z "$ac_file"; then :
33865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33866$as_echo "no" >&6; }
33867$as_echo "$as_me: failed program was:" >&5
33868sed 's/^/| /' conftest.$ac_ext >&5
33869
33870{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33872as_fn_error 77 "C compiler cannot create executables
33873See \`config.log' for more details" "$LINENO" 5; }
33874else
33875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33876$as_echo "yes" >&6; }
33877fi
33878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33879$as_echo_n "checking for C compiler default output file name... " >&6; }
33880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33881$as_echo "$ac_file" >&6; }
33882ac_exeext=$ac_cv_exeext
33883
33884rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33885ac_clean_files=$ac_clean_files_save
33886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33887$as_echo_n "checking for suffix of executables... " >&6; }
33888if { { ac_try="$ac_link"
33889case "(($ac_try" in
33890  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33891  *) ac_try_echo=$ac_try;;
33892esac
33893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33894$as_echo "$ac_try_echo"; } >&5
33895  (eval "$ac_link") 2>&5
33896  ac_status=$?
33897  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33898  test $ac_status = 0; }; then :
33899  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33900# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33901# work properly (i.e., refer to `conftest.exe'), while it won't with
33902# `rm'.
33903for ac_file in conftest.exe conftest conftest.*; do
33904  test -f "$ac_file" || continue
33905  case $ac_file in
33906    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33907    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33908	  break;;
33909    * ) break;;
33910  esac
33911done
33912else
33913  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33915as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33916See \`config.log' for more details" "$LINENO" 5; }
33917fi
33918rm -f conftest conftest$ac_cv_exeext
33919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33920$as_echo "$ac_cv_exeext" >&6; }
33921
33922rm -f conftest.$ac_ext
33923EXEEXT=$ac_cv_exeext
33924ac_exeext=$EXEEXT
33925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33926/* end confdefs.h.  */
33927#include <stdio.h>
33928int
33929main ()
33930{
33931FILE *f = fopen ("conftest.out", "w");
33932 return ferror (f) || fclose (f) != 0;
33933
33934  ;
33935  return 0;
33936}
33937_ACEOF
33938ac_clean_files="$ac_clean_files conftest.out"
33939# Check that the compiler produces executables we can run.  If not, either
33940# the compiler is broken, or we cross compile.
33941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33942$as_echo_n "checking whether we are cross compiling... " >&6; }
33943if test "$cross_compiling" != yes; then
33944  { { ac_try="$ac_link"
33945case "(($ac_try" in
33946  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33947  *) ac_try_echo=$ac_try;;
33948esac
33949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33950$as_echo "$ac_try_echo"; } >&5
33951  (eval "$ac_link") 2>&5
33952  ac_status=$?
33953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33954  test $ac_status = 0; }
33955  if { ac_try='./conftest$ac_cv_exeext'
33956  { { case "(($ac_try" in
33957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33958  *) ac_try_echo=$ac_try;;
33959esac
33960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33961$as_echo "$ac_try_echo"; } >&5
33962  (eval "$ac_try") 2>&5
33963  ac_status=$?
33964  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33965  test $ac_status = 0; }; }; then
33966    cross_compiling=no
33967  else
33968    if test "$cross_compiling" = maybe; then
33969	cross_compiling=yes
33970    else
33971	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33973as_fn_error $? "cannot run C compiled programs.
33974If you meant to cross compile, use \`--host'.
33975See \`config.log' for more details" "$LINENO" 5; }
33976    fi
33977  fi
33978fi
33979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33980$as_echo "$cross_compiling" >&6; }
33981
33982rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33983ac_clean_files=$ac_clean_files_save
33984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33985$as_echo_n "checking for suffix of object files... " >&6; }
33986if ${ac_cv_objext+:} false; then :
33987  $as_echo_n "(cached) " >&6
33988else
33989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33990/* end confdefs.h.  */
33991
33992int
33993main ()
33994{
33995
33996  ;
33997  return 0;
33998}
33999_ACEOF
34000rm -f conftest.o conftest.obj
34001if { { ac_try="$ac_compile"
34002case "(($ac_try" in
34003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34004  *) ac_try_echo=$ac_try;;
34005esac
34006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34007$as_echo "$ac_try_echo"; } >&5
34008  (eval "$ac_compile") 2>&5
34009  ac_status=$?
34010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34011  test $ac_status = 0; }; then :
34012  for ac_file in conftest.o conftest.obj conftest.*; do
34013  test -f "$ac_file" || continue;
34014  case $ac_file in
34015    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34016    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34017       break;;
34018  esac
34019done
34020else
34021  $as_echo "$as_me: failed program was:" >&5
34022sed 's/^/| /' conftest.$ac_ext >&5
34023
34024{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34026as_fn_error $? "cannot compute suffix of object files: cannot compile
34027See \`config.log' for more details" "$LINENO" 5; }
34028fi
34029rm -f conftest.$ac_cv_objext conftest.$ac_ext
34030fi
34031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34032$as_echo "$ac_cv_objext" >&6; }
34033OBJEXT=$ac_cv_objext
34034ac_objext=$OBJEXT
34035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34036$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34037if ${ac_cv_c_compiler_gnu+:} false; then :
34038  $as_echo_n "(cached) " >&6
34039else
34040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34041/* end confdefs.h.  */
34042
34043int
34044main ()
34045{
34046#ifndef __GNUC__
34047       choke me
34048#endif
34049
34050  ;
34051  return 0;
34052}
34053_ACEOF
34054if ac_fn_c_try_compile "$LINENO"; then :
34055  ac_compiler_gnu=yes
34056else
34057  ac_compiler_gnu=no
34058fi
34059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34060ac_cv_c_compiler_gnu=$ac_compiler_gnu
34061
34062fi
34063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34064$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34065if test $ac_compiler_gnu = yes; then
34066  GCC=yes
34067else
34068  GCC=
34069fi
34070ac_test_CFLAGS=${CFLAGS+set}
34071ac_save_CFLAGS=$CFLAGS
34072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34073$as_echo_n "checking whether $CC accepts -g... " >&6; }
34074if ${ac_cv_prog_cc_g+:} false; then :
34075  $as_echo_n "(cached) " >&6
34076else
34077  ac_save_c_werror_flag=$ac_c_werror_flag
34078   ac_c_werror_flag=yes
34079   ac_cv_prog_cc_g=no
34080   CFLAGS="-g"
34081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34082/* end confdefs.h.  */
34083
34084int
34085main ()
34086{
34087
34088  ;
34089  return 0;
34090}
34091_ACEOF
34092if ac_fn_c_try_compile "$LINENO"; then :
34093  ac_cv_prog_cc_g=yes
34094else
34095  CFLAGS=""
34096      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34097/* end confdefs.h.  */
34098
34099int
34100main ()
34101{
34102
34103  ;
34104  return 0;
34105}
34106_ACEOF
34107if ac_fn_c_try_compile "$LINENO"; then :
34108
34109else
34110  ac_c_werror_flag=$ac_save_c_werror_flag
34111	 CFLAGS="-g"
34112	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34113/* end confdefs.h.  */
34114
34115int
34116main ()
34117{
34118
34119  ;
34120  return 0;
34121}
34122_ACEOF
34123if ac_fn_c_try_compile "$LINENO"; then :
34124  ac_cv_prog_cc_g=yes
34125fi
34126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34127fi
34128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34129fi
34130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34131   ac_c_werror_flag=$ac_save_c_werror_flag
34132fi
34133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34134$as_echo "$ac_cv_prog_cc_g" >&6; }
34135if test "$ac_test_CFLAGS" = set; then
34136  CFLAGS=$ac_save_CFLAGS
34137elif test $ac_cv_prog_cc_g = yes; then
34138  if test "$GCC" = yes; then
34139    CFLAGS="-g -O2"
34140  else
34141    CFLAGS="-g"
34142  fi
34143else
34144  if test "$GCC" = yes; then
34145    CFLAGS="-O2"
34146  else
34147    CFLAGS=
34148  fi
34149fi
34150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34151$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34152if ${ac_cv_prog_cc_c89+:} false; then :
34153  $as_echo_n "(cached) " >&6
34154else
34155  ac_cv_prog_cc_c89=no
34156ac_save_CC=$CC
34157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34158/* end confdefs.h.  */
34159#include <stdarg.h>
34160#include <stdio.h>
34161struct stat;
34162/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34163struct buf { int x; };
34164FILE * (*rcsopen) (struct buf *, struct stat *, int);
34165static char *e (p, i)
34166     char **p;
34167     int i;
34168{
34169  return p[i];
34170}
34171static char *f (char * (*g) (char **, int), char **p, ...)
34172{
34173  char *s;
34174  va_list v;
34175  va_start (v,p);
34176  s = g (p, va_arg (v,int));
34177  va_end (v);
34178  return s;
34179}
34180
34181/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34182   function prototypes and stuff, but not '\xHH' hex character constants.
34183   These don't provoke an error unfortunately, instead are silently treated
34184   as 'x'.  The following induces an error, until -std is added to get
34185   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34186   array size at least.  It's necessary to write '\x00'==0 to get something
34187   that's true only with -std.  */
34188int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34189
34190/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34191   inside strings and character constants.  */
34192#define FOO(x) 'x'
34193int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34194
34195int test (int i, double x);
34196struct s1 {int (*f) (int a);};
34197struct s2 {int (*f) (double a);};
34198int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34199int argc;
34200char **argv;
34201int
34202main ()
34203{
34204return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34205  ;
34206  return 0;
34207}
34208_ACEOF
34209for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34210	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34211do
34212  CC="$ac_save_CC $ac_arg"
34213  if ac_fn_c_try_compile "$LINENO"; then :
34214  ac_cv_prog_cc_c89=$ac_arg
34215fi
34216rm -f core conftest.err conftest.$ac_objext
34217  test "x$ac_cv_prog_cc_c89" != "xno" && break
34218done
34219rm -f conftest.$ac_ext
34220CC=$ac_save_CC
34221
34222fi
34223# AC_CACHE_VAL
34224case "x$ac_cv_prog_cc_c89" in
34225  x)
34226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34227$as_echo "none needed" >&6; } ;;
34228  xno)
34229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34230$as_echo "unsupported" >&6; } ;;
34231  *)
34232    CC="$CC $ac_cv_prog_cc_c89"
34233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34234$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34235esac
34236if test "x$ac_cv_prog_cc_c89" != xno; then :
34237
34238fi
34239
34240ac_ext=cpp
34241ac_cpp='$CXXCPP $CPPFLAGS'
34242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34245
34246
34247
34248  COMPILER_NAME=C++
34249  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34250
34251  if test "x$CXX" != x; then
34252    # User has supplied compiler name already, always let that override.
34253    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34254$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34255    if test "x`basename $CXX`" = "x$CXX"; then
34256      # A command without a complete path is provided, search $PATH.
34257
34258      for ac_prog in $CXX
34259do
34260  # Extract the first word of "$ac_prog", so it can be a program name with args.
34261set dummy $ac_prog; ac_word=$2
34262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34263$as_echo_n "checking for $ac_word... " >&6; }
34264if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34265  $as_echo_n "(cached) " >&6
34266else
34267  case $POTENTIAL_CXX in
34268  [\\/]* | ?:[\\/]*)
34269  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34270  ;;
34271  *)
34272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34273for as_dir in $PATH
34274do
34275  IFS=$as_save_IFS
34276  test -z "$as_dir" && as_dir=.
34277    for ac_exec_ext in '' $ac_executable_extensions; do
34278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34279    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34281    break 2
34282  fi
34283done
34284  done
34285IFS=$as_save_IFS
34286
34287  ;;
34288esac
34289fi
34290POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34291if test -n "$POTENTIAL_CXX"; then
34292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34293$as_echo "$POTENTIAL_CXX" >&6; }
34294else
34295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34296$as_echo "no" >&6; }
34297fi
34298
34299
34300  test -n "$POTENTIAL_CXX" && break
34301done
34302
34303      if test "x$POTENTIAL_CXX" != x; then
34304        CXX=$POTENTIAL_CXX
34305      else
34306        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34307      fi
34308    else
34309      # Otherwise it might already be a complete path
34310      if test ! -x "$CXX"; then
34311        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34312      fi
34313    fi
34314  else
34315    # No user supplied value. Locate compiler ourselves.
34316
34317    # If we are cross compiling, assume cross compilation tools follows the
34318    # cross compilation standard where they are prefixed with the autoconf
34319    # standard name for the target. For example the binary
34320    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34321    # If we are not cross compiling, then the default compiler name will be
34322    # used.
34323
34324    CXX=
34325    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34326    # before checking the rest of the PATH.
34327    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34328    # step, this should not be necessary.
34329    if test -n "$TOOLCHAIN_PATH"; then
34330      PATH_save="$PATH"
34331      PATH="$TOOLCHAIN_PATH"
34332      for ac_prog in $SEARCH_LIST
34333do
34334  # Extract the first word of "$ac_prog", so it can be a program name with args.
34335set dummy $ac_prog; ac_word=$2
34336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34337$as_echo_n "checking for $ac_word... " >&6; }
34338if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34339  $as_echo_n "(cached) " >&6
34340else
34341  case $TOOLCHAIN_PATH_CXX in
34342  [\\/]* | ?:[\\/]*)
34343  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34344  ;;
34345  *)
34346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34347for as_dir in $PATH
34348do
34349  IFS=$as_save_IFS
34350  test -z "$as_dir" && as_dir=.
34351    for ac_exec_ext in '' $ac_executable_extensions; do
34352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34353    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34355    break 2
34356  fi
34357done
34358  done
34359IFS=$as_save_IFS
34360
34361  ;;
34362esac
34363fi
34364TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34365if test -n "$TOOLCHAIN_PATH_CXX"; then
34366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34367$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34368else
34369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34370$as_echo "no" >&6; }
34371fi
34372
34373
34374  test -n "$TOOLCHAIN_PATH_CXX" && break
34375done
34376
34377      CXX=$TOOLCHAIN_PATH_CXX
34378      PATH="$PATH_save"
34379    fi
34380
34381    # AC_PATH_PROGS can't be run multiple times with the same variable,
34382    # so create a new name for this run.
34383    if test "x$CXX" = x; then
34384      for ac_prog in $SEARCH_LIST
34385do
34386  # Extract the first word of "$ac_prog", so it can be a program name with args.
34387set dummy $ac_prog; ac_word=$2
34388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34389$as_echo_n "checking for $ac_word... " >&6; }
34390if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34391  $as_echo_n "(cached) " >&6
34392else
34393  case $POTENTIAL_CXX in
34394  [\\/]* | ?:[\\/]*)
34395  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34396  ;;
34397  *)
34398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34399for as_dir in $PATH
34400do
34401  IFS=$as_save_IFS
34402  test -z "$as_dir" && as_dir=.
34403    for ac_exec_ext in '' $ac_executable_extensions; do
34404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34405    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34407    break 2
34408  fi
34409done
34410  done
34411IFS=$as_save_IFS
34412
34413  ;;
34414esac
34415fi
34416POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34417if test -n "$POTENTIAL_CXX"; then
34418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34419$as_echo "$POTENTIAL_CXX" >&6; }
34420else
34421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34422$as_echo "no" >&6; }
34423fi
34424
34425
34426  test -n "$POTENTIAL_CXX" && break
34427done
34428
34429      CXX=$POTENTIAL_CXX
34430    fi
34431
34432    if test "x$CXX" = x; then
34433
34434  # Print a helpful message on how to acquire the necessary build dependency.
34435  # devkit is the help tag: freetype, cups, alsa etc
34436  MISSING_DEPENDENCY=devkit
34437
34438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34439    cygwin_help $MISSING_DEPENDENCY
34440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34441    msys_help $MISSING_DEPENDENCY
34442  else
34443    PKGHANDLER_COMMAND=
34444
34445    case $PKGHANDLER in
34446      apt-get)
34447        apt_help     $MISSING_DEPENDENCY ;;
34448      yum)
34449        yum_help     $MISSING_DEPENDENCY ;;
34450      port)
34451        port_help    $MISSING_DEPENDENCY ;;
34452      pkgutil)
34453        pkgutil_help $MISSING_DEPENDENCY ;;
34454      pkgadd)
34455        pkgadd_help  $MISSING_DEPENDENCY ;;
34456    esac
34457
34458    if test "x$PKGHANDLER_COMMAND" != x; then
34459      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34460    fi
34461  fi
34462
34463      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34464    fi
34465  fi
34466
34467  # Now we have a compiler binary in CXX. Make sure it's okay.
34468
34469  # Only process if variable expands to non-empty
34470
34471  if test "x$CXX" != x; then
34472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34473
34474  # First separate the path from the arguments. This will split at the first
34475  # space.
34476  complete="$CXX"
34477  path="${complete%% *}"
34478  tmp="$complete EOL"
34479  arguments="${tmp#* }"
34480
34481  # Input might be given as Windows format, start by converting to
34482  # unix format.
34483  new_path=`$CYGPATH -u "$path"`
34484
34485  # Now try to locate executable using which
34486  new_path=`$WHICH "$new_path" 2> /dev/null`
34487  # bat and cmd files are not always considered executable in cygwin causing which
34488  # to not find them
34489  if test "x$new_path" = x \
34490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34492    new_path=`$CYGPATH -u "$path"`
34493  fi
34494  if test "x$new_path" = x; then
34495    # Oops. Which didn't find the executable.
34496    # The splitting of arguments from the executable at a space might have been incorrect,
34497    # since paths with space are more likely in Windows. Give it another try with the whole
34498    # argument.
34499    path="$complete"
34500    arguments="EOL"
34501    new_path=`$CYGPATH -u "$path"`
34502    new_path=`$WHICH "$new_path" 2> /dev/null`
34503    # bat and cmd files are not always considered executable in cygwin causing which
34504    # to not find them
34505    if test "x$new_path" = x \
34506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34508      new_path=`$CYGPATH -u "$path"`
34509    fi
34510    if test "x$new_path" = x; then
34511      # It's still not found. Now this is an unrecoverable error.
34512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34513$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34514      has_space=`$ECHO "$complete" | $GREP " "`
34515      if test "x$has_space" != x; then
34516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34518      fi
34519      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34520    fi
34521  fi
34522
34523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34526  # "foo.exe" is OK but "foo" is an error.
34527  #
34528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34529  # It is also a way to make sure we got the proper file name for the real test later on.
34530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34531  if test "x$test_shortpath" = x; then
34532    # Short path failed, file does not exist as specified.
34533    # Try adding .exe or .cmd
34534    if test -f "${new_path}.exe"; then
34535      input_to_shortpath="${new_path}.exe"
34536    elif test -f "${new_path}.cmd"; then
34537      input_to_shortpath="${new_path}.cmd"
34538    else
34539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34540$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34543      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34544    fi
34545  else
34546    input_to_shortpath="$new_path"
34547  fi
34548
34549  # Call helper function which possibly converts this using DOS-style short mode.
34550  # If so, the updated path is stored in $new_path.
34551  new_path="$input_to_shortpath"
34552
34553  input_path="$input_to_shortpath"
34554  # Check if we need to convert this using DOS-style short mode. If the path
34555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34556  # take no chances and rewrite it.
34557  # Note: m4 eats our [], so we need to use [ and ] instead.
34558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34559  if test "x$has_forbidden_chars" != x; then
34560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34564      # Going to short mode and back again did indeed matter. Since short mode is
34565      # case insensitive, let's make it lowercase to improve readability.
34566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34567      # Now convert it back to Unix-style (cygpath)
34568      input_path=`$CYGPATH -u "$shortmode_path"`
34569      new_path="$input_path"
34570    fi
34571  fi
34572
34573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34574  if test "x$test_cygdrive_prefix" = x; then
34575    # As a simple fix, exclude /usr/bin since it's not a real path.
34576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34578      # a path prefixed by /cygdrive for fixpath to work.
34579      new_path="$CYGWIN_ROOT_PATH$input_path"
34580    fi
34581  fi
34582
34583  # remove trailing .exe if any
34584  new_path="${new_path/%.exe/}"
34585
34586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34587
34588  # First separate the path from the arguments. This will split at the first
34589  # space.
34590  complete="$CXX"
34591  path="${complete%% *}"
34592  tmp="$complete EOL"
34593  arguments="${tmp#* }"
34594
34595  # Input might be given as Windows format, start by converting to
34596  # unix format.
34597  new_path="$path"
34598
34599  windows_path="$new_path"
34600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34601    unix_path=`$CYGPATH -u "$windows_path"`
34602    new_path="$unix_path"
34603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34605    new_path="$unix_path"
34606  fi
34607
34608
34609  # Now try to locate executable using which
34610  new_path=`$WHICH "$new_path" 2> /dev/null`
34611
34612  if test "x$new_path" = x; then
34613    # Oops. Which didn't find the executable.
34614    # The splitting of arguments from the executable at a space might have been incorrect,
34615    # since paths with space are more likely in Windows. Give it another try with the whole
34616    # argument.
34617    path="$complete"
34618    arguments="EOL"
34619    new_path="$path"
34620
34621  windows_path="$new_path"
34622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34623    unix_path=`$CYGPATH -u "$windows_path"`
34624    new_path="$unix_path"
34625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34627    new_path="$unix_path"
34628  fi
34629
34630
34631    new_path=`$WHICH "$new_path" 2> /dev/null`
34632    # bat and cmd files are not always considered executable in MSYS causing which
34633    # to not find them
34634    if test "x$new_path" = x \
34635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34637      new_path="$path"
34638
34639  windows_path="$new_path"
34640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34641    unix_path=`$CYGPATH -u "$windows_path"`
34642    new_path="$unix_path"
34643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34645    new_path="$unix_path"
34646  fi
34647
34648    fi
34649
34650    if test "x$new_path" = x; then
34651      # It's still not found. Now this is an unrecoverable error.
34652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34653$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34654      has_space=`$ECHO "$complete" | $GREP " "`
34655      if test "x$has_space" != x; then
34656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34658      fi
34659      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34660    fi
34661  fi
34662
34663  # Now new_path has a complete unix path to the binary
34664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34665    # Keep paths in /bin as-is, but remove trailing .exe if any
34666    new_path="${new_path/%.exe/}"
34667    # Do not save /bin paths to all_fixpath_prefixes!
34668  else
34669    # Not in mixed or Windows style, start by that.
34670    new_path=`cmd //c echo $new_path`
34671
34672  input_path="$new_path"
34673  # Check if we need to convert this using DOS-style short mode. If the path
34674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34675  # take no chances and rewrite it.
34676  # Note: m4 eats our [], so we need to use [ and ] instead.
34677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34678  if test "x$has_forbidden_chars" != x; then
34679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34681  fi
34682
34683    # Output is in $new_path
34684
34685  windows_path="$new_path"
34686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34687    unix_path=`$CYGPATH -u "$windows_path"`
34688    new_path="$unix_path"
34689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34691    new_path="$unix_path"
34692  fi
34693
34694    # remove trailing .exe if any
34695    new_path="${new_path/%.exe/}"
34696
34697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34699  fi
34700
34701    else
34702      # We're on a unix platform. Hooray! :)
34703      # First separate the path from the arguments. This will split at the first
34704      # space.
34705      complete="$CXX"
34706      path="${complete%% *}"
34707      tmp="$complete EOL"
34708      arguments="${tmp#* }"
34709
34710      # Cannot rely on the command "which" here since it doesn't always work.
34711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34712      if test -z "$is_absolute_path"; then
34713        # Path to executable is not absolute. Find it.
34714        IFS_save="$IFS"
34715        IFS=:
34716        for p in $PATH; do
34717          if test -f "$p/$path" && test -x "$p/$path"; then
34718            new_path="$p/$path"
34719            break
34720          fi
34721        done
34722        IFS="$IFS_save"
34723      else
34724        # This is an absolute path, we can use it without further modifications.
34725        new_path="$path"
34726      fi
34727
34728      if test "x$new_path" = x; then
34729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34730$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34731        has_space=`$ECHO "$complete" | $GREP " "`
34732        if test "x$has_space" != x; then
34733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34735        fi
34736        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34737      fi
34738    fi
34739
34740    # Now join together the path and the arguments once again
34741    if test "x$arguments" != xEOL; then
34742      new_complete="$new_path ${arguments% *}"
34743    else
34744      new_complete="$new_path"
34745    fi
34746
34747    if test "x$complete" != "x$new_complete"; then
34748      CXX="$new_complete"
34749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34750$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34751    fi
34752  fi
34753
34754  TEST_COMPILER="$CXX"
34755
34756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34757$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34758  SYMLINK_ORIGINAL="$TEST_COMPILER"
34759
34760  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34761    # Follow a chain of symbolic links. Use readlink
34762    # where it exists, else fall back to horribly
34763    # complicated shell code.
34764    if test "x$READLINK_TESTED" != yes; then
34765      # On MacOSX there is a readlink tool with a different
34766      # purpose than the GNU readlink tool. Check the found readlink.
34767      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34768      if test "x$ISGNU" = x; then
34769        # A readlink that we do not know how to use.
34770        # Are there other non-GNU readlinks out there?
34771        READLINK_TESTED=yes
34772        READLINK=
34773      fi
34774    fi
34775
34776    if test "x$READLINK" != x; then
34777      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34778    else
34779      # Save the current directory for restoring afterwards
34780      STARTDIR=$PWD
34781      COUNTER=0
34782      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34783      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34784      cd $sym_link_dir
34785      # Use -P flag to resolve symlinks in directories.
34786      cd `$THEPWDCMD -P`
34787      sym_link_dir=`$THEPWDCMD -P`
34788      # Resolve file symlinks
34789      while test $COUNTER -lt 20; do
34790        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34791        if test "x$ISLINK" == x; then
34792          # This is not a symbolic link! We are done!
34793          break
34794        fi
34795        # Again resolve directory symlinks since the target of the just found
34796        # link could be in a different directory
34797        cd `$DIRNAME $ISLINK`
34798        sym_link_dir=`$THEPWDCMD -P`
34799        sym_link_file=`$BASENAME $ISLINK`
34800        let COUNTER=COUNTER+1
34801      done
34802      cd $STARTDIR
34803      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34804    fi
34805  fi
34806
34807  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34809$as_echo "no symlink" >&6; }
34810  else
34811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34812$as_echo "$SYMLINK_ORIGINAL" >&6; }
34813
34814    # We can't handle ccache by gcc wrappers, since we need to know if we're
34815    # using ccache. Instead ccache usage must be controlled by a configure option.
34816    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34817    if test "x$COMPILER_BASENAME" = "xccache"; then
34818      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34819$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34820      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34821    fi
34822  fi
34823
34824
34825  COMPILER=$CXX
34826  COMPILER_NAME=$COMPILER_NAME
34827
34828  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34829    # cc -V output typically looks like
34830    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34831    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34832    # Check that this is likely to be the Solaris Studio cc.
34833    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34834    if test $? -ne 0; then
34835      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34836      { $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
34837$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34838      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34839$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34840      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34841$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34842      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34843    fi
34844    # Remove usage instructions (if present), and
34845    # collapse compiler output into a single line
34846    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34847        $SED -e 's/ *[Uu]sage:.*//'`
34848    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34849        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34850  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34851    # xlc -qversion output typically looks like
34852    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34853    #     Version: 11.01.0000.0015
34854    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34855    # Check that this is likely to be the IBM XL C compiler.
34856    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34857    if test $? -ne 0; then
34858      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34859      { $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
34860$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34861      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34862$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34863      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34864$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34865      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34866    fi
34867    # Collapse compiler output into a single line
34868    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34869    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34870        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34871  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34872    # There is no specific version flag, but all output starts with a version string.
34873    # First line typically looks something like:
34874    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34875    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34876    # Check that this is likely to be Microsoft CL.EXE.
34877    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34878    if test $? -ne 0; then
34879      { $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
34880$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34882$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34883      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34884    fi
34885    # Collapse compiler output into a single line
34886    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34887    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34888        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34889  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34890    # gcc --version output typically looks like
34891    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34892    #     Copyright (C) 2013 Free Software Foundation, Inc.
34893    #     This is free software; see the source for copying conditions.  There is NO
34894    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34895    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34896    # Check that this is likely to be GCC.
34897    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34898    if test $? -ne 0; then
34899      { $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
34900$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34901      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34902$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34903      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34904    fi
34905    # Remove Copyright and legalese from version string, and
34906    # collapse into a single line
34907    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34908        $SED -e 's/ *Copyright .*//'`
34909    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34910        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34911  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34912    # clang --version output typically looks like
34913    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34914    #    clang version 3.3 (tags/RELEASE_33/final)
34915    # or
34916    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34917    #    Target: x86_64-pc-linux-gnu
34918    #    Thread model: posix
34919    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34920    # Check that this is likely to be clang
34921    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34922    if test $? -ne 0; then
34923      { $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
34924$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34925      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34926$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34927      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34928    fi
34929    # Collapse compiler output into a single line
34930    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34931    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34932        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34933  else
34934      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34935  fi
34936  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34937  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34938  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34939  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34940
34941  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34942$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34943
34944
34945  # Now that we have resolved CXX ourself, let autoconf have its go at it
34946  ac_ext=cpp
34947ac_cpp='$CXXCPP $CPPFLAGS'
34948ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34949ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34950ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34951if test -z "$CXX"; then
34952  if test -n "$CCC"; then
34953    CXX=$CCC
34954  else
34955    if test -n "$ac_tool_prefix"; then
34956  for ac_prog in $CXX
34957  do
34958    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34959set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34961$as_echo_n "checking for $ac_word... " >&6; }
34962if ${ac_cv_prog_CXX+:} false; then :
34963  $as_echo_n "(cached) " >&6
34964else
34965  if test -n "$CXX"; then
34966  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34967else
34968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34969for as_dir in $PATH
34970do
34971  IFS=$as_save_IFS
34972  test -z "$as_dir" && as_dir=.
34973    for ac_exec_ext in '' $ac_executable_extensions; do
34974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34975    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34977    break 2
34978  fi
34979done
34980  done
34981IFS=$as_save_IFS
34982
34983fi
34984fi
34985CXX=$ac_cv_prog_CXX
34986if test -n "$CXX"; then
34987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34988$as_echo "$CXX" >&6; }
34989else
34990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34991$as_echo "no" >&6; }
34992fi
34993
34994
34995    test -n "$CXX" && break
34996  done
34997fi
34998if test -z "$CXX"; then
34999  ac_ct_CXX=$CXX
35000  for ac_prog in $CXX
35001do
35002  # Extract the first word of "$ac_prog", so it can be a program name with args.
35003set dummy $ac_prog; ac_word=$2
35004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35005$as_echo_n "checking for $ac_word... " >&6; }
35006if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35007  $as_echo_n "(cached) " >&6
35008else
35009  if test -n "$ac_ct_CXX"; then
35010  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35011else
35012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35013for as_dir in $PATH
35014do
35015  IFS=$as_save_IFS
35016  test -z "$as_dir" && as_dir=.
35017    for ac_exec_ext in '' $ac_executable_extensions; do
35018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35019    ac_cv_prog_ac_ct_CXX="$ac_prog"
35020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35021    break 2
35022  fi
35023done
35024  done
35025IFS=$as_save_IFS
35026
35027fi
35028fi
35029ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35030if test -n "$ac_ct_CXX"; then
35031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35032$as_echo "$ac_ct_CXX" >&6; }
35033else
35034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35035$as_echo "no" >&6; }
35036fi
35037
35038
35039  test -n "$ac_ct_CXX" && break
35040done
35041
35042  if test "x$ac_ct_CXX" = x; then
35043    CXX="g++"
35044  else
35045    case $cross_compiling:$ac_tool_warned in
35046yes:)
35047{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35048$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35049ac_tool_warned=yes ;;
35050esac
35051    CXX=$ac_ct_CXX
35052  fi
35053fi
35054
35055  fi
35056fi
35057# Provide some information about the compiler.
35058$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35059set X $ac_compile
35060ac_compiler=$2
35061for ac_option in --version -v -V -qversion; do
35062  { { ac_try="$ac_compiler $ac_option >&5"
35063case "(($ac_try" in
35064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35065  *) ac_try_echo=$ac_try;;
35066esac
35067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35068$as_echo "$ac_try_echo"; } >&5
35069  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35070  ac_status=$?
35071  if test -s conftest.err; then
35072    sed '10a\
35073... rest of stderr output deleted ...
35074         10q' conftest.err >conftest.er1
35075    cat conftest.er1 >&5
35076  fi
35077  rm -f conftest.er1 conftest.err
35078  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35079  test $ac_status = 0; }
35080done
35081
35082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35083$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35084if ${ac_cv_cxx_compiler_gnu+:} false; then :
35085  $as_echo_n "(cached) " >&6
35086else
35087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35088/* end confdefs.h.  */
35089
35090int
35091main ()
35092{
35093#ifndef __GNUC__
35094       choke me
35095#endif
35096
35097  ;
35098  return 0;
35099}
35100_ACEOF
35101if ac_fn_cxx_try_compile "$LINENO"; then :
35102  ac_compiler_gnu=yes
35103else
35104  ac_compiler_gnu=no
35105fi
35106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35107ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35108
35109fi
35110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35111$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35112if test $ac_compiler_gnu = yes; then
35113  GXX=yes
35114else
35115  GXX=
35116fi
35117ac_test_CXXFLAGS=${CXXFLAGS+set}
35118ac_save_CXXFLAGS=$CXXFLAGS
35119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35120$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35121if ${ac_cv_prog_cxx_g+:} false; then :
35122  $as_echo_n "(cached) " >&6
35123else
35124  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35125   ac_cxx_werror_flag=yes
35126   ac_cv_prog_cxx_g=no
35127   CXXFLAGS="-g"
35128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35129/* end confdefs.h.  */
35130
35131int
35132main ()
35133{
35134
35135  ;
35136  return 0;
35137}
35138_ACEOF
35139if ac_fn_cxx_try_compile "$LINENO"; then :
35140  ac_cv_prog_cxx_g=yes
35141else
35142  CXXFLAGS=""
35143      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35144/* end confdefs.h.  */
35145
35146int
35147main ()
35148{
35149
35150  ;
35151  return 0;
35152}
35153_ACEOF
35154if ac_fn_cxx_try_compile "$LINENO"; then :
35155
35156else
35157  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35158	 CXXFLAGS="-g"
35159	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35160/* end confdefs.h.  */
35161
35162int
35163main ()
35164{
35165
35166  ;
35167  return 0;
35168}
35169_ACEOF
35170if ac_fn_cxx_try_compile "$LINENO"; then :
35171  ac_cv_prog_cxx_g=yes
35172fi
35173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35174fi
35175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35176fi
35177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35178   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35179fi
35180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35181$as_echo "$ac_cv_prog_cxx_g" >&6; }
35182if test "$ac_test_CXXFLAGS" = set; then
35183  CXXFLAGS=$ac_save_CXXFLAGS
35184elif test $ac_cv_prog_cxx_g = yes; then
35185  if test "$GXX" = yes; then
35186    CXXFLAGS="-g -O2"
35187  else
35188    CXXFLAGS="-g"
35189  fi
35190else
35191  if test "$GXX" = yes; then
35192    CXXFLAGS="-O2"
35193  else
35194    CXXFLAGS=
35195  fi
35196fi
35197ac_ext=cpp
35198ac_cpp='$CXXCPP $CPPFLAGS'
35199ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35200ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35201ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35202
35203
35204  # This is the compiler version number on the form X.Y[.Z]
35205
35206
35207
35208
35209  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35210    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35211$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35212    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35213$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35214  fi
35215
35216  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35217  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35218    { $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
35219$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;}
35220  fi
35221
35222  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35223    { $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
35224$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35225  fi
35226
35227  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35228
35229
35230  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280    # Execute function body
35281
35282  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35283  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35284
35285  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35286    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35287  fi
35288
35289  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35290    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35291  fi
35292
35293  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35294  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35295
35296  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35297    :
35298
35299  else
35300    :
35301
35302          { $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
35303$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35304
35305
35306  fi
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321  fi
35322
35323  #
35324  # Setup the preprocessor (CPP and CXXCPP)
35325  #
35326  ac_ext=c
35327ac_cpp='$CPP $CPPFLAGS'
35328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35330ac_compiler_gnu=$ac_cv_c_compiler_gnu
35331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35332$as_echo_n "checking how to run the C preprocessor... " >&6; }
35333# On Suns, sometimes $CPP names a directory.
35334if test -n "$CPP" && test -d "$CPP"; then
35335  CPP=
35336fi
35337if test -z "$CPP"; then
35338  if ${ac_cv_prog_CPP+:} false; then :
35339  $as_echo_n "(cached) " >&6
35340else
35341      # Double quotes because CPP needs to be expanded
35342    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35343    do
35344      ac_preproc_ok=false
35345for ac_c_preproc_warn_flag in '' yes
35346do
35347  # Use a header file that comes with gcc, so configuring glibc
35348  # with a fresh cross-compiler works.
35349  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35350  # <limits.h> exists even on freestanding compilers.
35351  # On the NeXT, cc -E runs the code through the compiler's parser,
35352  # not just through cpp. "Syntax error" is here to catch this case.
35353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35354/* end confdefs.h.  */
35355#ifdef __STDC__
35356# include <limits.h>
35357#else
35358# include <assert.h>
35359#endif
35360		     Syntax error
35361_ACEOF
35362if ac_fn_c_try_cpp "$LINENO"; then :
35363
35364else
35365  # Broken: fails on valid input.
35366continue
35367fi
35368rm -f conftest.err conftest.i conftest.$ac_ext
35369
35370  # OK, works on sane cases.  Now check whether nonexistent headers
35371  # can be detected and how.
35372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35373/* end confdefs.h.  */
35374#include <ac_nonexistent.h>
35375_ACEOF
35376if ac_fn_c_try_cpp "$LINENO"; then :
35377  # Broken: success on invalid input.
35378continue
35379else
35380  # Passes both tests.
35381ac_preproc_ok=:
35382break
35383fi
35384rm -f conftest.err conftest.i conftest.$ac_ext
35385
35386done
35387# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35388rm -f conftest.i conftest.err conftest.$ac_ext
35389if $ac_preproc_ok; then :
35390  break
35391fi
35392
35393    done
35394    ac_cv_prog_CPP=$CPP
35395
35396fi
35397  CPP=$ac_cv_prog_CPP
35398else
35399  ac_cv_prog_CPP=$CPP
35400fi
35401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35402$as_echo "$CPP" >&6; }
35403ac_preproc_ok=false
35404for ac_c_preproc_warn_flag in '' yes
35405do
35406  # Use a header file that comes with gcc, so configuring glibc
35407  # with a fresh cross-compiler works.
35408  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35409  # <limits.h> exists even on freestanding compilers.
35410  # On the NeXT, cc -E runs the code through the compiler's parser,
35411  # not just through cpp. "Syntax error" is here to catch this case.
35412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35413/* end confdefs.h.  */
35414#ifdef __STDC__
35415# include <limits.h>
35416#else
35417# include <assert.h>
35418#endif
35419		     Syntax error
35420_ACEOF
35421if ac_fn_c_try_cpp "$LINENO"; then :
35422
35423else
35424  # Broken: fails on valid input.
35425continue
35426fi
35427rm -f conftest.err conftest.i conftest.$ac_ext
35428
35429  # OK, works on sane cases.  Now check whether nonexistent headers
35430  # can be detected and how.
35431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35432/* end confdefs.h.  */
35433#include <ac_nonexistent.h>
35434_ACEOF
35435if ac_fn_c_try_cpp "$LINENO"; then :
35436  # Broken: success on invalid input.
35437continue
35438else
35439  # Passes both tests.
35440ac_preproc_ok=:
35441break
35442fi
35443rm -f conftest.err conftest.i conftest.$ac_ext
35444
35445done
35446# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35447rm -f conftest.i conftest.err conftest.$ac_ext
35448if $ac_preproc_ok; then :
35449
35450else
35451  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35453as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35454See \`config.log' for more details" "$LINENO" 5; }
35455fi
35456
35457ac_ext=cpp
35458ac_cpp='$CXXCPP $CPPFLAGS'
35459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35462
35463
35464  # Only process if variable expands to non-empty
35465
35466  if test "x$CPP" != x; then
35467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35468
35469  # First separate the path from the arguments. This will split at the first
35470  # space.
35471  complete="$CPP"
35472  path="${complete%% *}"
35473  tmp="$complete EOL"
35474  arguments="${tmp#* }"
35475
35476  # Input might be given as Windows format, start by converting to
35477  # unix format.
35478  new_path=`$CYGPATH -u "$path"`
35479
35480  # Now try to locate executable using which
35481  new_path=`$WHICH "$new_path" 2> /dev/null`
35482  # bat and cmd files are not always considered executable in cygwin causing which
35483  # to not find them
35484  if test "x$new_path" = x \
35485      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35486      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35487    new_path=`$CYGPATH -u "$path"`
35488  fi
35489  if test "x$new_path" = x; then
35490    # Oops. Which didn't find the executable.
35491    # The splitting of arguments from the executable at a space might have been incorrect,
35492    # since paths with space are more likely in Windows. Give it another try with the whole
35493    # argument.
35494    path="$complete"
35495    arguments="EOL"
35496    new_path=`$CYGPATH -u "$path"`
35497    new_path=`$WHICH "$new_path" 2> /dev/null`
35498    # bat and cmd files are not always considered executable in cygwin causing which
35499    # to not find them
35500    if test "x$new_path" = x \
35501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35503      new_path=`$CYGPATH -u "$path"`
35504    fi
35505    if test "x$new_path" = x; then
35506      # It's still not found. Now this is an unrecoverable error.
35507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35508$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35509      has_space=`$ECHO "$complete" | $GREP " "`
35510      if test "x$has_space" != x; then
35511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35513      fi
35514      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35515    fi
35516  fi
35517
35518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35521  # "foo.exe" is OK but "foo" is an error.
35522  #
35523  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35524  # It is also a way to make sure we got the proper file name for the real test later on.
35525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35526  if test "x$test_shortpath" = x; then
35527    # Short path failed, file does not exist as specified.
35528    # Try adding .exe or .cmd
35529    if test -f "${new_path}.exe"; then
35530      input_to_shortpath="${new_path}.exe"
35531    elif test -f "${new_path}.cmd"; then
35532      input_to_shortpath="${new_path}.cmd"
35533    else
35534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35535$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35538      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35539    fi
35540  else
35541    input_to_shortpath="$new_path"
35542  fi
35543
35544  # Call helper function which possibly converts this using DOS-style short mode.
35545  # If so, the updated path is stored in $new_path.
35546  new_path="$input_to_shortpath"
35547
35548  input_path="$input_to_shortpath"
35549  # Check if we need to convert this using DOS-style short mode. If the path
35550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35551  # take no chances and rewrite it.
35552  # Note: m4 eats our [], so we need to use [ and ] instead.
35553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35554  if test "x$has_forbidden_chars" != x; then
35555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35559      # Going to short mode and back again did indeed matter. Since short mode is
35560      # case insensitive, let's make it lowercase to improve readability.
35561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35562      # Now convert it back to Unix-style (cygpath)
35563      input_path=`$CYGPATH -u "$shortmode_path"`
35564      new_path="$input_path"
35565    fi
35566  fi
35567
35568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35569  if test "x$test_cygdrive_prefix" = x; then
35570    # As a simple fix, exclude /usr/bin since it's not a real path.
35571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35573      # a path prefixed by /cygdrive for fixpath to work.
35574      new_path="$CYGWIN_ROOT_PATH$input_path"
35575    fi
35576  fi
35577
35578  # remove trailing .exe if any
35579  new_path="${new_path/%.exe/}"
35580
35581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35582
35583  # First separate the path from the arguments. This will split at the first
35584  # space.
35585  complete="$CPP"
35586  path="${complete%% *}"
35587  tmp="$complete EOL"
35588  arguments="${tmp#* }"
35589
35590  # Input might be given as Windows format, start by converting to
35591  # unix format.
35592  new_path="$path"
35593
35594  windows_path="$new_path"
35595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35596    unix_path=`$CYGPATH -u "$windows_path"`
35597    new_path="$unix_path"
35598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35600    new_path="$unix_path"
35601  fi
35602
35603
35604  # Now try to locate executable using which
35605  new_path=`$WHICH "$new_path" 2> /dev/null`
35606
35607  if test "x$new_path" = x; then
35608    # Oops. Which didn't find the executable.
35609    # The splitting of arguments from the executable at a space might have been incorrect,
35610    # since paths with space are more likely in Windows. Give it another try with the whole
35611    # argument.
35612    path="$complete"
35613    arguments="EOL"
35614    new_path="$path"
35615
35616  windows_path="$new_path"
35617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35618    unix_path=`$CYGPATH -u "$windows_path"`
35619    new_path="$unix_path"
35620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35622    new_path="$unix_path"
35623  fi
35624
35625
35626    new_path=`$WHICH "$new_path" 2> /dev/null`
35627    # bat and cmd files are not always considered executable in MSYS causing which
35628    # to not find them
35629    if test "x$new_path" = x \
35630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35632      new_path="$path"
35633
35634  windows_path="$new_path"
35635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35636    unix_path=`$CYGPATH -u "$windows_path"`
35637    new_path="$unix_path"
35638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35640    new_path="$unix_path"
35641  fi
35642
35643    fi
35644
35645    if test "x$new_path" = x; then
35646      # It's still not found. Now this is an unrecoverable error.
35647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35648$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35649      has_space=`$ECHO "$complete" | $GREP " "`
35650      if test "x$has_space" != x; then
35651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35653      fi
35654      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35655    fi
35656  fi
35657
35658  # Now new_path has a complete unix path to the binary
35659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35660    # Keep paths in /bin as-is, but remove trailing .exe if any
35661    new_path="${new_path/%.exe/}"
35662    # Do not save /bin paths to all_fixpath_prefixes!
35663  else
35664    # Not in mixed or Windows style, start by that.
35665    new_path=`cmd //c echo $new_path`
35666
35667  input_path="$new_path"
35668  # Check if we need to convert this using DOS-style short mode. If the path
35669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35670  # take no chances and rewrite it.
35671  # Note: m4 eats our [], so we need to use [ and ] instead.
35672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35673  if test "x$has_forbidden_chars" != x; then
35674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35676  fi
35677
35678    # Output is in $new_path
35679
35680  windows_path="$new_path"
35681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35682    unix_path=`$CYGPATH -u "$windows_path"`
35683    new_path="$unix_path"
35684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35686    new_path="$unix_path"
35687  fi
35688
35689    # remove trailing .exe if any
35690    new_path="${new_path/%.exe/}"
35691
35692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35694  fi
35695
35696    else
35697      # We're on a unix platform. Hooray! :)
35698      # First separate the path from the arguments. This will split at the first
35699      # space.
35700      complete="$CPP"
35701      path="${complete%% *}"
35702      tmp="$complete EOL"
35703      arguments="${tmp#* }"
35704
35705      # Cannot rely on the command "which" here since it doesn't always work.
35706      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35707      if test -z "$is_absolute_path"; then
35708        # Path to executable is not absolute. Find it.
35709        IFS_save="$IFS"
35710        IFS=:
35711        for p in $PATH; do
35712          if test -f "$p/$path" && test -x "$p/$path"; then
35713            new_path="$p/$path"
35714            break
35715          fi
35716        done
35717        IFS="$IFS_save"
35718      else
35719        # This is an absolute path, we can use it without further modifications.
35720        new_path="$path"
35721      fi
35722
35723      if test "x$new_path" = x; then
35724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35725$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35726        has_space=`$ECHO "$complete" | $GREP " "`
35727        if test "x$has_space" != x; then
35728          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35729$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35730        fi
35731        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35732      fi
35733    fi
35734
35735    # Now join together the path and the arguments once again
35736    if test "x$arguments" != xEOL; then
35737      new_complete="$new_path ${arguments% *}"
35738    else
35739      new_complete="$new_path"
35740    fi
35741
35742    if test "x$complete" != "x$new_complete"; then
35743      CPP="$new_complete"
35744      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35745$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35746    fi
35747  fi
35748
35749  ac_ext=cpp
35750ac_cpp='$CXXCPP $CPPFLAGS'
35751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35755$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35756if test -z "$CXXCPP"; then
35757  if ${ac_cv_prog_CXXCPP+:} false; then :
35758  $as_echo_n "(cached) " >&6
35759else
35760      # Double quotes because CXXCPP needs to be expanded
35761    for CXXCPP in "$CXX -E" "/lib/cpp"
35762    do
35763      ac_preproc_ok=false
35764for ac_cxx_preproc_warn_flag in '' yes
35765do
35766  # Use a header file that comes with gcc, so configuring glibc
35767  # with a fresh cross-compiler works.
35768  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35769  # <limits.h> exists even on freestanding compilers.
35770  # On the NeXT, cc -E runs the code through the compiler's parser,
35771  # not just through cpp. "Syntax error" is here to catch this case.
35772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35773/* end confdefs.h.  */
35774#ifdef __STDC__
35775# include <limits.h>
35776#else
35777# include <assert.h>
35778#endif
35779		     Syntax error
35780_ACEOF
35781if ac_fn_cxx_try_cpp "$LINENO"; then :
35782
35783else
35784  # Broken: fails on valid input.
35785continue
35786fi
35787rm -f conftest.err conftest.i conftest.$ac_ext
35788
35789  # OK, works on sane cases.  Now check whether nonexistent headers
35790  # can be detected and how.
35791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35792/* end confdefs.h.  */
35793#include <ac_nonexistent.h>
35794_ACEOF
35795if ac_fn_cxx_try_cpp "$LINENO"; then :
35796  # Broken: success on invalid input.
35797continue
35798else
35799  # Passes both tests.
35800ac_preproc_ok=:
35801break
35802fi
35803rm -f conftest.err conftest.i conftest.$ac_ext
35804
35805done
35806# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35807rm -f conftest.i conftest.err conftest.$ac_ext
35808if $ac_preproc_ok; then :
35809  break
35810fi
35811
35812    done
35813    ac_cv_prog_CXXCPP=$CXXCPP
35814
35815fi
35816  CXXCPP=$ac_cv_prog_CXXCPP
35817else
35818  ac_cv_prog_CXXCPP=$CXXCPP
35819fi
35820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35821$as_echo "$CXXCPP" >&6; }
35822ac_preproc_ok=false
35823for ac_cxx_preproc_warn_flag in '' yes
35824do
35825  # Use a header file that comes with gcc, so configuring glibc
35826  # with a fresh cross-compiler works.
35827  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35828  # <limits.h> exists even on freestanding compilers.
35829  # On the NeXT, cc -E runs the code through the compiler's parser,
35830  # not just through cpp. "Syntax error" is here to catch this case.
35831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35832/* end confdefs.h.  */
35833#ifdef __STDC__
35834# include <limits.h>
35835#else
35836# include <assert.h>
35837#endif
35838		     Syntax error
35839_ACEOF
35840if ac_fn_cxx_try_cpp "$LINENO"; then :
35841
35842else
35843  # Broken: fails on valid input.
35844continue
35845fi
35846rm -f conftest.err conftest.i conftest.$ac_ext
35847
35848  # OK, works on sane cases.  Now check whether nonexistent headers
35849  # can be detected and how.
35850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35851/* end confdefs.h.  */
35852#include <ac_nonexistent.h>
35853_ACEOF
35854if ac_fn_cxx_try_cpp "$LINENO"; then :
35855  # Broken: success on invalid input.
35856continue
35857else
35858  # Passes both tests.
35859ac_preproc_ok=:
35860break
35861fi
35862rm -f conftest.err conftest.i conftest.$ac_ext
35863
35864done
35865# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35866rm -f conftest.i conftest.err conftest.$ac_ext
35867if $ac_preproc_ok; then :
35868
35869else
35870  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35872as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35873See \`config.log' for more details" "$LINENO" 5; }
35874fi
35875
35876ac_ext=cpp
35877ac_cpp='$CXXCPP $CPPFLAGS'
35878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35881
35882
35883  # Only process if variable expands to non-empty
35884
35885  if test "x$CXXCPP" != x; then
35886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35887
35888  # First separate the path from the arguments. This will split at the first
35889  # space.
35890  complete="$CXXCPP"
35891  path="${complete%% *}"
35892  tmp="$complete EOL"
35893  arguments="${tmp#* }"
35894
35895  # Input might be given as Windows format, start by converting to
35896  # unix format.
35897  new_path=`$CYGPATH -u "$path"`
35898
35899  # Now try to locate executable using which
35900  new_path=`$WHICH "$new_path" 2> /dev/null`
35901  # bat and cmd files are not always considered executable in cygwin causing which
35902  # to not find them
35903  if test "x$new_path" = x \
35904      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35905      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35906    new_path=`$CYGPATH -u "$path"`
35907  fi
35908  if test "x$new_path" = x; then
35909    # Oops. Which didn't find the executable.
35910    # The splitting of arguments from the executable at a space might have been incorrect,
35911    # since paths with space are more likely in Windows. Give it another try with the whole
35912    # argument.
35913    path="$complete"
35914    arguments="EOL"
35915    new_path=`$CYGPATH -u "$path"`
35916    new_path=`$WHICH "$new_path" 2> /dev/null`
35917    # bat and cmd files are not always considered executable in cygwin causing which
35918    # to not find them
35919    if test "x$new_path" = x \
35920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35922      new_path=`$CYGPATH -u "$path"`
35923    fi
35924    if test "x$new_path" = x; then
35925      # It's still not found. Now this is an unrecoverable error.
35926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35927$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35928      has_space=`$ECHO "$complete" | $GREP " "`
35929      if test "x$has_space" != x; then
35930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35932      fi
35933      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35934    fi
35935  fi
35936
35937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35940  # "foo.exe" is OK but "foo" is an error.
35941  #
35942  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35943  # It is also a way to make sure we got the proper file name for the real test later on.
35944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35945  if test "x$test_shortpath" = x; then
35946    # Short path failed, file does not exist as specified.
35947    # Try adding .exe or .cmd
35948    if test -f "${new_path}.exe"; then
35949      input_to_shortpath="${new_path}.exe"
35950    elif test -f "${new_path}.cmd"; then
35951      input_to_shortpath="${new_path}.cmd"
35952    else
35953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35954$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35957      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35958    fi
35959  else
35960    input_to_shortpath="$new_path"
35961  fi
35962
35963  # Call helper function which possibly converts this using DOS-style short mode.
35964  # If so, the updated path is stored in $new_path.
35965  new_path="$input_to_shortpath"
35966
35967  input_path="$input_to_shortpath"
35968  # Check if we need to convert this using DOS-style short mode. If the path
35969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35970  # take no chances and rewrite it.
35971  # Note: m4 eats our [], so we need to use [ and ] instead.
35972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35973  if test "x$has_forbidden_chars" != x; then
35974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35978      # Going to short mode and back again did indeed matter. Since short mode is
35979      # case insensitive, let's make it lowercase to improve readability.
35980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35981      # Now convert it back to Unix-style (cygpath)
35982      input_path=`$CYGPATH -u "$shortmode_path"`
35983      new_path="$input_path"
35984    fi
35985  fi
35986
35987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35988  if test "x$test_cygdrive_prefix" = x; then
35989    # As a simple fix, exclude /usr/bin since it's not a real path.
35990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35992      # a path prefixed by /cygdrive for fixpath to work.
35993      new_path="$CYGWIN_ROOT_PATH$input_path"
35994    fi
35995  fi
35996
35997  # remove trailing .exe if any
35998  new_path="${new_path/%.exe/}"
35999
36000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36001
36002  # First separate the path from the arguments. This will split at the first
36003  # space.
36004  complete="$CXXCPP"
36005  path="${complete%% *}"
36006  tmp="$complete EOL"
36007  arguments="${tmp#* }"
36008
36009  # Input might be given as Windows format, start by converting to
36010  # unix format.
36011  new_path="$path"
36012
36013  windows_path="$new_path"
36014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36015    unix_path=`$CYGPATH -u "$windows_path"`
36016    new_path="$unix_path"
36017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36019    new_path="$unix_path"
36020  fi
36021
36022
36023  # Now try to locate executable using which
36024  new_path=`$WHICH "$new_path" 2> /dev/null`
36025
36026  if test "x$new_path" = x; then
36027    # Oops. Which didn't find the executable.
36028    # The splitting of arguments from the executable at a space might have been incorrect,
36029    # since paths with space are more likely in Windows. Give it another try with the whole
36030    # argument.
36031    path="$complete"
36032    arguments="EOL"
36033    new_path="$path"
36034
36035  windows_path="$new_path"
36036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36037    unix_path=`$CYGPATH -u "$windows_path"`
36038    new_path="$unix_path"
36039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36041    new_path="$unix_path"
36042  fi
36043
36044
36045    new_path=`$WHICH "$new_path" 2> /dev/null`
36046    # bat and cmd files are not always considered executable in MSYS causing which
36047    # to not find them
36048    if test "x$new_path" = x \
36049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36051      new_path="$path"
36052
36053  windows_path="$new_path"
36054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36055    unix_path=`$CYGPATH -u "$windows_path"`
36056    new_path="$unix_path"
36057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36059    new_path="$unix_path"
36060  fi
36061
36062    fi
36063
36064    if test "x$new_path" = x; then
36065      # It's still not found. Now this is an unrecoverable error.
36066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36067$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36068      has_space=`$ECHO "$complete" | $GREP " "`
36069      if test "x$has_space" != x; then
36070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36072      fi
36073      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36074    fi
36075  fi
36076
36077  # Now new_path has a complete unix path to the binary
36078  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36079    # Keep paths in /bin as-is, but remove trailing .exe if any
36080    new_path="${new_path/%.exe/}"
36081    # Do not save /bin paths to all_fixpath_prefixes!
36082  else
36083    # Not in mixed or Windows style, start by that.
36084    new_path=`cmd //c echo $new_path`
36085
36086  input_path="$new_path"
36087  # Check if we need to convert this using DOS-style short mode. If the path
36088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36089  # take no chances and rewrite it.
36090  # Note: m4 eats our [], so we need to use [ and ] instead.
36091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36092  if test "x$has_forbidden_chars" != x; then
36093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36095  fi
36096
36097    # Output is in $new_path
36098
36099  windows_path="$new_path"
36100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36101    unix_path=`$CYGPATH -u "$windows_path"`
36102    new_path="$unix_path"
36103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36105    new_path="$unix_path"
36106  fi
36107
36108    # remove trailing .exe if any
36109    new_path="${new_path/%.exe/}"
36110
36111    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36112    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36113  fi
36114
36115    else
36116      # We're on a unix platform. Hooray! :)
36117      # First separate the path from the arguments. This will split at the first
36118      # space.
36119      complete="$CXXCPP"
36120      path="${complete%% *}"
36121      tmp="$complete EOL"
36122      arguments="${tmp#* }"
36123
36124      # Cannot rely on the command "which" here since it doesn't always work.
36125      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36126      if test -z "$is_absolute_path"; then
36127        # Path to executable is not absolute. Find it.
36128        IFS_save="$IFS"
36129        IFS=:
36130        for p in $PATH; do
36131          if test -f "$p/$path" && test -x "$p/$path"; then
36132            new_path="$p/$path"
36133            break
36134          fi
36135        done
36136        IFS="$IFS_save"
36137      else
36138        # This is an absolute path, we can use it without further modifications.
36139        new_path="$path"
36140      fi
36141
36142      if test "x$new_path" = x; then
36143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36144$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36145        has_space=`$ECHO "$complete" | $GREP " "`
36146        if test "x$has_space" != x; then
36147          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36148$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36149        fi
36150        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36151      fi
36152    fi
36153
36154    # Now join together the path and the arguments once again
36155    if test "x$arguments" != xEOL; then
36156      new_complete="$new_path ${arguments% *}"
36157    else
36158      new_complete="$new_path"
36159    fi
36160
36161    if test "x$complete" != "x$new_complete"; then
36162      CXXCPP="$new_complete"
36163      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36164$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36165    fi
36166  fi
36167
36168
36169  #
36170  # Setup the linker (LD)
36171  #
36172  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36173    # In the Microsoft toolchain we have a separate LD command "link".
36174    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36175    # a cygwin program for something completely different.
36176    # Extract the first word of "link", so it can be a program name with args.
36177set dummy link; ac_word=$2
36178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36179$as_echo_n "checking for $ac_word... " >&6; }
36180if ${ac_cv_prog_LD+:} false; then :
36181  $as_echo_n "(cached) " >&6
36182else
36183  if test -n "$LD"; then
36184  ac_cv_prog_LD="$LD" # Let the user override the test.
36185else
36186  ac_prog_rejected=no
36187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36188for as_dir in $PATH
36189do
36190  IFS=$as_save_IFS
36191  test -z "$as_dir" && as_dir=.
36192    for ac_exec_ext in '' $ac_executable_extensions; do
36193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36194    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36195       ac_prog_rejected=yes
36196       continue
36197     fi
36198    ac_cv_prog_LD="link"
36199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36200    break 2
36201  fi
36202done
36203  done
36204IFS=$as_save_IFS
36205
36206if test $ac_prog_rejected = yes; then
36207  # We found a bogon in the path, so make sure we never use it.
36208  set dummy $ac_cv_prog_LD
36209  shift
36210  if test $# != 0; then
36211    # We chose a different compiler from the bogus one.
36212    # However, it has the same basename, so the bogon will be chosen
36213    # first if we set LD to just the basename; use the full file name.
36214    shift
36215    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36216  fi
36217fi
36218fi
36219fi
36220LD=$ac_cv_prog_LD
36221if test -n "$LD"; then
36222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36223$as_echo "$LD" >&6; }
36224else
36225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36226$as_echo "no" >&6; }
36227fi
36228
36229
36230
36231  # Only process if variable expands to non-empty
36232
36233  if test "x$LD" != x; then
36234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36235
36236  # First separate the path from the arguments. This will split at the first
36237  # space.
36238  complete="$LD"
36239  path="${complete%% *}"
36240  tmp="$complete EOL"
36241  arguments="${tmp#* }"
36242
36243  # Input might be given as Windows format, start by converting to
36244  # unix format.
36245  new_path=`$CYGPATH -u "$path"`
36246
36247  # Now try to locate executable using which
36248  new_path=`$WHICH "$new_path" 2> /dev/null`
36249  # bat and cmd files are not always considered executable in cygwin causing which
36250  # to not find them
36251  if test "x$new_path" = x \
36252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36254    new_path=`$CYGPATH -u "$path"`
36255  fi
36256  if test "x$new_path" = x; then
36257    # Oops. Which didn't find the executable.
36258    # The splitting of arguments from the executable at a space might have been incorrect,
36259    # since paths with space are more likely in Windows. Give it another try with the whole
36260    # argument.
36261    path="$complete"
36262    arguments="EOL"
36263    new_path=`$CYGPATH -u "$path"`
36264    new_path=`$WHICH "$new_path" 2> /dev/null`
36265    # bat and cmd files are not always considered executable in cygwin causing which
36266    # to not find them
36267    if test "x$new_path" = x \
36268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36270      new_path=`$CYGPATH -u "$path"`
36271    fi
36272    if test "x$new_path" = x; then
36273      # It's still not found. Now this is an unrecoverable error.
36274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36275$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36276      has_space=`$ECHO "$complete" | $GREP " "`
36277      if test "x$has_space" != x; then
36278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36280      fi
36281      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36282    fi
36283  fi
36284
36285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36288  # "foo.exe" is OK but "foo" is an error.
36289  #
36290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36291  # It is also a way to make sure we got the proper file name for the real test later on.
36292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36293  if test "x$test_shortpath" = x; then
36294    # Short path failed, file does not exist as specified.
36295    # Try adding .exe or .cmd
36296    if test -f "${new_path}.exe"; then
36297      input_to_shortpath="${new_path}.exe"
36298    elif test -f "${new_path}.cmd"; then
36299      input_to_shortpath="${new_path}.cmd"
36300    else
36301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36302$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36305      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36306    fi
36307  else
36308    input_to_shortpath="$new_path"
36309  fi
36310
36311  # Call helper function which possibly converts this using DOS-style short mode.
36312  # If so, the updated path is stored in $new_path.
36313  new_path="$input_to_shortpath"
36314
36315  input_path="$input_to_shortpath"
36316  # Check if we need to convert this using DOS-style short mode. If the path
36317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36318  # take no chances and rewrite it.
36319  # Note: m4 eats our [], so we need to use [ and ] instead.
36320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36321  if test "x$has_forbidden_chars" != x; then
36322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36326      # Going to short mode and back again did indeed matter. Since short mode is
36327      # case insensitive, let's make it lowercase to improve readability.
36328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36329      # Now convert it back to Unix-style (cygpath)
36330      input_path=`$CYGPATH -u "$shortmode_path"`
36331      new_path="$input_path"
36332    fi
36333  fi
36334
36335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36336  if test "x$test_cygdrive_prefix" = x; then
36337    # As a simple fix, exclude /usr/bin since it's not a real path.
36338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36340      # a path prefixed by /cygdrive for fixpath to work.
36341      new_path="$CYGWIN_ROOT_PATH$input_path"
36342    fi
36343  fi
36344
36345  # remove trailing .exe if any
36346  new_path="${new_path/%.exe/}"
36347
36348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36349
36350  # First separate the path from the arguments. This will split at the first
36351  # space.
36352  complete="$LD"
36353  path="${complete%% *}"
36354  tmp="$complete EOL"
36355  arguments="${tmp#* }"
36356
36357  # Input might be given as Windows format, start by converting to
36358  # unix format.
36359  new_path="$path"
36360
36361  windows_path="$new_path"
36362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36363    unix_path=`$CYGPATH -u "$windows_path"`
36364    new_path="$unix_path"
36365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36367    new_path="$unix_path"
36368  fi
36369
36370
36371  # Now try to locate executable using which
36372  new_path=`$WHICH "$new_path" 2> /dev/null`
36373
36374  if test "x$new_path" = x; then
36375    # Oops. Which didn't find the executable.
36376    # The splitting of arguments from the executable at a space might have been incorrect,
36377    # since paths with space are more likely in Windows. Give it another try with the whole
36378    # argument.
36379    path="$complete"
36380    arguments="EOL"
36381    new_path="$path"
36382
36383  windows_path="$new_path"
36384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36385    unix_path=`$CYGPATH -u "$windows_path"`
36386    new_path="$unix_path"
36387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36389    new_path="$unix_path"
36390  fi
36391
36392
36393    new_path=`$WHICH "$new_path" 2> /dev/null`
36394    # bat and cmd files are not always considered executable in MSYS causing which
36395    # to not find them
36396    if test "x$new_path" = x \
36397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36399      new_path="$path"
36400
36401  windows_path="$new_path"
36402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36403    unix_path=`$CYGPATH -u "$windows_path"`
36404    new_path="$unix_path"
36405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36407    new_path="$unix_path"
36408  fi
36409
36410    fi
36411
36412    if test "x$new_path" = x; then
36413      # It's still not found. Now this is an unrecoverable error.
36414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36415$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36416      has_space=`$ECHO "$complete" | $GREP " "`
36417      if test "x$has_space" != x; then
36418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36420      fi
36421      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36422    fi
36423  fi
36424
36425  # Now new_path has a complete unix path to the binary
36426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36427    # Keep paths in /bin as-is, but remove trailing .exe if any
36428    new_path="${new_path/%.exe/}"
36429    # Do not save /bin paths to all_fixpath_prefixes!
36430  else
36431    # Not in mixed or Windows style, start by that.
36432    new_path=`cmd //c echo $new_path`
36433
36434  input_path="$new_path"
36435  # Check if we need to convert this using DOS-style short mode. If the path
36436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36437  # take no chances and rewrite it.
36438  # Note: m4 eats our [], so we need to use [ and ] instead.
36439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36440  if test "x$has_forbidden_chars" != x; then
36441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36443  fi
36444
36445    # Output is in $new_path
36446
36447  windows_path="$new_path"
36448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36449    unix_path=`$CYGPATH -u "$windows_path"`
36450    new_path="$unix_path"
36451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36453    new_path="$unix_path"
36454  fi
36455
36456    # remove trailing .exe if any
36457    new_path="${new_path/%.exe/}"
36458
36459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36461  fi
36462
36463    else
36464      # We're on a unix platform. Hooray! :)
36465      # First separate the path from the arguments. This will split at the first
36466      # space.
36467      complete="$LD"
36468      path="${complete%% *}"
36469      tmp="$complete EOL"
36470      arguments="${tmp#* }"
36471
36472      # Cannot rely on the command "which" here since it doesn't always work.
36473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36474      if test -z "$is_absolute_path"; then
36475        # Path to executable is not absolute. Find it.
36476        IFS_save="$IFS"
36477        IFS=:
36478        for p in $PATH; do
36479          if test -f "$p/$path" && test -x "$p/$path"; then
36480            new_path="$p/$path"
36481            break
36482          fi
36483        done
36484        IFS="$IFS_save"
36485      else
36486        # This is an absolute path, we can use it without further modifications.
36487        new_path="$path"
36488      fi
36489
36490      if test "x$new_path" = x; then
36491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36492$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36493        has_space=`$ECHO "$complete" | $GREP " "`
36494        if test "x$has_space" != x; then
36495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36497        fi
36498        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36499      fi
36500    fi
36501
36502    # Now join together the path and the arguments once again
36503    if test "x$arguments" != xEOL; then
36504      new_complete="$new_path ${arguments% *}"
36505    else
36506      new_complete="$new_path"
36507    fi
36508
36509    if test "x$complete" != "x$new_complete"; then
36510      LD="$new_complete"
36511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36512$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36513    fi
36514  fi
36515
36516    # Verify that we indeed succeeded with this trick.
36517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36518$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36519    "$LD" --version > /dev/null
36520    if test $? -eq 0 ; then
36521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36522$as_echo "no" >&6; }
36523      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36524    else
36525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36526$as_echo "yes" >&6; }
36527    fi
36528    LDCXX="$LD"
36529  else
36530    # All other toolchains use the compiler to link.
36531    LD="$CC"
36532    LDCXX="$CXX"
36533  fi
36534
36535  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36536
36537
36538  #
36539  # Setup the assembler (AS)
36540  #
36541  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36542
36543
36544  # Publish this variable in the help.
36545
36546
36547  if [ -z "${AS+x}" ]; then
36548    # The variable is not set by user, try to locate tool using the code snippet
36549    for ac_prog in as
36550do
36551  # Extract the first word of "$ac_prog", so it can be a program name with args.
36552set dummy $ac_prog; ac_word=$2
36553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36554$as_echo_n "checking for $ac_word... " >&6; }
36555if ${ac_cv_path_AS+:} false; then :
36556  $as_echo_n "(cached) " >&6
36557else
36558  case $AS in
36559  [\\/]* | ?:[\\/]*)
36560  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36561  ;;
36562  *)
36563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36564for as_dir in $PATH
36565do
36566  IFS=$as_save_IFS
36567  test -z "$as_dir" && as_dir=.
36568    for ac_exec_ext in '' $ac_executable_extensions; do
36569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36570    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36572    break 2
36573  fi
36574done
36575  done
36576IFS=$as_save_IFS
36577
36578  ;;
36579esac
36580fi
36581AS=$ac_cv_path_AS
36582if test -n "$AS"; then
36583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36584$as_echo "$AS" >&6; }
36585else
36586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36587$as_echo "no" >&6; }
36588fi
36589
36590
36591  test -n "$AS" && break
36592done
36593
36594  else
36595    # The variable is set, but is it from the command line or the environment?
36596
36597    # Try to remove the string !AS! from our list.
36598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36600      # If it failed, the variable was not from the command line. Ignore it,
36601      # but warn the user (except for BASH, which is always set by the calling BASH).
36602      if test "xAS" != xBASH; then
36603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36604$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36605      fi
36606      # Try to locate tool using the code snippet
36607      for ac_prog in as
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_path_AS+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  case $AS in
36617  [\\/]* | ?:[\\/]*)
36618  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36619  ;;
36620  *)
36621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36622for as_dir in $PATH
36623do
36624  IFS=$as_save_IFS
36625  test -z "$as_dir" && as_dir=.
36626    for ac_exec_ext in '' $ac_executable_extensions; do
36627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36628    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36630    break 2
36631  fi
36632done
36633  done
36634IFS=$as_save_IFS
36635
36636  ;;
36637esac
36638fi
36639AS=$ac_cv_path_AS
36640if test -n "$AS"; then
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36642$as_echo "$AS" >&6; }
36643else
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645$as_echo "no" >&6; }
36646fi
36647
36648
36649  test -n "$AS" && break
36650done
36651
36652    else
36653      # If it succeeded, then it was overridden by the user. We will use it
36654      # for the tool.
36655
36656      # First remove it from the list of overridden variables, so we can test
36657      # for unknown variables in the end.
36658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36659
36660      # Check if we try to supply an empty value
36661      if test "x$AS" = x; then
36662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36663$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36665$as_echo_n "checking for AS... " >&6; }
36666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36667$as_echo "disabled" >&6; }
36668      else
36669        # Check if the provided tool contains a complete path.
36670        tool_specified="$AS"
36671        tool_basename="${tool_specified##*/}"
36672        if test "x$tool_basename" = "x$tool_specified"; then
36673          # A command without a complete path is provided, search $PATH.
36674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36675$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36676          # Extract the first word of "$tool_basename", so it can be a program name with args.
36677set dummy $tool_basename; ac_word=$2
36678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36679$as_echo_n "checking for $ac_word... " >&6; }
36680if ${ac_cv_path_AS+:} false; then :
36681  $as_echo_n "(cached) " >&6
36682else
36683  case $AS in
36684  [\\/]* | ?:[\\/]*)
36685  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36686  ;;
36687  *)
36688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36689for as_dir in $PATH
36690do
36691  IFS=$as_save_IFS
36692  test -z "$as_dir" && as_dir=.
36693    for ac_exec_ext in '' $ac_executable_extensions; do
36694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36695    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36697    break 2
36698  fi
36699done
36700  done
36701IFS=$as_save_IFS
36702
36703  ;;
36704esac
36705fi
36706AS=$ac_cv_path_AS
36707if test -n "$AS"; then
36708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36709$as_echo "$AS" >&6; }
36710else
36711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36712$as_echo "no" >&6; }
36713fi
36714
36715
36716          if test "x$AS" = x; then
36717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36718          fi
36719        else
36720          # Otherwise we believe it is a complete path. Use it as it is.
36721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36722$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36724$as_echo_n "checking for AS... " >&6; }
36725          if test ! -x "$tool_specified"; then
36726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36727$as_echo "not found" >&6; }
36728            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36729          fi
36730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36731$as_echo "$tool_specified" >&6; }
36732        fi
36733      fi
36734    fi
36735
36736  fi
36737
36738
36739
36740  # Only process if variable expands to non-empty
36741
36742  if test "x$AS" != x; then
36743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36744
36745  # First separate the path from the arguments. This will split at the first
36746  # space.
36747  complete="$AS"
36748  path="${complete%% *}"
36749  tmp="$complete EOL"
36750  arguments="${tmp#* }"
36751
36752  # Input might be given as Windows format, start by converting to
36753  # unix format.
36754  new_path=`$CYGPATH -u "$path"`
36755
36756  # Now try to locate executable using which
36757  new_path=`$WHICH "$new_path" 2> /dev/null`
36758  # bat and cmd files are not always considered executable in cygwin causing which
36759  # to not find them
36760  if test "x$new_path" = x \
36761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36763    new_path=`$CYGPATH -u "$path"`
36764  fi
36765  if test "x$new_path" = x; then
36766    # Oops. Which didn't find the executable.
36767    # The splitting of arguments from the executable at a space might have been incorrect,
36768    # since paths with space are more likely in Windows. Give it another try with the whole
36769    # argument.
36770    path="$complete"
36771    arguments="EOL"
36772    new_path=`$CYGPATH -u "$path"`
36773    new_path=`$WHICH "$new_path" 2> /dev/null`
36774    # bat and cmd files are not always considered executable in cygwin causing which
36775    # to not find them
36776    if test "x$new_path" = x \
36777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36779      new_path=`$CYGPATH -u "$path"`
36780    fi
36781    if test "x$new_path" = x; then
36782      # It's still not found. Now this is an unrecoverable error.
36783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36784$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36785      has_space=`$ECHO "$complete" | $GREP " "`
36786      if test "x$has_space" != x; then
36787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36789      fi
36790      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36791    fi
36792  fi
36793
36794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36797  # "foo.exe" is OK but "foo" is an error.
36798  #
36799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36800  # It is also a way to make sure we got the proper file name for the real test later on.
36801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36802  if test "x$test_shortpath" = x; then
36803    # Short path failed, file does not exist as specified.
36804    # Try adding .exe or .cmd
36805    if test -f "${new_path}.exe"; then
36806      input_to_shortpath="${new_path}.exe"
36807    elif test -f "${new_path}.cmd"; then
36808      input_to_shortpath="${new_path}.cmd"
36809    else
36810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36811$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36814      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36815    fi
36816  else
36817    input_to_shortpath="$new_path"
36818  fi
36819
36820  # Call helper function which possibly converts this using DOS-style short mode.
36821  # If so, the updated path is stored in $new_path.
36822  new_path="$input_to_shortpath"
36823
36824  input_path="$input_to_shortpath"
36825  # Check if we need to convert this using DOS-style short mode. If the path
36826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36827  # take no chances and rewrite it.
36828  # Note: m4 eats our [], so we need to use [ and ] instead.
36829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36830  if test "x$has_forbidden_chars" != x; then
36831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36835      # Going to short mode and back again did indeed matter. Since short mode is
36836      # case insensitive, let's make it lowercase to improve readability.
36837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36838      # Now convert it back to Unix-style (cygpath)
36839      input_path=`$CYGPATH -u "$shortmode_path"`
36840      new_path="$input_path"
36841    fi
36842  fi
36843
36844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36845  if test "x$test_cygdrive_prefix" = x; then
36846    # As a simple fix, exclude /usr/bin since it's not a real path.
36847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36849      # a path prefixed by /cygdrive for fixpath to work.
36850      new_path="$CYGWIN_ROOT_PATH$input_path"
36851    fi
36852  fi
36853
36854  # remove trailing .exe if any
36855  new_path="${new_path/%.exe/}"
36856
36857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36858
36859  # First separate the path from the arguments. This will split at the first
36860  # space.
36861  complete="$AS"
36862  path="${complete%% *}"
36863  tmp="$complete EOL"
36864  arguments="${tmp#* }"
36865
36866  # Input might be given as Windows format, start by converting to
36867  # unix format.
36868  new_path="$path"
36869
36870  windows_path="$new_path"
36871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36872    unix_path=`$CYGPATH -u "$windows_path"`
36873    new_path="$unix_path"
36874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36876    new_path="$unix_path"
36877  fi
36878
36879
36880  # Now try to locate executable using which
36881  new_path=`$WHICH "$new_path" 2> /dev/null`
36882
36883  if test "x$new_path" = x; then
36884    # Oops. Which didn't find the executable.
36885    # The splitting of arguments from the executable at a space might have been incorrect,
36886    # since paths with space are more likely in Windows. Give it another try with the whole
36887    # argument.
36888    path="$complete"
36889    arguments="EOL"
36890    new_path="$path"
36891
36892  windows_path="$new_path"
36893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36894    unix_path=`$CYGPATH -u "$windows_path"`
36895    new_path="$unix_path"
36896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36898    new_path="$unix_path"
36899  fi
36900
36901
36902    new_path=`$WHICH "$new_path" 2> /dev/null`
36903    # bat and cmd files are not always considered executable in MSYS causing which
36904    # to not find them
36905    if test "x$new_path" = x \
36906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36908      new_path="$path"
36909
36910  windows_path="$new_path"
36911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36912    unix_path=`$CYGPATH -u "$windows_path"`
36913    new_path="$unix_path"
36914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36916    new_path="$unix_path"
36917  fi
36918
36919    fi
36920
36921    if test "x$new_path" = x; then
36922      # It's still not found. Now this is an unrecoverable error.
36923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36924$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36925      has_space=`$ECHO "$complete" | $GREP " "`
36926      if test "x$has_space" != x; then
36927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36929      fi
36930      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36931    fi
36932  fi
36933
36934  # Now new_path has a complete unix path to the binary
36935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36936    # Keep paths in /bin as-is, but remove trailing .exe if any
36937    new_path="${new_path/%.exe/}"
36938    # Do not save /bin paths to all_fixpath_prefixes!
36939  else
36940    # Not in mixed or Windows style, start by that.
36941    new_path=`cmd //c echo $new_path`
36942
36943  input_path="$new_path"
36944  # Check if we need to convert this using DOS-style short mode. If the path
36945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36946  # take no chances and rewrite it.
36947  # Note: m4 eats our [], so we need to use [ and ] instead.
36948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36949  if test "x$has_forbidden_chars" != x; then
36950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36952  fi
36953
36954    # Output is in $new_path
36955
36956  windows_path="$new_path"
36957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36958    unix_path=`$CYGPATH -u "$windows_path"`
36959    new_path="$unix_path"
36960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36962    new_path="$unix_path"
36963  fi
36964
36965    # remove trailing .exe if any
36966    new_path="${new_path/%.exe/}"
36967
36968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36970  fi
36971
36972    else
36973      # We're on a unix platform. Hooray! :)
36974      # First separate the path from the arguments. This will split at the first
36975      # space.
36976      complete="$AS"
36977      path="${complete%% *}"
36978      tmp="$complete EOL"
36979      arguments="${tmp#* }"
36980
36981      # Cannot rely on the command "which" here since it doesn't always work.
36982      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36983      if test -z "$is_absolute_path"; then
36984        # Path to executable is not absolute. Find it.
36985        IFS_save="$IFS"
36986        IFS=:
36987        for p in $PATH; do
36988          if test -f "$p/$path" && test -x "$p/$path"; then
36989            new_path="$p/$path"
36990            break
36991          fi
36992        done
36993        IFS="$IFS_save"
36994      else
36995        # This is an absolute path, we can use it without further modifications.
36996        new_path="$path"
36997      fi
36998
36999      if test "x$new_path" = x; then
37000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37001$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37002        has_space=`$ECHO "$complete" | $GREP " "`
37003        if test "x$has_space" != x; then
37004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37006        fi
37007        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37008      fi
37009    fi
37010
37011    # Now join together the path and the arguments once again
37012    if test "x$arguments" != xEOL; then
37013      new_complete="$new_path ${arguments% *}"
37014    else
37015      new_complete="$new_path"
37016    fi
37017
37018    if test "x$complete" != "x$new_complete"; then
37019      AS="$new_complete"
37020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37021$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37022    fi
37023  fi
37024
37025    if test "x$AS" = x; then
37026      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37027    fi
37028  else
37029    # FIXME: is this correct for microsoft?
37030    AS="$CC -c"
37031  fi
37032
37033
37034  #
37035  # Setup the archiver (AR)
37036  #
37037  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37038    # The corresponding ar tool is lib.exe (used to create static libraries)
37039    # Extract the first word of "lib", so it can be a program name with args.
37040set dummy lib; ac_word=$2
37041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37042$as_echo_n "checking for $ac_word... " >&6; }
37043if ${ac_cv_prog_AR+:} false; then :
37044  $as_echo_n "(cached) " >&6
37045else
37046  if test -n "$AR"; then
37047  ac_cv_prog_AR="$AR" # Let the user override the test.
37048else
37049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37050for as_dir in $PATH
37051do
37052  IFS=$as_save_IFS
37053  test -z "$as_dir" && as_dir=.
37054    for ac_exec_ext in '' $ac_executable_extensions; do
37055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37056    ac_cv_prog_AR="lib"
37057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37058    break 2
37059  fi
37060done
37061  done
37062IFS=$as_save_IFS
37063
37064fi
37065fi
37066AR=$ac_cv_prog_AR
37067if test -n "$AR"; then
37068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37069$as_echo "$AR" >&6; }
37070else
37071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37072$as_echo "no" >&6; }
37073fi
37074
37075
37076  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37077
37078
37079  # Publish this variable in the help.
37080
37081
37082  if [ -z "${AR+x}" ]; then
37083    # The variable is not set by user, try to locate tool using the code snippet
37084    if test -n "$ac_tool_prefix"; then
37085  for ac_prog in ar gcc-ar
37086  do
37087    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37090$as_echo_n "checking for $ac_word... " >&6; }
37091if ${ac_cv_prog_AR+:} false; then :
37092  $as_echo_n "(cached) " >&6
37093else
37094  if test -n "$AR"; then
37095  ac_cv_prog_AR="$AR" # Let the user override the test.
37096else
37097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37098for as_dir in $PATH
37099do
37100  IFS=$as_save_IFS
37101  test -z "$as_dir" && as_dir=.
37102    for ac_exec_ext in '' $ac_executable_extensions; do
37103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37104    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37106    break 2
37107  fi
37108done
37109  done
37110IFS=$as_save_IFS
37111
37112fi
37113fi
37114AR=$ac_cv_prog_AR
37115if test -n "$AR"; then
37116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37117$as_echo "$AR" >&6; }
37118else
37119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37120$as_echo "no" >&6; }
37121fi
37122
37123
37124    test -n "$AR" && break
37125  done
37126fi
37127if test -z "$AR"; then
37128  ac_ct_AR=$AR
37129  for ac_prog in ar gcc-ar
37130do
37131  # Extract the first word of "$ac_prog", so it can be a program name with args.
37132set dummy $ac_prog; ac_word=$2
37133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37134$as_echo_n "checking for $ac_word... " >&6; }
37135if ${ac_cv_prog_ac_ct_AR+:} false; then :
37136  $as_echo_n "(cached) " >&6
37137else
37138  if test -n "$ac_ct_AR"; then
37139  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37140else
37141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37142for as_dir in $PATH
37143do
37144  IFS=$as_save_IFS
37145  test -z "$as_dir" && as_dir=.
37146    for ac_exec_ext in '' $ac_executable_extensions; do
37147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37148    ac_cv_prog_ac_ct_AR="$ac_prog"
37149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37150    break 2
37151  fi
37152done
37153  done
37154IFS=$as_save_IFS
37155
37156fi
37157fi
37158ac_ct_AR=$ac_cv_prog_ac_ct_AR
37159if test -n "$ac_ct_AR"; then
37160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37161$as_echo "$ac_ct_AR" >&6; }
37162else
37163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37164$as_echo "no" >&6; }
37165fi
37166
37167
37168  test -n "$ac_ct_AR" && break
37169done
37170
37171  if test "x$ac_ct_AR" = x; then
37172    AR=""
37173  else
37174    case $cross_compiling:$ac_tool_warned in
37175yes:)
37176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37178ac_tool_warned=yes ;;
37179esac
37180    AR=$ac_ct_AR
37181  fi
37182fi
37183
37184  else
37185    # The variable is set, but is it from the command line or the environment?
37186
37187    # Try to remove the string !AR! from our list.
37188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37190      # If it failed, the variable was not from the command line. Ignore it,
37191      # but warn the user (except for BASH, which is always set by the calling BASH).
37192      if test "xAR" != xBASH; then
37193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37194$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37195      fi
37196      # Try to locate tool using the code snippet
37197      if test -n "$ac_tool_prefix"; then
37198  for ac_prog in ar gcc-ar
37199  do
37200    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37201set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37203$as_echo_n "checking for $ac_word... " >&6; }
37204if ${ac_cv_prog_AR+:} false; then :
37205  $as_echo_n "(cached) " >&6
37206else
37207  if test -n "$AR"; then
37208  ac_cv_prog_AR="$AR" # Let the user override the test.
37209else
37210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37211for as_dir in $PATH
37212do
37213  IFS=$as_save_IFS
37214  test -z "$as_dir" && as_dir=.
37215    for ac_exec_ext in '' $ac_executable_extensions; do
37216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37217    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37219    break 2
37220  fi
37221done
37222  done
37223IFS=$as_save_IFS
37224
37225fi
37226fi
37227AR=$ac_cv_prog_AR
37228if test -n "$AR"; then
37229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37230$as_echo "$AR" >&6; }
37231else
37232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37233$as_echo "no" >&6; }
37234fi
37235
37236
37237    test -n "$AR" && break
37238  done
37239fi
37240if test -z "$AR"; then
37241  ac_ct_AR=$AR
37242  for ac_prog in ar gcc-ar
37243do
37244  # Extract the first word of "$ac_prog", so it can be a program name with args.
37245set dummy $ac_prog; ac_word=$2
37246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37247$as_echo_n "checking for $ac_word... " >&6; }
37248if ${ac_cv_prog_ac_ct_AR+:} false; then :
37249  $as_echo_n "(cached) " >&6
37250else
37251  if test -n "$ac_ct_AR"; then
37252  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37253else
37254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37255for as_dir in $PATH
37256do
37257  IFS=$as_save_IFS
37258  test -z "$as_dir" && as_dir=.
37259    for ac_exec_ext in '' $ac_executable_extensions; do
37260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37261    ac_cv_prog_ac_ct_AR="$ac_prog"
37262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37263    break 2
37264  fi
37265done
37266  done
37267IFS=$as_save_IFS
37268
37269fi
37270fi
37271ac_ct_AR=$ac_cv_prog_ac_ct_AR
37272if test -n "$ac_ct_AR"; then
37273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37274$as_echo "$ac_ct_AR" >&6; }
37275else
37276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37277$as_echo "no" >&6; }
37278fi
37279
37280
37281  test -n "$ac_ct_AR" && break
37282done
37283
37284  if test "x$ac_ct_AR" = x; then
37285    AR=""
37286  else
37287    case $cross_compiling:$ac_tool_warned in
37288yes:)
37289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37291ac_tool_warned=yes ;;
37292esac
37293    AR=$ac_ct_AR
37294  fi
37295fi
37296
37297    else
37298      # If it succeeded, then it was overridden by the user. We will use it
37299      # for the tool.
37300
37301      # First remove it from the list of overridden variables, so we can test
37302      # for unknown variables in the end.
37303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37304
37305      # Check if we try to supply an empty value
37306      if test "x$AR" = x; then
37307        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37308$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37310$as_echo_n "checking for AR... " >&6; }
37311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37312$as_echo "disabled" >&6; }
37313      else
37314        # Check if the provided tool contains a complete path.
37315        tool_specified="$AR"
37316        tool_basename="${tool_specified##*/}"
37317        if test "x$tool_basename" = "x$tool_specified"; then
37318          # A command without a complete path is provided, search $PATH.
37319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37320$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37321          # Extract the first word of "$tool_basename", so it can be a program name with args.
37322set dummy $tool_basename; ac_word=$2
37323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37324$as_echo_n "checking for $ac_word... " >&6; }
37325if ${ac_cv_path_AR+:} false; then :
37326  $as_echo_n "(cached) " >&6
37327else
37328  case $AR in
37329  [\\/]* | ?:[\\/]*)
37330  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37331  ;;
37332  *)
37333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37334for as_dir in $PATH
37335do
37336  IFS=$as_save_IFS
37337  test -z "$as_dir" && as_dir=.
37338    for ac_exec_ext in '' $ac_executable_extensions; do
37339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37340    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37342    break 2
37343  fi
37344done
37345  done
37346IFS=$as_save_IFS
37347
37348  ;;
37349esac
37350fi
37351AR=$ac_cv_path_AR
37352if test -n "$AR"; then
37353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37354$as_echo "$AR" >&6; }
37355else
37356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37357$as_echo "no" >&6; }
37358fi
37359
37360
37361          if test "x$AR" = x; then
37362            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37363          fi
37364        else
37365          # Otherwise we believe it is a complete path. Use it as it is.
37366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37367$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37369$as_echo_n "checking for AR... " >&6; }
37370          if test ! -x "$tool_specified"; then
37371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37372$as_echo "not found" >&6; }
37373            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37374          fi
37375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37376$as_echo "$tool_specified" >&6; }
37377        fi
37378      fi
37379    fi
37380
37381  fi
37382
37383
37384  else
37385
37386
37387  # Publish this variable in the help.
37388
37389
37390  if [ -z "${AR+x}" ]; then
37391    # The variable is not set by user, try to locate tool using the code snippet
37392    if test -n "$ac_tool_prefix"; then
37393  for ac_prog in ar
37394  do
37395    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37396set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37398$as_echo_n "checking for $ac_word... " >&6; }
37399if ${ac_cv_prog_AR+:} false; then :
37400  $as_echo_n "(cached) " >&6
37401else
37402  if test -n "$AR"; then
37403  ac_cv_prog_AR="$AR" # Let the user override the test.
37404else
37405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37406for as_dir in $PATH
37407do
37408  IFS=$as_save_IFS
37409  test -z "$as_dir" && as_dir=.
37410    for ac_exec_ext in '' $ac_executable_extensions; do
37411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37412    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37414    break 2
37415  fi
37416done
37417  done
37418IFS=$as_save_IFS
37419
37420fi
37421fi
37422AR=$ac_cv_prog_AR
37423if test -n "$AR"; then
37424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37425$as_echo "$AR" >&6; }
37426else
37427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37428$as_echo "no" >&6; }
37429fi
37430
37431
37432    test -n "$AR" && break
37433  done
37434fi
37435if test -z "$AR"; then
37436  ac_ct_AR=$AR
37437  for ac_prog in ar
37438do
37439  # Extract the first word of "$ac_prog", so it can be a program name with args.
37440set dummy $ac_prog; ac_word=$2
37441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37442$as_echo_n "checking for $ac_word... " >&6; }
37443if ${ac_cv_prog_ac_ct_AR+:} false; then :
37444  $as_echo_n "(cached) " >&6
37445else
37446  if test -n "$ac_ct_AR"; then
37447  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37448else
37449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37450for as_dir in $PATH
37451do
37452  IFS=$as_save_IFS
37453  test -z "$as_dir" && as_dir=.
37454    for ac_exec_ext in '' $ac_executable_extensions; do
37455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37456    ac_cv_prog_ac_ct_AR="$ac_prog"
37457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37458    break 2
37459  fi
37460done
37461  done
37462IFS=$as_save_IFS
37463
37464fi
37465fi
37466ac_ct_AR=$ac_cv_prog_ac_ct_AR
37467if test -n "$ac_ct_AR"; then
37468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37469$as_echo "$ac_ct_AR" >&6; }
37470else
37471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37472$as_echo "no" >&6; }
37473fi
37474
37475
37476  test -n "$ac_ct_AR" && break
37477done
37478
37479  if test "x$ac_ct_AR" = x; then
37480    AR=""
37481  else
37482    case $cross_compiling:$ac_tool_warned in
37483yes:)
37484{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37485$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37486ac_tool_warned=yes ;;
37487esac
37488    AR=$ac_ct_AR
37489  fi
37490fi
37491
37492  else
37493    # The variable is set, but is it from the command line or the environment?
37494
37495    # Try to remove the string !AR! from our list.
37496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37498      # If it failed, the variable was not from the command line. Ignore it,
37499      # but warn the user (except for BASH, which is always set by the calling BASH).
37500      if test "xAR" != xBASH; then
37501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37502$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37503      fi
37504      # Try to locate tool using the code snippet
37505      if test -n "$ac_tool_prefix"; then
37506  for ac_prog in ar
37507  do
37508    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37509set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37511$as_echo_n "checking for $ac_word... " >&6; }
37512if ${ac_cv_prog_AR+:} false; then :
37513  $as_echo_n "(cached) " >&6
37514else
37515  if test -n "$AR"; then
37516  ac_cv_prog_AR="$AR" # Let the user override the test.
37517else
37518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37519for as_dir in $PATH
37520do
37521  IFS=$as_save_IFS
37522  test -z "$as_dir" && as_dir=.
37523    for ac_exec_ext in '' $ac_executable_extensions; do
37524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37525    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37527    break 2
37528  fi
37529done
37530  done
37531IFS=$as_save_IFS
37532
37533fi
37534fi
37535AR=$ac_cv_prog_AR
37536if test -n "$AR"; then
37537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37538$as_echo "$AR" >&6; }
37539else
37540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37541$as_echo "no" >&6; }
37542fi
37543
37544
37545    test -n "$AR" && break
37546  done
37547fi
37548if test -z "$AR"; then
37549  ac_ct_AR=$AR
37550  for ac_prog in ar
37551do
37552  # Extract the first word of "$ac_prog", so it can be a program name with args.
37553set dummy $ac_prog; ac_word=$2
37554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37555$as_echo_n "checking for $ac_word... " >&6; }
37556if ${ac_cv_prog_ac_ct_AR+:} false; then :
37557  $as_echo_n "(cached) " >&6
37558else
37559  if test -n "$ac_ct_AR"; then
37560  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37561else
37562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37563for as_dir in $PATH
37564do
37565  IFS=$as_save_IFS
37566  test -z "$as_dir" && as_dir=.
37567    for ac_exec_ext in '' $ac_executable_extensions; do
37568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37569    ac_cv_prog_ac_ct_AR="$ac_prog"
37570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37571    break 2
37572  fi
37573done
37574  done
37575IFS=$as_save_IFS
37576
37577fi
37578fi
37579ac_ct_AR=$ac_cv_prog_ac_ct_AR
37580if test -n "$ac_ct_AR"; then
37581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37582$as_echo "$ac_ct_AR" >&6; }
37583else
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37585$as_echo "no" >&6; }
37586fi
37587
37588
37589  test -n "$ac_ct_AR" && break
37590done
37591
37592  if test "x$ac_ct_AR" = x; then
37593    AR=""
37594  else
37595    case $cross_compiling:$ac_tool_warned in
37596yes:)
37597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37599ac_tool_warned=yes ;;
37600esac
37601    AR=$ac_ct_AR
37602  fi
37603fi
37604
37605    else
37606      # If it succeeded, then it was overridden by the user. We will use it
37607      # for the tool.
37608
37609      # First remove it from the list of overridden variables, so we can test
37610      # for unknown variables in the end.
37611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37612
37613      # Check if we try to supply an empty value
37614      if test "x$AR" = x; then
37615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37616$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37618$as_echo_n "checking for AR... " >&6; }
37619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37620$as_echo "disabled" >&6; }
37621      else
37622        # Check if the provided tool contains a complete path.
37623        tool_specified="$AR"
37624        tool_basename="${tool_specified##*/}"
37625        if test "x$tool_basename" = "x$tool_specified"; then
37626          # A command without a complete path is provided, search $PATH.
37627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37628$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37629          # Extract the first word of "$tool_basename", so it can be a program name with args.
37630set dummy $tool_basename; ac_word=$2
37631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37632$as_echo_n "checking for $ac_word... " >&6; }
37633if ${ac_cv_path_AR+:} false; then :
37634  $as_echo_n "(cached) " >&6
37635else
37636  case $AR in
37637  [\\/]* | ?:[\\/]*)
37638  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37639  ;;
37640  *)
37641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37642for as_dir in $PATH
37643do
37644  IFS=$as_save_IFS
37645  test -z "$as_dir" && as_dir=.
37646    for ac_exec_ext in '' $ac_executable_extensions; do
37647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37648    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37650    break 2
37651  fi
37652done
37653  done
37654IFS=$as_save_IFS
37655
37656  ;;
37657esac
37658fi
37659AR=$ac_cv_path_AR
37660if test -n "$AR"; then
37661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37662$as_echo "$AR" >&6; }
37663else
37664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37665$as_echo "no" >&6; }
37666fi
37667
37668
37669          if test "x$AR" = x; then
37670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37671          fi
37672        else
37673          # Otherwise we believe it is a complete path. Use it as it is.
37674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37675$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37677$as_echo_n "checking for AR... " >&6; }
37678          if test ! -x "$tool_specified"; then
37679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37680$as_echo "not found" >&6; }
37681            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37682          fi
37683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37684$as_echo "$tool_specified" >&6; }
37685        fi
37686      fi
37687    fi
37688
37689  fi
37690
37691
37692  fi
37693
37694  # Only process if variable expands to non-empty
37695
37696  if test "x$AR" != x; then
37697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37698
37699  # First separate the path from the arguments. This will split at the first
37700  # space.
37701  complete="$AR"
37702  path="${complete%% *}"
37703  tmp="$complete EOL"
37704  arguments="${tmp#* }"
37705
37706  # Input might be given as Windows format, start by converting to
37707  # unix format.
37708  new_path=`$CYGPATH -u "$path"`
37709
37710  # Now try to locate executable using which
37711  new_path=`$WHICH "$new_path" 2> /dev/null`
37712  # bat and cmd files are not always considered executable in cygwin causing which
37713  # to not find them
37714  if test "x$new_path" = x \
37715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37717    new_path=`$CYGPATH -u "$path"`
37718  fi
37719  if test "x$new_path" = x; then
37720    # Oops. Which didn't find the executable.
37721    # The splitting of arguments from the executable at a space might have been incorrect,
37722    # since paths with space are more likely in Windows. Give it another try with the whole
37723    # argument.
37724    path="$complete"
37725    arguments="EOL"
37726    new_path=`$CYGPATH -u "$path"`
37727    new_path=`$WHICH "$new_path" 2> /dev/null`
37728    # bat and cmd files are not always considered executable in cygwin causing which
37729    # to not find them
37730    if test "x$new_path" = x \
37731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37733      new_path=`$CYGPATH -u "$path"`
37734    fi
37735    if test "x$new_path" = x; then
37736      # It's still not found. Now this is an unrecoverable error.
37737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37738$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37739      has_space=`$ECHO "$complete" | $GREP " "`
37740      if test "x$has_space" != x; then
37741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37743      fi
37744      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37745    fi
37746  fi
37747
37748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37751  # "foo.exe" is OK but "foo" is an error.
37752  #
37753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37754  # It is also a way to make sure we got the proper file name for the real test later on.
37755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37756  if test "x$test_shortpath" = x; then
37757    # Short path failed, file does not exist as specified.
37758    # Try adding .exe or .cmd
37759    if test -f "${new_path}.exe"; then
37760      input_to_shortpath="${new_path}.exe"
37761    elif test -f "${new_path}.cmd"; then
37762      input_to_shortpath="${new_path}.cmd"
37763    else
37764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37765$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37768      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37769    fi
37770  else
37771    input_to_shortpath="$new_path"
37772  fi
37773
37774  # Call helper function which possibly converts this using DOS-style short mode.
37775  # If so, the updated path is stored in $new_path.
37776  new_path="$input_to_shortpath"
37777
37778  input_path="$input_to_shortpath"
37779  # Check if we need to convert this using DOS-style short mode. If the path
37780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37781  # take no chances and rewrite it.
37782  # Note: m4 eats our [], so we need to use [ and ] instead.
37783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37784  if test "x$has_forbidden_chars" != x; then
37785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37789      # Going to short mode and back again did indeed matter. Since short mode is
37790      # case insensitive, let's make it lowercase to improve readability.
37791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37792      # Now convert it back to Unix-style (cygpath)
37793      input_path=`$CYGPATH -u "$shortmode_path"`
37794      new_path="$input_path"
37795    fi
37796  fi
37797
37798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37799  if test "x$test_cygdrive_prefix" = x; then
37800    # As a simple fix, exclude /usr/bin since it's not a real path.
37801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37803      # a path prefixed by /cygdrive for fixpath to work.
37804      new_path="$CYGWIN_ROOT_PATH$input_path"
37805    fi
37806  fi
37807
37808  # remove trailing .exe if any
37809  new_path="${new_path/%.exe/}"
37810
37811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37812
37813  # First separate the path from the arguments. This will split at the first
37814  # space.
37815  complete="$AR"
37816  path="${complete%% *}"
37817  tmp="$complete EOL"
37818  arguments="${tmp#* }"
37819
37820  # Input might be given as Windows format, start by converting to
37821  # unix format.
37822  new_path="$path"
37823
37824  windows_path="$new_path"
37825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37826    unix_path=`$CYGPATH -u "$windows_path"`
37827    new_path="$unix_path"
37828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37830    new_path="$unix_path"
37831  fi
37832
37833
37834  # Now try to locate executable using which
37835  new_path=`$WHICH "$new_path" 2> /dev/null`
37836
37837  if test "x$new_path" = x; then
37838    # Oops. Which didn't find the executable.
37839    # The splitting of arguments from the executable at a space might have been incorrect,
37840    # since paths with space are more likely in Windows. Give it another try with the whole
37841    # argument.
37842    path="$complete"
37843    arguments="EOL"
37844    new_path="$path"
37845
37846  windows_path="$new_path"
37847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37848    unix_path=`$CYGPATH -u "$windows_path"`
37849    new_path="$unix_path"
37850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37852    new_path="$unix_path"
37853  fi
37854
37855
37856    new_path=`$WHICH "$new_path" 2> /dev/null`
37857    # bat and cmd files are not always considered executable in MSYS causing which
37858    # to not find them
37859    if test "x$new_path" = x \
37860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37862      new_path="$path"
37863
37864  windows_path="$new_path"
37865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37866    unix_path=`$CYGPATH -u "$windows_path"`
37867    new_path="$unix_path"
37868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37870    new_path="$unix_path"
37871  fi
37872
37873    fi
37874
37875    if test "x$new_path" = x; then
37876      # It's still not found. Now this is an unrecoverable error.
37877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37878$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37879      has_space=`$ECHO "$complete" | $GREP " "`
37880      if test "x$has_space" != x; then
37881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37883      fi
37884      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37885    fi
37886  fi
37887
37888  # Now new_path has a complete unix path to the binary
37889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37890    # Keep paths in /bin as-is, but remove trailing .exe if any
37891    new_path="${new_path/%.exe/}"
37892    # Do not save /bin paths to all_fixpath_prefixes!
37893  else
37894    # Not in mixed or Windows style, start by that.
37895    new_path=`cmd //c echo $new_path`
37896
37897  input_path="$new_path"
37898  # Check if we need to convert this using DOS-style short mode. If the path
37899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37900  # take no chances and rewrite it.
37901  # Note: m4 eats our [], so we need to use [ and ] instead.
37902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37903  if test "x$has_forbidden_chars" != x; then
37904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37906  fi
37907
37908    # Output is in $new_path
37909
37910  windows_path="$new_path"
37911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37912    unix_path=`$CYGPATH -u "$windows_path"`
37913    new_path="$unix_path"
37914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37916    new_path="$unix_path"
37917  fi
37918
37919    # remove trailing .exe if any
37920    new_path="${new_path/%.exe/}"
37921
37922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37924  fi
37925
37926    else
37927      # We're on a unix platform. Hooray! :)
37928      # First separate the path from the arguments. This will split at the first
37929      # space.
37930      complete="$AR"
37931      path="${complete%% *}"
37932      tmp="$complete EOL"
37933      arguments="${tmp#* }"
37934
37935      # Cannot rely on the command "which" here since it doesn't always work.
37936      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37937      if test -z "$is_absolute_path"; then
37938        # Path to executable is not absolute. Find it.
37939        IFS_save="$IFS"
37940        IFS=:
37941        for p in $PATH; do
37942          if test -f "$p/$path" && test -x "$p/$path"; then
37943            new_path="$p/$path"
37944            break
37945          fi
37946        done
37947        IFS="$IFS_save"
37948      else
37949        # This is an absolute path, we can use it without further modifications.
37950        new_path="$path"
37951      fi
37952
37953      if test "x$new_path" = x; then
37954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37955$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37956        has_space=`$ECHO "$complete" | $GREP " "`
37957        if test "x$has_space" != x; then
37958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37960        fi
37961        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37962      fi
37963    fi
37964
37965    # Now join together the path and the arguments once again
37966    if test "x$arguments" != xEOL; then
37967      new_complete="$new_path ${arguments% *}"
37968    else
37969      new_complete="$new_path"
37970    fi
37971
37972    if test "x$complete" != "x$new_complete"; then
37973      AR="$new_complete"
37974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37975$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37976    fi
37977  fi
37978
37979
37980
37981  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37982
37983
37984  # Publish this variable in the help.
37985
37986
37987  if [ -z "${LIPO+x}" ]; then
37988    # The variable is not set by user, try to locate tool using the code snippet
37989    for ac_prog in lipo
37990do
37991  # Extract the first word of "$ac_prog", so it can be a program name with args.
37992set dummy $ac_prog; ac_word=$2
37993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37994$as_echo_n "checking for $ac_word... " >&6; }
37995if ${ac_cv_path_LIPO+:} false; then :
37996  $as_echo_n "(cached) " >&6
37997else
37998  case $LIPO in
37999  [\\/]* | ?:[\\/]*)
38000  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38001  ;;
38002  *)
38003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38004for as_dir in $PATH
38005do
38006  IFS=$as_save_IFS
38007  test -z "$as_dir" && as_dir=.
38008    for ac_exec_ext in '' $ac_executable_extensions; do
38009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38010    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38012    break 2
38013  fi
38014done
38015  done
38016IFS=$as_save_IFS
38017
38018  ;;
38019esac
38020fi
38021LIPO=$ac_cv_path_LIPO
38022if test -n "$LIPO"; then
38023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38024$as_echo "$LIPO" >&6; }
38025else
38026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38027$as_echo "no" >&6; }
38028fi
38029
38030
38031  test -n "$LIPO" && break
38032done
38033
38034  else
38035    # The variable is set, but is it from the command line or the environment?
38036
38037    # Try to remove the string !LIPO! from our list.
38038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38040      # If it failed, the variable was not from the command line. Ignore it,
38041      # but warn the user (except for BASH, which is always set by the calling BASH).
38042      if test "xLIPO" != xBASH; then
38043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38044$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38045      fi
38046      # Try to locate tool using the code snippet
38047      for ac_prog in lipo
38048do
38049  # Extract the first word of "$ac_prog", so it can be a program name with args.
38050set dummy $ac_prog; ac_word=$2
38051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38052$as_echo_n "checking for $ac_word... " >&6; }
38053if ${ac_cv_path_LIPO+:} false; then :
38054  $as_echo_n "(cached) " >&6
38055else
38056  case $LIPO in
38057  [\\/]* | ?:[\\/]*)
38058  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38059  ;;
38060  *)
38061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38062for as_dir in $PATH
38063do
38064  IFS=$as_save_IFS
38065  test -z "$as_dir" && as_dir=.
38066    for ac_exec_ext in '' $ac_executable_extensions; do
38067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38068    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38070    break 2
38071  fi
38072done
38073  done
38074IFS=$as_save_IFS
38075
38076  ;;
38077esac
38078fi
38079LIPO=$ac_cv_path_LIPO
38080if test -n "$LIPO"; then
38081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38082$as_echo "$LIPO" >&6; }
38083else
38084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38085$as_echo "no" >&6; }
38086fi
38087
38088
38089  test -n "$LIPO" && break
38090done
38091
38092    else
38093      # If it succeeded, then it was overridden by the user. We will use it
38094      # for the tool.
38095
38096      # First remove it from the list of overridden variables, so we can test
38097      # for unknown variables in the end.
38098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38099
38100      # Check if we try to supply an empty value
38101      if test "x$LIPO" = x; then
38102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38103$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38105$as_echo_n "checking for LIPO... " >&6; }
38106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38107$as_echo "disabled" >&6; }
38108      else
38109        # Check if the provided tool contains a complete path.
38110        tool_specified="$LIPO"
38111        tool_basename="${tool_specified##*/}"
38112        if test "x$tool_basename" = "x$tool_specified"; then
38113          # A command without a complete path is provided, search $PATH.
38114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38115$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38116          # Extract the first word of "$tool_basename", so it can be a program name with args.
38117set dummy $tool_basename; ac_word=$2
38118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38119$as_echo_n "checking for $ac_word... " >&6; }
38120if ${ac_cv_path_LIPO+:} false; then :
38121  $as_echo_n "(cached) " >&6
38122else
38123  case $LIPO in
38124  [\\/]* | ?:[\\/]*)
38125  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38126  ;;
38127  *)
38128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38129for as_dir in $PATH
38130do
38131  IFS=$as_save_IFS
38132  test -z "$as_dir" && as_dir=.
38133    for ac_exec_ext in '' $ac_executable_extensions; do
38134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38135    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38137    break 2
38138  fi
38139done
38140  done
38141IFS=$as_save_IFS
38142
38143  ;;
38144esac
38145fi
38146LIPO=$ac_cv_path_LIPO
38147if test -n "$LIPO"; then
38148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38149$as_echo "$LIPO" >&6; }
38150else
38151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38152$as_echo "no" >&6; }
38153fi
38154
38155
38156          if test "x$LIPO" = x; then
38157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38158          fi
38159        else
38160          # Otherwise we believe it is a complete path. Use it as it is.
38161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38162$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38164$as_echo_n "checking for LIPO... " >&6; }
38165          if test ! -x "$tool_specified"; then
38166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38167$as_echo "not found" >&6; }
38168            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38169          fi
38170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38171$as_echo "$tool_specified" >&6; }
38172        fi
38173      fi
38174    fi
38175
38176  fi
38177
38178
38179
38180  # Only process if variable expands to non-empty
38181
38182  if test "x$LIPO" != x; then
38183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38184
38185  # First separate the path from the arguments. This will split at the first
38186  # space.
38187  complete="$LIPO"
38188  path="${complete%% *}"
38189  tmp="$complete EOL"
38190  arguments="${tmp#* }"
38191
38192  # Input might be given as Windows format, start by converting to
38193  # unix format.
38194  new_path=`$CYGPATH -u "$path"`
38195
38196  # Now try to locate executable using which
38197  new_path=`$WHICH "$new_path" 2> /dev/null`
38198  # bat and cmd files are not always considered executable in cygwin causing which
38199  # to not find them
38200  if test "x$new_path" = x \
38201      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38202      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38203    new_path=`$CYGPATH -u "$path"`
38204  fi
38205  if test "x$new_path" = x; then
38206    # Oops. Which didn't find the executable.
38207    # The splitting of arguments from the executable at a space might have been incorrect,
38208    # since paths with space are more likely in Windows. Give it another try with the whole
38209    # argument.
38210    path="$complete"
38211    arguments="EOL"
38212    new_path=`$CYGPATH -u "$path"`
38213    new_path=`$WHICH "$new_path" 2> /dev/null`
38214    # bat and cmd files are not always considered executable in cygwin causing which
38215    # to not find them
38216    if test "x$new_path" = x \
38217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38219      new_path=`$CYGPATH -u "$path"`
38220    fi
38221    if test "x$new_path" = x; then
38222      # It's still not found. Now this is an unrecoverable error.
38223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38224$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38225      has_space=`$ECHO "$complete" | $GREP " "`
38226      if test "x$has_space" != x; then
38227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38229      fi
38230      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38231    fi
38232  fi
38233
38234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38237  # "foo.exe" is OK but "foo" is an error.
38238  #
38239  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38240  # It is also a way to make sure we got the proper file name for the real test later on.
38241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38242  if test "x$test_shortpath" = x; then
38243    # Short path failed, file does not exist as specified.
38244    # Try adding .exe or .cmd
38245    if test -f "${new_path}.exe"; then
38246      input_to_shortpath="${new_path}.exe"
38247    elif test -f "${new_path}.cmd"; then
38248      input_to_shortpath="${new_path}.cmd"
38249    else
38250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38251$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38252      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38253$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38254      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38255    fi
38256  else
38257    input_to_shortpath="$new_path"
38258  fi
38259
38260  # Call helper function which possibly converts this using DOS-style short mode.
38261  # If so, the updated path is stored in $new_path.
38262  new_path="$input_to_shortpath"
38263
38264  input_path="$input_to_shortpath"
38265  # Check if we need to convert this using DOS-style short mode. If the path
38266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38267  # take no chances and rewrite it.
38268  # Note: m4 eats our [], so we need to use [ and ] instead.
38269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38270  if test "x$has_forbidden_chars" != x; then
38271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38275      # Going to short mode and back again did indeed matter. Since short mode is
38276      # case insensitive, let's make it lowercase to improve readability.
38277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38278      # Now convert it back to Unix-style (cygpath)
38279      input_path=`$CYGPATH -u "$shortmode_path"`
38280      new_path="$input_path"
38281    fi
38282  fi
38283
38284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38285  if test "x$test_cygdrive_prefix" = x; then
38286    # As a simple fix, exclude /usr/bin since it's not a real path.
38287    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38289      # a path prefixed by /cygdrive for fixpath to work.
38290      new_path="$CYGWIN_ROOT_PATH$input_path"
38291    fi
38292  fi
38293
38294  # remove trailing .exe if any
38295  new_path="${new_path/%.exe/}"
38296
38297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38298
38299  # First separate the path from the arguments. This will split at the first
38300  # space.
38301  complete="$LIPO"
38302  path="${complete%% *}"
38303  tmp="$complete EOL"
38304  arguments="${tmp#* }"
38305
38306  # Input might be given as Windows format, start by converting to
38307  # unix format.
38308  new_path="$path"
38309
38310  windows_path="$new_path"
38311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38312    unix_path=`$CYGPATH -u "$windows_path"`
38313    new_path="$unix_path"
38314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38316    new_path="$unix_path"
38317  fi
38318
38319
38320  # Now try to locate executable using which
38321  new_path=`$WHICH "$new_path" 2> /dev/null`
38322
38323  if test "x$new_path" = x; then
38324    # Oops. Which didn't find the executable.
38325    # The splitting of arguments from the executable at a space might have been incorrect,
38326    # since paths with space are more likely in Windows. Give it another try with the whole
38327    # argument.
38328    path="$complete"
38329    arguments="EOL"
38330    new_path="$path"
38331
38332  windows_path="$new_path"
38333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38334    unix_path=`$CYGPATH -u "$windows_path"`
38335    new_path="$unix_path"
38336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38338    new_path="$unix_path"
38339  fi
38340
38341
38342    new_path=`$WHICH "$new_path" 2> /dev/null`
38343    # bat and cmd files are not always considered executable in MSYS causing which
38344    # to not find them
38345    if test "x$new_path" = x \
38346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38348      new_path="$path"
38349
38350  windows_path="$new_path"
38351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38352    unix_path=`$CYGPATH -u "$windows_path"`
38353    new_path="$unix_path"
38354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38356    new_path="$unix_path"
38357  fi
38358
38359    fi
38360
38361    if test "x$new_path" = x; then
38362      # It's still not found. Now this is an unrecoverable error.
38363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38364$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38365      has_space=`$ECHO "$complete" | $GREP " "`
38366      if test "x$has_space" != x; then
38367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38369      fi
38370      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38371    fi
38372  fi
38373
38374  # Now new_path has a complete unix path to the binary
38375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38376    # Keep paths in /bin as-is, but remove trailing .exe if any
38377    new_path="${new_path/%.exe/}"
38378    # Do not save /bin paths to all_fixpath_prefixes!
38379  else
38380    # Not in mixed or Windows style, start by that.
38381    new_path=`cmd //c echo $new_path`
38382
38383  input_path="$new_path"
38384  # Check if we need to convert this using DOS-style short mode. If the path
38385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38386  # take no chances and rewrite it.
38387  # Note: m4 eats our [], so we need to use [ and ] instead.
38388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38389  if test "x$has_forbidden_chars" != x; then
38390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38392  fi
38393
38394    # Output is in $new_path
38395
38396  windows_path="$new_path"
38397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38398    unix_path=`$CYGPATH -u "$windows_path"`
38399    new_path="$unix_path"
38400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38402    new_path="$unix_path"
38403  fi
38404
38405    # remove trailing .exe if any
38406    new_path="${new_path/%.exe/}"
38407
38408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38410  fi
38411
38412    else
38413      # We're on a unix platform. Hooray! :)
38414      # First separate the path from the arguments. This will split at the first
38415      # space.
38416      complete="$LIPO"
38417      path="${complete%% *}"
38418      tmp="$complete EOL"
38419      arguments="${tmp#* }"
38420
38421      # Cannot rely on the command "which" here since it doesn't always work.
38422      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38423      if test -z "$is_absolute_path"; then
38424        # Path to executable is not absolute. Find it.
38425        IFS_save="$IFS"
38426        IFS=:
38427        for p in $PATH; do
38428          if test -f "$p/$path" && test -x "$p/$path"; then
38429            new_path="$p/$path"
38430            break
38431          fi
38432        done
38433        IFS="$IFS_save"
38434      else
38435        # This is an absolute path, we can use it without further modifications.
38436        new_path="$path"
38437      fi
38438
38439      if test "x$new_path" = x; then
38440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38441$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38442        has_space=`$ECHO "$complete" | $GREP " "`
38443        if test "x$has_space" != x; then
38444          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38446        fi
38447        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38448      fi
38449    fi
38450
38451    # Now join together the path and the arguments once again
38452    if test "x$arguments" != xEOL; then
38453      new_complete="$new_path ${arguments% *}"
38454    else
38455      new_complete="$new_path"
38456    fi
38457
38458    if test "x$complete" != "x$new_complete"; then
38459      LIPO="$new_complete"
38460      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38461$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38462    fi
38463  fi
38464
38465  fi
38466
38467  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38468    # Extract the first word of "mt", so it can be a program name with args.
38469set dummy mt; ac_word=$2
38470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38471$as_echo_n "checking for $ac_word... " >&6; }
38472if ${ac_cv_prog_MT+:} false; then :
38473  $as_echo_n "(cached) " >&6
38474else
38475  if test -n "$MT"; then
38476  ac_cv_prog_MT="$MT" # Let the user override the test.
38477else
38478  ac_prog_rejected=no
38479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38480for as_dir in $PATH
38481do
38482  IFS=$as_save_IFS
38483  test -z "$as_dir" && as_dir=.
38484    for ac_exec_ext in '' $ac_executable_extensions; do
38485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38486    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38487       ac_prog_rejected=yes
38488       continue
38489     fi
38490    ac_cv_prog_MT="mt"
38491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38492    break 2
38493  fi
38494done
38495  done
38496IFS=$as_save_IFS
38497
38498if test $ac_prog_rejected = yes; then
38499  # We found a bogon in the path, so make sure we never use it.
38500  set dummy $ac_cv_prog_MT
38501  shift
38502  if test $# != 0; then
38503    # We chose a different compiler from the bogus one.
38504    # However, it has the same basename, so the bogon will be chosen
38505    # first if we set MT to just the basename; use the full file name.
38506    shift
38507    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38508  fi
38509fi
38510fi
38511fi
38512MT=$ac_cv_prog_MT
38513if test -n "$MT"; then
38514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38515$as_echo "$MT" >&6; }
38516else
38517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38518$as_echo "no" >&6; }
38519fi
38520
38521
38522
38523  # Only process if variable expands to non-empty
38524
38525  if test "x$MT" != x; then
38526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38527
38528  # First separate the path from the arguments. This will split at the first
38529  # space.
38530  complete="$MT"
38531  path="${complete%% *}"
38532  tmp="$complete EOL"
38533  arguments="${tmp#* }"
38534
38535  # Input might be given as Windows format, start by converting to
38536  # unix format.
38537  new_path=`$CYGPATH -u "$path"`
38538
38539  # Now try to locate executable using which
38540  new_path=`$WHICH "$new_path" 2> /dev/null`
38541  # bat and cmd files are not always considered executable in cygwin causing which
38542  # to not find them
38543  if test "x$new_path" = x \
38544      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38545      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38546    new_path=`$CYGPATH -u "$path"`
38547  fi
38548  if test "x$new_path" = x; then
38549    # Oops. Which didn't find the executable.
38550    # The splitting of arguments from the executable at a space might have been incorrect,
38551    # since paths with space are more likely in Windows. Give it another try with the whole
38552    # argument.
38553    path="$complete"
38554    arguments="EOL"
38555    new_path=`$CYGPATH -u "$path"`
38556    new_path=`$WHICH "$new_path" 2> /dev/null`
38557    # bat and cmd files are not always considered executable in cygwin causing which
38558    # to not find them
38559    if test "x$new_path" = x \
38560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38562      new_path=`$CYGPATH -u "$path"`
38563    fi
38564    if test "x$new_path" = x; then
38565      # It's still not found. Now this is an unrecoverable error.
38566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38567$as_echo "$as_me: The path of MT, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38572      fi
38573      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38574    fi
38575  fi
38576
38577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38580  # "foo.exe" is OK but "foo" is an error.
38581  #
38582  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38583  # It is also a way to make sure we got the proper file name for the real test later on.
38584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38585  if test "x$test_shortpath" = x; then
38586    # Short path failed, file does not exist as specified.
38587    # Try adding .exe or .cmd
38588    if test -f "${new_path}.exe"; then
38589      input_to_shortpath="${new_path}.exe"
38590    elif test -f "${new_path}.cmd"; then
38591      input_to_shortpath="${new_path}.cmd"
38592    else
38593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38594$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38595      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38596$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38597      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38598    fi
38599  else
38600    input_to_shortpath="$new_path"
38601  fi
38602
38603  # Call helper function which possibly converts this using DOS-style short mode.
38604  # If so, the updated path is stored in $new_path.
38605  new_path="$input_to_shortpath"
38606
38607  input_path="$input_to_shortpath"
38608  # Check if we need to convert this using DOS-style short mode. If the path
38609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38610  # take no chances and rewrite it.
38611  # Note: m4 eats our [], so we need to use [ and ] instead.
38612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38613  if test "x$has_forbidden_chars" != x; then
38614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38618      # Going to short mode and back again did indeed matter. Since short mode is
38619      # case insensitive, let's make it lowercase to improve readability.
38620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38621      # Now convert it back to Unix-style (cygpath)
38622      input_path=`$CYGPATH -u "$shortmode_path"`
38623      new_path="$input_path"
38624    fi
38625  fi
38626
38627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38628  if test "x$test_cygdrive_prefix" = x; then
38629    # As a simple fix, exclude /usr/bin since it's not a real path.
38630    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38632      # a path prefixed by /cygdrive for fixpath to work.
38633      new_path="$CYGWIN_ROOT_PATH$input_path"
38634    fi
38635  fi
38636
38637  # remove trailing .exe if any
38638  new_path="${new_path/%.exe/}"
38639
38640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38641
38642  # First separate the path from the arguments. This will split at the first
38643  # space.
38644  complete="$MT"
38645  path="${complete%% *}"
38646  tmp="$complete EOL"
38647  arguments="${tmp#* }"
38648
38649  # Input might be given as Windows format, start by converting to
38650  # unix format.
38651  new_path="$path"
38652
38653  windows_path="$new_path"
38654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38655    unix_path=`$CYGPATH -u "$windows_path"`
38656    new_path="$unix_path"
38657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38659    new_path="$unix_path"
38660  fi
38661
38662
38663  # Now try to locate executable using which
38664  new_path=`$WHICH "$new_path" 2> /dev/null`
38665
38666  if test "x$new_path" = x; then
38667    # Oops. Which didn't find the executable.
38668    # The splitting of arguments from the executable at a space might have been incorrect,
38669    # since paths with space are more likely in Windows. Give it another try with the whole
38670    # argument.
38671    path="$complete"
38672    arguments="EOL"
38673    new_path="$path"
38674
38675  windows_path="$new_path"
38676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38677    unix_path=`$CYGPATH -u "$windows_path"`
38678    new_path="$unix_path"
38679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38681    new_path="$unix_path"
38682  fi
38683
38684
38685    new_path=`$WHICH "$new_path" 2> /dev/null`
38686    # bat and cmd files are not always considered executable in MSYS causing which
38687    # to not find them
38688    if test "x$new_path" = x \
38689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38691      new_path="$path"
38692
38693  windows_path="$new_path"
38694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38695    unix_path=`$CYGPATH -u "$windows_path"`
38696    new_path="$unix_path"
38697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38699    new_path="$unix_path"
38700  fi
38701
38702    fi
38703
38704    if test "x$new_path" = x; then
38705      # It's still not found. Now this is an unrecoverable error.
38706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38707$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38708      has_space=`$ECHO "$complete" | $GREP " "`
38709      if test "x$has_space" != x; then
38710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38712      fi
38713      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38714    fi
38715  fi
38716
38717  # Now new_path has a complete unix path to the binary
38718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38719    # Keep paths in /bin as-is, but remove trailing .exe if any
38720    new_path="${new_path/%.exe/}"
38721    # Do not save /bin paths to all_fixpath_prefixes!
38722  else
38723    # Not in mixed or Windows style, start by that.
38724    new_path=`cmd //c echo $new_path`
38725
38726  input_path="$new_path"
38727  # Check if we need to convert this using DOS-style short mode. If the path
38728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38729  # take no chances and rewrite it.
38730  # Note: m4 eats our [], so we need to use [ and ] instead.
38731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38732  if test "x$has_forbidden_chars" != x; then
38733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38735  fi
38736
38737    # Output is in $new_path
38738
38739  windows_path="$new_path"
38740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38741    unix_path=`$CYGPATH -u "$windows_path"`
38742    new_path="$unix_path"
38743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38745    new_path="$unix_path"
38746  fi
38747
38748    # remove trailing .exe if any
38749    new_path="${new_path/%.exe/}"
38750
38751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38753  fi
38754
38755    else
38756      # We're on a unix platform. Hooray! :)
38757      # First separate the path from the arguments. This will split at the first
38758      # space.
38759      complete="$MT"
38760      path="${complete%% *}"
38761      tmp="$complete EOL"
38762      arguments="${tmp#* }"
38763
38764      # Cannot rely on the command "which" here since it doesn't always work.
38765      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38766      if test -z "$is_absolute_path"; then
38767        # Path to executable is not absolute. Find it.
38768        IFS_save="$IFS"
38769        IFS=:
38770        for p in $PATH; do
38771          if test -f "$p/$path" && test -x "$p/$path"; then
38772            new_path="$p/$path"
38773            break
38774          fi
38775        done
38776        IFS="$IFS_save"
38777      else
38778        # This is an absolute path, we can use it without further modifications.
38779        new_path="$path"
38780      fi
38781
38782      if test "x$new_path" = x; then
38783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38784$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38785        has_space=`$ECHO "$complete" | $GREP " "`
38786        if test "x$has_space" != x; then
38787          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38788$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38789        fi
38790        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38791      fi
38792    fi
38793
38794    # Now join together the path and the arguments once again
38795    if test "x$arguments" != xEOL; then
38796      new_complete="$new_path ${arguments% *}"
38797    else
38798      new_complete="$new_path"
38799    fi
38800
38801    if test "x$complete" != "x$new_complete"; then
38802      MT="$new_complete"
38803      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38804$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38805    fi
38806  fi
38807
38808    # Setup the resource compiler (RC)
38809    # Extract the first word of "rc", so it can be a program name with args.
38810set dummy rc; ac_word=$2
38811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38812$as_echo_n "checking for $ac_word... " >&6; }
38813if ${ac_cv_prog_RC+:} false; then :
38814  $as_echo_n "(cached) " >&6
38815else
38816  if test -n "$RC"; then
38817  ac_cv_prog_RC="$RC" # Let the user override the test.
38818else
38819  ac_prog_rejected=no
38820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38821for as_dir in $PATH
38822do
38823  IFS=$as_save_IFS
38824  test -z "$as_dir" && as_dir=.
38825    for ac_exec_ext in '' $ac_executable_extensions; do
38826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38827    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38828       ac_prog_rejected=yes
38829       continue
38830     fi
38831    ac_cv_prog_RC="rc"
38832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38833    break 2
38834  fi
38835done
38836  done
38837IFS=$as_save_IFS
38838
38839if test $ac_prog_rejected = yes; then
38840  # We found a bogon in the path, so make sure we never use it.
38841  set dummy $ac_cv_prog_RC
38842  shift
38843  if test $# != 0; then
38844    # We chose a different compiler from the bogus one.
38845    # However, it has the same basename, so the bogon will be chosen
38846    # first if we set RC to just the basename; use the full file name.
38847    shift
38848    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38849  fi
38850fi
38851fi
38852fi
38853RC=$ac_cv_prog_RC
38854if test -n "$RC"; then
38855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38856$as_echo "$RC" >&6; }
38857else
38858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38859$as_echo "no" >&6; }
38860fi
38861
38862
38863
38864  # Only process if variable expands to non-empty
38865
38866  if test "x$RC" != x; then
38867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868
38869  # First separate the path from the arguments. This will split at the first
38870  # space.
38871  complete="$RC"
38872  path="${complete%% *}"
38873  tmp="$complete EOL"
38874  arguments="${tmp#* }"
38875
38876  # Input might be given as Windows format, start by converting to
38877  # unix format.
38878  new_path=`$CYGPATH -u "$path"`
38879
38880  # Now try to locate executable using which
38881  new_path=`$WHICH "$new_path" 2> /dev/null`
38882  # bat and cmd files are not always considered executable in cygwin causing which
38883  # to not find them
38884  if test "x$new_path" = x \
38885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38887    new_path=`$CYGPATH -u "$path"`
38888  fi
38889  if test "x$new_path" = x; then
38890    # Oops. Which didn't find the executable.
38891    # The splitting of arguments from the executable at a space might have been incorrect,
38892    # since paths with space are more likely in Windows. Give it another try with the whole
38893    # argument.
38894    path="$complete"
38895    arguments="EOL"
38896    new_path=`$CYGPATH -u "$path"`
38897    new_path=`$WHICH "$new_path" 2> /dev/null`
38898    # bat and cmd files are not always considered executable in cygwin causing which
38899    # to not find them
38900    if test "x$new_path" = x \
38901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38903      new_path=`$CYGPATH -u "$path"`
38904    fi
38905    if test "x$new_path" = x; then
38906      # It's still not found. Now this is an unrecoverable error.
38907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38908$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38909      has_space=`$ECHO "$complete" | $GREP " "`
38910      if test "x$has_space" != x; then
38911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38913      fi
38914      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38915    fi
38916  fi
38917
38918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38921  # "foo.exe" is OK but "foo" is an error.
38922  #
38923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38924  # It is also a way to make sure we got the proper file name for the real test later on.
38925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38926  if test "x$test_shortpath" = x; then
38927    # Short path failed, file does not exist as specified.
38928    # Try adding .exe or .cmd
38929    if test -f "${new_path}.exe"; then
38930      input_to_shortpath="${new_path}.exe"
38931    elif test -f "${new_path}.cmd"; then
38932      input_to_shortpath="${new_path}.cmd"
38933    else
38934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38935$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38938      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38939    fi
38940  else
38941    input_to_shortpath="$new_path"
38942  fi
38943
38944  # Call helper function which possibly converts this using DOS-style short mode.
38945  # If so, the updated path is stored in $new_path.
38946  new_path="$input_to_shortpath"
38947
38948  input_path="$input_to_shortpath"
38949  # Check if we need to convert this using DOS-style short mode. If the path
38950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38951  # take no chances and rewrite it.
38952  # Note: m4 eats our [], so we need to use [ and ] instead.
38953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38954  if test "x$has_forbidden_chars" != x; then
38955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38959      # Going to short mode and back again did indeed matter. Since short mode is
38960      # case insensitive, let's make it lowercase to improve readability.
38961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38962      # Now convert it back to Unix-style (cygpath)
38963      input_path=`$CYGPATH -u "$shortmode_path"`
38964      new_path="$input_path"
38965    fi
38966  fi
38967
38968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38969  if test "x$test_cygdrive_prefix" = x; then
38970    # As a simple fix, exclude /usr/bin since it's not a real path.
38971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38973      # a path prefixed by /cygdrive for fixpath to work.
38974      new_path="$CYGWIN_ROOT_PATH$input_path"
38975    fi
38976  fi
38977
38978  # remove trailing .exe if any
38979  new_path="${new_path/%.exe/}"
38980
38981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38982
38983  # First separate the path from the arguments. This will split at the first
38984  # space.
38985  complete="$RC"
38986  path="${complete%% *}"
38987  tmp="$complete EOL"
38988  arguments="${tmp#* }"
38989
38990  # Input might be given as Windows format, start by converting to
38991  # unix format.
38992  new_path="$path"
38993
38994  windows_path="$new_path"
38995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38996    unix_path=`$CYGPATH -u "$windows_path"`
38997    new_path="$unix_path"
38998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39000    new_path="$unix_path"
39001  fi
39002
39003
39004  # Now try to locate executable using which
39005  new_path=`$WHICH "$new_path" 2> /dev/null`
39006
39007  if test "x$new_path" = x; then
39008    # Oops. Which didn't find the executable.
39009    # The splitting of arguments from the executable at a space might have been incorrect,
39010    # since paths with space are more likely in Windows. Give it another try with the whole
39011    # argument.
39012    path="$complete"
39013    arguments="EOL"
39014    new_path="$path"
39015
39016  windows_path="$new_path"
39017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39018    unix_path=`$CYGPATH -u "$windows_path"`
39019    new_path="$unix_path"
39020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39022    new_path="$unix_path"
39023  fi
39024
39025
39026    new_path=`$WHICH "$new_path" 2> /dev/null`
39027    # bat and cmd files are not always considered executable in MSYS causing which
39028    # to not find them
39029    if test "x$new_path" = x \
39030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39032      new_path="$path"
39033
39034  windows_path="$new_path"
39035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39036    unix_path=`$CYGPATH -u "$windows_path"`
39037    new_path="$unix_path"
39038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39040    new_path="$unix_path"
39041  fi
39042
39043    fi
39044
39045    if test "x$new_path" = x; then
39046      # It's still not found. Now this is an unrecoverable error.
39047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39048$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39049      has_space=`$ECHO "$complete" | $GREP " "`
39050      if test "x$has_space" != x; then
39051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39053      fi
39054      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39055    fi
39056  fi
39057
39058  # Now new_path has a complete unix path to the binary
39059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39060    # Keep paths in /bin as-is, but remove trailing .exe if any
39061    new_path="${new_path/%.exe/}"
39062    # Do not save /bin paths to all_fixpath_prefixes!
39063  else
39064    # Not in mixed or Windows style, start by that.
39065    new_path=`cmd //c echo $new_path`
39066
39067  input_path="$new_path"
39068  # Check if we need to convert this using DOS-style short mode. If the path
39069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39070  # take no chances and rewrite it.
39071  # Note: m4 eats our [], so we need to use [ and ] instead.
39072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39073  if test "x$has_forbidden_chars" != x; then
39074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39076  fi
39077
39078    # Output is in $new_path
39079
39080  windows_path="$new_path"
39081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39082    unix_path=`$CYGPATH -u "$windows_path"`
39083    new_path="$unix_path"
39084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39086    new_path="$unix_path"
39087  fi
39088
39089    # remove trailing .exe if any
39090    new_path="${new_path/%.exe/}"
39091
39092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39094  fi
39095
39096    else
39097      # We're on a unix platform. Hooray! :)
39098      # First separate the path from the arguments. This will split at the first
39099      # space.
39100      complete="$RC"
39101      path="${complete%% *}"
39102      tmp="$complete EOL"
39103      arguments="${tmp#* }"
39104
39105      # Cannot rely on the command "which" here since it doesn't always work.
39106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39107      if test -z "$is_absolute_path"; then
39108        # Path to executable is not absolute. Find it.
39109        IFS_save="$IFS"
39110        IFS=:
39111        for p in $PATH; do
39112          if test -f "$p/$path" && test -x "$p/$path"; then
39113            new_path="$p/$path"
39114            break
39115          fi
39116        done
39117        IFS="$IFS_save"
39118      else
39119        # This is an absolute path, we can use it without further modifications.
39120        new_path="$path"
39121      fi
39122
39123      if test "x$new_path" = x; then
39124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39125$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39126        has_space=`$ECHO "$complete" | $GREP " "`
39127        if test "x$has_space" != x; then
39128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39130        fi
39131        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39132      fi
39133    fi
39134
39135    # Now join together the path and the arguments once again
39136    if test "x$arguments" != xEOL; then
39137      new_complete="$new_path ${arguments% *}"
39138    else
39139      new_complete="$new_path"
39140    fi
39141
39142    if test "x$complete" != "x$new_complete"; then
39143      RC="$new_complete"
39144      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39145$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39146    fi
39147  fi
39148
39149    # Extract the first word of "dumpbin", so it can be a program name with args.
39150set dummy dumpbin; ac_word=$2
39151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39152$as_echo_n "checking for $ac_word... " >&6; }
39153if ${ac_cv_prog_DUMPBIN+:} false; then :
39154  $as_echo_n "(cached) " >&6
39155else
39156  if test -n "$DUMPBIN"; then
39157  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39158else
39159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39160for as_dir in $PATH
39161do
39162  IFS=$as_save_IFS
39163  test -z "$as_dir" && as_dir=.
39164    for ac_exec_ext in '' $ac_executable_extensions; do
39165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39166    ac_cv_prog_DUMPBIN="dumpbin"
39167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39168    break 2
39169  fi
39170done
39171  done
39172IFS=$as_save_IFS
39173
39174fi
39175fi
39176DUMPBIN=$ac_cv_prog_DUMPBIN
39177if test -n "$DUMPBIN"; then
39178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39179$as_echo "$DUMPBIN" >&6; }
39180else
39181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39182$as_echo "no" >&6; }
39183fi
39184
39185
39186
39187  # Only process if variable expands to non-empty
39188
39189  if test "x$DUMPBIN" != x; then
39190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39191
39192  # First separate the path from the arguments. This will split at the first
39193  # space.
39194  complete="$DUMPBIN"
39195  path="${complete%% *}"
39196  tmp="$complete EOL"
39197  arguments="${tmp#* }"
39198
39199  # Input might be given as Windows format, start by converting to
39200  # unix format.
39201  new_path=`$CYGPATH -u "$path"`
39202
39203  # Now try to locate executable using which
39204  new_path=`$WHICH "$new_path" 2> /dev/null`
39205  # bat and cmd files are not always considered executable in cygwin causing which
39206  # to not find them
39207  if test "x$new_path" = x \
39208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39210    new_path=`$CYGPATH -u "$path"`
39211  fi
39212  if test "x$new_path" = x; then
39213    # Oops. Which didn't find the executable.
39214    # The splitting of arguments from the executable at a space might have been incorrect,
39215    # since paths with space are more likely in Windows. Give it another try with the whole
39216    # argument.
39217    path="$complete"
39218    arguments="EOL"
39219    new_path=`$CYGPATH -u "$path"`
39220    new_path=`$WHICH "$new_path" 2> /dev/null`
39221    # bat and cmd files are not always considered executable in cygwin causing which
39222    # to not find them
39223    if test "x$new_path" = x \
39224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39226      new_path=`$CYGPATH -u "$path"`
39227    fi
39228    if test "x$new_path" = x; then
39229      # It's still not found. Now this is an unrecoverable error.
39230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39231$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39232      has_space=`$ECHO "$complete" | $GREP " "`
39233      if test "x$has_space" != x; then
39234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39236      fi
39237      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39238    fi
39239  fi
39240
39241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39244  # "foo.exe" is OK but "foo" is an error.
39245  #
39246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39247  # It is also a way to make sure we got the proper file name for the real test later on.
39248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39249  if test "x$test_shortpath" = x; then
39250    # Short path failed, file does not exist as specified.
39251    # Try adding .exe or .cmd
39252    if test -f "${new_path}.exe"; then
39253      input_to_shortpath="${new_path}.exe"
39254    elif test -f "${new_path}.cmd"; then
39255      input_to_shortpath="${new_path}.cmd"
39256    else
39257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39258$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39261      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39262    fi
39263  else
39264    input_to_shortpath="$new_path"
39265  fi
39266
39267  # Call helper function which possibly converts this using DOS-style short mode.
39268  # If so, the updated path is stored in $new_path.
39269  new_path="$input_to_shortpath"
39270
39271  input_path="$input_to_shortpath"
39272  # Check if we need to convert this using DOS-style short mode. If the path
39273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39274  # take no chances and rewrite it.
39275  # Note: m4 eats our [], so we need to use [ and ] instead.
39276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39277  if test "x$has_forbidden_chars" != x; then
39278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39282      # Going to short mode and back again did indeed matter. Since short mode is
39283      # case insensitive, let's make it lowercase to improve readability.
39284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39285      # Now convert it back to Unix-style (cygpath)
39286      input_path=`$CYGPATH -u "$shortmode_path"`
39287      new_path="$input_path"
39288    fi
39289  fi
39290
39291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39292  if test "x$test_cygdrive_prefix" = x; then
39293    # As a simple fix, exclude /usr/bin since it's not a real path.
39294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39296      # a path prefixed by /cygdrive for fixpath to work.
39297      new_path="$CYGWIN_ROOT_PATH$input_path"
39298    fi
39299  fi
39300
39301  # remove trailing .exe if any
39302  new_path="${new_path/%.exe/}"
39303
39304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39305
39306  # First separate the path from the arguments. This will split at the first
39307  # space.
39308  complete="$DUMPBIN"
39309  path="${complete%% *}"
39310  tmp="$complete EOL"
39311  arguments="${tmp#* }"
39312
39313  # Input might be given as Windows format, start by converting to
39314  # unix format.
39315  new_path="$path"
39316
39317  windows_path="$new_path"
39318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39319    unix_path=`$CYGPATH -u "$windows_path"`
39320    new_path="$unix_path"
39321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39323    new_path="$unix_path"
39324  fi
39325
39326
39327  # Now try to locate executable using which
39328  new_path=`$WHICH "$new_path" 2> /dev/null`
39329
39330  if test "x$new_path" = x; then
39331    # Oops. Which didn't find the executable.
39332    # The splitting of arguments from the executable at a space might have been incorrect,
39333    # since paths with space are more likely in Windows. Give it another try with the whole
39334    # argument.
39335    path="$complete"
39336    arguments="EOL"
39337    new_path="$path"
39338
39339  windows_path="$new_path"
39340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39341    unix_path=`$CYGPATH -u "$windows_path"`
39342    new_path="$unix_path"
39343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39345    new_path="$unix_path"
39346  fi
39347
39348
39349    new_path=`$WHICH "$new_path" 2> /dev/null`
39350    # bat and cmd files are not always considered executable in MSYS causing which
39351    # to not find them
39352    if test "x$new_path" = x \
39353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39355      new_path="$path"
39356
39357  windows_path="$new_path"
39358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39359    unix_path=`$CYGPATH -u "$windows_path"`
39360    new_path="$unix_path"
39361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39363    new_path="$unix_path"
39364  fi
39365
39366    fi
39367
39368    if test "x$new_path" = x; then
39369      # It's still not found. Now this is an unrecoverable error.
39370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39371$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39372      has_space=`$ECHO "$complete" | $GREP " "`
39373      if test "x$has_space" != x; then
39374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39376      fi
39377      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39378    fi
39379  fi
39380
39381  # Now new_path has a complete unix path to the binary
39382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39383    # Keep paths in /bin as-is, but remove trailing .exe if any
39384    new_path="${new_path/%.exe/}"
39385    # Do not save /bin paths to all_fixpath_prefixes!
39386  else
39387    # Not in mixed or Windows style, start by that.
39388    new_path=`cmd //c echo $new_path`
39389
39390  input_path="$new_path"
39391  # Check if we need to convert this using DOS-style short mode. If the path
39392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39393  # take no chances and rewrite it.
39394  # Note: m4 eats our [], so we need to use [ and ] instead.
39395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39396  if test "x$has_forbidden_chars" != x; then
39397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39399  fi
39400
39401    # Output is in $new_path
39402
39403  windows_path="$new_path"
39404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39405    unix_path=`$CYGPATH -u "$windows_path"`
39406    new_path="$unix_path"
39407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39409    new_path="$unix_path"
39410  fi
39411
39412    # remove trailing .exe if any
39413    new_path="${new_path/%.exe/}"
39414
39415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39417  fi
39418
39419    else
39420      # We're on a unix platform. Hooray! :)
39421      # First separate the path from the arguments. This will split at the first
39422      # space.
39423      complete="$DUMPBIN"
39424      path="${complete%% *}"
39425      tmp="$complete EOL"
39426      arguments="${tmp#* }"
39427
39428      # Cannot rely on the command "which" here since it doesn't always work.
39429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39430      if test -z "$is_absolute_path"; then
39431        # Path to executable is not absolute. Find it.
39432        IFS_save="$IFS"
39433        IFS=:
39434        for p in $PATH; do
39435          if test -f "$p/$path" && test -x "$p/$path"; then
39436            new_path="$p/$path"
39437            break
39438          fi
39439        done
39440        IFS="$IFS_save"
39441      else
39442        # This is an absolute path, we can use it without further modifications.
39443        new_path="$path"
39444      fi
39445
39446      if test "x$new_path" = x; then
39447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39448$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39449        has_space=`$ECHO "$complete" | $GREP " "`
39450        if test "x$has_space" != x; then
39451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39453        fi
39454        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39455      fi
39456    fi
39457
39458    # Now join together the path and the arguments once again
39459    if test "x$arguments" != xEOL; then
39460      new_complete="$new_path ${arguments% *}"
39461    else
39462      new_complete="$new_path"
39463    fi
39464
39465    if test "x$complete" != "x$new_complete"; then
39466      DUMPBIN="$new_complete"
39467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39468$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39469    fi
39470  fi
39471
39472    # We need to check for 'msbuild.exe' because at the place where we expect to
39473    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39474    # won't find the 'msbuild.exe' executable in that case (and the
39475    # 'ac_executable_extensions' is unusable due to performance reasons).
39476    # Notice that we intentionally don't fix up the path to MSBUILD because we
39477    # will call it in a DOS shell during freetype detection on Windows (see
39478    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39479    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39480set dummy msbuild.exe; ac_word=$2
39481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39482$as_echo_n "checking for $ac_word... " >&6; }
39483if ${ac_cv_prog_MSBUILD+:} false; then :
39484  $as_echo_n "(cached) " >&6
39485else
39486  if test -n "$MSBUILD"; then
39487  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39488else
39489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39490for as_dir in $PATH
39491do
39492  IFS=$as_save_IFS
39493  test -z "$as_dir" && as_dir=.
39494    for ac_exec_ext in '' $ac_executable_extensions; do
39495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39496    ac_cv_prog_MSBUILD="msbuild.exe"
39497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39498    break 2
39499  fi
39500done
39501  done
39502IFS=$as_save_IFS
39503
39504fi
39505fi
39506MSBUILD=$ac_cv_prog_MSBUILD
39507if test -n "$MSBUILD"; then
39508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39509$as_echo "$MSBUILD" >&6; }
39510else
39511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39512$as_echo "no" >&6; }
39513fi
39514
39515
39516  fi
39517
39518  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39519
39520
39521  # Publish this variable in the help.
39522
39523
39524  if [ -z "${STRIP+x}" ]; then
39525    # The variable is not set by user, try to locate tool using the code snippet
39526    for ac_prog in strip
39527do
39528  # Extract the first word of "$ac_prog", so it can be a program name with args.
39529set dummy $ac_prog; ac_word=$2
39530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39531$as_echo_n "checking for $ac_word... " >&6; }
39532if ${ac_cv_path_STRIP+:} false; then :
39533  $as_echo_n "(cached) " >&6
39534else
39535  case $STRIP in
39536  [\\/]* | ?:[\\/]*)
39537  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39538  ;;
39539  *)
39540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39541for as_dir in $PATH
39542do
39543  IFS=$as_save_IFS
39544  test -z "$as_dir" && as_dir=.
39545    for ac_exec_ext in '' $ac_executable_extensions; do
39546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39547    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39549    break 2
39550  fi
39551done
39552  done
39553IFS=$as_save_IFS
39554
39555  ;;
39556esac
39557fi
39558STRIP=$ac_cv_path_STRIP
39559if test -n "$STRIP"; then
39560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39561$as_echo "$STRIP" >&6; }
39562else
39563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39564$as_echo "no" >&6; }
39565fi
39566
39567
39568  test -n "$STRIP" && break
39569done
39570
39571  else
39572    # The variable is set, but is it from the command line or the environment?
39573
39574    # Try to remove the string !STRIP! from our list.
39575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39577      # If it failed, the variable was not from the command line. Ignore it,
39578      # but warn the user (except for BASH, which is always set by the calling BASH).
39579      if test "xSTRIP" != xBASH; then
39580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39581$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39582      fi
39583      # Try to locate tool using the code snippet
39584      for ac_prog in strip
39585do
39586  # Extract the first word of "$ac_prog", so it can be a program name with args.
39587set dummy $ac_prog; ac_word=$2
39588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39589$as_echo_n "checking for $ac_word... " >&6; }
39590if ${ac_cv_path_STRIP+:} false; then :
39591  $as_echo_n "(cached) " >&6
39592else
39593  case $STRIP in
39594  [\\/]* | ?:[\\/]*)
39595  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39596  ;;
39597  *)
39598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39599for as_dir in $PATH
39600do
39601  IFS=$as_save_IFS
39602  test -z "$as_dir" && as_dir=.
39603    for ac_exec_ext in '' $ac_executable_extensions; do
39604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39605    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39607    break 2
39608  fi
39609done
39610  done
39611IFS=$as_save_IFS
39612
39613  ;;
39614esac
39615fi
39616STRIP=$ac_cv_path_STRIP
39617if test -n "$STRIP"; then
39618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39619$as_echo "$STRIP" >&6; }
39620else
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39622$as_echo "no" >&6; }
39623fi
39624
39625
39626  test -n "$STRIP" && break
39627done
39628
39629    else
39630      # If it succeeded, then it was overridden by the user. We will use it
39631      # for the tool.
39632
39633      # First remove it from the list of overridden variables, so we can test
39634      # for unknown variables in the end.
39635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39636
39637      # Check if we try to supply an empty value
39638      if test "x$STRIP" = x; then
39639        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39640$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39642$as_echo_n "checking for STRIP... " >&6; }
39643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39644$as_echo "disabled" >&6; }
39645      else
39646        # Check if the provided tool contains a complete path.
39647        tool_specified="$STRIP"
39648        tool_basename="${tool_specified##*/}"
39649        if test "x$tool_basename" = "x$tool_specified"; then
39650          # A command without a complete path is provided, search $PATH.
39651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39652$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39653          # Extract the first word of "$tool_basename", so it can be a program name with args.
39654set dummy $tool_basename; ac_word=$2
39655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39656$as_echo_n "checking for $ac_word... " >&6; }
39657if ${ac_cv_path_STRIP+:} false; then :
39658  $as_echo_n "(cached) " >&6
39659else
39660  case $STRIP in
39661  [\\/]* | ?:[\\/]*)
39662  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39663  ;;
39664  *)
39665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39666for as_dir in $PATH
39667do
39668  IFS=$as_save_IFS
39669  test -z "$as_dir" && as_dir=.
39670    for ac_exec_ext in '' $ac_executable_extensions; do
39671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39672    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39674    break 2
39675  fi
39676done
39677  done
39678IFS=$as_save_IFS
39679
39680  ;;
39681esac
39682fi
39683STRIP=$ac_cv_path_STRIP
39684if test -n "$STRIP"; then
39685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39686$as_echo "$STRIP" >&6; }
39687else
39688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39689$as_echo "no" >&6; }
39690fi
39691
39692
39693          if test "x$STRIP" = x; then
39694            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39695          fi
39696        else
39697          # Otherwise we believe it is a complete path. Use it as it is.
39698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39699$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39700          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39701$as_echo_n "checking for STRIP... " >&6; }
39702          if test ! -x "$tool_specified"; then
39703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39704$as_echo "not found" >&6; }
39705            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39706          fi
39707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39708$as_echo "$tool_specified" >&6; }
39709        fi
39710      fi
39711    fi
39712
39713  fi
39714
39715
39716
39717  # Only process if variable expands to non-empty
39718
39719  if test "x$STRIP" != x; then
39720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39721
39722  # First separate the path from the arguments. This will split at the first
39723  # space.
39724  complete="$STRIP"
39725  path="${complete%% *}"
39726  tmp="$complete EOL"
39727  arguments="${tmp#* }"
39728
39729  # Input might be given as Windows format, start by converting to
39730  # unix format.
39731  new_path=`$CYGPATH -u "$path"`
39732
39733  # Now try to locate executable using which
39734  new_path=`$WHICH "$new_path" 2> /dev/null`
39735  # bat and cmd files are not always considered executable in cygwin causing which
39736  # to not find them
39737  if test "x$new_path" = x \
39738      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39739      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39740    new_path=`$CYGPATH -u "$path"`
39741  fi
39742  if test "x$new_path" = x; then
39743    # Oops. Which didn't find the executable.
39744    # The splitting of arguments from the executable at a space might have been incorrect,
39745    # since paths with space are more likely in Windows. Give it another try with the whole
39746    # argument.
39747    path="$complete"
39748    arguments="EOL"
39749    new_path=`$CYGPATH -u "$path"`
39750    new_path=`$WHICH "$new_path" 2> /dev/null`
39751    # bat and cmd files are not always considered executable in cygwin causing which
39752    # to not find them
39753    if test "x$new_path" = x \
39754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39756      new_path=`$CYGPATH -u "$path"`
39757    fi
39758    if test "x$new_path" = x; then
39759      # It's still not found. Now this is an unrecoverable error.
39760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39761$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39762      has_space=`$ECHO "$complete" | $GREP " "`
39763      if test "x$has_space" != x; then
39764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39766      fi
39767      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39768    fi
39769  fi
39770
39771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39774  # "foo.exe" is OK but "foo" is an error.
39775  #
39776  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39777  # It is also a way to make sure we got the proper file name for the real test later on.
39778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39779  if test "x$test_shortpath" = x; then
39780    # Short path failed, file does not exist as specified.
39781    # Try adding .exe or .cmd
39782    if test -f "${new_path}.exe"; then
39783      input_to_shortpath="${new_path}.exe"
39784    elif test -f "${new_path}.cmd"; then
39785      input_to_shortpath="${new_path}.cmd"
39786    else
39787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39788$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39789      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39790$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39791      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39792    fi
39793  else
39794    input_to_shortpath="$new_path"
39795  fi
39796
39797  # Call helper function which possibly converts this using DOS-style short mode.
39798  # If so, the updated path is stored in $new_path.
39799  new_path="$input_to_shortpath"
39800
39801  input_path="$input_to_shortpath"
39802  # Check if we need to convert this using DOS-style short mode. If the path
39803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39804  # take no chances and rewrite it.
39805  # Note: m4 eats our [], so we need to use [ and ] instead.
39806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39807  if test "x$has_forbidden_chars" != x; then
39808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39812      # Going to short mode and back again did indeed matter. Since short mode is
39813      # case insensitive, let's make it lowercase to improve readability.
39814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39815      # Now convert it back to Unix-style (cygpath)
39816      input_path=`$CYGPATH -u "$shortmode_path"`
39817      new_path="$input_path"
39818    fi
39819  fi
39820
39821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39822  if test "x$test_cygdrive_prefix" = x; then
39823    # As a simple fix, exclude /usr/bin since it's not a real path.
39824    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39826      # a path prefixed by /cygdrive for fixpath to work.
39827      new_path="$CYGWIN_ROOT_PATH$input_path"
39828    fi
39829  fi
39830
39831  # remove trailing .exe if any
39832  new_path="${new_path/%.exe/}"
39833
39834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39835
39836  # First separate the path from the arguments. This will split at the first
39837  # space.
39838  complete="$STRIP"
39839  path="${complete%% *}"
39840  tmp="$complete EOL"
39841  arguments="${tmp#* }"
39842
39843  # Input might be given as Windows format, start by converting to
39844  # unix format.
39845  new_path="$path"
39846
39847  windows_path="$new_path"
39848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39849    unix_path=`$CYGPATH -u "$windows_path"`
39850    new_path="$unix_path"
39851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39853    new_path="$unix_path"
39854  fi
39855
39856
39857  # Now try to locate executable using which
39858  new_path=`$WHICH "$new_path" 2> /dev/null`
39859
39860  if test "x$new_path" = x; then
39861    # Oops. Which didn't find the executable.
39862    # The splitting of arguments from the executable at a space might have been incorrect,
39863    # since paths with space are more likely in Windows. Give it another try with the whole
39864    # argument.
39865    path="$complete"
39866    arguments="EOL"
39867    new_path="$path"
39868
39869  windows_path="$new_path"
39870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39871    unix_path=`$CYGPATH -u "$windows_path"`
39872    new_path="$unix_path"
39873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39875    new_path="$unix_path"
39876  fi
39877
39878
39879    new_path=`$WHICH "$new_path" 2> /dev/null`
39880    # bat and cmd files are not always considered executable in MSYS causing which
39881    # to not find them
39882    if test "x$new_path" = x \
39883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39885      new_path="$path"
39886
39887  windows_path="$new_path"
39888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39889    unix_path=`$CYGPATH -u "$windows_path"`
39890    new_path="$unix_path"
39891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39893    new_path="$unix_path"
39894  fi
39895
39896    fi
39897
39898    if test "x$new_path" = x; then
39899      # It's still not found. Now this is an unrecoverable error.
39900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39901$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39902      has_space=`$ECHO "$complete" | $GREP " "`
39903      if test "x$has_space" != x; then
39904        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39905$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39906      fi
39907      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39908    fi
39909  fi
39910
39911  # Now new_path has a complete unix path to the binary
39912  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39913    # Keep paths in /bin as-is, but remove trailing .exe if any
39914    new_path="${new_path/%.exe/}"
39915    # Do not save /bin paths to all_fixpath_prefixes!
39916  else
39917    # Not in mixed or Windows style, start by that.
39918    new_path=`cmd //c echo $new_path`
39919
39920  input_path="$new_path"
39921  # Check if we need to convert this using DOS-style short mode. If the path
39922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39923  # take no chances and rewrite it.
39924  # Note: m4 eats our [], so we need to use [ and ] instead.
39925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39926  if test "x$has_forbidden_chars" != x; then
39927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39929  fi
39930
39931    # Output is in $new_path
39932
39933  windows_path="$new_path"
39934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39935    unix_path=`$CYGPATH -u "$windows_path"`
39936    new_path="$unix_path"
39937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39939    new_path="$unix_path"
39940  fi
39941
39942    # remove trailing .exe if any
39943    new_path="${new_path/%.exe/}"
39944
39945    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39946    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39947  fi
39948
39949    else
39950      # We're on a unix platform. Hooray! :)
39951      # First separate the path from the arguments. This will split at the first
39952      # space.
39953      complete="$STRIP"
39954      path="${complete%% *}"
39955      tmp="$complete EOL"
39956      arguments="${tmp#* }"
39957
39958      # Cannot rely on the command "which" here since it doesn't always work.
39959      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39960      if test -z "$is_absolute_path"; then
39961        # Path to executable is not absolute. Find it.
39962        IFS_save="$IFS"
39963        IFS=:
39964        for p in $PATH; do
39965          if test -f "$p/$path" && test -x "$p/$path"; then
39966            new_path="$p/$path"
39967            break
39968          fi
39969        done
39970        IFS="$IFS_save"
39971      else
39972        # This is an absolute path, we can use it without further modifications.
39973        new_path="$path"
39974      fi
39975
39976      if test "x$new_path" = x; then
39977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39978$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39979        has_space=`$ECHO "$complete" | $GREP " "`
39980        if test "x$has_space" != x; then
39981          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39982$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39983        fi
39984        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39985      fi
39986    fi
39987
39988    # Now join together the path and the arguments once again
39989    if test "x$arguments" != xEOL; then
39990      new_complete="$new_path ${arguments% *}"
39991    else
39992      new_complete="$new_path"
39993    fi
39994
39995    if test "x$complete" != "x$new_complete"; then
39996      STRIP="$new_complete"
39997      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39998$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39999    fi
40000  fi
40001
40002
40003
40004  # Publish this variable in the help.
40005
40006
40007  if [ -z "${NM+x}" ]; then
40008    # The variable is not set by user, try to locate tool using the code snippet
40009    for ac_prog in nm
40010do
40011  # Extract the first word of "$ac_prog", so it can be a program name with args.
40012set dummy $ac_prog; ac_word=$2
40013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40014$as_echo_n "checking for $ac_word... " >&6; }
40015if ${ac_cv_path_NM+:} false; then :
40016  $as_echo_n "(cached) " >&6
40017else
40018  case $NM in
40019  [\\/]* | ?:[\\/]*)
40020  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40021  ;;
40022  *)
40023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40024for as_dir in $PATH
40025do
40026  IFS=$as_save_IFS
40027  test -z "$as_dir" && as_dir=.
40028    for ac_exec_ext in '' $ac_executable_extensions; do
40029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40030    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40032    break 2
40033  fi
40034done
40035  done
40036IFS=$as_save_IFS
40037
40038  ;;
40039esac
40040fi
40041NM=$ac_cv_path_NM
40042if test -n "$NM"; then
40043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40044$as_echo "$NM" >&6; }
40045else
40046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40047$as_echo "no" >&6; }
40048fi
40049
40050
40051  test -n "$NM" && break
40052done
40053
40054  else
40055    # The variable is set, but is it from the command line or the environment?
40056
40057    # Try to remove the string !NM! from our list.
40058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40060      # If it failed, the variable was not from the command line. Ignore it,
40061      # but warn the user (except for BASH, which is always set by the calling BASH).
40062      if test "xNM" != xBASH; then
40063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40064$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40065      fi
40066      # Try to locate tool using the code snippet
40067      for ac_prog in nm
40068do
40069  # Extract the first word of "$ac_prog", so it can be a program name with args.
40070set dummy $ac_prog; ac_word=$2
40071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40072$as_echo_n "checking for $ac_word... " >&6; }
40073if ${ac_cv_path_NM+:} false; then :
40074  $as_echo_n "(cached) " >&6
40075else
40076  case $NM in
40077  [\\/]* | ?:[\\/]*)
40078  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40079  ;;
40080  *)
40081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40082for as_dir in $PATH
40083do
40084  IFS=$as_save_IFS
40085  test -z "$as_dir" && as_dir=.
40086    for ac_exec_ext in '' $ac_executable_extensions; do
40087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40088    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40090    break 2
40091  fi
40092done
40093  done
40094IFS=$as_save_IFS
40095
40096  ;;
40097esac
40098fi
40099NM=$ac_cv_path_NM
40100if test -n "$NM"; then
40101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40102$as_echo "$NM" >&6; }
40103else
40104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40105$as_echo "no" >&6; }
40106fi
40107
40108
40109  test -n "$NM" && break
40110done
40111
40112    else
40113      # If it succeeded, then it was overridden by the user. We will use it
40114      # for the tool.
40115
40116      # First remove it from the list of overridden variables, so we can test
40117      # for unknown variables in the end.
40118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40119
40120      # Check if we try to supply an empty value
40121      if test "x$NM" = x; then
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40123$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40125$as_echo_n "checking for NM... " >&6; }
40126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40127$as_echo "disabled" >&6; }
40128      else
40129        # Check if the provided tool contains a complete path.
40130        tool_specified="$NM"
40131        tool_basename="${tool_specified##*/}"
40132        if test "x$tool_basename" = "x$tool_specified"; then
40133          # A command without a complete path is provided, search $PATH.
40134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40135$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40136          # Extract the first word of "$tool_basename", so it can be a program name with args.
40137set dummy $tool_basename; ac_word=$2
40138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40139$as_echo_n "checking for $ac_word... " >&6; }
40140if ${ac_cv_path_NM+:} false; then :
40141  $as_echo_n "(cached) " >&6
40142else
40143  case $NM in
40144  [\\/]* | ?:[\\/]*)
40145  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40146  ;;
40147  *)
40148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40149for as_dir in $PATH
40150do
40151  IFS=$as_save_IFS
40152  test -z "$as_dir" && as_dir=.
40153    for ac_exec_ext in '' $ac_executable_extensions; do
40154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40155    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40157    break 2
40158  fi
40159done
40160  done
40161IFS=$as_save_IFS
40162
40163  ;;
40164esac
40165fi
40166NM=$ac_cv_path_NM
40167if test -n "$NM"; then
40168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40169$as_echo "$NM" >&6; }
40170else
40171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40172$as_echo "no" >&6; }
40173fi
40174
40175
40176          if test "x$NM" = x; then
40177            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40178          fi
40179        else
40180          # Otherwise we believe it is a complete path. Use it as it is.
40181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40182$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40183          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40184$as_echo_n "checking for NM... " >&6; }
40185          if test ! -x "$tool_specified"; then
40186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40187$as_echo "not found" >&6; }
40188            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40189          fi
40190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40191$as_echo "$tool_specified" >&6; }
40192        fi
40193      fi
40194    fi
40195
40196  fi
40197
40198
40199
40200  # Only process if variable expands to non-empty
40201
40202  if test "x$NM" != x; then
40203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40204
40205  # First separate the path from the arguments. This will split at the first
40206  # space.
40207  complete="$NM"
40208  path="${complete%% *}"
40209  tmp="$complete EOL"
40210  arguments="${tmp#* }"
40211
40212  # Input might be given as Windows format, start by converting to
40213  # unix format.
40214  new_path=`$CYGPATH -u "$path"`
40215
40216  # Now try to locate executable using which
40217  new_path=`$WHICH "$new_path" 2> /dev/null`
40218  # bat and cmd files are not always considered executable in cygwin causing which
40219  # to not find them
40220  if test "x$new_path" = x \
40221      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40222      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40223    new_path=`$CYGPATH -u "$path"`
40224  fi
40225  if test "x$new_path" = x; then
40226    # Oops. Which didn't find the executable.
40227    # The splitting of arguments from the executable at a space might have been incorrect,
40228    # since paths with space are more likely in Windows. Give it another try with the whole
40229    # argument.
40230    path="$complete"
40231    arguments="EOL"
40232    new_path=`$CYGPATH -u "$path"`
40233    new_path=`$WHICH "$new_path" 2> /dev/null`
40234    # bat and cmd files are not always considered executable in cygwin causing which
40235    # to not find them
40236    if test "x$new_path" = x \
40237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40239      new_path=`$CYGPATH -u "$path"`
40240    fi
40241    if test "x$new_path" = x; then
40242      # It's still not found. Now this is an unrecoverable error.
40243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40244$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40245      has_space=`$ECHO "$complete" | $GREP " "`
40246      if test "x$has_space" != x; then
40247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40249      fi
40250      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40251    fi
40252  fi
40253
40254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40257  # "foo.exe" is OK but "foo" is an error.
40258  #
40259  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40260  # It is also a way to make sure we got the proper file name for the real test later on.
40261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40262  if test "x$test_shortpath" = x; then
40263    # Short path failed, file does not exist as specified.
40264    # Try adding .exe or .cmd
40265    if test -f "${new_path}.exe"; then
40266      input_to_shortpath="${new_path}.exe"
40267    elif test -f "${new_path}.cmd"; then
40268      input_to_shortpath="${new_path}.cmd"
40269    else
40270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40271$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40274      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40275    fi
40276  else
40277    input_to_shortpath="$new_path"
40278  fi
40279
40280  # Call helper function which possibly converts this using DOS-style short mode.
40281  # If so, the updated path is stored in $new_path.
40282  new_path="$input_to_shortpath"
40283
40284  input_path="$input_to_shortpath"
40285  # Check if we need to convert this using DOS-style short mode. If the path
40286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40287  # take no chances and rewrite it.
40288  # Note: m4 eats our [], so we need to use [ and ] instead.
40289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40290  if test "x$has_forbidden_chars" != x; then
40291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40295      # Going to short mode and back again did indeed matter. Since short mode is
40296      # case insensitive, let's make it lowercase to improve readability.
40297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40298      # Now convert it back to Unix-style (cygpath)
40299      input_path=`$CYGPATH -u "$shortmode_path"`
40300      new_path="$input_path"
40301    fi
40302  fi
40303
40304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40305  if test "x$test_cygdrive_prefix" = x; then
40306    # As a simple fix, exclude /usr/bin since it's not a real path.
40307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40309      # a path prefixed by /cygdrive for fixpath to work.
40310      new_path="$CYGWIN_ROOT_PATH$input_path"
40311    fi
40312  fi
40313
40314  # remove trailing .exe if any
40315  new_path="${new_path/%.exe/}"
40316
40317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40318
40319  # First separate the path from the arguments. This will split at the first
40320  # space.
40321  complete="$NM"
40322  path="${complete%% *}"
40323  tmp="$complete EOL"
40324  arguments="${tmp#* }"
40325
40326  # Input might be given as Windows format, start by converting to
40327  # unix format.
40328  new_path="$path"
40329
40330  windows_path="$new_path"
40331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40332    unix_path=`$CYGPATH -u "$windows_path"`
40333    new_path="$unix_path"
40334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40336    new_path="$unix_path"
40337  fi
40338
40339
40340  # Now try to locate executable using which
40341  new_path=`$WHICH "$new_path" 2> /dev/null`
40342
40343  if test "x$new_path" = x; then
40344    # Oops. Which didn't find the executable.
40345    # The splitting of arguments from the executable at a space might have been incorrect,
40346    # since paths with space are more likely in Windows. Give it another try with the whole
40347    # argument.
40348    path="$complete"
40349    arguments="EOL"
40350    new_path="$path"
40351
40352  windows_path="$new_path"
40353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40354    unix_path=`$CYGPATH -u "$windows_path"`
40355    new_path="$unix_path"
40356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40358    new_path="$unix_path"
40359  fi
40360
40361
40362    new_path=`$WHICH "$new_path" 2> /dev/null`
40363    # bat and cmd files are not always considered executable in MSYS causing which
40364    # to not find them
40365    if test "x$new_path" = x \
40366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40368      new_path="$path"
40369
40370  windows_path="$new_path"
40371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40372    unix_path=`$CYGPATH -u "$windows_path"`
40373    new_path="$unix_path"
40374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40376    new_path="$unix_path"
40377  fi
40378
40379    fi
40380
40381    if test "x$new_path" = x; then
40382      # It's still not found. Now this is an unrecoverable error.
40383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40384$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40385      has_space=`$ECHO "$complete" | $GREP " "`
40386      if test "x$has_space" != x; then
40387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40389      fi
40390      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40391    fi
40392  fi
40393
40394  # Now new_path has a complete unix path to the binary
40395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40396    # Keep paths in /bin as-is, but remove trailing .exe if any
40397    new_path="${new_path/%.exe/}"
40398    # Do not save /bin paths to all_fixpath_prefixes!
40399  else
40400    # Not in mixed or Windows style, start by that.
40401    new_path=`cmd //c echo $new_path`
40402
40403  input_path="$new_path"
40404  # Check if we need to convert this using DOS-style short mode. If the path
40405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40406  # take no chances and rewrite it.
40407  # Note: m4 eats our [], so we need to use [ and ] instead.
40408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40409  if test "x$has_forbidden_chars" != x; then
40410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40412  fi
40413
40414    # Output is in $new_path
40415
40416  windows_path="$new_path"
40417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40418    unix_path=`$CYGPATH -u "$windows_path"`
40419    new_path="$unix_path"
40420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40422    new_path="$unix_path"
40423  fi
40424
40425    # remove trailing .exe if any
40426    new_path="${new_path/%.exe/}"
40427
40428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40430  fi
40431
40432    else
40433      # We're on a unix platform. Hooray! :)
40434      # First separate the path from the arguments. This will split at the first
40435      # space.
40436      complete="$NM"
40437      path="${complete%% *}"
40438      tmp="$complete EOL"
40439      arguments="${tmp#* }"
40440
40441      # Cannot rely on the command "which" here since it doesn't always work.
40442      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40443      if test -z "$is_absolute_path"; then
40444        # Path to executable is not absolute. Find it.
40445        IFS_save="$IFS"
40446        IFS=:
40447        for p in $PATH; do
40448          if test -f "$p/$path" && test -x "$p/$path"; then
40449            new_path="$p/$path"
40450            break
40451          fi
40452        done
40453        IFS="$IFS_save"
40454      else
40455        # This is an absolute path, we can use it without further modifications.
40456        new_path="$path"
40457      fi
40458
40459      if test "x$new_path" = x; then
40460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40461$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40462        has_space=`$ECHO "$complete" | $GREP " "`
40463        if test "x$has_space" != x; then
40464          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40466        fi
40467        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40468      fi
40469    fi
40470
40471    # Now join together the path and the arguments once again
40472    if test "x$arguments" != xEOL; then
40473      new_complete="$new_path ${arguments% *}"
40474    else
40475      new_complete="$new_path"
40476    fi
40477
40478    if test "x$complete" != "x$new_complete"; then
40479      NM="$new_complete"
40480      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40481$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40482    fi
40483  fi
40484
40485
40486
40487  # Publish this variable in the help.
40488
40489
40490  if [ -z "${GNM+x}" ]; then
40491    # The variable is not set by user, try to locate tool using the code snippet
40492    for ac_prog in gnm
40493do
40494  # Extract the first word of "$ac_prog", so it can be a program name with args.
40495set dummy $ac_prog; ac_word=$2
40496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40497$as_echo_n "checking for $ac_word... " >&6; }
40498if ${ac_cv_path_GNM+:} false; then :
40499  $as_echo_n "(cached) " >&6
40500else
40501  case $GNM in
40502  [\\/]* | ?:[\\/]*)
40503  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40504  ;;
40505  *)
40506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40507for as_dir in $PATH
40508do
40509  IFS=$as_save_IFS
40510  test -z "$as_dir" && as_dir=.
40511    for ac_exec_ext in '' $ac_executable_extensions; do
40512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40513    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40515    break 2
40516  fi
40517done
40518  done
40519IFS=$as_save_IFS
40520
40521  ;;
40522esac
40523fi
40524GNM=$ac_cv_path_GNM
40525if test -n "$GNM"; then
40526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40527$as_echo "$GNM" >&6; }
40528else
40529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40530$as_echo "no" >&6; }
40531fi
40532
40533
40534  test -n "$GNM" && break
40535done
40536
40537  else
40538    # The variable is set, but is it from the command line or the environment?
40539
40540    # Try to remove the string !GNM! from our list.
40541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40543      # If it failed, the variable was not from the command line. Ignore it,
40544      # but warn the user (except for BASH, which is always set by the calling BASH).
40545      if test "xGNM" != xBASH; then
40546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40547$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40548      fi
40549      # Try to locate tool using the code snippet
40550      for ac_prog in gnm
40551do
40552  # Extract the first word of "$ac_prog", so it can be a program name with args.
40553set dummy $ac_prog; ac_word=$2
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40555$as_echo_n "checking for $ac_word... " >&6; }
40556if ${ac_cv_path_GNM+:} false; then :
40557  $as_echo_n "(cached) " >&6
40558else
40559  case $GNM in
40560  [\\/]* | ?:[\\/]*)
40561  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40562  ;;
40563  *)
40564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40565for as_dir in $PATH
40566do
40567  IFS=$as_save_IFS
40568  test -z "$as_dir" && as_dir=.
40569    for ac_exec_ext in '' $ac_executable_extensions; do
40570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40571    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40573    break 2
40574  fi
40575done
40576  done
40577IFS=$as_save_IFS
40578
40579  ;;
40580esac
40581fi
40582GNM=$ac_cv_path_GNM
40583if test -n "$GNM"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40585$as_echo "$GNM" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592  test -n "$GNM" && break
40593done
40594
40595    else
40596      # If it succeeded, then it was overridden by the user. We will use it
40597      # for the tool.
40598
40599      # First remove it from the list of overridden variables, so we can test
40600      # for unknown variables in the end.
40601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40602
40603      # Check if we try to supply an empty value
40604      if test "x$GNM" = x; then
40605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40606$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40608$as_echo_n "checking for GNM... " >&6; }
40609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40610$as_echo "disabled" >&6; }
40611      else
40612        # Check if the provided tool contains a complete path.
40613        tool_specified="$GNM"
40614        tool_basename="${tool_specified##*/}"
40615        if test "x$tool_basename" = "x$tool_specified"; then
40616          # A command without a complete path is provided, search $PATH.
40617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40618$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40619          # Extract the first word of "$tool_basename", so it can be a program name with args.
40620set dummy $tool_basename; ac_word=$2
40621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40622$as_echo_n "checking for $ac_word... " >&6; }
40623if ${ac_cv_path_GNM+:} false; then :
40624  $as_echo_n "(cached) " >&6
40625else
40626  case $GNM in
40627  [\\/]* | ?:[\\/]*)
40628  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40629  ;;
40630  *)
40631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40632for as_dir in $PATH
40633do
40634  IFS=$as_save_IFS
40635  test -z "$as_dir" && as_dir=.
40636    for ac_exec_ext in '' $ac_executable_extensions; do
40637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40638    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40640    break 2
40641  fi
40642done
40643  done
40644IFS=$as_save_IFS
40645
40646  ;;
40647esac
40648fi
40649GNM=$ac_cv_path_GNM
40650if test -n "$GNM"; then
40651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40652$as_echo "$GNM" >&6; }
40653else
40654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40655$as_echo "no" >&6; }
40656fi
40657
40658
40659          if test "x$GNM" = x; then
40660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40661          fi
40662        else
40663          # Otherwise we believe it is a complete path. Use it as it is.
40664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40665$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40667$as_echo_n "checking for GNM... " >&6; }
40668          if test ! -x "$tool_specified"; then
40669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40670$as_echo "not found" >&6; }
40671            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40672          fi
40673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40674$as_echo "$tool_specified" >&6; }
40675        fi
40676      fi
40677    fi
40678
40679  fi
40680
40681
40682
40683  # Only process if variable expands to non-empty
40684
40685  if test "x$GNM" != x; then
40686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40687
40688  # First separate the path from the arguments. This will split at the first
40689  # space.
40690  complete="$GNM"
40691  path="${complete%% *}"
40692  tmp="$complete EOL"
40693  arguments="${tmp#* }"
40694
40695  # Input might be given as Windows format, start by converting to
40696  # unix format.
40697  new_path=`$CYGPATH -u "$path"`
40698
40699  # Now try to locate executable using which
40700  new_path=`$WHICH "$new_path" 2> /dev/null`
40701  # bat and cmd files are not always considered executable in cygwin causing which
40702  # to not find them
40703  if test "x$new_path" = x \
40704      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40705      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40706    new_path=`$CYGPATH -u "$path"`
40707  fi
40708  if test "x$new_path" = x; then
40709    # Oops. Which didn't find the executable.
40710    # The splitting of arguments from the executable at a space might have been incorrect,
40711    # since paths with space are more likely in Windows. Give it another try with the whole
40712    # argument.
40713    path="$complete"
40714    arguments="EOL"
40715    new_path=`$CYGPATH -u "$path"`
40716    new_path=`$WHICH "$new_path" 2> /dev/null`
40717    # bat and cmd files are not always considered executable in cygwin causing which
40718    # to not find them
40719    if test "x$new_path" = x \
40720        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40721        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40722      new_path=`$CYGPATH -u "$path"`
40723    fi
40724    if test "x$new_path" = x; then
40725      # It's still not found. Now this is an unrecoverable error.
40726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40727$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40728      has_space=`$ECHO "$complete" | $GREP " "`
40729      if test "x$has_space" != x; then
40730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40732      fi
40733      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40734    fi
40735  fi
40736
40737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40740  # "foo.exe" is OK but "foo" is an error.
40741  #
40742  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40743  # It is also a way to make sure we got the proper file name for the real test later on.
40744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40745  if test "x$test_shortpath" = x; then
40746    # Short path failed, file does not exist as specified.
40747    # Try adding .exe or .cmd
40748    if test -f "${new_path}.exe"; then
40749      input_to_shortpath="${new_path}.exe"
40750    elif test -f "${new_path}.cmd"; then
40751      input_to_shortpath="${new_path}.cmd"
40752    else
40753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40754$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40755      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40756$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40757      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40758    fi
40759  else
40760    input_to_shortpath="$new_path"
40761  fi
40762
40763  # Call helper function which possibly converts this using DOS-style short mode.
40764  # If so, the updated path is stored in $new_path.
40765  new_path="$input_to_shortpath"
40766
40767  input_path="$input_to_shortpath"
40768  # Check if we need to convert this using DOS-style short mode. If the path
40769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40770  # take no chances and rewrite it.
40771  # Note: m4 eats our [], so we need to use [ and ] instead.
40772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40773  if test "x$has_forbidden_chars" != x; then
40774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40778      # Going to short mode and back again did indeed matter. Since short mode is
40779      # case insensitive, let's make it lowercase to improve readability.
40780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40781      # Now convert it back to Unix-style (cygpath)
40782      input_path=`$CYGPATH -u "$shortmode_path"`
40783      new_path="$input_path"
40784    fi
40785  fi
40786
40787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40788  if test "x$test_cygdrive_prefix" = x; then
40789    # As a simple fix, exclude /usr/bin since it's not a real path.
40790    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40792      # a path prefixed by /cygdrive for fixpath to work.
40793      new_path="$CYGWIN_ROOT_PATH$input_path"
40794    fi
40795  fi
40796
40797  # remove trailing .exe if any
40798  new_path="${new_path/%.exe/}"
40799
40800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40801
40802  # First separate the path from the arguments. This will split at the first
40803  # space.
40804  complete="$GNM"
40805  path="${complete%% *}"
40806  tmp="$complete EOL"
40807  arguments="${tmp#* }"
40808
40809  # Input might be given as Windows format, start by converting to
40810  # unix format.
40811  new_path="$path"
40812
40813  windows_path="$new_path"
40814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40815    unix_path=`$CYGPATH -u "$windows_path"`
40816    new_path="$unix_path"
40817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40819    new_path="$unix_path"
40820  fi
40821
40822
40823  # Now try to locate executable using which
40824  new_path=`$WHICH "$new_path" 2> /dev/null`
40825
40826  if test "x$new_path" = x; then
40827    # Oops. Which didn't find the executable.
40828    # The splitting of arguments from the executable at a space might have been incorrect,
40829    # since paths with space are more likely in Windows. Give it another try with the whole
40830    # argument.
40831    path="$complete"
40832    arguments="EOL"
40833    new_path="$path"
40834
40835  windows_path="$new_path"
40836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40837    unix_path=`$CYGPATH -u "$windows_path"`
40838    new_path="$unix_path"
40839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40841    new_path="$unix_path"
40842  fi
40843
40844
40845    new_path=`$WHICH "$new_path" 2> /dev/null`
40846    # bat and cmd files are not always considered executable in MSYS causing which
40847    # to not find them
40848    if test "x$new_path" = x \
40849        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40850        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40851      new_path="$path"
40852
40853  windows_path="$new_path"
40854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40855    unix_path=`$CYGPATH -u "$windows_path"`
40856    new_path="$unix_path"
40857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40859    new_path="$unix_path"
40860  fi
40861
40862    fi
40863
40864    if test "x$new_path" = x; then
40865      # It's still not found. Now this is an unrecoverable error.
40866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40867$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40868      has_space=`$ECHO "$complete" | $GREP " "`
40869      if test "x$has_space" != x; then
40870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40872      fi
40873      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40874    fi
40875  fi
40876
40877  # Now new_path has a complete unix path to the binary
40878  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40879    # Keep paths in /bin as-is, but remove trailing .exe if any
40880    new_path="${new_path/%.exe/}"
40881    # Do not save /bin paths to all_fixpath_prefixes!
40882  else
40883    # Not in mixed or Windows style, start by that.
40884    new_path=`cmd //c echo $new_path`
40885
40886  input_path="$new_path"
40887  # Check if we need to convert this using DOS-style short mode. If the path
40888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40889  # take no chances and rewrite it.
40890  # Note: m4 eats our [], so we need to use [ and ] instead.
40891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40892  if test "x$has_forbidden_chars" != x; then
40893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40895  fi
40896
40897    # Output is in $new_path
40898
40899  windows_path="$new_path"
40900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40901    unix_path=`$CYGPATH -u "$windows_path"`
40902    new_path="$unix_path"
40903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40905    new_path="$unix_path"
40906  fi
40907
40908    # remove trailing .exe if any
40909    new_path="${new_path/%.exe/}"
40910
40911    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40912    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40913  fi
40914
40915    else
40916      # We're on a unix platform. Hooray! :)
40917      # First separate the path from the arguments. This will split at the first
40918      # space.
40919      complete="$GNM"
40920      path="${complete%% *}"
40921      tmp="$complete EOL"
40922      arguments="${tmp#* }"
40923
40924      # Cannot rely on the command "which" here since it doesn't always work.
40925      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40926      if test -z "$is_absolute_path"; then
40927        # Path to executable is not absolute. Find it.
40928        IFS_save="$IFS"
40929        IFS=:
40930        for p in $PATH; do
40931          if test -f "$p/$path" && test -x "$p/$path"; then
40932            new_path="$p/$path"
40933            break
40934          fi
40935        done
40936        IFS="$IFS_save"
40937      else
40938        # This is an absolute path, we can use it without further modifications.
40939        new_path="$path"
40940      fi
40941
40942      if test "x$new_path" = x; then
40943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40944$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40945        has_space=`$ECHO "$complete" | $GREP " "`
40946        if test "x$has_space" != x; then
40947          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40948$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40949        fi
40950        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40951      fi
40952    fi
40953
40954    # Now join together the path and the arguments once again
40955    if test "x$arguments" != xEOL; then
40956      new_complete="$new_path ${arguments% *}"
40957    else
40958      new_complete="$new_path"
40959    fi
40960
40961    if test "x$complete" != "x$new_complete"; then
40962      GNM="$new_complete"
40963      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40964$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40965    fi
40966  fi
40967
40968  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40969    # FIXME: we should unify this with the solaris case above.
40970
40971
40972  # Publish this variable in the help.
40973
40974
40975  if [ -z "${STRIP+x}" ]; then
40976    # The variable is not set by user, try to locate tool using the code snippet
40977    if test -n "$ac_tool_prefix"; then
40978  for ac_prog in strip
40979  do
40980    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40981set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40983$as_echo_n "checking for $ac_word... " >&6; }
40984if ${ac_cv_prog_STRIP+:} false; then :
40985  $as_echo_n "(cached) " >&6
40986else
40987  if test -n "$STRIP"; then
40988  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40989else
40990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40991for as_dir in $PATH
40992do
40993  IFS=$as_save_IFS
40994  test -z "$as_dir" && as_dir=.
40995    for ac_exec_ext in '' $ac_executable_extensions; do
40996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40997    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40999    break 2
41000  fi
41001done
41002  done
41003IFS=$as_save_IFS
41004
41005fi
41006fi
41007STRIP=$ac_cv_prog_STRIP
41008if test -n "$STRIP"; then
41009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41010$as_echo "$STRIP" >&6; }
41011else
41012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41013$as_echo "no" >&6; }
41014fi
41015
41016
41017    test -n "$STRIP" && break
41018  done
41019fi
41020if test -z "$STRIP"; then
41021  ac_ct_STRIP=$STRIP
41022  for ac_prog in strip
41023do
41024  # Extract the first word of "$ac_prog", so it can be a program name with args.
41025set dummy $ac_prog; ac_word=$2
41026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41027$as_echo_n "checking for $ac_word... " >&6; }
41028if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41029  $as_echo_n "(cached) " >&6
41030else
41031  if test -n "$ac_ct_STRIP"; then
41032  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41033else
41034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41035for as_dir in $PATH
41036do
41037  IFS=$as_save_IFS
41038  test -z "$as_dir" && as_dir=.
41039    for ac_exec_ext in '' $ac_executable_extensions; do
41040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41041    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41043    break 2
41044  fi
41045done
41046  done
41047IFS=$as_save_IFS
41048
41049fi
41050fi
41051ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41052if test -n "$ac_ct_STRIP"; then
41053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41054$as_echo "$ac_ct_STRIP" >&6; }
41055else
41056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41057$as_echo "no" >&6; }
41058fi
41059
41060
41061  test -n "$ac_ct_STRIP" && break
41062done
41063
41064  if test "x$ac_ct_STRIP" = x; then
41065    STRIP=""
41066  else
41067    case $cross_compiling:$ac_tool_warned in
41068yes:)
41069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41071ac_tool_warned=yes ;;
41072esac
41073    STRIP=$ac_ct_STRIP
41074  fi
41075fi
41076
41077  else
41078    # The variable is set, but is it from the command line or the environment?
41079
41080    # Try to remove the string !STRIP! from our list.
41081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41083      # If it failed, the variable was not from the command line. Ignore it,
41084      # but warn the user (except for BASH, which is always set by the calling BASH).
41085      if test "xSTRIP" != xBASH; then
41086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41087$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41088      fi
41089      # Try to locate tool using the code snippet
41090      if test -n "$ac_tool_prefix"; then
41091  for ac_prog in strip
41092  do
41093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41096$as_echo_n "checking for $ac_word... " >&6; }
41097if ${ac_cv_prog_STRIP+:} false; then :
41098  $as_echo_n "(cached) " >&6
41099else
41100  if test -n "$STRIP"; then
41101  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41102else
41103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41104for as_dir in $PATH
41105do
41106  IFS=$as_save_IFS
41107  test -z "$as_dir" && as_dir=.
41108    for ac_exec_ext in '' $ac_executable_extensions; do
41109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41110    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41112    break 2
41113  fi
41114done
41115  done
41116IFS=$as_save_IFS
41117
41118fi
41119fi
41120STRIP=$ac_cv_prog_STRIP
41121if test -n "$STRIP"; then
41122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41123$as_echo "$STRIP" >&6; }
41124else
41125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41126$as_echo "no" >&6; }
41127fi
41128
41129
41130    test -n "$STRIP" && break
41131  done
41132fi
41133if test -z "$STRIP"; then
41134  ac_ct_STRIP=$STRIP
41135  for ac_prog in strip
41136do
41137  # Extract the first word of "$ac_prog", so it can be a program name with args.
41138set dummy $ac_prog; ac_word=$2
41139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41140$as_echo_n "checking for $ac_word... " >&6; }
41141if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41142  $as_echo_n "(cached) " >&6
41143else
41144  if test -n "$ac_ct_STRIP"; then
41145  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41146else
41147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41148for as_dir in $PATH
41149do
41150  IFS=$as_save_IFS
41151  test -z "$as_dir" && as_dir=.
41152    for ac_exec_ext in '' $ac_executable_extensions; do
41153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41154    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41156    break 2
41157  fi
41158done
41159  done
41160IFS=$as_save_IFS
41161
41162fi
41163fi
41164ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41165if test -n "$ac_ct_STRIP"; then
41166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41167$as_echo "$ac_ct_STRIP" >&6; }
41168else
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41170$as_echo "no" >&6; }
41171fi
41172
41173
41174  test -n "$ac_ct_STRIP" && break
41175done
41176
41177  if test "x$ac_ct_STRIP" = x; then
41178    STRIP=""
41179  else
41180    case $cross_compiling:$ac_tool_warned in
41181yes:)
41182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41184ac_tool_warned=yes ;;
41185esac
41186    STRIP=$ac_ct_STRIP
41187  fi
41188fi
41189
41190    else
41191      # If it succeeded, then it was overridden by the user. We will use it
41192      # for the tool.
41193
41194      # First remove it from the list of overridden variables, so we can test
41195      # for unknown variables in the end.
41196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41197
41198      # Check if we try to supply an empty value
41199      if test "x$STRIP" = x; then
41200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41201$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41203$as_echo_n "checking for STRIP... " >&6; }
41204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41205$as_echo "disabled" >&6; }
41206      else
41207        # Check if the provided tool contains a complete path.
41208        tool_specified="$STRIP"
41209        tool_basename="${tool_specified##*/}"
41210        if test "x$tool_basename" = "x$tool_specified"; then
41211          # A command without a complete path is provided, search $PATH.
41212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41213$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41214          # Extract the first word of "$tool_basename", so it can be a program name with args.
41215set dummy $tool_basename; ac_word=$2
41216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41217$as_echo_n "checking for $ac_word... " >&6; }
41218if ${ac_cv_path_STRIP+:} false; then :
41219  $as_echo_n "(cached) " >&6
41220else
41221  case $STRIP in
41222  [\\/]* | ?:[\\/]*)
41223  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41224  ;;
41225  *)
41226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41227for as_dir in $PATH
41228do
41229  IFS=$as_save_IFS
41230  test -z "$as_dir" && as_dir=.
41231    for ac_exec_ext in '' $ac_executable_extensions; do
41232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41233    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41235    break 2
41236  fi
41237done
41238  done
41239IFS=$as_save_IFS
41240
41241  ;;
41242esac
41243fi
41244STRIP=$ac_cv_path_STRIP
41245if test -n "$STRIP"; then
41246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41247$as_echo "$STRIP" >&6; }
41248else
41249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41250$as_echo "no" >&6; }
41251fi
41252
41253
41254          if test "x$STRIP" = x; then
41255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41256          fi
41257        else
41258          # Otherwise we believe it is a complete path. Use it as it is.
41259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41260$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41262$as_echo_n "checking for STRIP... " >&6; }
41263          if test ! -x "$tool_specified"; then
41264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41265$as_echo "not found" >&6; }
41266            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41267          fi
41268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41269$as_echo "$tool_specified" >&6; }
41270        fi
41271      fi
41272    fi
41273
41274  fi
41275
41276
41277
41278  # Only process if variable expands to non-empty
41279
41280  if test "x$STRIP" != x; then
41281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41282
41283  # First separate the path from the arguments. This will split at the first
41284  # space.
41285  complete="$STRIP"
41286  path="${complete%% *}"
41287  tmp="$complete EOL"
41288  arguments="${tmp#* }"
41289
41290  # Input might be given as Windows format, start by converting to
41291  # unix format.
41292  new_path=`$CYGPATH -u "$path"`
41293
41294  # Now try to locate executable using which
41295  new_path=`$WHICH "$new_path" 2> /dev/null`
41296  # bat and cmd files are not always considered executable in cygwin causing which
41297  # to not find them
41298  if test "x$new_path" = x \
41299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41301    new_path=`$CYGPATH -u "$path"`
41302  fi
41303  if test "x$new_path" = x; then
41304    # Oops. Which didn't find the executable.
41305    # The splitting of arguments from the executable at a space might have been incorrect,
41306    # since paths with space are more likely in Windows. Give it another try with the whole
41307    # argument.
41308    path="$complete"
41309    arguments="EOL"
41310    new_path=`$CYGPATH -u "$path"`
41311    new_path=`$WHICH "$new_path" 2> /dev/null`
41312    # bat and cmd files are not always considered executable in cygwin causing which
41313    # to not find them
41314    if test "x$new_path" = x \
41315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41317      new_path=`$CYGPATH -u "$path"`
41318    fi
41319    if test "x$new_path" = x; then
41320      # It's still not found. Now this is an unrecoverable error.
41321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41322$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41323      has_space=`$ECHO "$complete" | $GREP " "`
41324      if test "x$has_space" != x; then
41325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41327      fi
41328      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41329    fi
41330  fi
41331
41332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41335  # "foo.exe" is OK but "foo" is an error.
41336  #
41337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41338  # It is also a way to make sure we got the proper file name for the real test later on.
41339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41340  if test "x$test_shortpath" = x; then
41341    # Short path failed, file does not exist as specified.
41342    # Try adding .exe or .cmd
41343    if test -f "${new_path}.exe"; then
41344      input_to_shortpath="${new_path}.exe"
41345    elif test -f "${new_path}.cmd"; then
41346      input_to_shortpath="${new_path}.cmd"
41347    else
41348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41349$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41352      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41353    fi
41354  else
41355    input_to_shortpath="$new_path"
41356  fi
41357
41358  # Call helper function which possibly converts this using DOS-style short mode.
41359  # If so, the updated path is stored in $new_path.
41360  new_path="$input_to_shortpath"
41361
41362  input_path="$input_to_shortpath"
41363  # Check if we need to convert this using DOS-style short mode. If the path
41364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41365  # take no chances and rewrite it.
41366  # Note: m4 eats our [], so we need to use [ and ] instead.
41367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41368  if test "x$has_forbidden_chars" != x; then
41369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41373      # Going to short mode and back again did indeed matter. Since short mode is
41374      # case insensitive, let's make it lowercase to improve readability.
41375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41376      # Now convert it back to Unix-style (cygpath)
41377      input_path=`$CYGPATH -u "$shortmode_path"`
41378      new_path="$input_path"
41379    fi
41380  fi
41381
41382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41383  if test "x$test_cygdrive_prefix" = x; then
41384    # As a simple fix, exclude /usr/bin since it's not a real path.
41385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41387      # a path prefixed by /cygdrive for fixpath to work.
41388      new_path="$CYGWIN_ROOT_PATH$input_path"
41389    fi
41390  fi
41391
41392  # remove trailing .exe if any
41393  new_path="${new_path/%.exe/}"
41394
41395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41396
41397  # First separate the path from the arguments. This will split at the first
41398  # space.
41399  complete="$STRIP"
41400  path="${complete%% *}"
41401  tmp="$complete EOL"
41402  arguments="${tmp#* }"
41403
41404  # Input might be given as Windows format, start by converting to
41405  # unix format.
41406  new_path="$path"
41407
41408  windows_path="$new_path"
41409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41410    unix_path=`$CYGPATH -u "$windows_path"`
41411    new_path="$unix_path"
41412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41414    new_path="$unix_path"
41415  fi
41416
41417
41418  # Now try to locate executable using which
41419  new_path=`$WHICH "$new_path" 2> /dev/null`
41420
41421  if test "x$new_path" = x; then
41422    # Oops. Which didn't find the executable.
41423    # The splitting of arguments from the executable at a space might have been incorrect,
41424    # since paths with space are more likely in Windows. Give it another try with the whole
41425    # argument.
41426    path="$complete"
41427    arguments="EOL"
41428    new_path="$path"
41429
41430  windows_path="$new_path"
41431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41432    unix_path=`$CYGPATH -u "$windows_path"`
41433    new_path="$unix_path"
41434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41436    new_path="$unix_path"
41437  fi
41438
41439
41440    new_path=`$WHICH "$new_path" 2> /dev/null`
41441    # bat and cmd files are not always considered executable in MSYS causing which
41442    # to not find them
41443    if test "x$new_path" = x \
41444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41446      new_path="$path"
41447
41448  windows_path="$new_path"
41449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41450    unix_path=`$CYGPATH -u "$windows_path"`
41451    new_path="$unix_path"
41452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41454    new_path="$unix_path"
41455  fi
41456
41457    fi
41458
41459    if test "x$new_path" = x; then
41460      # It's still not found. Now this is an unrecoverable error.
41461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41462$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41463      has_space=`$ECHO "$complete" | $GREP " "`
41464      if test "x$has_space" != x; then
41465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41467      fi
41468      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41469    fi
41470  fi
41471
41472  # Now new_path has a complete unix path to the binary
41473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41474    # Keep paths in /bin as-is, but remove trailing .exe if any
41475    new_path="${new_path/%.exe/}"
41476    # Do not save /bin paths to all_fixpath_prefixes!
41477  else
41478    # Not in mixed or Windows style, start by that.
41479    new_path=`cmd //c echo $new_path`
41480
41481  input_path="$new_path"
41482  # Check if we need to convert this using DOS-style short mode. If the path
41483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41484  # take no chances and rewrite it.
41485  # Note: m4 eats our [], so we need to use [ and ] instead.
41486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41487  if test "x$has_forbidden_chars" != x; then
41488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41490  fi
41491
41492    # Output is in $new_path
41493
41494  windows_path="$new_path"
41495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41496    unix_path=`$CYGPATH -u "$windows_path"`
41497    new_path="$unix_path"
41498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41500    new_path="$unix_path"
41501  fi
41502
41503    # remove trailing .exe if any
41504    new_path="${new_path/%.exe/}"
41505
41506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41508  fi
41509
41510    else
41511      # We're on a unix platform. Hooray! :)
41512      # First separate the path from the arguments. This will split at the first
41513      # space.
41514      complete="$STRIP"
41515      path="${complete%% *}"
41516      tmp="$complete EOL"
41517      arguments="${tmp#* }"
41518
41519      # Cannot rely on the command "which" here since it doesn't always work.
41520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41521      if test -z "$is_absolute_path"; then
41522        # Path to executable is not absolute. Find it.
41523        IFS_save="$IFS"
41524        IFS=:
41525        for p in $PATH; do
41526          if test -f "$p/$path" && test -x "$p/$path"; then
41527            new_path="$p/$path"
41528            break
41529          fi
41530        done
41531        IFS="$IFS_save"
41532      else
41533        # This is an absolute path, we can use it without further modifications.
41534        new_path="$path"
41535      fi
41536
41537      if test "x$new_path" = x; then
41538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41539$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41540        has_space=`$ECHO "$complete" | $GREP " "`
41541        if test "x$has_space" != x; then
41542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41544        fi
41545        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41546      fi
41547    fi
41548
41549    # Now join together the path and the arguments once again
41550    if test "x$arguments" != xEOL; then
41551      new_complete="$new_path ${arguments% *}"
41552    else
41553      new_complete="$new_path"
41554    fi
41555
41556    if test "x$complete" != "x$new_complete"; then
41557      STRIP="$new_complete"
41558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41559$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41560    fi
41561  fi
41562
41563    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41564
41565
41566  # Publish this variable in the help.
41567
41568
41569  if [ -z "${NM+x}" ]; then
41570    # The variable is not set by user, try to locate tool using the code snippet
41571    if test -n "$ac_tool_prefix"; then
41572  for ac_prog in nm gcc-nm
41573  do
41574    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41577$as_echo_n "checking for $ac_word... " >&6; }
41578if ${ac_cv_prog_NM+:} false; then :
41579  $as_echo_n "(cached) " >&6
41580else
41581  if test -n "$NM"; then
41582  ac_cv_prog_NM="$NM" # Let the user override the test.
41583else
41584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41585for as_dir in $PATH
41586do
41587  IFS=$as_save_IFS
41588  test -z "$as_dir" && as_dir=.
41589    for ac_exec_ext in '' $ac_executable_extensions; do
41590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41591    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41593    break 2
41594  fi
41595done
41596  done
41597IFS=$as_save_IFS
41598
41599fi
41600fi
41601NM=$ac_cv_prog_NM
41602if test -n "$NM"; then
41603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41604$as_echo "$NM" >&6; }
41605else
41606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41607$as_echo "no" >&6; }
41608fi
41609
41610
41611    test -n "$NM" && break
41612  done
41613fi
41614if test -z "$NM"; then
41615  ac_ct_NM=$NM
41616  for ac_prog in nm gcc-nm
41617do
41618  # Extract the first word of "$ac_prog", so it can be a program name with args.
41619set dummy $ac_prog; ac_word=$2
41620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41621$as_echo_n "checking for $ac_word... " >&6; }
41622if ${ac_cv_prog_ac_ct_NM+:} false; then :
41623  $as_echo_n "(cached) " >&6
41624else
41625  if test -n "$ac_ct_NM"; then
41626  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41627else
41628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41629for as_dir in $PATH
41630do
41631  IFS=$as_save_IFS
41632  test -z "$as_dir" && as_dir=.
41633    for ac_exec_ext in '' $ac_executable_extensions; do
41634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41635    ac_cv_prog_ac_ct_NM="$ac_prog"
41636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41637    break 2
41638  fi
41639done
41640  done
41641IFS=$as_save_IFS
41642
41643fi
41644fi
41645ac_ct_NM=$ac_cv_prog_ac_ct_NM
41646if test -n "$ac_ct_NM"; then
41647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41648$as_echo "$ac_ct_NM" >&6; }
41649else
41650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41651$as_echo "no" >&6; }
41652fi
41653
41654
41655  test -n "$ac_ct_NM" && break
41656done
41657
41658  if test "x$ac_ct_NM" = x; then
41659    NM=""
41660  else
41661    case $cross_compiling:$ac_tool_warned in
41662yes:)
41663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41665ac_tool_warned=yes ;;
41666esac
41667    NM=$ac_ct_NM
41668  fi
41669fi
41670
41671  else
41672    # The variable is set, but is it from the command line or the environment?
41673
41674    # Try to remove the string !NM! from our list.
41675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41677      # If it failed, the variable was not from the command line. Ignore it,
41678      # but warn the user (except for BASH, which is always set by the calling BASH).
41679      if test "xNM" != xBASH; then
41680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41681$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41682      fi
41683      # Try to locate tool using the code snippet
41684      if test -n "$ac_tool_prefix"; then
41685  for ac_prog in nm gcc-nm
41686  do
41687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41690$as_echo_n "checking for $ac_word... " >&6; }
41691if ${ac_cv_prog_NM+:} false; then :
41692  $as_echo_n "(cached) " >&6
41693else
41694  if test -n "$NM"; then
41695  ac_cv_prog_NM="$NM" # Let the user override the test.
41696else
41697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41698for as_dir in $PATH
41699do
41700  IFS=$as_save_IFS
41701  test -z "$as_dir" && as_dir=.
41702    for ac_exec_ext in '' $ac_executable_extensions; do
41703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41704    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41706    break 2
41707  fi
41708done
41709  done
41710IFS=$as_save_IFS
41711
41712fi
41713fi
41714NM=$ac_cv_prog_NM
41715if test -n "$NM"; then
41716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41717$as_echo "$NM" >&6; }
41718else
41719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41720$as_echo "no" >&6; }
41721fi
41722
41723
41724    test -n "$NM" && break
41725  done
41726fi
41727if test -z "$NM"; then
41728  ac_ct_NM=$NM
41729  for ac_prog in nm gcc-nm
41730do
41731  # Extract the first word of "$ac_prog", so it can be a program name with args.
41732set dummy $ac_prog; ac_word=$2
41733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41734$as_echo_n "checking for $ac_word... " >&6; }
41735if ${ac_cv_prog_ac_ct_NM+:} false; then :
41736  $as_echo_n "(cached) " >&6
41737else
41738  if test -n "$ac_ct_NM"; then
41739  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41740else
41741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41742for as_dir in $PATH
41743do
41744  IFS=$as_save_IFS
41745  test -z "$as_dir" && as_dir=.
41746    for ac_exec_ext in '' $ac_executable_extensions; do
41747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41748    ac_cv_prog_ac_ct_NM="$ac_prog"
41749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41750    break 2
41751  fi
41752done
41753  done
41754IFS=$as_save_IFS
41755
41756fi
41757fi
41758ac_ct_NM=$ac_cv_prog_ac_ct_NM
41759if test -n "$ac_ct_NM"; then
41760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41761$as_echo "$ac_ct_NM" >&6; }
41762else
41763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41764$as_echo "no" >&6; }
41765fi
41766
41767
41768  test -n "$ac_ct_NM" && break
41769done
41770
41771  if test "x$ac_ct_NM" = x; then
41772    NM=""
41773  else
41774    case $cross_compiling:$ac_tool_warned in
41775yes:)
41776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41778ac_tool_warned=yes ;;
41779esac
41780    NM=$ac_ct_NM
41781  fi
41782fi
41783
41784    else
41785      # If it succeeded, then it was overridden by the user. We will use it
41786      # for the tool.
41787
41788      # First remove it from the list of overridden variables, so we can test
41789      # for unknown variables in the end.
41790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41791
41792      # Check if we try to supply an empty value
41793      if test "x$NM" = x; then
41794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41795$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41797$as_echo_n "checking for NM... " >&6; }
41798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41799$as_echo "disabled" >&6; }
41800      else
41801        # Check if the provided tool contains a complete path.
41802        tool_specified="$NM"
41803        tool_basename="${tool_specified##*/}"
41804        if test "x$tool_basename" = "x$tool_specified"; then
41805          # A command without a complete path is provided, search $PATH.
41806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41807$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41808          # Extract the first word of "$tool_basename", so it can be a program name with args.
41809set dummy $tool_basename; ac_word=$2
41810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41811$as_echo_n "checking for $ac_word... " >&6; }
41812if ${ac_cv_path_NM+:} false; then :
41813  $as_echo_n "(cached) " >&6
41814else
41815  case $NM in
41816  [\\/]* | ?:[\\/]*)
41817  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41818  ;;
41819  *)
41820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41821for as_dir in $PATH
41822do
41823  IFS=$as_save_IFS
41824  test -z "$as_dir" && as_dir=.
41825    for ac_exec_ext in '' $ac_executable_extensions; do
41826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41827    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41829    break 2
41830  fi
41831done
41832  done
41833IFS=$as_save_IFS
41834
41835  ;;
41836esac
41837fi
41838NM=$ac_cv_path_NM
41839if test -n "$NM"; then
41840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41841$as_echo "$NM" >&6; }
41842else
41843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41844$as_echo "no" >&6; }
41845fi
41846
41847
41848          if test "x$NM" = x; then
41849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41850          fi
41851        else
41852          # Otherwise we believe it is a complete path. Use it as it is.
41853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41854$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41856$as_echo_n "checking for NM... " >&6; }
41857          if test ! -x "$tool_specified"; then
41858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41859$as_echo "not found" >&6; }
41860            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41861          fi
41862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41863$as_echo "$tool_specified" >&6; }
41864        fi
41865      fi
41866    fi
41867
41868  fi
41869
41870
41871    else
41872
41873
41874  # Publish this variable in the help.
41875
41876
41877  if [ -z "${NM+x}" ]; then
41878    # The variable is not set by user, try to locate tool using the code snippet
41879    if test -n "$ac_tool_prefix"; then
41880  for ac_prog in nm
41881  do
41882    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41883set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41885$as_echo_n "checking for $ac_word... " >&6; }
41886if ${ac_cv_prog_NM+:} false; then :
41887  $as_echo_n "(cached) " >&6
41888else
41889  if test -n "$NM"; then
41890  ac_cv_prog_NM="$NM" # Let the user override the test.
41891else
41892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41893for as_dir in $PATH
41894do
41895  IFS=$as_save_IFS
41896  test -z "$as_dir" && as_dir=.
41897    for ac_exec_ext in '' $ac_executable_extensions; do
41898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41899    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41901    break 2
41902  fi
41903done
41904  done
41905IFS=$as_save_IFS
41906
41907fi
41908fi
41909NM=$ac_cv_prog_NM
41910if test -n "$NM"; then
41911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41912$as_echo "$NM" >&6; }
41913else
41914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41915$as_echo "no" >&6; }
41916fi
41917
41918
41919    test -n "$NM" && break
41920  done
41921fi
41922if test -z "$NM"; then
41923  ac_ct_NM=$NM
41924  for ac_prog in nm
41925do
41926  # Extract the first word of "$ac_prog", so it can be a program name with args.
41927set dummy $ac_prog; ac_word=$2
41928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41929$as_echo_n "checking for $ac_word... " >&6; }
41930if ${ac_cv_prog_ac_ct_NM+:} false; then :
41931  $as_echo_n "(cached) " >&6
41932else
41933  if test -n "$ac_ct_NM"; then
41934  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41935else
41936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41937for as_dir in $PATH
41938do
41939  IFS=$as_save_IFS
41940  test -z "$as_dir" && as_dir=.
41941    for ac_exec_ext in '' $ac_executable_extensions; do
41942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41943    ac_cv_prog_ac_ct_NM="$ac_prog"
41944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41945    break 2
41946  fi
41947done
41948  done
41949IFS=$as_save_IFS
41950
41951fi
41952fi
41953ac_ct_NM=$ac_cv_prog_ac_ct_NM
41954if test -n "$ac_ct_NM"; then
41955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41956$as_echo "$ac_ct_NM" >&6; }
41957else
41958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41959$as_echo "no" >&6; }
41960fi
41961
41962
41963  test -n "$ac_ct_NM" && break
41964done
41965
41966  if test "x$ac_ct_NM" = x; then
41967    NM=""
41968  else
41969    case $cross_compiling:$ac_tool_warned in
41970yes:)
41971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41973ac_tool_warned=yes ;;
41974esac
41975    NM=$ac_ct_NM
41976  fi
41977fi
41978
41979  else
41980    # The variable is set, but is it from the command line or the environment?
41981
41982    # Try to remove the string !NM! from our list.
41983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41985      # If it failed, the variable was not from the command line. Ignore it,
41986      # but warn the user (except for BASH, which is always set by the calling BASH).
41987      if test "xNM" != xBASH; then
41988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41989$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41990      fi
41991      # Try to locate tool using the code snippet
41992      if test -n "$ac_tool_prefix"; then
41993  for ac_prog in nm
41994  do
41995    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41996set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41998$as_echo_n "checking for $ac_word... " >&6; }
41999if ${ac_cv_prog_NM+:} false; then :
42000  $as_echo_n "(cached) " >&6
42001else
42002  if test -n "$NM"; then
42003  ac_cv_prog_NM="$NM" # Let the user override the test.
42004else
42005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42006for as_dir in $PATH
42007do
42008  IFS=$as_save_IFS
42009  test -z "$as_dir" && as_dir=.
42010    for ac_exec_ext in '' $ac_executable_extensions; do
42011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42012    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42014    break 2
42015  fi
42016done
42017  done
42018IFS=$as_save_IFS
42019
42020fi
42021fi
42022NM=$ac_cv_prog_NM
42023if test -n "$NM"; then
42024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42025$as_echo "$NM" >&6; }
42026else
42027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42028$as_echo "no" >&6; }
42029fi
42030
42031
42032    test -n "$NM" && break
42033  done
42034fi
42035if test -z "$NM"; then
42036  ac_ct_NM=$NM
42037  for ac_prog in nm
42038do
42039  # Extract the first word of "$ac_prog", so it can be a program name with args.
42040set dummy $ac_prog; ac_word=$2
42041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42042$as_echo_n "checking for $ac_word... " >&6; }
42043if ${ac_cv_prog_ac_ct_NM+:} false; then :
42044  $as_echo_n "(cached) " >&6
42045else
42046  if test -n "$ac_ct_NM"; then
42047  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42048else
42049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42050for as_dir in $PATH
42051do
42052  IFS=$as_save_IFS
42053  test -z "$as_dir" && as_dir=.
42054    for ac_exec_ext in '' $ac_executable_extensions; do
42055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42056    ac_cv_prog_ac_ct_NM="$ac_prog"
42057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42058    break 2
42059  fi
42060done
42061  done
42062IFS=$as_save_IFS
42063
42064fi
42065fi
42066ac_ct_NM=$ac_cv_prog_ac_ct_NM
42067if test -n "$ac_ct_NM"; then
42068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42069$as_echo "$ac_ct_NM" >&6; }
42070else
42071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42072$as_echo "no" >&6; }
42073fi
42074
42075
42076  test -n "$ac_ct_NM" && break
42077done
42078
42079  if test "x$ac_ct_NM" = x; then
42080    NM=""
42081  else
42082    case $cross_compiling:$ac_tool_warned in
42083yes:)
42084{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42085$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42086ac_tool_warned=yes ;;
42087esac
42088    NM=$ac_ct_NM
42089  fi
42090fi
42091
42092    else
42093      # If it succeeded, then it was overridden by the user. We will use it
42094      # for the tool.
42095
42096      # First remove it from the list of overridden variables, so we can test
42097      # for unknown variables in the end.
42098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42099
42100      # Check if we try to supply an empty value
42101      if test "x$NM" = x; then
42102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42103$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42105$as_echo_n "checking for NM... " >&6; }
42106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42107$as_echo "disabled" >&6; }
42108      else
42109        # Check if the provided tool contains a complete path.
42110        tool_specified="$NM"
42111        tool_basename="${tool_specified##*/}"
42112        if test "x$tool_basename" = "x$tool_specified"; then
42113          # A command without a complete path is provided, search $PATH.
42114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42115$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42116          # Extract the first word of "$tool_basename", so it can be a program name with args.
42117set dummy $tool_basename; ac_word=$2
42118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42119$as_echo_n "checking for $ac_word... " >&6; }
42120if ${ac_cv_path_NM+:} false; then :
42121  $as_echo_n "(cached) " >&6
42122else
42123  case $NM in
42124  [\\/]* | ?:[\\/]*)
42125  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42126  ;;
42127  *)
42128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42129for as_dir in $PATH
42130do
42131  IFS=$as_save_IFS
42132  test -z "$as_dir" && as_dir=.
42133    for ac_exec_ext in '' $ac_executable_extensions; do
42134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42135    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42137    break 2
42138  fi
42139done
42140  done
42141IFS=$as_save_IFS
42142
42143  ;;
42144esac
42145fi
42146NM=$ac_cv_path_NM
42147if test -n "$NM"; then
42148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42149$as_echo "$NM" >&6; }
42150else
42151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42152$as_echo "no" >&6; }
42153fi
42154
42155
42156          if test "x$NM" = x; then
42157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42158          fi
42159        else
42160          # Otherwise we believe it is a complete path. Use it as it is.
42161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42162$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42164$as_echo_n "checking for NM... " >&6; }
42165          if test ! -x "$tool_specified"; then
42166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42167$as_echo "not found" >&6; }
42168            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42169          fi
42170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42171$as_echo "$tool_specified" >&6; }
42172        fi
42173      fi
42174    fi
42175
42176  fi
42177
42178
42179    fi
42180
42181  # Only process if variable expands to non-empty
42182
42183  if test "x$NM" != x; then
42184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42185
42186  # First separate the path from the arguments. This will split at the first
42187  # space.
42188  complete="$NM"
42189  path="${complete%% *}"
42190  tmp="$complete EOL"
42191  arguments="${tmp#* }"
42192
42193  # Input might be given as Windows format, start by converting to
42194  # unix format.
42195  new_path=`$CYGPATH -u "$path"`
42196
42197  # Now try to locate executable using which
42198  new_path=`$WHICH "$new_path" 2> /dev/null`
42199  # bat and cmd files are not always considered executable in cygwin causing which
42200  # to not find them
42201  if test "x$new_path" = x \
42202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42204    new_path=`$CYGPATH -u "$path"`
42205  fi
42206  if test "x$new_path" = x; then
42207    # Oops. Which didn't find the executable.
42208    # The splitting of arguments from the executable at a space might have been incorrect,
42209    # since paths with space are more likely in Windows. Give it another try with the whole
42210    # argument.
42211    path="$complete"
42212    arguments="EOL"
42213    new_path=`$CYGPATH -u "$path"`
42214    new_path=`$WHICH "$new_path" 2> /dev/null`
42215    # bat and cmd files are not always considered executable in cygwin causing which
42216    # to not find them
42217    if test "x$new_path" = x \
42218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42220      new_path=`$CYGPATH -u "$path"`
42221    fi
42222    if test "x$new_path" = x; then
42223      # It's still not found. Now this is an unrecoverable error.
42224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42225$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42226      has_space=`$ECHO "$complete" | $GREP " "`
42227      if test "x$has_space" != x; then
42228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42230      fi
42231      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42232    fi
42233  fi
42234
42235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42238  # "foo.exe" is OK but "foo" is an error.
42239  #
42240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42241  # It is also a way to make sure we got the proper file name for the real test later on.
42242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42243  if test "x$test_shortpath" = x; then
42244    # Short path failed, file does not exist as specified.
42245    # Try adding .exe or .cmd
42246    if test -f "${new_path}.exe"; then
42247      input_to_shortpath="${new_path}.exe"
42248    elif test -f "${new_path}.cmd"; then
42249      input_to_shortpath="${new_path}.cmd"
42250    else
42251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42252$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42255      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42256    fi
42257  else
42258    input_to_shortpath="$new_path"
42259  fi
42260
42261  # Call helper function which possibly converts this using DOS-style short mode.
42262  # If so, the updated path is stored in $new_path.
42263  new_path="$input_to_shortpath"
42264
42265  input_path="$input_to_shortpath"
42266  # Check if we need to convert this using DOS-style short mode. If the path
42267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42268  # take no chances and rewrite it.
42269  # Note: m4 eats our [], so we need to use [ and ] instead.
42270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42271  if test "x$has_forbidden_chars" != x; then
42272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42276      # Going to short mode and back again did indeed matter. Since short mode is
42277      # case insensitive, let's make it lowercase to improve readability.
42278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42279      # Now convert it back to Unix-style (cygpath)
42280      input_path=`$CYGPATH -u "$shortmode_path"`
42281      new_path="$input_path"
42282    fi
42283  fi
42284
42285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42286  if test "x$test_cygdrive_prefix" = x; then
42287    # As a simple fix, exclude /usr/bin since it's not a real path.
42288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42290      # a path prefixed by /cygdrive for fixpath to work.
42291      new_path="$CYGWIN_ROOT_PATH$input_path"
42292    fi
42293  fi
42294
42295  # remove trailing .exe if any
42296  new_path="${new_path/%.exe/}"
42297
42298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42299
42300  # First separate the path from the arguments. This will split at the first
42301  # space.
42302  complete="$NM"
42303  path="${complete%% *}"
42304  tmp="$complete EOL"
42305  arguments="${tmp#* }"
42306
42307  # Input might be given as Windows format, start by converting to
42308  # unix format.
42309  new_path="$path"
42310
42311  windows_path="$new_path"
42312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42313    unix_path=`$CYGPATH -u "$windows_path"`
42314    new_path="$unix_path"
42315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42317    new_path="$unix_path"
42318  fi
42319
42320
42321  # Now try to locate executable using which
42322  new_path=`$WHICH "$new_path" 2> /dev/null`
42323
42324  if test "x$new_path" = x; then
42325    # Oops. Which didn't find the executable.
42326    # The splitting of arguments from the executable at a space might have been incorrect,
42327    # since paths with space are more likely in Windows. Give it another try with the whole
42328    # argument.
42329    path="$complete"
42330    arguments="EOL"
42331    new_path="$path"
42332
42333  windows_path="$new_path"
42334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42335    unix_path=`$CYGPATH -u "$windows_path"`
42336    new_path="$unix_path"
42337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42339    new_path="$unix_path"
42340  fi
42341
42342
42343    new_path=`$WHICH "$new_path" 2> /dev/null`
42344    # bat and cmd files are not always considered executable in MSYS causing which
42345    # to not find them
42346    if test "x$new_path" = x \
42347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42349      new_path="$path"
42350
42351  windows_path="$new_path"
42352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42353    unix_path=`$CYGPATH -u "$windows_path"`
42354    new_path="$unix_path"
42355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42357    new_path="$unix_path"
42358  fi
42359
42360    fi
42361
42362    if test "x$new_path" = x; then
42363      # It's still not found. Now this is an unrecoverable error.
42364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42365$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42366      has_space=`$ECHO "$complete" | $GREP " "`
42367      if test "x$has_space" != x; then
42368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42370      fi
42371      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42372    fi
42373  fi
42374
42375  # Now new_path has a complete unix path to the binary
42376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42377    # Keep paths in /bin as-is, but remove trailing .exe if any
42378    new_path="${new_path/%.exe/}"
42379    # Do not save /bin paths to all_fixpath_prefixes!
42380  else
42381    # Not in mixed or Windows style, start by that.
42382    new_path=`cmd //c echo $new_path`
42383
42384  input_path="$new_path"
42385  # Check if we need to convert this using DOS-style short mode. If the path
42386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42387  # take no chances and rewrite it.
42388  # Note: m4 eats our [], so we need to use [ and ] instead.
42389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42390  if test "x$has_forbidden_chars" != x; then
42391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42393  fi
42394
42395    # Output is in $new_path
42396
42397  windows_path="$new_path"
42398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42399    unix_path=`$CYGPATH -u "$windows_path"`
42400    new_path="$unix_path"
42401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42403    new_path="$unix_path"
42404  fi
42405
42406    # remove trailing .exe if any
42407    new_path="${new_path/%.exe/}"
42408
42409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42411  fi
42412
42413    else
42414      # We're on a unix platform. Hooray! :)
42415      # First separate the path from the arguments. This will split at the first
42416      # space.
42417      complete="$NM"
42418      path="${complete%% *}"
42419      tmp="$complete EOL"
42420      arguments="${tmp#* }"
42421
42422      # Cannot rely on the command "which" here since it doesn't always work.
42423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42424      if test -z "$is_absolute_path"; then
42425        # Path to executable is not absolute. Find it.
42426        IFS_save="$IFS"
42427        IFS=:
42428        for p in $PATH; do
42429          if test -f "$p/$path" && test -x "$p/$path"; then
42430            new_path="$p/$path"
42431            break
42432          fi
42433        done
42434        IFS="$IFS_save"
42435      else
42436        # This is an absolute path, we can use it without further modifications.
42437        new_path="$path"
42438      fi
42439
42440      if test "x$new_path" = x; then
42441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42442$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42443        has_space=`$ECHO "$complete" | $GREP " "`
42444        if test "x$has_space" != x; then
42445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42447        fi
42448        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42449      fi
42450    fi
42451
42452    # Now join together the path and the arguments once again
42453    if test "x$arguments" != xEOL; then
42454      new_complete="$new_path ${arguments% *}"
42455    else
42456      new_complete="$new_path"
42457    fi
42458
42459    if test "x$complete" != "x$new_complete"; then
42460      NM="$new_complete"
42461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42462$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42463    fi
42464  fi
42465
42466    GNM="$NM"
42467
42468  fi
42469
42470  # objcopy is used for moving debug symbols to separate files when
42471  # full debug symbols are enabled.
42472  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42473
42474
42475  # Publish this variable in the help.
42476
42477
42478  if [ -z "${OBJCOPY+x}" ]; then
42479    # The variable is not set by user, try to locate tool using the code snippet
42480    if test -n "$ac_tool_prefix"; then
42481  for ac_prog in gobjcopy objcopy
42482  do
42483    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42484set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42486$as_echo_n "checking for $ac_word... " >&6; }
42487if ${ac_cv_prog_OBJCOPY+:} false; then :
42488  $as_echo_n "(cached) " >&6
42489else
42490  if test -n "$OBJCOPY"; then
42491  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42492else
42493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42494for as_dir in $PATH
42495do
42496  IFS=$as_save_IFS
42497  test -z "$as_dir" && as_dir=.
42498    for ac_exec_ext in '' $ac_executable_extensions; do
42499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42500    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42502    break 2
42503  fi
42504done
42505  done
42506IFS=$as_save_IFS
42507
42508fi
42509fi
42510OBJCOPY=$ac_cv_prog_OBJCOPY
42511if test -n "$OBJCOPY"; then
42512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42513$as_echo "$OBJCOPY" >&6; }
42514else
42515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42516$as_echo "no" >&6; }
42517fi
42518
42519
42520    test -n "$OBJCOPY" && break
42521  done
42522fi
42523if test -z "$OBJCOPY"; then
42524  ac_ct_OBJCOPY=$OBJCOPY
42525  for ac_prog in gobjcopy objcopy
42526do
42527  # Extract the first word of "$ac_prog", so it can be a program name with args.
42528set dummy $ac_prog; ac_word=$2
42529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42530$as_echo_n "checking for $ac_word... " >&6; }
42531if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42532  $as_echo_n "(cached) " >&6
42533else
42534  if test -n "$ac_ct_OBJCOPY"; then
42535  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42536else
42537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42538for as_dir in $PATH
42539do
42540  IFS=$as_save_IFS
42541  test -z "$as_dir" && as_dir=.
42542    for ac_exec_ext in '' $ac_executable_extensions; do
42543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42544    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42546    break 2
42547  fi
42548done
42549  done
42550IFS=$as_save_IFS
42551
42552fi
42553fi
42554ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42555if test -n "$ac_ct_OBJCOPY"; then
42556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42557$as_echo "$ac_ct_OBJCOPY" >&6; }
42558else
42559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42560$as_echo "no" >&6; }
42561fi
42562
42563
42564  test -n "$ac_ct_OBJCOPY" && break
42565done
42566
42567  if test "x$ac_ct_OBJCOPY" = x; then
42568    OBJCOPY=""
42569  else
42570    case $cross_compiling:$ac_tool_warned in
42571yes:)
42572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42574ac_tool_warned=yes ;;
42575esac
42576    OBJCOPY=$ac_ct_OBJCOPY
42577  fi
42578fi
42579
42580  else
42581    # The variable is set, but is it from the command line or the environment?
42582
42583    # Try to remove the string !OBJCOPY! from our list.
42584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42586      # If it failed, the variable was not from the command line. Ignore it,
42587      # but warn the user (except for BASH, which is always set by the calling BASH).
42588      if test "xOBJCOPY" != xBASH; then
42589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42590$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42591      fi
42592      # Try to locate tool using the code snippet
42593      if test -n "$ac_tool_prefix"; then
42594  for ac_prog in gobjcopy objcopy
42595  do
42596    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42597set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42599$as_echo_n "checking for $ac_word... " >&6; }
42600if ${ac_cv_prog_OBJCOPY+:} false; then :
42601  $as_echo_n "(cached) " >&6
42602else
42603  if test -n "$OBJCOPY"; then
42604  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42605else
42606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42607for as_dir in $PATH
42608do
42609  IFS=$as_save_IFS
42610  test -z "$as_dir" && as_dir=.
42611    for ac_exec_ext in '' $ac_executable_extensions; do
42612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42613    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42615    break 2
42616  fi
42617done
42618  done
42619IFS=$as_save_IFS
42620
42621fi
42622fi
42623OBJCOPY=$ac_cv_prog_OBJCOPY
42624if test -n "$OBJCOPY"; then
42625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42626$as_echo "$OBJCOPY" >&6; }
42627else
42628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42629$as_echo "no" >&6; }
42630fi
42631
42632
42633    test -n "$OBJCOPY" && break
42634  done
42635fi
42636if test -z "$OBJCOPY"; then
42637  ac_ct_OBJCOPY=$OBJCOPY
42638  for ac_prog in gobjcopy objcopy
42639do
42640  # Extract the first word of "$ac_prog", so it can be a program name with args.
42641set dummy $ac_prog; ac_word=$2
42642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42643$as_echo_n "checking for $ac_word... " >&6; }
42644if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42645  $as_echo_n "(cached) " >&6
42646else
42647  if test -n "$ac_ct_OBJCOPY"; then
42648  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42649else
42650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42651for as_dir in $PATH
42652do
42653  IFS=$as_save_IFS
42654  test -z "$as_dir" && as_dir=.
42655    for ac_exec_ext in '' $ac_executable_extensions; do
42656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42657    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42659    break 2
42660  fi
42661done
42662  done
42663IFS=$as_save_IFS
42664
42665fi
42666fi
42667ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42668if test -n "$ac_ct_OBJCOPY"; then
42669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42670$as_echo "$ac_ct_OBJCOPY" >&6; }
42671else
42672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42673$as_echo "no" >&6; }
42674fi
42675
42676
42677  test -n "$ac_ct_OBJCOPY" && break
42678done
42679
42680  if test "x$ac_ct_OBJCOPY" = x; then
42681    OBJCOPY=""
42682  else
42683    case $cross_compiling:$ac_tool_warned in
42684yes:)
42685{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42686$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42687ac_tool_warned=yes ;;
42688esac
42689    OBJCOPY=$ac_ct_OBJCOPY
42690  fi
42691fi
42692
42693    else
42694      # If it succeeded, then it was overridden by the user. We will use it
42695      # for the tool.
42696
42697      # First remove it from the list of overridden variables, so we can test
42698      # for unknown variables in the end.
42699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42700
42701      # Check if we try to supply an empty value
42702      if test "x$OBJCOPY" = x; then
42703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42704$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42706$as_echo_n "checking for OBJCOPY... " >&6; }
42707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42708$as_echo "disabled" >&6; }
42709      else
42710        # Check if the provided tool contains a complete path.
42711        tool_specified="$OBJCOPY"
42712        tool_basename="${tool_specified##*/}"
42713        if test "x$tool_basename" = "x$tool_specified"; then
42714          # A command without a complete path is provided, search $PATH.
42715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42716$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42717          # Extract the first word of "$tool_basename", so it can be a program name with args.
42718set dummy $tool_basename; ac_word=$2
42719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42720$as_echo_n "checking for $ac_word... " >&6; }
42721if ${ac_cv_path_OBJCOPY+:} false; then :
42722  $as_echo_n "(cached) " >&6
42723else
42724  case $OBJCOPY in
42725  [\\/]* | ?:[\\/]*)
42726  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42727  ;;
42728  *)
42729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42730for as_dir in $PATH
42731do
42732  IFS=$as_save_IFS
42733  test -z "$as_dir" && as_dir=.
42734    for ac_exec_ext in '' $ac_executable_extensions; do
42735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42736    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42738    break 2
42739  fi
42740done
42741  done
42742IFS=$as_save_IFS
42743
42744  ;;
42745esac
42746fi
42747OBJCOPY=$ac_cv_path_OBJCOPY
42748if test -n "$OBJCOPY"; then
42749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42750$as_echo "$OBJCOPY" >&6; }
42751else
42752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42753$as_echo "no" >&6; }
42754fi
42755
42756
42757          if test "x$OBJCOPY" = x; then
42758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42759          fi
42760        else
42761          # Otherwise we believe it is a complete path. Use it as it is.
42762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42763$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42765$as_echo_n "checking for OBJCOPY... " >&6; }
42766          if test ! -x "$tool_specified"; then
42767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42768$as_echo "not found" >&6; }
42769            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42770          fi
42771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42772$as_echo "$tool_specified" >&6; }
42773        fi
42774      fi
42775    fi
42776
42777  fi
42778
42779
42780    # Only call fixup if objcopy was found.
42781    if test -n "$OBJCOPY"; then
42782
42783  # Only process if variable expands to non-empty
42784
42785  if test "x$OBJCOPY" != x; then
42786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42787
42788  # First separate the path from the arguments. This will split at the first
42789  # space.
42790  complete="$OBJCOPY"
42791  path="${complete%% *}"
42792  tmp="$complete EOL"
42793  arguments="${tmp#* }"
42794
42795  # Input might be given as Windows format, start by converting to
42796  # unix format.
42797  new_path=`$CYGPATH -u "$path"`
42798
42799  # Now try to locate executable using which
42800  new_path=`$WHICH "$new_path" 2> /dev/null`
42801  # bat and cmd files are not always considered executable in cygwin causing which
42802  # to not find them
42803  if test "x$new_path" = x \
42804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42806    new_path=`$CYGPATH -u "$path"`
42807  fi
42808  if test "x$new_path" = x; then
42809    # Oops. Which didn't find the executable.
42810    # The splitting of arguments from the executable at a space might have been incorrect,
42811    # since paths with space are more likely in Windows. Give it another try with the whole
42812    # argument.
42813    path="$complete"
42814    arguments="EOL"
42815    new_path=`$CYGPATH -u "$path"`
42816    new_path=`$WHICH "$new_path" 2> /dev/null`
42817    # bat and cmd files are not always considered executable in cygwin causing which
42818    # to not find them
42819    if test "x$new_path" = x \
42820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42822      new_path=`$CYGPATH -u "$path"`
42823    fi
42824    if test "x$new_path" = x; then
42825      # It's still not found. Now this is an unrecoverable error.
42826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42827$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42828      has_space=`$ECHO "$complete" | $GREP " "`
42829      if test "x$has_space" != x; then
42830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42832      fi
42833      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42834    fi
42835  fi
42836
42837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42840  # "foo.exe" is OK but "foo" is an error.
42841  #
42842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42843  # It is also a way to make sure we got the proper file name for the real test later on.
42844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42845  if test "x$test_shortpath" = x; then
42846    # Short path failed, file does not exist as specified.
42847    # Try adding .exe or .cmd
42848    if test -f "${new_path}.exe"; then
42849      input_to_shortpath="${new_path}.exe"
42850    elif test -f "${new_path}.cmd"; then
42851      input_to_shortpath="${new_path}.cmd"
42852    else
42853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42854$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42857      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42858    fi
42859  else
42860    input_to_shortpath="$new_path"
42861  fi
42862
42863  # Call helper function which possibly converts this using DOS-style short mode.
42864  # If so, the updated path is stored in $new_path.
42865  new_path="$input_to_shortpath"
42866
42867  input_path="$input_to_shortpath"
42868  # Check if we need to convert this using DOS-style short mode. If the path
42869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42870  # take no chances and rewrite it.
42871  # Note: m4 eats our [], so we need to use [ and ] instead.
42872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42873  if test "x$has_forbidden_chars" != x; then
42874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42878      # Going to short mode and back again did indeed matter. Since short mode is
42879      # case insensitive, let's make it lowercase to improve readability.
42880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42881      # Now convert it back to Unix-style (cygpath)
42882      input_path=`$CYGPATH -u "$shortmode_path"`
42883      new_path="$input_path"
42884    fi
42885  fi
42886
42887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42888  if test "x$test_cygdrive_prefix" = x; then
42889    # As a simple fix, exclude /usr/bin since it's not a real path.
42890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42892      # a path prefixed by /cygdrive for fixpath to work.
42893      new_path="$CYGWIN_ROOT_PATH$input_path"
42894    fi
42895  fi
42896
42897  # remove trailing .exe if any
42898  new_path="${new_path/%.exe/}"
42899
42900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42901
42902  # First separate the path from the arguments. This will split at the first
42903  # space.
42904  complete="$OBJCOPY"
42905  path="${complete%% *}"
42906  tmp="$complete EOL"
42907  arguments="${tmp#* }"
42908
42909  # Input might be given as Windows format, start by converting to
42910  # unix format.
42911  new_path="$path"
42912
42913  windows_path="$new_path"
42914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42915    unix_path=`$CYGPATH -u "$windows_path"`
42916    new_path="$unix_path"
42917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42919    new_path="$unix_path"
42920  fi
42921
42922
42923  # Now try to locate executable using which
42924  new_path=`$WHICH "$new_path" 2> /dev/null`
42925
42926  if test "x$new_path" = x; then
42927    # Oops. Which didn't find the executable.
42928    # The splitting of arguments from the executable at a space might have been incorrect,
42929    # since paths with space are more likely in Windows. Give it another try with the whole
42930    # argument.
42931    path="$complete"
42932    arguments="EOL"
42933    new_path="$path"
42934
42935  windows_path="$new_path"
42936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42937    unix_path=`$CYGPATH -u "$windows_path"`
42938    new_path="$unix_path"
42939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42941    new_path="$unix_path"
42942  fi
42943
42944
42945    new_path=`$WHICH "$new_path" 2> /dev/null`
42946    # bat and cmd files are not always considered executable in MSYS causing which
42947    # to not find them
42948    if test "x$new_path" = x \
42949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42951      new_path="$path"
42952
42953  windows_path="$new_path"
42954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42955    unix_path=`$CYGPATH -u "$windows_path"`
42956    new_path="$unix_path"
42957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42959    new_path="$unix_path"
42960  fi
42961
42962    fi
42963
42964    if test "x$new_path" = x; then
42965      # It's still not found. Now this is an unrecoverable error.
42966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42967$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42968      has_space=`$ECHO "$complete" | $GREP " "`
42969      if test "x$has_space" != x; then
42970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42972      fi
42973      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42974    fi
42975  fi
42976
42977  # Now new_path has a complete unix path to the binary
42978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42979    # Keep paths in /bin as-is, but remove trailing .exe if any
42980    new_path="${new_path/%.exe/}"
42981    # Do not save /bin paths to all_fixpath_prefixes!
42982  else
42983    # Not in mixed or Windows style, start by that.
42984    new_path=`cmd //c echo $new_path`
42985
42986  input_path="$new_path"
42987  # Check if we need to convert this using DOS-style short mode. If the path
42988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42989  # take no chances and rewrite it.
42990  # Note: m4 eats our [], so we need to use [ and ] instead.
42991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42992  if test "x$has_forbidden_chars" != x; then
42993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42995  fi
42996
42997    # Output is in $new_path
42998
42999  windows_path="$new_path"
43000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43001    unix_path=`$CYGPATH -u "$windows_path"`
43002    new_path="$unix_path"
43003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43005    new_path="$unix_path"
43006  fi
43007
43008    # remove trailing .exe if any
43009    new_path="${new_path/%.exe/}"
43010
43011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43013  fi
43014
43015    else
43016      # We're on a unix platform. Hooray! :)
43017      # First separate the path from the arguments. This will split at the first
43018      # space.
43019      complete="$OBJCOPY"
43020      path="${complete%% *}"
43021      tmp="$complete EOL"
43022      arguments="${tmp#* }"
43023
43024      # Cannot rely on the command "which" here since it doesn't always work.
43025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43026      if test -z "$is_absolute_path"; then
43027        # Path to executable is not absolute. Find it.
43028        IFS_save="$IFS"
43029        IFS=:
43030        for p in $PATH; do
43031          if test -f "$p/$path" && test -x "$p/$path"; then
43032            new_path="$p/$path"
43033            break
43034          fi
43035        done
43036        IFS="$IFS_save"
43037      else
43038        # This is an absolute path, we can use it without further modifications.
43039        new_path="$path"
43040      fi
43041
43042      if test "x$new_path" = x; then
43043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43044$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43045        has_space=`$ECHO "$complete" | $GREP " "`
43046        if test "x$has_space" != x; then
43047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43049        fi
43050        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43051      fi
43052    fi
43053
43054    # Now join together the path and the arguments once again
43055    if test "x$arguments" != xEOL; then
43056      new_complete="$new_path ${arguments% *}"
43057    else
43058      new_complete="$new_path"
43059    fi
43060
43061    if test "x$complete" != "x$new_complete"; then
43062      OBJCOPY="$new_complete"
43063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43064$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43065    fi
43066  fi
43067
43068      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43069        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43070        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43071        # - version number is last blank separate word on first line
43072        # - version number formats that have been seen:
43073        #   - <major>.<minor>
43074        #   - <major>.<minor>.<micro>
43075        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43076        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43077         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43078              -e 's/.* //' \
43079              -e '/^[01]\./b bad' \
43080              -e '/^2\./{' \
43081              -e '  s/^2\.//' \
43082              -e '  /^[0-9]$/b bad' \
43083              -e '  /^[0-9]\./b bad' \
43084              -e '  /^1[0-9]$/b bad' \
43085              -e '  /^1[0-9]\./b bad' \
43086              -e '  /^20\./b bad' \
43087              -e '  /^21\.0$/b bad' \
43088              -e '  /^21\.0\./b bad' \
43089              -e '}' \
43090              -e ':good' \
43091              -e 's/.*/VALID_VERSION/p' \
43092              -e 'q' \
43093              -e ':bad' \
43094              -e 's/.*/BAD_VERSION/p' \
43095              -e 'q'`
43096        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43097          OBJCOPY=
43098          { $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
43099$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43100          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43101$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43102          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43103$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43104          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43105$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43106          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43107$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43108        fi
43109      fi
43110    fi
43111  fi
43112
43113
43114
43115  # Publish this variable in the help.
43116
43117
43118  if [ -z "${OBJDUMP+x}" ]; then
43119    # The variable is not set by user, try to locate tool using the code snippet
43120    if test -n "$ac_tool_prefix"; then
43121  for ac_prog in gobjdump objdump
43122  do
43123    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43124set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43126$as_echo_n "checking for $ac_word... " >&6; }
43127if ${ac_cv_prog_OBJDUMP+:} false; then :
43128  $as_echo_n "(cached) " >&6
43129else
43130  if test -n "$OBJDUMP"; then
43131  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43132else
43133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43134for as_dir in $PATH
43135do
43136  IFS=$as_save_IFS
43137  test -z "$as_dir" && as_dir=.
43138    for ac_exec_ext in '' $ac_executable_extensions; do
43139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43140    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43142    break 2
43143  fi
43144done
43145  done
43146IFS=$as_save_IFS
43147
43148fi
43149fi
43150OBJDUMP=$ac_cv_prog_OBJDUMP
43151if test -n "$OBJDUMP"; then
43152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43153$as_echo "$OBJDUMP" >&6; }
43154else
43155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43156$as_echo "no" >&6; }
43157fi
43158
43159
43160    test -n "$OBJDUMP" && break
43161  done
43162fi
43163if test -z "$OBJDUMP"; then
43164  ac_ct_OBJDUMP=$OBJDUMP
43165  for ac_prog in gobjdump objdump
43166do
43167  # Extract the first word of "$ac_prog", so it can be a program name with args.
43168set dummy $ac_prog; ac_word=$2
43169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43170$as_echo_n "checking for $ac_word... " >&6; }
43171if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43172  $as_echo_n "(cached) " >&6
43173else
43174  if test -n "$ac_ct_OBJDUMP"; then
43175  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43176else
43177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43178for as_dir in $PATH
43179do
43180  IFS=$as_save_IFS
43181  test -z "$as_dir" && as_dir=.
43182    for ac_exec_ext in '' $ac_executable_extensions; do
43183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43184    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43186    break 2
43187  fi
43188done
43189  done
43190IFS=$as_save_IFS
43191
43192fi
43193fi
43194ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43195if test -n "$ac_ct_OBJDUMP"; then
43196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43197$as_echo "$ac_ct_OBJDUMP" >&6; }
43198else
43199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43200$as_echo "no" >&6; }
43201fi
43202
43203
43204  test -n "$ac_ct_OBJDUMP" && break
43205done
43206
43207  if test "x$ac_ct_OBJDUMP" = x; then
43208    OBJDUMP=""
43209  else
43210    case $cross_compiling:$ac_tool_warned in
43211yes:)
43212{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43213$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43214ac_tool_warned=yes ;;
43215esac
43216    OBJDUMP=$ac_ct_OBJDUMP
43217  fi
43218fi
43219
43220  else
43221    # The variable is set, but is it from the command line or the environment?
43222
43223    # Try to remove the string !OBJDUMP! from our list.
43224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43226      # If it failed, the variable was not from the command line. Ignore it,
43227      # but warn the user (except for BASH, which is always set by the calling BASH).
43228      if test "xOBJDUMP" != xBASH; then
43229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43230$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43231      fi
43232      # Try to locate tool using the code snippet
43233      if test -n "$ac_tool_prefix"; then
43234  for ac_prog in gobjdump objdump
43235  do
43236    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43237set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43239$as_echo_n "checking for $ac_word... " >&6; }
43240if ${ac_cv_prog_OBJDUMP+:} false; then :
43241  $as_echo_n "(cached) " >&6
43242else
43243  if test -n "$OBJDUMP"; then
43244  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43245else
43246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43247for as_dir in $PATH
43248do
43249  IFS=$as_save_IFS
43250  test -z "$as_dir" && as_dir=.
43251    for ac_exec_ext in '' $ac_executable_extensions; do
43252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43253    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43255    break 2
43256  fi
43257done
43258  done
43259IFS=$as_save_IFS
43260
43261fi
43262fi
43263OBJDUMP=$ac_cv_prog_OBJDUMP
43264if test -n "$OBJDUMP"; then
43265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43266$as_echo "$OBJDUMP" >&6; }
43267else
43268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43269$as_echo "no" >&6; }
43270fi
43271
43272
43273    test -n "$OBJDUMP" && break
43274  done
43275fi
43276if test -z "$OBJDUMP"; then
43277  ac_ct_OBJDUMP=$OBJDUMP
43278  for ac_prog in gobjdump objdump
43279do
43280  # Extract the first word of "$ac_prog", so it can be a program name with args.
43281set dummy $ac_prog; ac_word=$2
43282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43283$as_echo_n "checking for $ac_word... " >&6; }
43284if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43285  $as_echo_n "(cached) " >&6
43286else
43287  if test -n "$ac_ct_OBJDUMP"; then
43288  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43289else
43290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43291for as_dir in $PATH
43292do
43293  IFS=$as_save_IFS
43294  test -z "$as_dir" && as_dir=.
43295    for ac_exec_ext in '' $ac_executable_extensions; do
43296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43297    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43299    break 2
43300  fi
43301done
43302  done
43303IFS=$as_save_IFS
43304
43305fi
43306fi
43307ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43308if test -n "$ac_ct_OBJDUMP"; then
43309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43310$as_echo "$ac_ct_OBJDUMP" >&6; }
43311else
43312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43313$as_echo "no" >&6; }
43314fi
43315
43316
43317  test -n "$ac_ct_OBJDUMP" && break
43318done
43319
43320  if test "x$ac_ct_OBJDUMP" = x; then
43321    OBJDUMP=""
43322  else
43323    case $cross_compiling:$ac_tool_warned in
43324yes:)
43325{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43326$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43327ac_tool_warned=yes ;;
43328esac
43329    OBJDUMP=$ac_ct_OBJDUMP
43330  fi
43331fi
43332
43333    else
43334      # If it succeeded, then it was overridden by the user. We will use it
43335      # for the tool.
43336
43337      # First remove it from the list of overridden variables, so we can test
43338      # for unknown variables in the end.
43339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43340
43341      # Check if we try to supply an empty value
43342      if test "x$OBJDUMP" = x; then
43343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43344$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43346$as_echo_n "checking for OBJDUMP... " >&6; }
43347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43348$as_echo "disabled" >&6; }
43349      else
43350        # Check if the provided tool contains a complete path.
43351        tool_specified="$OBJDUMP"
43352        tool_basename="${tool_specified##*/}"
43353        if test "x$tool_basename" = "x$tool_specified"; then
43354          # A command without a complete path is provided, search $PATH.
43355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43356$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43357          # Extract the first word of "$tool_basename", so it can be a program name with args.
43358set dummy $tool_basename; ac_word=$2
43359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43360$as_echo_n "checking for $ac_word... " >&6; }
43361if ${ac_cv_path_OBJDUMP+:} false; then :
43362  $as_echo_n "(cached) " >&6
43363else
43364  case $OBJDUMP in
43365  [\\/]* | ?:[\\/]*)
43366  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43367  ;;
43368  *)
43369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43370for as_dir in $PATH
43371do
43372  IFS=$as_save_IFS
43373  test -z "$as_dir" && as_dir=.
43374    for ac_exec_ext in '' $ac_executable_extensions; do
43375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43376    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43378    break 2
43379  fi
43380done
43381  done
43382IFS=$as_save_IFS
43383
43384  ;;
43385esac
43386fi
43387OBJDUMP=$ac_cv_path_OBJDUMP
43388if test -n "$OBJDUMP"; then
43389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43390$as_echo "$OBJDUMP" >&6; }
43391else
43392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43393$as_echo "no" >&6; }
43394fi
43395
43396
43397          if test "x$OBJDUMP" = x; then
43398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43399          fi
43400        else
43401          # Otherwise we believe it is a complete path. Use it as it is.
43402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43403$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43405$as_echo_n "checking for OBJDUMP... " >&6; }
43406          if test ! -x "$tool_specified"; then
43407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43408$as_echo "not found" >&6; }
43409            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43410          fi
43411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43412$as_echo "$tool_specified" >&6; }
43413        fi
43414      fi
43415    fi
43416
43417  fi
43418
43419
43420  if test "x$OBJDUMP" != x; then
43421    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43422    # bails if argument is missing.
43423
43424  # Only process if variable expands to non-empty
43425
43426  if test "x$OBJDUMP" != x; then
43427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43428
43429  # First separate the path from the arguments. This will split at the first
43430  # space.
43431  complete="$OBJDUMP"
43432  path="${complete%% *}"
43433  tmp="$complete EOL"
43434  arguments="${tmp#* }"
43435
43436  # Input might be given as Windows format, start by converting to
43437  # unix format.
43438  new_path=`$CYGPATH -u "$path"`
43439
43440  # Now try to locate executable using which
43441  new_path=`$WHICH "$new_path" 2> /dev/null`
43442  # bat and cmd files are not always considered executable in cygwin causing which
43443  # to not find them
43444  if test "x$new_path" = x \
43445      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43446      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43447    new_path=`$CYGPATH -u "$path"`
43448  fi
43449  if test "x$new_path" = x; then
43450    # Oops. Which didn't find the executable.
43451    # The splitting of arguments from the executable at a space might have been incorrect,
43452    # since paths with space are more likely in Windows. Give it another try with the whole
43453    # argument.
43454    path="$complete"
43455    arguments="EOL"
43456    new_path=`$CYGPATH -u "$path"`
43457    new_path=`$WHICH "$new_path" 2> /dev/null`
43458    # bat and cmd files are not always considered executable in cygwin causing which
43459    # to not find them
43460    if test "x$new_path" = x \
43461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43463      new_path=`$CYGPATH -u "$path"`
43464    fi
43465    if test "x$new_path" = x; then
43466      # It's still not found. Now this is an unrecoverable error.
43467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43468$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43469      has_space=`$ECHO "$complete" | $GREP " "`
43470      if test "x$has_space" != x; then
43471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43473      fi
43474      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43475    fi
43476  fi
43477
43478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43481  # "foo.exe" is OK but "foo" is an error.
43482  #
43483  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43484  # It is also a way to make sure we got the proper file name for the real test later on.
43485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43486  if test "x$test_shortpath" = x; then
43487    # Short path failed, file does not exist as specified.
43488    # Try adding .exe or .cmd
43489    if test -f "${new_path}.exe"; then
43490      input_to_shortpath="${new_path}.exe"
43491    elif test -f "${new_path}.cmd"; then
43492      input_to_shortpath="${new_path}.cmd"
43493    else
43494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43495$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43498      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43499    fi
43500  else
43501    input_to_shortpath="$new_path"
43502  fi
43503
43504  # Call helper function which possibly converts this using DOS-style short mode.
43505  # If so, the updated path is stored in $new_path.
43506  new_path="$input_to_shortpath"
43507
43508  input_path="$input_to_shortpath"
43509  # Check if we need to convert this using DOS-style short mode. If the path
43510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43511  # take no chances and rewrite it.
43512  # Note: m4 eats our [], so we need to use [ and ] instead.
43513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43514  if test "x$has_forbidden_chars" != x; then
43515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43519      # Going to short mode and back again did indeed matter. Since short mode is
43520      # case insensitive, let's make it lowercase to improve readability.
43521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43522      # Now convert it back to Unix-style (cygpath)
43523      input_path=`$CYGPATH -u "$shortmode_path"`
43524      new_path="$input_path"
43525    fi
43526  fi
43527
43528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43529  if test "x$test_cygdrive_prefix" = x; then
43530    # As a simple fix, exclude /usr/bin since it's not a real path.
43531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43533      # a path prefixed by /cygdrive for fixpath to work.
43534      new_path="$CYGWIN_ROOT_PATH$input_path"
43535    fi
43536  fi
43537
43538  # remove trailing .exe if any
43539  new_path="${new_path/%.exe/}"
43540
43541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43542
43543  # First separate the path from the arguments. This will split at the first
43544  # space.
43545  complete="$OBJDUMP"
43546  path="${complete%% *}"
43547  tmp="$complete EOL"
43548  arguments="${tmp#* }"
43549
43550  # Input might be given as Windows format, start by converting to
43551  # unix format.
43552  new_path="$path"
43553
43554  windows_path="$new_path"
43555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43556    unix_path=`$CYGPATH -u "$windows_path"`
43557    new_path="$unix_path"
43558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43560    new_path="$unix_path"
43561  fi
43562
43563
43564  # Now try to locate executable using which
43565  new_path=`$WHICH "$new_path" 2> /dev/null`
43566
43567  if test "x$new_path" = x; then
43568    # Oops. Which didn't find the executable.
43569    # The splitting of arguments from the executable at a space might have been incorrect,
43570    # since paths with space are more likely in Windows. Give it another try with the whole
43571    # argument.
43572    path="$complete"
43573    arguments="EOL"
43574    new_path="$path"
43575
43576  windows_path="$new_path"
43577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43578    unix_path=`$CYGPATH -u "$windows_path"`
43579    new_path="$unix_path"
43580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43582    new_path="$unix_path"
43583  fi
43584
43585
43586    new_path=`$WHICH "$new_path" 2> /dev/null`
43587    # bat and cmd files are not always considered executable in MSYS causing which
43588    # to not find them
43589    if test "x$new_path" = x \
43590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43592      new_path="$path"
43593
43594  windows_path="$new_path"
43595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43596    unix_path=`$CYGPATH -u "$windows_path"`
43597    new_path="$unix_path"
43598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43600    new_path="$unix_path"
43601  fi
43602
43603    fi
43604
43605    if test "x$new_path" = x; then
43606      # It's still not found. Now this is an unrecoverable error.
43607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43608$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43609      has_space=`$ECHO "$complete" | $GREP " "`
43610      if test "x$has_space" != x; then
43611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43613      fi
43614      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43615    fi
43616  fi
43617
43618  # Now new_path has a complete unix path to the binary
43619  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43620    # Keep paths in /bin as-is, but remove trailing .exe if any
43621    new_path="${new_path/%.exe/}"
43622    # Do not save /bin paths to all_fixpath_prefixes!
43623  else
43624    # Not in mixed or Windows style, start by that.
43625    new_path=`cmd //c echo $new_path`
43626
43627  input_path="$new_path"
43628  # Check if we need to convert this using DOS-style short mode. If the path
43629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43630  # take no chances and rewrite it.
43631  # Note: m4 eats our [], so we need to use [ and ] instead.
43632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43633  if test "x$has_forbidden_chars" != x; then
43634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43636  fi
43637
43638    # Output is in $new_path
43639
43640  windows_path="$new_path"
43641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43642    unix_path=`$CYGPATH -u "$windows_path"`
43643    new_path="$unix_path"
43644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43646    new_path="$unix_path"
43647  fi
43648
43649    # remove trailing .exe if any
43650    new_path="${new_path/%.exe/}"
43651
43652    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43653    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43654  fi
43655
43656    else
43657      # We're on a unix platform. Hooray! :)
43658      # First separate the path from the arguments. This will split at the first
43659      # space.
43660      complete="$OBJDUMP"
43661      path="${complete%% *}"
43662      tmp="$complete EOL"
43663      arguments="${tmp#* }"
43664
43665      # Cannot rely on the command "which" here since it doesn't always work.
43666      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43667      if test -z "$is_absolute_path"; then
43668        # Path to executable is not absolute. Find it.
43669        IFS_save="$IFS"
43670        IFS=:
43671        for p in $PATH; do
43672          if test -f "$p/$path" && test -x "$p/$path"; then
43673            new_path="$p/$path"
43674            break
43675          fi
43676        done
43677        IFS="$IFS_save"
43678      else
43679        # This is an absolute path, we can use it without further modifications.
43680        new_path="$path"
43681      fi
43682
43683      if test "x$new_path" = x; then
43684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43685$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43686        has_space=`$ECHO "$complete" | $GREP " "`
43687        if test "x$has_space" != x; then
43688          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43689$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43690        fi
43691        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43692      fi
43693    fi
43694
43695    # Now join together the path and the arguments once again
43696    if test "x$arguments" != xEOL; then
43697      new_complete="$new_path ${arguments% *}"
43698    else
43699      new_complete="$new_path"
43700    fi
43701
43702    if test "x$complete" != "x$new_complete"; then
43703      OBJDUMP="$new_complete"
43704      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43705$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43706    fi
43707  fi
43708
43709  fi
43710
43711
43712  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43713  # to remain in place. Otherwise the compiler will not work in some siutations
43714  # in later configure checks.
43715  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43716    PATH="$OLD_PATH"
43717  fi
43718
43719  # Restore the flags to the user specified values.
43720  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43721  CFLAGS="$ORG_CFLAGS"
43722  CXXFLAGS="$ORG_CXXFLAGS"
43723
43724
43725# Finally do some processing after the detection phase
43726
43727  if test "x$COMPILE_TYPE" = "xcross"; then
43728    # Now we need to find a C/C++ compiler that can build executables for the
43729    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43730    # used once. Also, we need to do this without adding a tools dir to the
43731    # path, otherwise we might pick up cross-compilers which don't use standard
43732    # naming.
43733
43734    OLDPATH="$PATH"
43735
43736
43737# Check whether --with-build-devkit was given.
43738if test "${with_build_devkit+set}" = set; then :
43739  withval=$with_build_devkit;
43740fi
43741
43742    if test "x$with_build_devkit" = "xyes"; then
43743      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43744    elif test -n "$with_build_devkit"; then
43745      if test ! -d "$with_build_devkit"; then
43746        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43747      else
43748
43749  # Only process if variable expands to non-empty
43750
43751  if test "x$with_build_devkit" != x; then
43752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43753
43754  # Input might be given as Windows format, start by converting to
43755  # unix format.
43756  path="$with_build_devkit"
43757  new_path=`$CYGPATH -u "$path"`
43758
43759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43762  # "foo.exe" is OK but "foo" is an error.
43763  #
43764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43765  # It is also a way to make sure we got the proper file name for the real test later on.
43766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43767  if test "x$test_shortpath" = x; then
43768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43769$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43770    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43771  fi
43772
43773  # Call helper function which possibly converts this using DOS-style short mode.
43774  # If so, the updated path is stored in $new_path.
43775
43776  input_path="$new_path"
43777  # Check if we need to convert this using DOS-style short mode. If the path
43778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43779  # take no chances and rewrite it.
43780  # Note: m4 eats our [], so we need to use [ and ] instead.
43781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43782  if test "x$has_forbidden_chars" != x; then
43783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43787      # Going to short mode and back again did indeed matter. Since short mode is
43788      # case insensitive, let's make it lowercase to improve readability.
43789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43790      # Now convert it back to Unix-style (cygpath)
43791      input_path=`$CYGPATH -u "$shortmode_path"`
43792      new_path="$input_path"
43793    fi
43794  fi
43795
43796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43797  if test "x$test_cygdrive_prefix" = x; then
43798    # As a simple fix, exclude /usr/bin since it's not a real path.
43799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43801      # a path prefixed by /cygdrive for fixpath to work.
43802      new_path="$CYGWIN_ROOT_PATH$input_path"
43803    fi
43804  fi
43805
43806
43807  if test "x$path" != "x$new_path"; then
43808    with_build_devkit="$new_path"
43809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43810$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43811  fi
43812
43813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43814
43815  path="$with_build_devkit"
43816  has_colon=`$ECHO $path | $GREP ^.:`
43817  new_path="$path"
43818  if test "x$has_colon" = x; then
43819    # Not in mixed or Windows style, start by that.
43820    new_path=`cmd //c echo $path`
43821  fi
43822
43823
43824  input_path="$new_path"
43825  # Check if we need to convert this using DOS-style short mode. If the path
43826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43827  # take no chances and rewrite it.
43828  # Note: m4 eats our [], so we need to use [ and ] instead.
43829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43830  if test "x$has_forbidden_chars" != x; then
43831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43833  fi
43834
43835
43836  windows_path="$new_path"
43837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43838    unix_path=`$CYGPATH -u "$windows_path"`
43839    new_path="$unix_path"
43840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43842    new_path="$unix_path"
43843  fi
43844
43845  if test "x$path" != "x$new_path"; then
43846    with_build_devkit="$new_path"
43847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43848$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43849  fi
43850
43851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43853
43854    else
43855      # We're on a unix platform. Hooray! :)
43856      path="$with_build_devkit"
43857      has_space=`$ECHO "$path" | $GREP " "`
43858      if test "x$has_space" != x; then
43859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43860$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43862      fi
43863
43864      # Use eval to expand a potential ~
43865      eval path="$path"
43866      if test ! -f "$path" && test ! -d "$path"; then
43867        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43868      fi
43869
43870      if test -d "$path"; then
43871        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43872      else
43873        dir="`$DIRNAME "$path"`"
43874        base="`$BASENAME "$path"`"
43875        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43876      fi
43877    fi
43878  fi
43879
43880        BUILD_DEVKIT_ROOT="$with_build_devkit"
43881        # Check for a meta data info file in the root of the devkit
43882        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43883          # Process devkit.info so that existing devkit variables are not
43884          # modified by this
43885          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43886              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43887              -e "s/\$host/\$build/g" \
43888              $BUILD_DEVKIT_ROOT/devkit.info \
43889              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43890          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43891          # This potentially sets the following:
43892          # A descriptive name of the devkit
43893
43894  if test "x$BUILD_DEVKIT_NAME" = x; then
43895    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43896  fi
43897
43898          # Corresponds to --with-extra-path
43899
43900  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43901    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43902  fi
43903
43904          # Corresponds to --with-toolchain-path
43905
43906  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43907    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43908  fi
43909
43910          # Corresponds to --with-sysroot
43911
43912  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43913    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43914  fi
43915
43916          # Skip the Window specific parts
43917        fi
43918
43919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43920$as_echo_n "checking for build platform devkit... " >&6; }
43921        if test "x$BUILD_DEVKIT_NAME" != x; then
43922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43923$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43924        else
43925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43926$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43927        fi
43928
43929        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43930
43931  if test "x$BUILD_SYSROOT" != "x"; then
43932    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43933      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43934        # Solaris Studio does not have a concept of sysroot. Instead we must
43935        # make sure the default include and lib dirs are appended to each
43936        # compile and link command line. Must also add -I-xbuiltin to enable
43937        # inlining of system functions and intrinsics.
43938        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43939        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43940            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43941      fi
43942    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43943      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43944      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43945    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43946      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43947      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43948    fi
43949    # Propagate the sysroot args to hotspot
43950    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43951    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43952    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43953    # The global CFLAGS and LDFLAGS variables need these for configure to function
43954    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43955    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43956    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43957    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43958  fi
43959
43960  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43961    # We also need -iframework<path>/System/Library/Frameworks
43962    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43963    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43964    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43965    # set this here so it doesn't have to be peppered throughout the forest
43966    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43967    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43968  fi
43969
43970
43971
43972
43973
43974         # Fallback default of just /bin if DEVKIT_PATH is not defined
43975        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43976          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43977        fi
43978        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43979      fi
43980    fi
43981
43982    # FIXME: we should list the discovered compilers as an exclude pattern!
43983    # If we do that, we can do this detection before POST_DETECTION, and still
43984    # find the build compilers in the tools dir, if needed.
43985
43986
43987
43988  # Publish this variable in the help.
43989
43990
43991  if [ -z "${BUILD_CC+x}" ]; then
43992    # The variable is not set by user, try to locate tool using the code snippet
43993    for ac_prog in cl cc gcc
43994do
43995  # Extract the first word of "$ac_prog", so it can be a program name with args.
43996set dummy $ac_prog; ac_word=$2
43997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43998$as_echo_n "checking for $ac_word... " >&6; }
43999if ${ac_cv_path_BUILD_CC+:} false; then :
44000  $as_echo_n "(cached) " >&6
44001else
44002  case $BUILD_CC in
44003  [\\/]* | ?:[\\/]*)
44004  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44005  ;;
44006  *)
44007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44008for as_dir in $PATH
44009do
44010  IFS=$as_save_IFS
44011  test -z "$as_dir" && as_dir=.
44012    for ac_exec_ext in '' $ac_executable_extensions; do
44013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44014    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44016    break 2
44017  fi
44018done
44019  done
44020IFS=$as_save_IFS
44021
44022  ;;
44023esac
44024fi
44025BUILD_CC=$ac_cv_path_BUILD_CC
44026if test -n "$BUILD_CC"; then
44027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44028$as_echo "$BUILD_CC" >&6; }
44029else
44030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44031$as_echo "no" >&6; }
44032fi
44033
44034
44035  test -n "$BUILD_CC" && break
44036done
44037
44038  else
44039    # The variable is set, but is it from the command line or the environment?
44040
44041    # Try to remove the string !BUILD_CC! from our list.
44042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44044      # If it failed, the variable was not from the command line. Ignore it,
44045      # but warn the user (except for BASH, which is always set by the calling BASH).
44046      if test "xBUILD_CC" != xBASH; then
44047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44048$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44049      fi
44050      # Try to locate tool using the code snippet
44051      for ac_prog in cl cc gcc
44052do
44053  # Extract the first word of "$ac_prog", so it can be a program name with args.
44054set dummy $ac_prog; ac_word=$2
44055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44056$as_echo_n "checking for $ac_word... " >&6; }
44057if ${ac_cv_path_BUILD_CC+:} false; then :
44058  $as_echo_n "(cached) " >&6
44059else
44060  case $BUILD_CC in
44061  [\\/]* | ?:[\\/]*)
44062  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44063  ;;
44064  *)
44065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44066for as_dir in $PATH
44067do
44068  IFS=$as_save_IFS
44069  test -z "$as_dir" && as_dir=.
44070    for ac_exec_ext in '' $ac_executable_extensions; do
44071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44072    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44074    break 2
44075  fi
44076done
44077  done
44078IFS=$as_save_IFS
44079
44080  ;;
44081esac
44082fi
44083BUILD_CC=$ac_cv_path_BUILD_CC
44084if test -n "$BUILD_CC"; then
44085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44086$as_echo "$BUILD_CC" >&6; }
44087else
44088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44089$as_echo "no" >&6; }
44090fi
44091
44092
44093  test -n "$BUILD_CC" && break
44094done
44095
44096    else
44097      # If it succeeded, then it was overridden by the user. We will use it
44098      # for the tool.
44099
44100      # First remove it from the list of overridden variables, so we can test
44101      # for unknown variables in the end.
44102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44103
44104      # Check if we try to supply an empty value
44105      if test "x$BUILD_CC" = x; then
44106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44107$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44109$as_echo_n "checking for BUILD_CC... " >&6; }
44110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44111$as_echo "disabled" >&6; }
44112      else
44113        # Check if the provided tool contains a complete path.
44114        tool_specified="$BUILD_CC"
44115        tool_basename="${tool_specified##*/}"
44116        if test "x$tool_basename" = "x$tool_specified"; then
44117          # A command without a complete path is provided, search $PATH.
44118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44119$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44120          # Extract the first word of "$tool_basename", so it can be a program name with args.
44121set dummy $tool_basename; ac_word=$2
44122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44123$as_echo_n "checking for $ac_word... " >&6; }
44124if ${ac_cv_path_BUILD_CC+:} false; then :
44125  $as_echo_n "(cached) " >&6
44126else
44127  case $BUILD_CC in
44128  [\\/]* | ?:[\\/]*)
44129  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44130  ;;
44131  *)
44132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44133for as_dir in $PATH
44134do
44135  IFS=$as_save_IFS
44136  test -z "$as_dir" && as_dir=.
44137    for ac_exec_ext in '' $ac_executable_extensions; do
44138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44139    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44141    break 2
44142  fi
44143done
44144  done
44145IFS=$as_save_IFS
44146
44147  ;;
44148esac
44149fi
44150BUILD_CC=$ac_cv_path_BUILD_CC
44151if test -n "$BUILD_CC"; then
44152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44153$as_echo "$BUILD_CC" >&6; }
44154else
44155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44156$as_echo "no" >&6; }
44157fi
44158
44159
44160          if test "x$BUILD_CC" = x; then
44161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44162          fi
44163        else
44164          # Otherwise we believe it is a complete path. Use it as it is.
44165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44166$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44168$as_echo_n "checking for BUILD_CC... " >&6; }
44169          if test ! -x "$tool_specified"; then
44170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44171$as_echo "not found" >&6; }
44172            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44173          fi
44174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44175$as_echo "$tool_specified" >&6; }
44176        fi
44177      fi
44178    fi
44179
44180  fi
44181
44182
44183
44184  if test "x$BUILD_CC" = x; then
44185    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44186  fi
44187
44188
44189
44190  # Only process if variable expands to non-empty
44191
44192  if test "x$BUILD_CC" != x; then
44193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44194
44195  # First separate the path from the arguments. This will split at the first
44196  # space.
44197  complete="$BUILD_CC"
44198  path="${complete%% *}"
44199  tmp="$complete EOL"
44200  arguments="${tmp#* }"
44201
44202  # Input might be given as Windows format, start by converting to
44203  # unix format.
44204  new_path=`$CYGPATH -u "$path"`
44205
44206  # Now try to locate executable using which
44207  new_path=`$WHICH "$new_path" 2> /dev/null`
44208  # bat and cmd files are not always considered executable in cygwin causing which
44209  # to not find them
44210  if test "x$new_path" = x \
44211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44213    new_path=`$CYGPATH -u "$path"`
44214  fi
44215  if test "x$new_path" = x; then
44216    # Oops. Which didn't find the executable.
44217    # The splitting of arguments from the executable at a space might have been incorrect,
44218    # since paths with space are more likely in Windows. Give it another try with the whole
44219    # argument.
44220    path="$complete"
44221    arguments="EOL"
44222    new_path=`$CYGPATH -u "$path"`
44223    new_path=`$WHICH "$new_path" 2> /dev/null`
44224    # bat and cmd files are not always considered executable in cygwin causing which
44225    # to not find them
44226    if test "x$new_path" = x \
44227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44229      new_path=`$CYGPATH -u "$path"`
44230    fi
44231    if test "x$new_path" = x; then
44232      # It's still not found. Now this is an unrecoverable error.
44233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44234$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44235      has_space=`$ECHO "$complete" | $GREP " "`
44236      if test "x$has_space" != x; then
44237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44239      fi
44240      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44241    fi
44242  fi
44243
44244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44247  # "foo.exe" is OK but "foo" is an error.
44248  #
44249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44250  # It is also a way to make sure we got the proper file name for the real test later on.
44251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44252  if test "x$test_shortpath" = x; then
44253    # Short path failed, file does not exist as specified.
44254    # Try adding .exe or .cmd
44255    if test -f "${new_path}.exe"; then
44256      input_to_shortpath="${new_path}.exe"
44257    elif test -f "${new_path}.cmd"; then
44258      input_to_shortpath="${new_path}.cmd"
44259    else
44260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44261$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44264      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44265    fi
44266  else
44267    input_to_shortpath="$new_path"
44268  fi
44269
44270  # Call helper function which possibly converts this using DOS-style short mode.
44271  # If so, the updated path is stored in $new_path.
44272  new_path="$input_to_shortpath"
44273
44274  input_path="$input_to_shortpath"
44275  # Check if we need to convert this using DOS-style short mode. If the path
44276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44277  # take no chances and rewrite it.
44278  # Note: m4 eats our [], so we need to use [ and ] instead.
44279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44280  if test "x$has_forbidden_chars" != x; then
44281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44285      # Going to short mode and back again did indeed matter. Since short mode is
44286      # case insensitive, let's make it lowercase to improve readability.
44287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44288      # Now convert it back to Unix-style (cygpath)
44289      input_path=`$CYGPATH -u "$shortmode_path"`
44290      new_path="$input_path"
44291    fi
44292  fi
44293
44294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44295  if test "x$test_cygdrive_prefix" = x; then
44296    # As a simple fix, exclude /usr/bin since it's not a real path.
44297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44299      # a path prefixed by /cygdrive for fixpath to work.
44300      new_path="$CYGWIN_ROOT_PATH$input_path"
44301    fi
44302  fi
44303
44304  # remove trailing .exe if any
44305  new_path="${new_path/%.exe/}"
44306
44307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44308
44309  # First separate the path from the arguments. This will split at the first
44310  # space.
44311  complete="$BUILD_CC"
44312  path="${complete%% *}"
44313  tmp="$complete EOL"
44314  arguments="${tmp#* }"
44315
44316  # Input might be given as Windows format, start by converting to
44317  # unix format.
44318  new_path="$path"
44319
44320  windows_path="$new_path"
44321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44322    unix_path=`$CYGPATH -u "$windows_path"`
44323    new_path="$unix_path"
44324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44326    new_path="$unix_path"
44327  fi
44328
44329
44330  # Now try to locate executable using which
44331  new_path=`$WHICH "$new_path" 2> /dev/null`
44332
44333  if test "x$new_path" = x; then
44334    # Oops. Which didn't find the executable.
44335    # The splitting of arguments from the executable at a space might have been incorrect,
44336    # since paths with space are more likely in Windows. Give it another try with the whole
44337    # argument.
44338    path="$complete"
44339    arguments="EOL"
44340    new_path="$path"
44341
44342  windows_path="$new_path"
44343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44344    unix_path=`$CYGPATH -u "$windows_path"`
44345    new_path="$unix_path"
44346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44348    new_path="$unix_path"
44349  fi
44350
44351
44352    new_path=`$WHICH "$new_path" 2> /dev/null`
44353    # bat and cmd files are not always considered executable in MSYS causing which
44354    # to not find them
44355    if test "x$new_path" = x \
44356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44358      new_path="$path"
44359
44360  windows_path="$new_path"
44361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44362    unix_path=`$CYGPATH -u "$windows_path"`
44363    new_path="$unix_path"
44364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44366    new_path="$unix_path"
44367  fi
44368
44369    fi
44370
44371    if test "x$new_path" = x; then
44372      # It's still not found. Now this is an unrecoverable error.
44373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44374$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44375      has_space=`$ECHO "$complete" | $GREP " "`
44376      if test "x$has_space" != x; then
44377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44379      fi
44380      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44381    fi
44382  fi
44383
44384  # Now new_path has a complete unix path to the binary
44385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44386    # Keep paths in /bin as-is, but remove trailing .exe if any
44387    new_path="${new_path/%.exe/}"
44388    # Do not save /bin paths to all_fixpath_prefixes!
44389  else
44390    # Not in mixed or Windows style, start by that.
44391    new_path=`cmd //c echo $new_path`
44392
44393  input_path="$new_path"
44394  # Check if we need to convert this using DOS-style short mode. If the path
44395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44396  # take no chances and rewrite it.
44397  # Note: m4 eats our [], so we need to use [ and ] instead.
44398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44399  if test "x$has_forbidden_chars" != x; then
44400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44402  fi
44403
44404    # Output is in $new_path
44405
44406  windows_path="$new_path"
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    unix_path=`$CYGPATH -u "$windows_path"`
44409    new_path="$unix_path"
44410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44412    new_path="$unix_path"
44413  fi
44414
44415    # remove trailing .exe if any
44416    new_path="${new_path/%.exe/}"
44417
44418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44420  fi
44421
44422    else
44423      # We're on a unix platform. Hooray! :)
44424      # First separate the path from the arguments. This will split at the first
44425      # space.
44426      complete="$BUILD_CC"
44427      path="${complete%% *}"
44428      tmp="$complete EOL"
44429      arguments="${tmp#* }"
44430
44431      # Cannot rely on the command "which" here since it doesn't always work.
44432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44433      if test -z "$is_absolute_path"; then
44434        # Path to executable is not absolute. Find it.
44435        IFS_save="$IFS"
44436        IFS=:
44437        for p in $PATH; do
44438          if test -f "$p/$path" && test -x "$p/$path"; then
44439            new_path="$p/$path"
44440            break
44441          fi
44442        done
44443        IFS="$IFS_save"
44444      else
44445        # This is an absolute path, we can use it without further modifications.
44446        new_path="$path"
44447      fi
44448
44449      if test "x$new_path" = x; then
44450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44451$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44452        has_space=`$ECHO "$complete" | $GREP " "`
44453        if test "x$has_space" != x; then
44454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44456        fi
44457        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44458      fi
44459    fi
44460
44461    # Now join together the path and the arguments once again
44462    if test "x$arguments" != xEOL; then
44463      new_complete="$new_path ${arguments% *}"
44464    else
44465      new_complete="$new_path"
44466    fi
44467
44468    if test "x$complete" != "x$new_complete"; then
44469      BUILD_CC="$new_complete"
44470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44471$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44472    fi
44473  fi
44474
44475
44476
44477
44478  # Publish this variable in the help.
44479
44480
44481  if [ -z "${BUILD_CXX+x}" ]; then
44482    # The variable is not set by user, try to locate tool using the code snippet
44483    for ac_prog in cl CC g++
44484do
44485  # Extract the first word of "$ac_prog", so it can be a program name with args.
44486set dummy $ac_prog; ac_word=$2
44487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44488$as_echo_n "checking for $ac_word... " >&6; }
44489if ${ac_cv_path_BUILD_CXX+:} false; then :
44490  $as_echo_n "(cached) " >&6
44491else
44492  case $BUILD_CXX in
44493  [\\/]* | ?:[\\/]*)
44494  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44495  ;;
44496  *)
44497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44498for as_dir in $PATH
44499do
44500  IFS=$as_save_IFS
44501  test -z "$as_dir" && as_dir=.
44502    for ac_exec_ext in '' $ac_executable_extensions; do
44503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44504    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44506    break 2
44507  fi
44508done
44509  done
44510IFS=$as_save_IFS
44511
44512  ;;
44513esac
44514fi
44515BUILD_CXX=$ac_cv_path_BUILD_CXX
44516if test -n "$BUILD_CXX"; then
44517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44518$as_echo "$BUILD_CXX" >&6; }
44519else
44520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44521$as_echo "no" >&6; }
44522fi
44523
44524
44525  test -n "$BUILD_CXX" && break
44526done
44527
44528  else
44529    # The variable is set, but is it from the command line or the environment?
44530
44531    # Try to remove the string !BUILD_CXX! from our list.
44532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44534      # If it failed, the variable was not from the command line. Ignore it,
44535      # but warn the user (except for BASH, which is always set by the calling BASH).
44536      if test "xBUILD_CXX" != xBASH; then
44537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44538$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44539      fi
44540      # Try to locate tool using the code snippet
44541      for ac_prog in cl CC g++
44542do
44543  # Extract the first word of "$ac_prog", so it can be a program name with args.
44544set dummy $ac_prog; ac_word=$2
44545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44546$as_echo_n "checking for $ac_word... " >&6; }
44547if ${ac_cv_path_BUILD_CXX+:} false; then :
44548  $as_echo_n "(cached) " >&6
44549else
44550  case $BUILD_CXX in
44551  [\\/]* | ?:[\\/]*)
44552  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44553  ;;
44554  *)
44555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44556for as_dir in $PATH
44557do
44558  IFS=$as_save_IFS
44559  test -z "$as_dir" && as_dir=.
44560    for ac_exec_ext in '' $ac_executable_extensions; do
44561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44562    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44564    break 2
44565  fi
44566done
44567  done
44568IFS=$as_save_IFS
44569
44570  ;;
44571esac
44572fi
44573BUILD_CXX=$ac_cv_path_BUILD_CXX
44574if test -n "$BUILD_CXX"; then
44575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44576$as_echo "$BUILD_CXX" >&6; }
44577else
44578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44579$as_echo "no" >&6; }
44580fi
44581
44582
44583  test -n "$BUILD_CXX" && break
44584done
44585
44586    else
44587      # If it succeeded, then it was overridden by the user. We will use it
44588      # for the tool.
44589
44590      # First remove it from the list of overridden variables, so we can test
44591      # for unknown variables in the end.
44592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44593
44594      # Check if we try to supply an empty value
44595      if test "x$BUILD_CXX" = x; then
44596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44597$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44599$as_echo_n "checking for BUILD_CXX... " >&6; }
44600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44601$as_echo "disabled" >&6; }
44602      else
44603        # Check if the provided tool contains a complete path.
44604        tool_specified="$BUILD_CXX"
44605        tool_basename="${tool_specified##*/}"
44606        if test "x$tool_basename" = "x$tool_specified"; then
44607          # A command without a complete path is provided, search $PATH.
44608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44609$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44610          # Extract the first word of "$tool_basename", so it can be a program name with args.
44611set dummy $tool_basename; ac_word=$2
44612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44613$as_echo_n "checking for $ac_word... " >&6; }
44614if ${ac_cv_path_BUILD_CXX+:} false; then :
44615  $as_echo_n "(cached) " >&6
44616else
44617  case $BUILD_CXX in
44618  [\\/]* | ?:[\\/]*)
44619  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44620  ;;
44621  *)
44622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44623for as_dir in $PATH
44624do
44625  IFS=$as_save_IFS
44626  test -z "$as_dir" && as_dir=.
44627    for ac_exec_ext in '' $ac_executable_extensions; do
44628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44629    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44631    break 2
44632  fi
44633done
44634  done
44635IFS=$as_save_IFS
44636
44637  ;;
44638esac
44639fi
44640BUILD_CXX=$ac_cv_path_BUILD_CXX
44641if test -n "$BUILD_CXX"; then
44642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44643$as_echo "$BUILD_CXX" >&6; }
44644else
44645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44646$as_echo "no" >&6; }
44647fi
44648
44649
44650          if test "x$BUILD_CXX" = x; then
44651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44652          fi
44653        else
44654          # Otherwise we believe it is a complete path. Use it as it is.
44655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44656$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44658$as_echo_n "checking for BUILD_CXX... " >&6; }
44659          if test ! -x "$tool_specified"; then
44660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44661$as_echo "not found" >&6; }
44662            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44663          fi
44664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44665$as_echo "$tool_specified" >&6; }
44666        fi
44667      fi
44668    fi
44669
44670  fi
44671
44672
44673
44674  if test "x$BUILD_CXX" = x; then
44675    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44676  fi
44677
44678
44679
44680  # Only process if variable expands to non-empty
44681
44682  if test "x$BUILD_CXX" != x; then
44683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44684
44685  # First separate the path from the arguments. This will split at the first
44686  # space.
44687  complete="$BUILD_CXX"
44688  path="${complete%% *}"
44689  tmp="$complete EOL"
44690  arguments="${tmp#* }"
44691
44692  # Input might be given as Windows format, start by converting to
44693  # unix format.
44694  new_path=`$CYGPATH -u "$path"`
44695
44696  # Now try to locate executable using which
44697  new_path=`$WHICH "$new_path" 2> /dev/null`
44698  # bat and cmd files are not always considered executable in cygwin causing which
44699  # to not find them
44700  if test "x$new_path" = x \
44701      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44702      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44703    new_path=`$CYGPATH -u "$path"`
44704  fi
44705  if test "x$new_path" = x; then
44706    # Oops. Which didn't find the executable.
44707    # The splitting of arguments from the executable at a space might have been incorrect,
44708    # since paths with space are more likely in Windows. Give it another try with the whole
44709    # argument.
44710    path="$complete"
44711    arguments="EOL"
44712    new_path=`$CYGPATH -u "$path"`
44713    new_path=`$WHICH "$new_path" 2> /dev/null`
44714    # bat and cmd files are not always considered executable in cygwin causing which
44715    # to not find them
44716    if test "x$new_path" = x \
44717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44719      new_path=`$CYGPATH -u "$path"`
44720    fi
44721    if test "x$new_path" = x; then
44722      # It's still not found. Now this is an unrecoverable error.
44723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44724$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44725      has_space=`$ECHO "$complete" | $GREP " "`
44726      if test "x$has_space" != x; then
44727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44729      fi
44730      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44731    fi
44732  fi
44733
44734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44737  # "foo.exe" is OK but "foo" is an error.
44738  #
44739  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44740  # It is also a way to make sure we got the proper file name for the real test later on.
44741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44742  if test "x$test_shortpath" = x; then
44743    # Short path failed, file does not exist as specified.
44744    # Try adding .exe or .cmd
44745    if test -f "${new_path}.exe"; then
44746      input_to_shortpath="${new_path}.exe"
44747    elif test -f "${new_path}.cmd"; then
44748      input_to_shortpath="${new_path}.cmd"
44749    else
44750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44751$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44752      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44753$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44754      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44755    fi
44756  else
44757    input_to_shortpath="$new_path"
44758  fi
44759
44760  # Call helper function which possibly converts this using DOS-style short mode.
44761  # If so, the updated path is stored in $new_path.
44762  new_path="$input_to_shortpath"
44763
44764  input_path="$input_to_shortpath"
44765  # Check if we need to convert this using DOS-style short mode. If the path
44766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44767  # take no chances and rewrite it.
44768  # Note: m4 eats our [], so we need to use [ and ] instead.
44769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44770  if test "x$has_forbidden_chars" != x; then
44771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44775      # Going to short mode and back again did indeed matter. Since short mode is
44776      # case insensitive, let's make it lowercase to improve readability.
44777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44778      # Now convert it back to Unix-style (cygpath)
44779      input_path=`$CYGPATH -u "$shortmode_path"`
44780      new_path="$input_path"
44781    fi
44782  fi
44783
44784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44785  if test "x$test_cygdrive_prefix" = x; then
44786    # As a simple fix, exclude /usr/bin since it's not a real path.
44787    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44789      # a path prefixed by /cygdrive for fixpath to work.
44790      new_path="$CYGWIN_ROOT_PATH$input_path"
44791    fi
44792  fi
44793
44794  # remove trailing .exe if any
44795  new_path="${new_path/%.exe/}"
44796
44797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44798
44799  # First separate the path from the arguments. This will split at the first
44800  # space.
44801  complete="$BUILD_CXX"
44802  path="${complete%% *}"
44803  tmp="$complete EOL"
44804  arguments="${tmp#* }"
44805
44806  # Input might be given as Windows format, start by converting to
44807  # unix format.
44808  new_path="$path"
44809
44810  windows_path="$new_path"
44811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44812    unix_path=`$CYGPATH -u "$windows_path"`
44813    new_path="$unix_path"
44814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44816    new_path="$unix_path"
44817  fi
44818
44819
44820  # Now try to locate executable using which
44821  new_path=`$WHICH "$new_path" 2> /dev/null`
44822
44823  if test "x$new_path" = x; then
44824    # Oops. Which didn't find the executable.
44825    # The splitting of arguments from the executable at a space might have been incorrect,
44826    # since paths with space are more likely in Windows. Give it another try with the whole
44827    # argument.
44828    path="$complete"
44829    arguments="EOL"
44830    new_path="$path"
44831
44832  windows_path="$new_path"
44833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44834    unix_path=`$CYGPATH -u "$windows_path"`
44835    new_path="$unix_path"
44836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44838    new_path="$unix_path"
44839  fi
44840
44841
44842    new_path=`$WHICH "$new_path" 2> /dev/null`
44843    # bat and cmd files are not always considered executable in MSYS causing which
44844    # to not find them
44845    if test "x$new_path" = x \
44846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44848      new_path="$path"
44849
44850  windows_path="$new_path"
44851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44852    unix_path=`$CYGPATH -u "$windows_path"`
44853    new_path="$unix_path"
44854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44856    new_path="$unix_path"
44857  fi
44858
44859    fi
44860
44861    if test "x$new_path" = x; then
44862      # It's still not found. Now this is an unrecoverable error.
44863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44864$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44865      has_space=`$ECHO "$complete" | $GREP " "`
44866      if test "x$has_space" != x; then
44867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44869      fi
44870      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44871    fi
44872  fi
44873
44874  # Now new_path has a complete unix path to the binary
44875  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44876    # Keep paths in /bin as-is, but remove trailing .exe if any
44877    new_path="${new_path/%.exe/}"
44878    # Do not save /bin paths to all_fixpath_prefixes!
44879  else
44880    # Not in mixed or Windows style, start by that.
44881    new_path=`cmd //c echo $new_path`
44882
44883  input_path="$new_path"
44884  # Check if we need to convert this using DOS-style short mode. If the path
44885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44886  # take no chances and rewrite it.
44887  # Note: m4 eats our [], so we need to use [ and ] instead.
44888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44889  if test "x$has_forbidden_chars" != x; then
44890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44892  fi
44893
44894    # Output is in $new_path
44895
44896  windows_path="$new_path"
44897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44898    unix_path=`$CYGPATH -u "$windows_path"`
44899    new_path="$unix_path"
44900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44902    new_path="$unix_path"
44903  fi
44904
44905    # remove trailing .exe if any
44906    new_path="${new_path/%.exe/}"
44907
44908    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44909    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44910  fi
44911
44912    else
44913      # We're on a unix platform. Hooray! :)
44914      # First separate the path from the arguments. This will split at the first
44915      # space.
44916      complete="$BUILD_CXX"
44917      path="${complete%% *}"
44918      tmp="$complete EOL"
44919      arguments="${tmp#* }"
44920
44921      # Cannot rely on the command "which" here since it doesn't always work.
44922      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44923      if test -z "$is_absolute_path"; then
44924        # Path to executable is not absolute. Find it.
44925        IFS_save="$IFS"
44926        IFS=:
44927        for p in $PATH; do
44928          if test -f "$p/$path" && test -x "$p/$path"; then
44929            new_path="$p/$path"
44930            break
44931          fi
44932        done
44933        IFS="$IFS_save"
44934      else
44935        # This is an absolute path, we can use it without further modifications.
44936        new_path="$path"
44937      fi
44938
44939      if test "x$new_path" = x; then
44940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44941$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44942        has_space=`$ECHO "$complete" | $GREP " "`
44943        if test "x$has_space" != x; then
44944          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44945$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44946        fi
44947        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44948      fi
44949    fi
44950
44951    # Now join together the path and the arguments once again
44952    if test "x$arguments" != xEOL; then
44953      new_complete="$new_path ${arguments% *}"
44954    else
44955      new_complete="$new_path"
44956    fi
44957
44958    if test "x$complete" != "x$new_complete"; then
44959      BUILD_CXX="$new_complete"
44960      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44961$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44962    fi
44963  fi
44964
44965
44966
44967  # Publish this variable in the help.
44968
44969
44970  if [ -z "${BUILD_NM+x}" ]; then
44971    # The variable is not set by user, try to locate tool using the code snippet
44972    for ac_prog in nm gcc-nm
44973do
44974  # Extract the first word of "$ac_prog", so it can be a program name with args.
44975set dummy $ac_prog; ac_word=$2
44976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44977$as_echo_n "checking for $ac_word... " >&6; }
44978if ${ac_cv_path_BUILD_NM+:} false; then :
44979  $as_echo_n "(cached) " >&6
44980else
44981  case $BUILD_NM in
44982  [\\/]* | ?:[\\/]*)
44983  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44984  ;;
44985  *)
44986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44987for as_dir in $PATH
44988do
44989  IFS=$as_save_IFS
44990  test -z "$as_dir" && as_dir=.
44991    for ac_exec_ext in '' $ac_executable_extensions; do
44992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44993    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44995    break 2
44996  fi
44997done
44998  done
44999IFS=$as_save_IFS
45000
45001  ;;
45002esac
45003fi
45004BUILD_NM=$ac_cv_path_BUILD_NM
45005if test -n "$BUILD_NM"; then
45006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45007$as_echo "$BUILD_NM" >&6; }
45008else
45009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45010$as_echo "no" >&6; }
45011fi
45012
45013
45014  test -n "$BUILD_NM" && break
45015done
45016
45017  else
45018    # The variable is set, but is it from the command line or the environment?
45019
45020    # Try to remove the string !BUILD_NM! from our list.
45021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45023      # If it failed, the variable was not from the command line. Ignore it,
45024      # but warn the user (except for BASH, which is always set by the calling BASH).
45025      if test "xBUILD_NM" != xBASH; then
45026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45027$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45028      fi
45029      # Try to locate tool using the code snippet
45030      for ac_prog in nm gcc-nm
45031do
45032  # Extract the first word of "$ac_prog", so it can be a program name with args.
45033set dummy $ac_prog; ac_word=$2
45034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45035$as_echo_n "checking for $ac_word... " >&6; }
45036if ${ac_cv_path_BUILD_NM+:} false; then :
45037  $as_echo_n "(cached) " >&6
45038else
45039  case $BUILD_NM in
45040  [\\/]* | ?:[\\/]*)
45041  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45042  ;;
45043  *)
45044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45045for as_dir in $PATH
45046do
45047  IFS=$as_save_IFS
45048  test -z "$as_dir" && as_dir=.
45049    for ac_exec_ext in '' $ac_executable_extensions; do
45050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45051    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45053    break 2
45054  fi
45055done
45056  done
45057IFS=$as_save_IFS
45058
45059  ;;
45060esac
45061fi
45062BUILD_NM=$ac_cv_path_BUILD_NM
45063if test -n "$BUILD_NM"; then
45064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45065$as_echo "$BUILD_NM" >&6; }
45066else
45067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45068$as_echo "no" >&6; }
45069fi
45070
45071
45072  test -n "$BUILD_NM" && break
45073done
45074
45075    else
45076      # If it succeeded, then it was overridden by the user. We will use it
45077      # for the tool.
45078
45079      # First remove it from the list of overridden variables, so we can test
45080      # for unknown variables in the end.
45081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45082
45083      # Check if we try to supply an empty value
45084      if test "x$BUILD_NM" = x; then
45085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45086$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45088$as_echo_n "checking for BUILD_NM... " >&6; }
45089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45090$as_echo "disabled" >&6; }
45091      else
45092        # Check if the provided tool contains a complete path.
45093        tool_specified="$BUILD_NM"
45094        tool_basename="${tool_specified##*/}"
45095        if test "x$tool_basename" = "x$tool_specified"; then
45096          # A command without a complete path is provided, search $PATH.
45097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45098$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45099          # Extract the first word of "$tool_basename", so it can be a program name with args.
45100set dummy $tool_basename; ac_word=$2
45101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45102$as_echo_n "checking for $ac_word... " >&6; }
45103if ${ac_cv_path_BUILD_NM+:} false; then :
45104  $as_echo_n "(cached) " >&6
45105else
45106  case $BUILD_NM in
45107  [\\/]* | ?:[\\/]*)
45108  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45109  ;;
45110  *)
45111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45112for as_dir in $PATH
45113do
45114  IFS=$as_save_IFS
45115  test -z "$as_dir" && as_dir=.
45116    for ac_exec_ext in '' $ac_executable_extensions; do
45117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45118    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45120    break 2
45121  fi
45122done
45123  done
45124IFS=$as_save_IFS
45125
45126  ;;
45127esac
45128fi
45129BUILD_NM=$ac_cv_path_BUILD_NM
45130if test -n "$BUILD_NM"; then
45131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45132$as_echo "$BUILD_NM" >&6; }
45133else
45134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45135$as_echo "no" >&6; }
45136fi
45137
45138
45139          if test "x$BUILD_NM" = x; then
45140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45141          fi
45142        else
45143          # Otherwise we believe it is a complete path. Use it as it is.
45144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45145$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45147$as_echo_n "checking for BUILD_NM... " >&6; }
45148          if test ! -x "$tool_specified"; then
45149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45150$as_echo "not found" >&6; }
45151            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45152          fi
45153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45154$as_echo "$tool_specified" >&6; }
45155        fi
45156      fi
45157    fi
45158
45159  fi
45160
45161
45162
45163  # Only process if variable expands to non-empty
45164
45165  if test "x$BUILD_NM" != x; then
45166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45167
45168  # First separate the path from the arguments. This will split at the first
45169  # space.
45170  complete="$BUILD_NM"
45171  path="${complete%% *}"
45172  tmp="$complete EOL"
45173  arguments="${tmp#* }"
45174
45175  # Input might be given as Windows format, start by converting to
45176  # unix format.
45177  new_path=`$CYGPATH -u "$path"`
45178
45179  # Now try to locate executable using which
45180  new_path=`$WHICH "$new_path" 2> /dev/null`
45181  # bat and cmd files are not always considered executable in cygwin causing which
45182  # to not find them
45183  if test "x$new_path" = x \
45184      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45185      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45186    new_path=`$CYGPATH -u "$path"`
45187  fi
45188  if test "x$new_path" = x; then
45189    # Oops. Which didn't find the executable.
45190    # The splitting of arguments from the executable at a space might have been incorrect,
45191    # since paths with space are more likely in Windows. Give it another try with the whole
45192    # argument.
45193    path="$complete"
45194    arguments="EOL"
45195    new_path=`$CYGPATH -u "$path"`
45196    new_path=`$WHICH "$new_path" 2> /dev/null`
45197    # bat and cmd files are not always considered executable in cygwin causing which
45198    # to not find them
45199    if test "x$new_path" = x \
45200        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45201        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45202      new_path=`$CYGPATH -u "$path"`
45203    fi
45204    if test "x$new_path" = x; then
45205      # It's still not found. Now this is an unrecoverable error.
45206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45207$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45208      has_space=`$ECHO "$complete" | $GREP " "`
45209      if test "x$has_space" != x; then
45210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45212      fi
45213      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45214    fi
45215  fi
45216
45217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45220  # "foo.exe" is OK but "foo" is an error.
45221  #
45222  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45223  # It is also a way to make sure we got the proper file name for the real test later on.
45224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45225  if test "x$test_shortpath" = x; then
45226    # Short path failed, file does not exist as specified.
45227    # Try adding .exe or .cmd
45228    if test -f "${new_path}.exe"; then
45229      input_to_shortpath="${new_path}.exe"
45230    elif test -f "${new_path}.cmd"; then
45231      input_to_shortpath="${new_path}.cmd"
45232    else
45233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45234$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45235      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45236$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45237      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45238    fi
45239  else
45240    input_to_shortpath="$new_path"
45241  fi
45242
45243  # Call helper function which possibly converts this using DOS-style short mode.
45244  # If so, the updated path is stored in $new_path.
45245  new_path="$input_to_shortpath"
45246
45247  input_path="$input_to_shortpath"
45248  # Check if we need to convert this using DOS-style short mode. If the path
45249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45250  # take no chances and rewrite it.
45251  # Note: m4 eats our [], so we need to use [ and ] instead.
45252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45253  if test "x$has_forbidden_chars" != x; then
45254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45258      # Going to short mode and back again did indeed matter. Since short mode is
45259      # case insensitive, let's make it lowercase to improve readability.
45260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45261      # Now convert it back to Unix-style (cygpath)
45262      input_path=`$CYGPATH -u "$shortmode_path"`
45263      new_path="$input_path"
45264    fi
45265  fi
45266
45267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45268  if test "x$test_cygdrive_prefix" = x; then
45269    # As a simple fix, exclude /usr/bin since it's not a real path.
45270    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45272      # a path prefixed by /cygdrive for fixpath to work.
45273      new_path="$CYGWIN_ROOT_PATH$input_path"
45274    fi
45275  fi
45276
45277  # remove trailing .exe if any
45278  new_path="${new_path/%.exe/}"
45279
45280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45281
45282  # First separate the path from the arguments. This will split at the first
45283  # space.
45284  complete="$BUILD_NM"
45285  path="${complete%% *}"
45286  tmp="$complete EOL"
45287  arguments="${tmp#* }"
45288
45289  # Input might be given as Windows format, start by converting to
45290  # unix format.
45291  new_path="$path"
45292
45293  windows_path="$new_path"
45294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45295    unix_path=`$CYGPATH -u "$windows_path"`
45296    new_path="$unix_path"
45297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45299    new_path="$unix_path"
45300  fi
45301
45302
45303  # Now try to locate executable using which
45304  new_path=`$WHICH "$new_path" 2> /dev/null`
45305
45306  if test "x$new_path" = x; then
45307    # Oops. Which didn't find the executable.
45308    # The splitting of arguments from the executable at a space might have been incorrect,
45309    # since paths with space are more likely in Windows. Give it another try with the whole
45310    # argument.
45311    path="$complete"
45312    arguments="EOL"
45313    new_path="$path"
45314
45315  windows_path="$new_path"
45316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45317    unix_path=`$CYGPATH -u "$windows_path"`
45318    new_path="$unix_path"
45319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45321    new_path="$unix_path"
45322  fi
45323
45324
45325    new_path=`$WHICH "$new_path" 2> /dev/null`
45326    # bat and cmd files are not always considered executable in MSYS causing which
45327    # to not find them
45328    if test "x$new_path" = x \
45329        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45330        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45331      new_path="$path"
45332
45333  windows_path="$new_path"
45334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45335    unix_path=`$CYGPATH -u "$windows_path"`
45336    new_path="$unix_path"
45337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45339    new_path="$unix_path"
45340  fi
45341
45342    fi
45343
45344    if test "x$new_path" = x; then
45345      # It's still not found. Now this is an unrecoverable error.
45346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45347$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45348      has_space=`$ECHO "$complete" | $GREP " "`
45349      if test "x$has_space" != x; then
45350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45352      fi
45353      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45354    fi
45355  fi
45356
45357  # Now new_path has a complete unix path to the binary
45358  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45359    # Keep paths in /bin as-is, but remove trailing .exe if any
45360    new_path="${new_path/%.exe/}"
45361    # Do not save /bin paths to all_fixpath_prefixes!
45362  else
45363    # Not in mixed or Windows style, start by that.
45364    new_path=`cmd //c echo $new_path`
45365
45366  input_path="$new_path"
45367  # Check if we need to convert this using DOS-style short mode. If the path
45368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45369  # take no chances and rewrite it.
45370  # Note: m4 eats our [], so we need to use [ and ] instead.
45371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45372  if test "x$has_forbidden_chars" != x; then
45373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45375  fi
45376
45377    # Output is in $new_path
45378
45379  windows_path="$new_path"
45380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45381    unix_path=`$CYGPATH -u "$windows_path"`
45382    new_path="$unix_path"
45383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45385    new_path="$unix_path"
45386  fi
45387
45388    # remove trailing .exe if any
45389    new_path="${new_path/%.exe/}"
45390
45391    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45392    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45393  fi
45394
45395    else
45396      # We're on a unix platform. Hooray! :)
45397      # First separate the path from the arguments. This will split at the first
45398      # space.
45399      complete="$BUILD_NM"
45400      path="${complete%% *}"
45401      tmp="$complete EOL"
45402      arguments="${tmp#* }"
45403
45404      # Cannot rely on the command "which" here since it doesn't always work.
45405      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45406      if test -z "$is_absolute_path"; then
45407        # Path to executable is not absolute. Find it.
45408        IFS_save="$IFS"
45409        IFS=:
45410        for p in $PATH; do
45411          if test -f "$p/$path" && test -x "$p/$path"; then
45412            new_path="$p/$path"
45413            break
45414          fi
45415        done
45416        IFS="$IFS_save"
45417      else
45418        # This is an absolute path, we can use it without further modifications.
45419        new_path="$path"
45420      fi
45421
45422      if test "x$new_path" = x; then
45423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45424$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45425        has_space=`$ECHO "$complete" | $GREP " "`
45426        if test "x$has_space" != x; then
45427          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45428$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45429        fi
45430        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45431      fi
45432    fi
45433
45434    # Now join together the path and the arguments once again
45435    if test "x$arguments" != xEOL; then
45436      new_complete="$new_path ${arguments% *}"
45437    else
45438      new_complete="$new_path"
45439    fi
45440
45441    if test "x$complete" != "x$new_complete"; then
45442      BUILD_NM="$new_complete"
45443      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45444$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45445    fi
45446  fi
45447
45448
45449
45450  # Publish this variable in the help.
45451
45452
45453  if [ -z "${BUILD_AR+x}" ]; then
45454    # The variable is not set by user, try to locate tool using the code snippet
45455    for ac_prog in ar gcc-ar
45456do
45457  # Extract the first word of "$ac_prog", so it can be a program name with args.
45458set dummy $ac_prog; ac_word=$2
45459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45460$as_echo_n "checking for $ac_word... " >&6; }
45461if ${ac_cv_path_BUILD_AR+:} false; then :
45462  $as_echo_n "(cached) " >&6
45463else
45464  case $BUILD_AR in
45465  [\\/]* | ?:[\\/]*)
45466  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45467  ;;
45468  *)
45469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45470for as_dir in $PATH
45471do
45472  IFS=$as_save_IFS
45473  test -z "$as_dir" && as_dir=.
45474    for ac_exec_ext in '' $ac_executable_extensions; do
45475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45476    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45478    break 2
45479  fi
45480done
45481  done
45482IFS=$as_save_IFS
45483
45484  ;;
45485esac
45486fi
45487BUILD_AR=$ac_cv_path_BUILD_AR
45488if test -n "$BUILD_AR"; then
45489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45490$as_echo "$BUILD_AR" >&6; }
45491else
45492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45493$as_echo "no" >&6; }
45494fi
45495
45496
45497  test -n "$BUILD_AR" && break
45498done
45499
45500  else
45501    # The variable is set, but is it from the command line or the environment?
45502
45503    # Try to remove the string !BUILD_AR! from our list.
45504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45506      # If it failed, the variable was not from the command line. Ignore it,
45507      # but warn the user (except for BASH, which is always set by the calling BASH).
45508      if test "xBUILD_AR" != xBASH; then
45509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45510$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45511      fi
45512      # Try to locate tool using the code snippet
45513      for ac_prog in ar gcc-ar
45514do
45515  # Extract the first word of "$ac_prog", so it can be a program name with args.
45516set dummy $ac_prog; ac_word=$2
45517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45518$as_echo_n "checking for $ac_word... " >&6; }
45519if ${ac_cv_path_BUILD_AR+:} false; then :
45520  $as_echo_n "(cached) " >&6
45521else
45522  case $BUILD_AR in
45523  [\\/]* | ?:[\\/]*)
45524  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45525  ;;
45526  *)
45527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45528for as_dir in $PATH
45529do
45530  IFS=$as_save_IFS
45531  test -z "$as_dir" && as_dir=.
45532    for ac_exec_ext in '' $ac_executable_extensions; do
45533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45534    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45536    break 2
45537  fi
45538done
45539  done
45540IFS=$as_save_IFS
45541
45542  ;;
45543esac
45544fi
45545BUILD_AR=$ac_cv_path_BUILD_AR
45546if test -n "$BUILD_AR"; then
45547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45548$as_echo "$BUILD_AR" >&6; }
45549else
45550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45551$as_echo "no" >&6; }
45552fi
45553
45554
45555  test -n "$BUILD_AR" && break
45556done
45557
45558    else
45559      # If it succeeded, then it was overridden by the user. We will use it
45560      # for the tool.
45561
45562      # First remove it from the list of overridden variables, so we can test
45563      # for unknown variables in the end.
45564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45565
45566      # Check if we try to supply an empty value
45567      if test "x$BUILD_AR" = x; then
45568        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45569$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45570        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45571$as_echo_n "checking for BUILD_AR... " >&6; }
45572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45573$as_echo "disabled" >&6; }
45574      else
45575        # Check if the provided tool contains a complete path.
45576        tool_specified="$BUILD_AR"
45577        tool_basename="${tool_specified##*/}"
45578        if test "x$tool_basename" = "x$tool_specified"; then
45579          # A command without a complete path is provided, search $PATH.
45580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45581$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45582          # Extract the first word of "$tool_basename", so it can be a program name with args.
45583set dummy $tool_basename; ac_word=$2
45584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45585$as_echo_n "checking for $ac_word... " >&6; }
45586if ${ac_cv_path_BUILD_AR+:} false; then :
45587  $as_echo_n "(cached) " >&6
45588else
45589  case $BUILD_AR in
45590  [\\/]* | ?:[\\/]*)
45591  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45592  ;;
45593  *)
45594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45595for as_dir in $PATH
45596do
45597  IFS=$as_save_IFS
45598  test -z "$as_dir" && as_dir=.
45599    for ac_exec_ext in '' $ac_executable_extensions; do
45600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45601    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45603    break 2
45604  fi
45605done
45606  done
45607IFS=$as_save_IFS
45608
45609  ;;
45610esac
45611fi
45612BUILD_AR=$ac_cv_path_BUILD_AR
45613if test -n "$BUILD_AR"; then
45614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45615$as_echo "$BUILD_AR" >&6; }
45616else
45617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45618$as_echo "no" >&6; }
45619fi
45620
45621
45622          if test "x$BUILD_AR" = x; then
45623            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45624          fi
45625        else
45626          # Otherwise we believe it is a complete path. Use it as it is.
45627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45628$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45629          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45630$as_echo_n "checking for BUILD_AR... " >&6; }
45631          if test ! -x "$tool_specified"; then
45632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45633$as_echo "not found" >&6; }
45634            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45635          fi
45636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45637$as_echo "$tool_specified" >&6; }
45638        fi
45639      fi
45640    fi
45641
45642  fi
45643
45644
45645
45646  # Only process if variable expands to non-empty
45647
45648  if test "x$BUILD_AR" != x; then
45649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45650
45651  # First separate the path from the arguments. This will split at the first
45652  # space.
45653  complete="$BUILD_AR"
45654  path="${complete%% *}"
45655  tmp="$complete EOL"
45656  arguments="${tmp#* }"
45657
45658  # Input might be given as Windows format, start by converting to
45659  # unix format.
45660  new_path=`$CYGPATH -u "$path"`
45661
45662  # Now try to locate executable using which
45663  new_path=`$WHICH "$new_path" 2> /dev/null`
45664  # bat and cmd files are not always considered executable in cygwin causing which
45665  # to not find them
45666  if test "x$new_path" = x \
45667      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45668      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45669    new_path=`$CYGPATH -u "$path"`
45670  fi
45671  if test "x$new_path" = x; then
45672    # Oops. Which didn't find the executable.
45673    # The splitting of arguments from the executable at a space might have been incorrect,
45674    # since paths with space are more likely in Windows. Give it another try with the whole
45675    # argument.
45676    path="$complete"
45677    arguments="EOL"
45678    new_path=`$CYGPATH -u "$path"`
45679    new_path=`$WHICH "$new_path" 2> /dev/null`
45680    # bat and cmd files are not always considered executable in cygwin causing which
45681    # to not find them
45682    if test "x$new_path" = x \
45683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45685      new_path=`$CYGPATH -u "$path"`
45686    fi
45687    if test "x$new_path" = x; then
45688      # It's still not found. Now this is an unrecoverable error.
45689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45690$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45691      has_space=`$ECHO "$complete" | $GREP " "`
45692      if test "x$has_space" != x; then
45693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45695      fi
45696      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45697    fi
45698  fi
45699
45700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45703  # "foo.exe" is OK but "foo" is an error.
45704  #
45705  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45706  # It is also a way to make sure we got the proper file name for the real test later on.
45707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45708  if test "x$test_shortpath" = x; then
45709    # Short path failed, file does not exist as specified.
45710    # Try adding .exe or .cmd
45711    if test -f "${new_path}.exe"; then
45712      input_to_shortpath="${new_path}.exe"
45713    elif test -f "${new_path}.cmd"; then
45714      input_to_shortpath="${new_path}.cmd"
45715    else
45716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45717$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45718      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45719$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45720      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45721    fi
45722  else
45723    input_to_shortpath="$new_path"
45724  fi
45725
45726  # Call helper function which possibly converts this using DOS-style short mode.
45727  # If so, the updated path is stored in $new_path.
45728  new_path="$input_to_shortpath"
45729
45730  input_path="$input_to_shortpath"
45731  # Check if we need to convert this using DOS-style short mode. If the path
45732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45733  # take no chances and rewrite it.
45734  # Note: m4 eats our [], so we need to use [ and ] instead.
45735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45736  if test "x$has_forbidden_chars" != x; then
45737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45741      # Going to short mode and back again did indeed matter. Since short mode is
45742      # case insensitive, let's make it lowercase to improve readability.
45743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45744      # Now convert it back to Unix-style (cygpath)
45745      input_path=`$CYGPATH -u "$shortmode_path"`
45746      new_path="$input_path"
45747    fi
45748  fi
45749
45750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45751  if test "x$test_cygdrive_prefix" = x; then
45752    # As a simple fix, exclude /usr/bin since it's not a real path.
45753    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45755      # a path prefixed by /cygdrive for fixpath to work.
45756      new_path="$CYGWIN_ROOT_PATH$input_path"
45757    fi
45758  fi
45759
45760  # remove trailing .exe if any
45761  new_path="${new_path/%.exe/}"
45762
45763    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45764
45765  # First separate the path from the arguments. This will split at the first
45766  # space.
45767  complete="$BUILD_AR"
45768  path="${complete%% *}"
45769  tmp="$complete EOL"
45770  arguments="${tmp#* }"
45771
45772  # Input might be given as Windows format, start by converting to
45773  # unix format.
45774  new_path="$path"
45775
45776  windows_path="$new_path"
45777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45778    unix_path=`$CYGPATH -u "$windows_path"`
45779    new_path="$unix_path"
45780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45782    new_path="$unix_path"
45783  fi
45784
45785
45786  # Now try to locate executable using which
45787  new_path=`$WHICH "$new_path" 2> /dev/null`
45788
45789  if test "x$new_path" = x; then
45790    # Oops. Which didn't find the executable.
45791    # The splitting of arguments from the executable at a space might have been incorrect,
45792    # since paths with space are more likely in Windows. Give it another try with the whole
45793    # argument.
45794    path="$complete"
45795    arguments="EOL"
45796    new_path="$path"
45797
45798  windows_path="$new_path"
45799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45800    unix_path=`$CYGPATH -u "$windows_path"`
45801    new_path="$unix_path"
45802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45804    new_path="$unix_path"
45805  fi
45806
45807
45808    new_path=`$WHICH "$new_path" 2> /dev/null`
45809    # bat and cmd files are not always considered executable in MSYS causing which
45810    # to not find them
45811    if test "x$new_path" = x \
45812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45814      new_path="$path"
45815
45816  windows_path="$new_path"
45817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45818    unix_path=`$CYGPATH -u "$windows_path"`
45819    new_path="$unix_path"
45820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45822    new_path="$unix_path"
45823  fi
45824
45825    fi
45826
45827    if test "x$new_path" = x; then
45828      # It's still not found. Now this is an unrecoverable error.
45829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45830$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45831      has_space=`$ECHO "$complete" | $GREP " "`
45832      if test "x$has_space" != x; then
45833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45835      fi
45836      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45837    fi
45838  fi
45839
45840  # Now new_path has a complete unix path to the binary
45841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45842    # Keep paths in /bin as-is, but remove trailing .exe if any
45843    new_path="${new_path/%.exe/}"
45844    # Do not save /bin paths to all_fixpath_prefixes!
45845  else
45846    # Not in mixed or Windows style, start by that.
45847    new_path=`cmd //c echo $new_path`
45848
45849  input_path="$new_path"
45850  # Check if we need to convert this using DOS-style short mode. If the path
45851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45852  # take no chances and rewrite it.
45853  # Note: m4 eats our [], so we need to use [ and ] instead.
45854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45855  if test "x$has_forbidden_chars" != x; then
45856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45858  fi
45859
45860    # Output is in $new_path
45861
45862  windows_path="$new_path"
45863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45864    unix_path=`$CYGPATH -u "$windows_path"`
45865    new_path="$unix_path"
45866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45868    new_path="$unix_path"
45869  fi
45870
45871    # remove trailing .exe if any
45872    new_path="${new_path/%.exe/}"
45873
45874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45876  fi
45877
45878    else
45879      # We're on a unix platform. Hooray! :)
45880      # First separate the path from the arguments. This will split at the first
45881      # space.
45882      complete="$BUILD_AR"
45883      path="${complete%% *}"
45884      tmp="$complete EOL"
45885      arguments="${tmp#* }"
45886
45887      # Cannot rely on the command "which" here since it doesn't always work.
45888      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45889      if test -z "$is_absolute_path"; then
45890        # Path to executable is not absolute. Find it.
45891        IFS_save="$IFS"
45892        IFS=:
45893        for p in $PATH; do
45894          if test -f "$p/$path" && test -x "$p/$path"; then
45895            new_path="$p/$path"
45896            break
45897          fi
45898        done
45899        IFS="$IFS_save"
45900      else
45901        # This is an absolute path, we can use it without further modifications.
45902        new_path="$path"
45903      fi
45904
45905      if test "x$new_path" = x; then
45906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45907$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45908        has_space=`$ECHO "$complete" | $GREP " "`
45909        if test "x$has_space" != x; then
45910          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45911$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45912        fi
45913        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45914      fi
45915    fi
45916
45917    # Now join together the path and the arguments once again
45918    if test "x$arguments" != xEOL; then
45919      new_complete="$new_path ${arguments% *}"
45920    else
45921      new_complete="$new_path"
45922    fi
45923
45924    if test "x$complete" != "x$new_complete"; then
45925      BUILD_AR="$new_complete"
45926      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45927$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45928    fi
45929  fi
45930
45931
45932
45933  # Publish this variable in the help.
45934
45935
45936  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45937    # The variable is not set by user, try to locate tool using the code snippet
45938    for ac_prog in objcopy
45939do
45940  # Extract the first word of "$ac_prog", so it can be a program name with args.
45941set dummy $ac_prog; ac_word=$2
45942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45943$as_echo_n "checking for $ac_word... " >&6; }
45944if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45945  $as_echo_n "(cached) " >&6
45946else
45947  case $BUILD_OBJCOPY in
45948  [\\/]* | ?:[\\/]*)
45949  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45950  ;;
45951  *)
45952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45953for as_dir in $PATH
45954do
45955  IFS=$as_save_IFS
45956  test -z "$as_dir" && as_dir=.
45957    for ac_exec_ext in '' $ac_executable_extensions; do
45958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45959    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45961    break 2
45962  fi
45963done
45964  done
45965IFS=$as_save_IFS
45966
45967  ;;
45968esac
45969fi
45970BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45971if test -n "$BUILD_OBJCOPY"; then
45972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45973$as_echo "$BUILD_OBJCOPY" >&6; }
45974else
45975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45976$as_echo "no" >&6; }
45977fi
45978
45979
45980  test -n "$BUILD_OBJCOPY" && break
45981done
45982
45983  else
45984    # The variable is set, but is it from the command line or the environment?
45985
45986    # Try to remove the string !BUILD_OBJCOPY! from our list.
45987    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45988    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45989      # If it failed, the variable was not from the command line. Ignore it,
45990      # but warn the user (except for BASH, which is always set by the calling BASH).
45991      if test "xBUILD_OBJCOPY" != xBASH; then
45992        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45993$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45994      fi
45995      # Try to locate tool using the code snippet
45996      for ac_prog in objcopy
45997do
45998  # Extract the first word of "$ac_prog", so it can be a program name with args.
45999set dummy $ac_prog; ac_word=$2
46000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46001$as_echo_n "checking for $ac_word... " >&6; }
46002if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46003  $as_echo_n "(cached) " >&6
46004else
46005  case $BUILD_OBJCOPY in
46006  [\\/]* | ?:[\\/]*)
46007  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46008  ;;
46009  *)
46010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46011for as_dir in $PATH
46012do
46013  IFS=$as_save_IFS
46014  test -z "$as_dir" && as_dir=.
46015    for ac_exec_ext in '' $ac_executable_extensions; do
46016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46017    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46019    break 2
46020  fi
46021done
46022  done
46023IFS=$as_save_IFS
46024
46025  ;;
46026esac
46027fi
46028BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46029if test -n "$BUILD_OBJCOPY"; then
46030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46031$as_echo "$BUILD_OBJCOPY" >&6; }
46032else
46033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46034$as_echo "no" >&6; }
46035fi
46036
46037
46038  test -n "$BUILD_OBJCOPY" && break
46039done
46040
46041    else
46042      # If it succeeded, then it was overridden by the user. We will use it
46043      # for the tool.
46044
46045      # First remove it from the list of overridden variables, so we can test
46046      # for unknown variables in the end.
46047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46048
46049      # Check if we try to supply an empty value
46050      if test "x$BUILD_OBJCOPY" = x; then
46051        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46052$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46054$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46056$as_echo "disabled" >&6; }
46057      else
46058        # Check if the provided tool contains a complete path.
46059        tool_specified="$BUILD_OBJCOPY"
46060        tool_basename="${tool_specified##*/}"
46061        if test "x$tool_basename" = "x$tool_specified"; then
46062          # A command without a complete path is provided, search $PATH.
46063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46064$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46065          # Extract the first word of "$tool_basename", so it can be a program name with args.
46066set dummy $tool_basename; ac_word=$2
46067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46068$as_echo_n "checking for $ac_word... " >&6; }
46069if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46070  $as_echo_n "(cached) " >&6
46071else
46072  case $BUILD_OBJCOPY in
46073  [\\/]* | ?:[\\/]*)
46074  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46075  ;;
46076  *)
46077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46078for as_dir in $PATH
46079do
46080  IFS=$as_save_IFS
46081  test -z "$as_dir" && as_dir=.
46082    for ac_exec_ext in '' $ac_executable_extensions; do
46083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46084    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46086    break 2
46087  fi
46088done
46089  done
46090IFS=$as_save_IFS
46091
46092  ;;
46093esac
46094fi
46095BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46096if test -n "$BUILD_OBJCOPY"; then
46097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46098$as_echo "$BUILD_OBJCOPY" >&6; }
46099else
46100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46101$as_echo "no" >&6; }
46102fi
46103
46104
46105          if test "x$BUILD_OBJCOPY" = x; then
46106            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46107          fi
46108        else
46109          # Otherwise we believe it is a complete path. Use it as it is.
46110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46111$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46112          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46113$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46114          if test ! -x "$tool_specified"; then
46115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46116$as_echo "not found" >&6; }
46117            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46118          fi
46119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46120$as_echo "$tool_specified" >&6; }
46121        fi
46122      fi
46123    fi
46124
46125  fi
46126
46127
46128
46129  # Only process if variable expands to non-empty
46130
46131  if test "x$BUILD_OBJCOPY" != x; then
46132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46133
46134  # First separate the path from the arguments. This will split at the first
46135  # space.
46136  complete="$BUILD_OBJCOPY"
46137  path="${complete%% *}"
46138  tmp="$complete EOL"
46139  arguments="${tmp#* }"
46140
46141  # Input might be given as Windows format, start by converting to
46142  # unix format.
46143  new_path=`$CYGPATH -u "$path"`
46144
46145  # Now try to locate executable using which
46146  new_path=`$WHICH "$new_path" 2> /dev/null`
46147  # bat and cmd files are not always considered executable in cygwin causing which
46148  # to not find them
46149  if test "x$new_path" = x \
46150      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46151      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46152    new_path=`$CYGPATH -u "$path"`
46153  fi
46154  if test "x$new_path" = x; then
46155    # Oops. Which didn't find the executable.
46156    # The splitting of arguments from the executable at a space might have been incorrect,
46157    # since paths with space are more likely in Windows. Give it another try with the whole
46158    # argument.
46159    path="$complete"
46160    arguments="EOL"
46161    new_path=`$CYGPATH -u "$path"`
46162    new_path=`$WHICH "$new_path" 2> /dev/null`
46163    # bat and cmd files are not always considered executable in cygwin causing which
46164    # to not find them
46165    if test "x$new_path" = x \
46166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46168      new_path=`$CYGPATH -u "$path"`
46169    fi
46170    if test "x$new_path" = x; then
46171      # It's still not found. Now this is an unrecoverable error.
46172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46173$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46174      has_space=`$ECHO "$complete" | $GREP " "`
46175      if test "x$has_space" != x; then
46176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46178      fi
46179      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46180    fi
46181  fi
46182
46183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46186  # "foo.exe" is OK but "foo" is an error.
46187  #
46188  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46189  # It is also a way to make sure we got the proper file name for the real test later on.
46190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46191  if test "x$test_shortpath" = x; then
46192    # Short path failed, file does not exist as specified.
46193    # Try adding .exe or .cmd
46194    if test -f "${new_path}.exe"; then
46195      input_to_shortpath="${new_path}.exe"
46196    elif test -f "${new_path}.cmd"; then
46197      input_to_shortpath="${new_path}.cmd"
46198    else
46199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46200$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46203      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46204    fi
46205  else
46206    input_to_shortpath="$new_path"
46207  fi
46208
46209  # Call helper function which possibly converts this using DOS-style short mode.
46210  # If so, the updated path is stored in $new_path.
46211  new_path="$input_to_shortpath"
46212
46213  input_path="$input_to_shortpath"
46214  # Check if we need to convert this using DOS-style short mode. If the path
46215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46216  # take no chances and rewrite it.
46217  # Note: m4 eats our [], so we need to use [ and ] instead.
46218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46219  if test "x$has_forbidden_chars" != x; then
46220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46224      # Going to short mode and back again did indeed matter. Since short mode is
46225      # case insensitive, let's make it lowercase to improve readability.
46226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46227      # Now convert it back to Unix-style (cygpath)
46228      input_path=`$CYGPATH -u "$shortmode_path"`
46229      new_path="$input_path"
46230    fi
46231  fi
46232
46233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46234  if test "x$test_cygdrive_prefix" = x; then
46235    # As a simple fix, exclude /usr/bin since it's not a real path.
46236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46238      # a path prefixed by /cygdrive for fixpath to work.
46239      new_path="$CYGWIN_ROOT_PATH$input_path"
46240    fi
46241  fi
46242
46243  # remove trailing .exe if any
46244  new_path="${new_path/%.exe/}"
46245
46246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46247
46248  # First separate the path from the arguments. This will split at the first
46249  # space.
46250  complete="$BUILD_OBJCOPY"
46251  path="${complete%% *}"
46252  tmp="$complete EOL"
46253  arguments="${tmp#* }"
46254
46255  # Input might be given as Windows format, start by converting to
46256  # unix format.
46257  new_path="$path"
46258
46259  windows_path="$new_path"
46260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46261    unix_path=`$CYGPATH -u "$windows_path"`
46262    new_path="$unix_path"
46263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46265    new_path="$unix_path"
46266  fi
46267
46268
46269  # Now try to locate executable using which
46270  new_path=`$WHICH "$new_path" 2> /dev/null`
46271
46272  if test "x$new_path" = x; then
46273    # Oops. Which didn't find the executable.
46274    # The splitting of arguments from the executable at a space might have been incorrect,
46275    # since paths with space are more likely in Windows. Give it another try with the whole
46276    # argument.
46277    path="$complete"
46278    arguments="EOL"
46279    new_path="$path"
46280
46281  windows_path="$new_path"
46282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46283    unix_path=`$CYGPATH -u "$windows_path"`
46284    new_path="$unix_path"
46285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46287    new_path="$unix_path"
46288  fi
46289
46290
46291    new_path=`$WHICH "$new_path" 2> /dev/null`
46292    # bat and cmd files are not always considered executable in MSYS causing which
46293    # to not find them
46294    if test "x$new_path" = x \
46295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46297      new_path="$path"
46298
46299  windows_path="$new_path"
46300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46301    unix_path=`$CYGPATH -u "$windows_path"`
46302    new_path="$unix_path"
46303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46305    new_path="$unix_path"
46306  fi
46307
46308    fi
46309
46310    if test "x$new_path" = x; then
46311      # It's still not found. Now this is an unrecoverable error.
46312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46313$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46314      has_space=`$ECHO "$complete" | $GREP " "`
46315      if test "x$has_space" != x; then
46316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46318      fi
46319      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46320    fi
46321  fi
46322
46323  # Now new_path has a complete unix path to the binary
46324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46325    # Keep paths in /bin as-is, but remove trailing .exe if any
46326    new_path="${new_path/%.exe/}"
46327    # Do not save /bin paths to all_fixpath_prefixes!
46328  else
46329    # Not in mixed or Windows style, start by that.
46330    new_path=`cmd //c echo $new_path`
46331
46332  input_path="$new_path"
46333  # Check if we need to convert this using DOS-style short mode. If the path
46334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46335  # take no chances and rewrite it.
46336  # Note: m4 eats our [], so we need to use [ and ] instead.
46337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46338  if test "x$has_forbidden_chars" != x; then
46339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46341  fi
46342
46343    # Output is in $new_path
46344
46345  windows_path="$new_path"
46346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46347    unix_path=`$CYGPATH -u "$windows_path"`
46348    new_path="$unix_path"
46349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46351    new_path="$unix_path"
46352  fi
46353
46354    # remove trailing .exe if any
46355    new_path="${new_path/%.exe/}"
46356
46357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46359  fi
46360
46361    else
46362      # We're on a unix platform. Hooray! :)
46363      # First separate the path from the arguments. This will split at the first
46364      # space.
46365      complete="$BUILD_OBJCOPY"
46366      path="${complete%% *}"
46367      tmp="$complete EOL"
46368      arguments="${tmp#* }"
46369
46370      # Cannot rely on the command "which" here since it doesn't always work.
46371      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46372      if test -z "$is_absolute_path"; then
46373        # Path to executable is not absolute. Find it.
46374        IFS_save="$IFS"
46375        IFS=:
46376        for p in $PATH; do
46377          if test -f "$p/$path" && test -x "$p/$path"; then
46378            new_path="$p/$path"
46379            break
46380          fi
46381        done
46382        IFS="$IFS_save"
46383      else
46384        # This is an absolute path, we can use it without further modifications.
46385        new_path="$path"
46386      fi
46387
46388      if test "x$new_path" = x; then
46389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46390$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46391        has_space=`$ECHO "$complete" | $GREP " "`
46392        if test "x$has_space" != x; then
46393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46395        fi
46396        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46397      fi
46398    fi
46399
46400    # Now join together the path and the arguments once again
46401    if test "x$arguments" != xEOL; then
46402      new_complete="$new_path ${arguments% *}"
46403    else
46404      new_complete="$new_path"
46405    fi
46406
46407    if test "x$complete" != "x$new_complete"; then
46408      BUILD_OBJCOPY="$new_complete"
46409      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46410$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46411    fi
46412  fi
46413
46414
46415
46416  # Publish this variable in the help.
46417
46418
46419  if [ -z "${BUILD_STRIP+x}" ]; then
46420    # The variable is not set by user, try to locate tool using the code snippet
46421    for ac_prog in strip
46422do
46423  # Extract the first word of "$ac_prog", so it can be a program name with args.
46424set dummy $ac_prog; ac_word=$2
46425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46426$as_echo_n "checking for $ac_word... " >&6; }
46427if ${ac_cv_path_BUILD_STRIP+:} false; then :
46428  $as_echo_n "(cached) " >&6
46429else
46430  case $BUILD_STRIP in
46431  [\\/]* | ?:[\\/]*)
46432  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46433  ;;
46434  *)
46435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46436for as_dir in $PATH
46437do
46438  IFS=$as_save_IFS
46439  test -z "$as_dir" && as_dir=.
46440    for ac_exec_ext in '' $ac_executable_extensions; do
46441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46442    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46444    break 2
46445  fi
46446done
46447  done
46448IFS=$as_save_IFS
46449
46450  ;;
46451esac
46452fi
46453BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46454if test -n "$BUILD_STRIP"; then
46455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46456$as_echo "$BUILD_STRIP" >&6; }
46457else
46458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46459$as_echo "no" >&6; }
46460fi
46461
46462
46463  test -n "$BUILD_STRIP" && break
46464done
46465
46466  else
46467    # The variable is set, but is it from the command line or the environment?
46468
46469    # Try to remove the string !BUILD_STRIP! from our list.
46470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46472      # If it failed, the variable was not from the command line. Ignore it,
46473      # but warn the user (except for BASH, which is always set by the calling BASH).
46474      if test "xBUILD_STRIP" != xBASH; then
46475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46476$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46477      fi
46478      # Try to locate tool using the code snippet
46479      for ac_prog in strip
46480do
46481  # Extract the first word of "$ac_prog", so it can be a program name with args.
46482set dummy $ac_prog; ac_word=$2
46483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46484$as_echo_n "checking for $ac_word... " >&6; }
46485if ${ac_cv_path_BUILD_STRIP+:} false; then :
46486  $as_echo_n "(cached) " >&6
46487else
46488  case $BUILD_STRIP in
46489  [\\/]* | ?:[\\/]*)
46490  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46491  ;;
46492  *)
46493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46494for as_dir in $PATH
46495do
46496  IFS=$as_save_IFS
46497  test -z "$as_dir" && as_dir=.
46498    for ac_exec_ext in '' $ac_executable_extensions; do
46499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46500    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46502    break 2
46503  fi
46504done
46505  done
46506IFS=$as_save_IFS
46507
46508  ;;
46509esac
46510fi
46511BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46512if test -n "$BUILD_STRIP"; then
46513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46514$as_echo "$BUILD_STRIP" >&6; }
46515else
46516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46517$as_echo "no" >&6; }
46518fi
46519
46520
46521  test -n "$BUILD_STRIP" && break
46522done
46523
46524    else
46525      # If it succeeded, then it was overridden by the user. We will use it
46526      # for the tool.
46527
46528      # First remove it from the list of overridden variables, so we can test
46529      # for unknown variables in the end.
46530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46531
46532      # Check if we try to supply an empty value
46533      if test "x$BUILD_STRIP" = x; then
46534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46535$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46537$as_echo_n "checking for BUILD_STRIP... " >&6; }
46538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46539$as_echo "disabled" >&6; }
46540      else
46541        # Check if the provided tool contains a complete path.
46542        tool_specified="$BUILD_STRIP"
46543        tool_basename="${tool_specified##*/}"
46544        if test "x$tool_basename" = "x$tool_specified"; then
46545          # A command without a complete path is provided, search $PATH.
46546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46547$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46548          # Extract the first word of "$tool_basename", so it can be a program name with args.
46549set dummy $tool_basename; ac_word=$2
46550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46551$as_echo_n "checking for $ac_word... " >&6; }
46552if ${ac_cv_path_BUILD_STRIP+:} false; then :
46553  $as_echo_n "(cached) " >&6
46554else
46555  case $BUILD_STRIP in
46556  [\\/]* | ?:[\\/]*)
46557  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46558  ;;
46559  *)
46560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46561for as_dir in $PATH
46562do
46563  IFS=$as_save_IFS
46564  test -z "$as_dir" && as_dir=.
46565    for ac_exec_ext in '' $ac_executable_extensions; do
46566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46567    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46569    break 2
46570  fi
46571done
46572  done
46573IFS=$as_save_IFS
46574
46575  ;;
46576esac
46577fi
46578BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46579if test -n "$BUILD_STRIP"; then
46580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46581$as_echo "$BUILD_STRIP" >&6; }
46582else
46583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46584$as_echo "no" >&6; }
46585fi
46586
46587
46588          if test "x$BUILD_STRIP" = x; then
46589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46590          fi
46591        else
46592          # Otherwise we believe it is a complete path. Use it as it is.
46593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46594$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46596$as_echo_n "checking for BUILD_STRIP... " >&6; }
46597          if test ! -x "$tool_specified"; then
46598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46599$as_echo "not found" >&6; }
46600            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46601          fi
46602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46603$as_echo "$tool_specified" >&6; }
46604        fi
46605      fi
46606    fi
46607
46608  fi
46609
46610
46611
46612  # Only process if variable expands to non-empty
46613
46614  if test "x$BUILD_STRIP" != x; then
46615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46616
46617  # First separate the path from the arguments. This will split at the first
46618  # space.
46619  complete="$BUILD_STRIP"
46620  path="${complete%% *}"
46621  tmp="$complete EOL"
46622  arguments="${tmp#* }"
46623
46624  # Input might be given as Windows format, start by converting to
46625  # unix format.
46626  new_path=`$CYGPATH -u "$path"`
46627
46628  # Now try to locate executable using which
46629  new_path=`$WHICH "$new_path" 2> /dev/null`
46630  # bat and cmd files are not always considered executable in cygwin causing which
46631  # to not find them
46632  if test "x$new_path" = x \
46633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46635    new_path=`$CYGPATH -u "$path"`
46636  fi
46637  if test "x$new_path" = x; then
46638    # Oops. Which didn't find the executable.
46639    # The splitting of arguments from the executable at a space might have been incorrect,
46640    # since paths with space are more likely in Windows. Give it another try with the whole
46641    # argument.
46642    path="$complete"
46643    arguments="EOL"
46644    new_path=`$CYGPATH -u "$path"`
46645    new_path=`$WHICH "$new_path" 2> /dev/null`
46646    # bat and cmd files are not always considered executable in cygwin causing which
46647    # to not find them
46648    if test "x$new_path" = x \
46649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46651      new_path=`$CYGPATH -u "$path"`
46652    fi
46653    if test "x$new_path" = x; then
46654      # It's still not found. Now this is an unrecoverable error.
46655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46656$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46657      has_space=`$ECHO "$complete" | $GREP " "`
46658      if test "x$has_space" != x; then
46659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46661      fi
46662      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46663    fi
46664  fi
46665
46666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46669  # "foo.exe" is OK but "foo" is an error.
46670  #
46671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46672  # It is also a way to make sure we got the proper file name for the real test later on.
46673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46674  if test "x$test_shortpath" = x; then
46675    # Short path failed, file does not exist as specified.
46676    # Try adding .exe or .cmd
46677    if test -f "${new_path}.exe"; then
46678      input_to_shortpath="${new_path}.exe"
46679    elif test -f "${new_path}.cmd"; then
46680      input_to_shortpath="${new_path}.cmd"
46681    else
46682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46683$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46686      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46687    fi
46688  else
46689    input_to_shortpath="$new_path"
46690  fi
46691
46692  # Call helper function which possibly converts this using DOS-style short mode.
46693  # If so, the updated path is stored in $new_path.
46694  new_path="$input_to_shortpath"
46695
46696  input_path="$input_to_shortpath"
46697  # Check if we need to convert this using DOS-style short mode. If the path
46698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46699  # take no chances and rewrite it.
46700  # Note: m4 eats our [], so we need to use [ and ] instead.
46701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46702  if test "x$has_forbidden_chars" != x; then
46703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46707      # Going to short mode and back again did indeed matter. Since short mode is
46708      # case insensitive, let's make it lowercase to improve readability.
46709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46710      # Now convert it back to Unix-style (cygpath)
46711      input_path=`$CYGPATH -u "$shortmode_path"`
46712      new_path="$input_path"
46713    fi
46714  fi
46715
46716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46717  if test "x$test_cygdrive_prefix" = x; then
46718    # As a simple fix, exclude /usr/bin since it's not a real path.
46719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46721      # a path prefixed by /cygdrive for fixpath to work.
46722      new_path="$CYGWIN_ROOT_PATH$input_path"
46723    fi
46724  fi
46725
46726  # remove trailing .exe if any
46727  new_path="${new_path/%.exe/}"
46728
46729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46730
46731  # First separate the path from the arguments. This will split at the first
46732  # space.
46733  complete="$BUILD_STRIP"
46734  path="${complete%% *}"
46735  tmp="$complete EOL"
46736  arguments="${tmp#* }"
46737
46738  # Input might be given as Windows format, start by converting to
46739  # unix format.
46740  new_path="$path"
46741
46742  windows_path="$new_path"
46743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46744    unix_path=`$CYGPATH -u "$windows_path"`
46745    new_path="$unix_path"
46746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46748    new_path="$unix_path"
46749  fi
46750
46751
46752  # Now try to locate executable using which
46753  new_path=`$WHICH "$new_path" 2> /dev/null`
46754
46755  if test "x$new_path" = x; then
46756    # Oops. Which didn't find the executable.
46757    # The splitting of arguments from the executable at a space might have been incorrect,
46758    # since paths with space are more likely in Windows. Give it another try with the whole
46759    # argument.
46760    path="$complete"
46761    arguments="EOL"
46762    new_path="$path"
46763
46764  windows_path="$new_path"
46765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46766    unix_path=`$CYGPATH -u "$windows_path"`
46767    new_path="$unix_path"
46768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46770    new_path="$unix_path"
46771  fi
46772
46773
46774    new_path=`$WHICH "$new_path" 2> /dev/null`
46775    # bat and cmd files are not always considered executable in MSYS causing which
46776    # to not find them
46777    if test "x$new_path" = x \
46778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46780      new_path="$path"
46781
46782  windows_path="$new_path"
46783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46784    unix_path=`$CYGPATH -u "$windows_path"`
46785    new_path="$unix_path"
46786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46788    new_path="$unix_path"
46789  fi
46790
46791    fi
46792
46793    if test "x$new_path" = x; then
46794      # It's still not found. Now this is an unrecoverable error.
46795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46796$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46797      has_space=`$ECHO "$complete" | $GREP " "`
46798      if test "x$has_space" != x; then
46799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46801      fi
46802      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46803    fi
46804  fi
46805
46806  # Now new_path has a complete unix path to the binary
46807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46808    # Keep paths in /bin as-is, but remove trailing .exe if any
46809    new_path="${new_path/%.exe/}"
46810    # Do not save /bin paths to all_fixpath_prefixes!
46811  else
46812    # Not in mixed or Windows style, start by that.
46813    new_path=`cmd //c echo $new_path`
46814
46815  input_path="$new_path"
46816  # Check if we need to convert this using DOS-style short mode. If the path
46817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46818  # take no chances and rewrite it.
46819  # Note: m4 eats our [], so we need to use [ and ] instead.
46820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46821  if test "x$has_forbidden_chars" != x; then
46822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46824  fi
46825
46826    # Output is in $new_path
46827
46828  windows_path="$new_path"
46829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46830    unix_path=`$CYGPATH -u "$windows_path"`
46831    new_path="$unix_path"
46832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46834    new_path="$unix_path"
46835  fi
46836
46837    # remove trailing .exe if any
46838    new_path="${new_path/%.exe/}"
46839
46840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46842  fi
46843
46844    else
46845      # We're on a unix platform. Hooray! :)
46846      # First separate the path from the arguments. This will split at the first
46847      # space.
46848      complete="$BUILD_STRIP"
46849      path="${complete%% *}"
46850      tmp="$complete EOL"
46851      arguments="${tmp#* }"
46852
46853      # Cannot rely on the command "which" here since it doesn't always work.
46854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46855      if test -z "$is_absolute_path"; then
46856        # Path to executable is not absolute. Find it.
46857        IFS_save="$IFS"
46858        IFS=:
46859        for p in $PATH; do
46860          if test -f "$p/$path" && test -x "$p/$path"; then
46861            new_path="$p/$path"
46862            break
46863          fi
46864        done
46865        IFS="$IFS_save"
46866      else
46867        # This is an absolute path, we can use it without further modifications.
46868        new_path="$path"
46869      fi
46870
46871      if test "x$new_path" = x; then
46872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46873$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46874        has_space=`$ECHO "$complete" | $GREP " "`
46875        if test "x$has_space" != x; then
46876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46878        fi
46879        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46880      fi
46881    fi
46882
46883    # Now join together the path and the arguments once again
46884    if test "x$arguments" != xEOL; then
46885      new_complete="$new_path ${arguments% *}"
46886    else
46887      new_complete="$new_path"
46888    fi
46889
46890    if test "x$complete" != "x$new_complete"; then
46891      BUILD_STRIP="$new_complete"
46892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46893$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46894    fi
46895  fi
46896
46897    # Assume the C compiler is the assembler
46898    BUILD_AS="$BUILD_CC -c"
46899    # Just like for the target compiler, use the compiler as linker
46900    BUILD_LD="$BUILD_CC"
46901    BUILD_LDCXX="$BUILD_CXX"
46902
46903    PATH="$OLDPATH"
46904
46905
46906  COMPILER=$BUILD_CC
46907  COMPILER_NAME=BuildC
46908
46909  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46910    # cc -V output typically looks like
46911    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46912    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46913    # Check that this is likely to be the Solaris Studio cc.
46914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46915    if test $? -ne 0; then
46916      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46917      { $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
46918$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46919      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46920$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46922$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46924    fi
46925    # Remove usage instructions (if present), and
46926    # collapse compiler output into a single line
46927    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46928        $SED -e 's/ *[Uu]sage:.*//'`
46929    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46930        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46931  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46932    # xlc -qversion output typically looks like
46933    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46934    #     Version: 11.01.0000.0015
46935    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46936    # Check that this is likely to be the IBM XL C compiler.
46937    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46938    if test $? -ne 0; then
46939      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46940      { $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
46941$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46942      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46943$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46944      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46945$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46946      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46947    fi
46948    # Collapse compiler output into a single line
46949    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46950    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46951        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46952  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46953    # There is no specific version flag, but all output starts with a version string.
46954    # First line typically looks something like:
46955    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46956    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46957    # Check that this is likely to be Microsoft CL.EXE.
46958    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46959    if test $? -ne 0; then
46960      { $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
46961$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46962      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46963$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46964      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46965    fi
46966    # Collapse compiler output into a single line
46967    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46969        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46970  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
46971    # gcc --version output typically looks like
46972    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46973    #     Copyright (C) 2013 Free Software Foundation, Inc.
46974    #     This is free software; see the source for copying conditions.  There is NO
46975    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46976    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46977    # Check that this is likely to be GCC.
46978    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46979    if test $? -ne 0; then
46980      { $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
46981$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46982      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46983$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46984      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46985    fi
46986    # Remove Copyright and legalese from version string, and
46987    # collapse into a single line
46988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46989        $SED -e 's/ *Copyright .*//'`
46990    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46991        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46992  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
46993    # clang --version output typically looks like
46994    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46995    #    clang version 3.3 (tags/RELEASE_33/final)
46996    # or
46997    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46998    #    Target: x86_64-pc-linux-gnu
46999    #    Thread model: posix
47000    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47001    # Check that this is likely to be clang
47002    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47003    if test $? -ne 0; then
47004      { $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
47005$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47006      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47007$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47008      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47009    fi
47010    # Collapse compiler output into a single line
47011    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47012    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47013        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47014  else
47015      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47016  fi
47017  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47018  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47019  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47020  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47021
47022  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47023$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47024
47025
47026  COMPILER=$BUILD_CXX
47027  COMPILER_NAME=BuildC++
47028
47029  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47030    # cc -V output typically looks like
47031    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47032    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47033    # Check that this is likely to be the Solaris Studio cc.
47034    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47035    if test $? -ne 0; then
47036      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47037      { $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
47038$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47039      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47040$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47041      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47042$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47043      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47044    fi
47045    # Remove usage instructions (if present), and
47046    # collapse compiler output into a single line
47047    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47048        $SED -e 's/ *[Uu]sage:.*//'`
47049    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47050        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47051  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47052    # xlc -qversion output typically looks like
47053    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47054    #     Version: 11.01.0000.0015
47055    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47056    # Check that this is likely to be the IBM XL C compiler.
47057    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47058    if test $? -ne 0; then
47059      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47060      { $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
47061$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47063$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47064      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47065$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47066      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47067    fi
47068    # Collapse compiler output into a single line
47069    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47070    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47071        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47072  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47073    # There is no specific version flag, but all output starts with a version string.
47074    # First line typically looks something like:
47075    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47076    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47077    # Check that this is likely to be Microsoft CL.EXE.
47078    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47079    if test $? -ne 0; then
47080      { $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
47081$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47082      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47083$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47084      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47085    fi
47086    # Collapse compiler output into a single line
47087    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47088    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47089        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47090  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47091    # gcc --version output typically looks like
47092    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47093    #     Copyright (C) 2013 Free Software Foundation, Inc.
47094    #     This is free software; see the source for copying conditions.  There is NO
47095    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47096    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47097    # Check that this is likely to be GCC.
47098    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47099    if test $? -ne 0; then
47100      { $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
47101$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47102      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47103$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47104      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47105    fi
47106    # Remove Copyright and legalese from version string, and
47107    # collapse into a single line
47108    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47109        $SED -e 's/ *Copyright .*//'`
47110    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47111        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47112  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47113    # clang --version output typically looks like
47114    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47115    #    clang version 3.3 (tags/RELEASE_33/final)
47116    # or
47117    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47118    #    Target: x86_64-pc-linux-gnu
47119    #    Thread model: posix
47120    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47121    # Check that this is likely to be clang
47122    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47123    if test $? -ne 0; then
47124      { $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
47125$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47127$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47128      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47129    fi
47130    # Collapse compiler output into a single line
47131    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47132    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47133        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47134  else
47135      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47136  fi
47137  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47138  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47139  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47140  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47141
47142  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47143$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47144
47145
47146  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47148$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47149    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47150$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47151  fi
47152
47153  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47154  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47156$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47157  fi
47158
47159  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47161$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47162  fi
47163
47164  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47165
47166  else
47167    # If we are not cross compiling, use the normal target compilers for
47168    # building the build platform executables.
47169    BUILD_CC="$CC"
47170    BUILD_CXX="$CXX"
47171    BUILD_LD="$LD"
47172    BUILD_LDCXX="$LDCXX"
47173    BUILD_NM="$NM"
47174    BUILD_AS="$AS"
47175    BUILD_OBJCOPY="$OBJCOPY"
47176    BUILD_STRIP="$STRIP"
47177    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47178    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47179    BUILD_AR="$AR"
47180
47181
47182  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47184$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47186$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47187  fi
47188
47189  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47190  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47191    { $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
47192$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;}
47193  fi
47194
47195  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47196    { $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
47197$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47198  fi
47199
47200  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47201
47202  fi
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47216    # For hotspot, we need these in Windows mixed path,
47217    # so rewrite them all. Need added .exe suffix.
47218    HOTSPOT_CXX="$CXX.exe"
47219    HOTSPOT_LD="$LD.exe"
47220    HOTSPOT_MT="$MT.exe"
47221    HOTSPOT_RC="$RC.exe"
47222
47223  unix_path="$HOTSPOT_CXX"
47224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47225    windows_path=`$CYGPATH -m "$unix_path"`
47226    HOTSPOT_CXX="$windows_path"
47227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47228    windows_path=`cmd //c echo $unix_path`
47229    HOTSPOT_CXX="$windows_path"
47230  fi
47231
47232
47233  unix_path="$HOTSPOT_LD"
47234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47235    windows_path=`$CYGPATH -m "$unix_path"`
47236    HOTSPOT_LD="$windows_path"
47237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47238    windows_path=`cmd //c echo $unix_path`
47239    HOTSPOT_LD="$windows_path"
47240  fi
47241
47242
47243  unix_path="$HOTSPOT_MT"
47244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47245    windows_path=`$CYGPATH -m "$unix_path"`
47246    HOTSPOT_MT="$windows_path"
47247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47248    windows_path=`cmd //c echo $unix_path`
47249    HOTSPOT_MT="$windows_path"
47250  fi
47251
47252
47253  unix_path="$HOTSPOT_RC"
47254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47255    windows_path=`$CYGPATH -m "$unix_path"`
47256    HOTSPOT_RC="$windows_path"
47257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47258    windows_path=`cmd //c echo $unix_path`
47259    HOTSPOT_RC="$windows_path"
47260  fi
47261
47262
47263
47264  else
47265    HOTSPOT_CXX="$CXX"
47266    HOTSPOT_LD="$LD"
47267  fi
47268
47269
47270
47271  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47272    USE_CLANG=true
47273  fi
47274
47275
47276
47277
47278
47279  # The package path is used only on macosx?
47280  # FIXME: clean this up, and/or move it elsewhere.
47281  PACKAGE_PATH=/opt/local
47282
47283
47284  # Check for extra potential brokenness.
47285  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47286    # On Windows, double-check that we got the right compiler.
47287    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47288    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47289    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47290      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47291        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
47292      fi
47293    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47294      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47295        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47296      fi
47297    fi
47298  fi
47299
47300  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47301    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47302    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47303    # This is later checked when setting flags.
47304
47305    # "-Og" suppported for GCC 4.8 and later
47306    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354    # Execute function body
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403    # Execute function body
47404
47405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47406$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47407  supports=yes
47408
47409  saved_cflags="$CFLAGS"
47410  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47411  ac_ext=c
47412ac_cpp='$CPP $CPPFLAGS'
47413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47415ac_compiler_gnu=$ac_cv_c_compiler_gnu
47416
47417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47418/* end confdefs.h.  */
47419int i;
47420_ACEOF
47421if ac_fn_c_try_compile "$LINENO"; then :
47422
47423else
47424  supports=no
47425fi
47426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47427  ac_ext=cpp
47428ac_cpp='$CXXCPP $CPPFLAGS'
47429ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47430ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47431ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47432
47433  CFLAGS="$saved_cflags"
47434
47435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47436$as_echo "$supports" >&6; }
47437  if test "x$supports" = "xyes" ; then
47438    :
47439    C_COMP_SUPPORTS="yes"
47440  else
47441    :
47442    C_COMP_SUPPORTS="no"
47443  fi
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503    # Execute function body
47504
47505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47506$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47507  supports=yes
47508
47509  saved_cxxflags="$CXXFLAGS"
47510  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47511  ac_ext=cpp
47512ac_cpp='$CXXCPP $CPPFLAGS'
47513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47516
47517  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47518/* end confdefs.h.  */
47519int i;
47520_ACEOF
47521if ac_fn_cxx_try_compile "$LINENO"; then :
47522
47523else
47524  supports=no
47525fi
47526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47527  ac_ext=cpp
47528ac_cpp='$CXXCPP $CPPFLAGS'
47529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47532
47533  CXXFLAGS="$saved_cxxflags"
47534
47535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47536$as_echo "$supports" >&6; }
47537  if test "x$supports" = "xyes" ; then
47538    :
47539    CXX_COMP_SUPPORTS="yes"
47540  else
47541    :
47542    CXX_COMP_SUPPORTS="no"
47543  fi
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47558$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47559  supports=no
47560  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47561
47562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47563$as_echo "$supports" >&6; }
47564  if test "x$supports" = "xyes" ; then
47565    :
47566    HAS_CFLAG_OPTIMIZE_DEBUG=true
47567  else
47568    :
47569    HAS_CFLAG_OPTIMIZE_DEBUG=false
47570  fi
47571
47572
47573
47574
47575
47576
47577
47578    # "-z relro" supported in GNU binutils 2.17 and later
47579    LINKER_RELRO_FLAG="-Wl,-z,relro"
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627    # Execute function body
47628
47629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47630$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47631  supports=yes
47632
47633  saved_ldflags="$LDFLAGS"
47634  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47635  ac_ext=c
47636ac_cpp='$CPP $CPPFLAGS'
47637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47639ac_compiler_gnu=$ac_cv_c_compiler_gnu
47640
47641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47642/* end confdefs.h.  */
47643
47644int
47645main ()
47646{
47647
47648  ;
47649  return 0;
47650}
47651_ACEOF
47652if ac_fn_c_try_link "$LINENO"; then :
47653
47654else
47655  supports=no
47656fi
47657rm -f core conftest.err conftest.$ac_objext \
47658    conftest$ac_exeext conftest.$ac_ext
47659  ac_ext=cpp
47660ac_cpp='$CXXCPP $CPPFLAGS'
47661ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47662ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47663ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47664
47665  LDFLAGS="$saved_ldflags"
47666
47667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47668$as_echo "$supports" >&6; }
47669  if test "x$supports" = "xyes" ; then
47670    :
47671    HAS_LINKER_RELRO=true
47672  else
47673    :
47674    HAS_LINKER_RELRO=false
47675  fi
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689    # "-z now" supported in GNU binutils 2.11 and later
47690    LINKER_NOW_FLAG="-Wl,-z,now"
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738    # Execute function body
47739
47740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47741$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47742  supports=yes
47743
47744  saved_ldflags="$LDFLAGS"
47745  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47746  ac_ext=c
47747ac_cpp='$CPP $CPPFLAGS'
47748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47750ac_compiler_gnu=$ac_cv_c_compiler_gnu
47751
47752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47753/* end confdefs.h.  */
47754
47755int
47756main ()
47757{
47758
47759  ;
47760  return 0;
47761}
47762_ACEOF
47763if ac_fn_c_try_link "$LINENO"; then :
47764
47765else
47766  supports=no
47767fi
47768rm -f core conftest.err conftest.$ac_objext \
47769    conftest$ac_exeext conftest.$ac_ext
47770  ac_ext=cpp
47771ac_cpp='$CXXCPP $CPPFLAGS'
47772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47775
47776  LDFLAGS="$saved_ldflags"
47777
47778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47779$as_echo "$supports" >&6; }
47780  if test "x$supports" = "xyes" ; then
47781    :
47782    HAS_LINKER_NOW=true
47783  else
47784    :
47785    HAS_LINKER_NOW=false
47786  fi
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799  fi
47800
47801  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47802  # in executable.'
47803  USING_BROKEN_SUSE_LD=no
47804  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47806$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47807    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47808    $ECHO "int main() { }" > main.c
47809    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47811$as_echo "no" >&6; }
47812      USING_BROKEN_SUSE_LD=no
47813    else
47814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47815$as_echo "yes" >&6; }
47816      USING_BROKEN_SUSE_LD=yes
47817    fi
47818    $RM version-script.map main.c a.out
47819  fi
47820
47821
47822  # Setup hotspot lecagy names for toolchains
47823  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47824  if test "x$TOOLCHAIN_TYPE" = xclang; then
47825    HOTSPOT_TOOLCHAIN_TYPE=gcc
47826  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47827    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47828  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47829    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47830  fi
47831
47832
47833
47834# Setup the JTReg Regression Test Harness.
47835
47836
47837# Check whether --with-jtreg was given.
47838if test "${with_jtreg+set}" = set; then :
47839  withval=$with_jtreg;
47840else
47841  with_jtreg=no
47842fi
47843
47844
47845  if test "x$with_jtreg" = xno; then
47846    # jtreg disabled
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47848$as_echo_n "checking for jtreg... " >&6; }
47849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47850$as_echo "no" >&6; }
47851  else
47852    if test "x$with_jtreg" != xyes; then
47853      # with path specified.
47854      JT_HOME="$with_jtreg"
47855    fi
47856
47857    if test "x$JT_HOME" != x; then
47858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47859$as_echo_n "checking for jtreg... " >&6; }
47860
47861      # use JT_HOME enviroment var.
47862
47863  # Only process if variable expands to non-empty
47864
47865  if test "x$JT_HOME" != x; then
47866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47867
47868  # Input might be given as Windows format, start by converting to
47869  # unix format.
47870  path="$JT_HOME"
47871  new_path=`$CYGPATH -u "$path"`
47872
47873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47876  # "foo.exe" is OK but "foo" is an error.
47877  #
47878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47879  # It is also a way to make sure we got the proper file name for the real test later on.
47880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47881  if test "x$test_shortpath" = x; then
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47883$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47884    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47885  fi
47886
47887  # Call helper function which possibly converts this using DOS-style short mode.
47888  # If so, the updated path is stored in $new_path.
47889
47890  input_path="$new_path"
47891  # Check if we need to convert this using DOS-style short mode. If the path
47892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47893  # take no chances and rewrite it.
47894  # Note: m4 eats our [], so we need to use [ and ] instead.
47895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47896  if test "x$has_forbidden_chars" != x; then
47897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47901      # Going to short mode and back again did indeed matter. Since short mode is
47902      # case insensitive, let's make it lowercase to improve readability.
47903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47904      # Now convert it back to Unix-style (cygpath)
47905      input_path=`$CYGPATH -u "$shortmode_path"`
47906      new_path="$input_path"
47907    fi
47908  fi
47909
47910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47911  if test "x$test_cygdrive_prefix" = x; then
47912    # As a simple fix, exclude /usr/bin since it's not a real path.
47913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47915      # a path prefixed by /cygdrive for fixpath to work.
47916      new_path="$CYGWIN_ROOT_PATH$input_path"
47917    fi
47918  fi
47919
47920
47921  if test "x$path" != "x$new_path"; then
47922    JT_HOME="$new_path"
47923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47924$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47925  fi
47926
47927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47928
47929  path="$JT_HOME"
47930  has_colon=`$ECHO $path | $GREP ^.:`
47931  new_path="$path"
47932  if test "x$has_colon" = x; then
47933    # Not in mixed or Windows style, start by that.
47934    new_path=`cmd //c echo $path`
47935  fi
47936
47937
47938  input_path="$new_path"
47939  # Check if we need to convert this using DOS-style short mode. If the path
47940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47941  # take no chances and rewrite it.
47942  # Note: m4 eats our [], so we need to use [ and ] instead.
47943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47944  if test "x$has_forbidden_chars" != x; then
47945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47947  fi
47948
47949
47950  windows_path="$new_path"
47951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47952    unix_path=`$CYGPATH -u "$windows_path"`
47953    new_path="$unix_path"
47954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47956    new_path="$unix_path"
47957  fi
47958
47959  if test "x$path" != "x$new_path"; then
47960    JT_HOME="$new_path"
47961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47962$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47963  fi
47964
47965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47967
47968    else
47969      # We're on a unix platform. Hooray! :)
47970      path="$JT_HOME"
47971      has_space=`$ECHO "$path" | $GREP " "`
47972      if test "x$has_space" != x; then
47973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47974$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47976      fi
47977
47978      # Use eval to expand a potential ~
47979      eval path="$path"
47980      if test ! -f "$path" && test ! -d "$path"; then
47981        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47982      fi
47983
47984      if test -d "$path"; then
47985        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47986      else
47987        dir="`$DIRNAME "$path"`"
47988        base="`$BASENAME "$path"`"
47989        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47990      fi
47991    fi
47992  fi
47993
47994
47995      # jtreg win32 script works for everybody
47996      JTREGEXE="$JT_HOME/bin/jtreg"
47997
47998      if test ! -f "$JTREGEXE"; then
47999        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48000      fi
48001
48002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48003$as_echo "$JTREGEXE" >&6; }
48004    else
48005      # try to find jtreg on path
48006
48007
48008
48009  # Publish this variable in the help.
48010
48011
48012  if [ -z "${JTREGEXE+x}" ]; then
48013    # The variable is not set by user, try to locate tool using the code snippet
48014    for ac_prog in jtreg
48015do
48016  # Extract the first word of "$ac_prog", so it can be a program name with args.
48017set dummy $ac_prog; ac_word=$2
48018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48019$as_echo_n "checking for $ac_word... " >&6; }
48020if ${ac_cv_path_JTREGEXE+:} false; then :
48021  $as_echo_n "(cached) " >&6
48022else
48023  case $JTREGEXE in
48024  [\\/]* | ?:[\\/]*)
48025  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48026  ;;
48027  *)
48028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48029for as_dir in $PATH
48030do
48031  IFS=$as_save_IFS
48032  test -z "$as_dir" && as_dir=.
48033    for ac_exec_ext in '' $ac_executable_extensions; do
48034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48035    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48037    break 2
48038  fi
48039done
48040  done
48041IFS=$as_save_IFS
48042
48043  ;;
48044esac
48045fi
48046JTREGEXE=$ac_cv_path_JTREGEXE
48047if test -n "$JTREGEXE"; then
48048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48049$as_echo "$JTREGEXE" >&6; }
48050else
48051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48052$as_echo "no" >&6; }
48053fi
48054
48055
48056  test -n "$JTREGEXE" && break
48057done
48058
48059  else
48060    # The variable is set, but is it from the command line or the environment?
48061
48062    # Try to remove the string !JTREGEXE! from our list.
48063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48065      # If it failed, the variable was not from the command line. Ignore it,
48066      # but warn the user (except for BASH, which is always set by the calling BASH).
48067      if test "xJTREGEXE" != xBASH; then
48068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48069$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48070      fi
48071      # Try to locate tool using the code snippet
48072      for ac_prog in jtreg
48073do
48074  # Extract the first word of "$ac_prog", so it can be a program name with args.
48075set dummy $ac_prog; ac_word=$2
48076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48077$as_echo_n "checking for $ac_word... " >&6; }
48078if ${ac_cv_path_JTREGEXE+:} false; then :
48079  $as_echo_n "(cached) " >&6
48080else
48081  case $JTREGEXE in
48082  [\\/]* | ?:[\\/]*)
48083  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48084  ;;
48085  *)
48086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48087for as_dir in $PATH
48088do
48089  IFS=$as_save_IFS
48090  test -z "$as_dir" && as_dir=.
48091    for ac_exec_ext in '' $ac_executable_extensions; do
48092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48093    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48095    break 2
48096  fi
48097done
48098  done
48099IFS=$as_save_IFS
48100
48101  ;;
48102esac
48103fi
48104JTREGEXE=$ac_cv_path_JTREGEXE
48105if test -n "$JTREGEXE"; then
48106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48107$as_echo "$JTREGEXE" >&6; }
48108else
48109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48110$as_echo "no" >&6; }
48111fi
48112
48113
48114  test -n "$JTREGEXE" && break
48115done
48116
48117    else
48118      # If it succeeded, then it was overridden by the user. We will use it
48119      # for the tool.
48120
48121      # First remove it from the list of overridden variables, so we can test
48122      # for unknown variables in the end.
48123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48124
48125      # Check if we try to supply an empty value
48126      if test "x$JTREGEXE" = x; then
48127        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48128$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48130$as_echo_n "checking for JTREGEXE... " >&6; }
48131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48132$as_echo "disabled" >&6; }
48133      else
48134        # Check if the provided tool contains a complete path.
48135        tool_specified="$JTREGEXE"
48136        tool_basename="${tool_specified##*/}"
48137        if test "x$tool_basename" = "x$tool_specified"; then
48138          # A command without a complete path is provided, search $PATH.
48139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48140$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48141          # Extract the first word of "$tool_basename", so it can be a program name with args.
48142set dummy $tool_basename; ac_word=$2
48143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48144$as_echo_n "checking for $ac_word... " >&6; }
48145if ${ac_cv_path_JTREGEXE+:} false; then :
48146  $as_echo_n "(cached) " >&6
48147else
48148  case $JTREGEXE in
48149  [\\/]* | ?:[\\/]*)
48150  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48151  ;;
48152  *)
48153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48154for as_dir in $PATH
48155do
48156  IFS=$as_save_IFS
48157  test -z "$as_dir" && as_dir=.
48158    for ac_exec_ext in '' $ac_executable_extensions; do
48159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48160    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48162    break 2
48163  fi
48164done
48165  done
48166IFS=$as_save_IFS
48167
48168  ;;
48169esac
48170fi
48171JTREGEXE=$ac_cv_path_JTREGEXE
48172if test -n "$JTREGEXE"; then
48173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48174$as_echo "$JTREGEXE" >&6; }
48175else
48176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48177$as_echo "no" >&6; }
48178fi
48179
48180
48181          if test "x$JTREGEXE" = x; then
48182            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48183          fi
48184        else
48185          # Otherwise we believe it is a complete path. Use it as it is.
48186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48187$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48189$as_echo_n "checking for JTREGEXE... " >&6; }
48190          if test ! -x "$tool_specified"; then
48191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48192$as_echo "not found" >&6; }
48193            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48194          fi
48195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48196$as_echo "$tool_specified" >&6; }
48197        fi
48198      fi
48199    fi
48200
48201  fi
48202
48203
48204
48205  if test "x$JTREGEXE" = x; then
48206    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48207  fi
48208
48209
48210      JT_HOME="`$DIRNAME $JTREGEXE`"
48211    fi
48212  fi
48213
48214
48215
48216
48217
48218
48219  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48220  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48221  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48222  #                              commands produced by the link step (currently AIX only)
48223  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48224    COMPILER_TARGET_BITS_FLAG="-q"
48225    COMPILER_COMMAND_FILE_FLAG="-f"
48226    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48227  else
48228    COMPILER_TARGET_BITS_FLAG="-m"
48229    COMPILER_COMMAND_FILE_FLAG="@"
48230    COMPILER_BINDCMD_FILE_FLAG=""
48231
48232    # The solstudio linker does not support @-files.
48233    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48234      COMPILER_COMMAND_FILE_FLAG=
48235    fi
48236
48237    # Check if @file is supported by gcc
48238    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48240$as_echo_n "checking if @file is supported by gcc... " >&6; }
48241      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48242      $ECHO "" "--version" > command.file
48243      if $CXX @command.file 2>&5 >&5; then
48244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48245$as_echo "yes" >&6; }
48246        COMPILER_COMMAND_FILE_FLAG="@"
48247      else
48248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48249$as_echo "no" >&6; }
48250        COMPILER_COMMAND_FILE_FLAG=
48251      fi
48252      $RM command.file
48253    fi
48254  fi
48255
48256
48257
48258
48259  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48260  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48261    ARFLAGS="-r"
48262  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48263    ARFLAGS="-X64"
48264  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48265    # lib.exe is used as AR to create static libraries.
48266    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48267  else
48268    ARFLAGS=""
48269  fi
48270
48271
48272  ## Setup strip.
48273  # FIXME: should this really be per platform, or should it be per toolchain type?
48274  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48275  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48276  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48277    STRIPFLAGS="-g"
48278  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48279    STRIPFLAGS="-x"
48280  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48281    STRIPFLAGS="-S"
48282  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48283    STRIPFLAGS="-X32_64"
48284  fi
48285
48286
48287
48288  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48289    CC_OUT_OPTION=-Fo
48290    EXE_OUT_OPTION=-out:
48291    LD_OUT_OPTION=-out:
48292    AR_OUT_OPTION=-out:
48293  else
48294    # The option used to specify the target .o,.a or .so file.
48295    # When compiling, how to specify the to be created object file.
48296    CC_OUT_OPTION='-o$(SPACE)'
48297    # When linking, how to specify the to be created executable.
48298    EXE_OUT_OPTION='-o$(SPACE)'
48299    # When linking, how to specify the to be created dynamically linkable library.
48300    LD_OUT_OPTION='-o$(SPACE)'
48301    # When archiving, how to specify the to be create static archive for object files.
48302    AR_OUT_OPTION='rcs$(SPACE)'
48303  fi
48304
48305
48306
48307
48308
48309  # On Windows, we need to set RC flags.
48310  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48311    RC_FLAGS="-nologo -l0x409"
48312    JVM_RCFLAGS="-nologo"
48313    if test "x$DEBUG_LEVEL" = xrelease; then
48314      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48315      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48316    fi
48317
48318    # The version variables used to create RC_FLAGS may be overridden
48319    # in a custom configure script, or possibly the command line.
48320    # Let those variables be expanded at make time in spec.gmk.
48321    # The \$ are escaped to the shell, and the $(...) variables
48322    # are evaluated by make.
48323    RC_FLAGS="$RC_FLAGS \
48324        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48325        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48326        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48327        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48328        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48329        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48330        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48331
48332    JVM_RCFLAGS="$JVM_RCFLAGS \
48333        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48334        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48335        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48336        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48337        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48338        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48339        -D\"HS_FNAME=jvm.dll\" \
48340        -D\"HS_INTERNAL_NAME=jvm\""
48341  fi
48342
48343
48344
48345  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48346    # silence copyright notice and other headers.
48347    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48348  fi
48349
48350
48351# Now we can test some aspects on the target using configure macros.
48352
48353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48354$as_echo_n "checking for ANSI C header files... " >&6; }
48355if ${ac_cv_header_stdc+:} false; then :
48356  $as_echo_n "(cached) " >&6
48357else
48358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48359/* end confdefs.h.  */
48360#include <stdlib.h>
48361#include <stdarg.h>
48362#include <string.h>
48363#include <float.h>
48364
48365int
48366main ()
48367{
48368
48369  ;
48370  return 0;
48371}
48372_ACEOF
48373if ac_fn_cxx_try_compile "$LINENO"; then :
48374  ac_cv_header_stdc=yes
48375else
48376  ac_cv_header_stdc=no
48377fi
48378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48379
48380if test $ac_cv_header_stdc = yes; then
48381  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48383/* end confdefs.h.  */
48384#include <string.h>
48385
48386_ACEOF
48387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48388  $EGREP "memchr" >/dev/null 2>&1; then :
48389
48390else
48391  ac_cv_header_stdc=no
48392fi
48393rm -f conftest*
48394
48395fi
48396
48397if test $ac_cv_header_stdc = yes; then
48398  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48400/* end confdefs.h.  */
48401#include <stdlib.h>
48402
48403_ACEOF
48404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48405  $EGREP "free" >/dev/null 2>&1; then :
48406
48407else
48408  ac_cv_header_stdc=no
48409fi
48410rm -f conftest*
48411
48412fi
48413
48414if test $ac_cv_header_stdc = yes; then
48415  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48416  if test "$cross_compiling" = yes; then :
48417  :
48418else
48419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48420/* end confdefs.h.  */
48421#include <ctype.h>
48422#include <stdlib.h>
48423#if ((' ' & 0x0FF) == 0x020)
48424# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48425# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48426#else
48427# define ISLOWER(c) \
48428		   (('a' <= (c) && (c) <= 'i') \
48429		     || ('j' <= (c) && (c) <= 'r') \
48430		     || ('s' <= (c) && (c) <= 'z'))
48431# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48432#endif
48433
48434#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48435int
48436main ()
48437{
48438  int i;
48439  for (i = 0; i < 256; i++)
48440    if (XOR (islower (i), ISLOWER (i))
48441	|| toupper (i) != TOUPPER (i))
48442      return 2;
48443  return 0;
48444}
48445_ACEOF
48446if ac_fn_cxx_try_run "$LINENO"; then :
48447
48448else
48449  ac_cv_header_stdc=no
48450fi
48451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48452  conftest.$ac_objext conftest.beam conftest.$ac_ext
48453fi
48454
48455fi
48456fi
48457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48458$as_echo "$ac_cv_header_stdc" >&6; }
48459if test $ac_cv_header_stdc = yes; then
48460
48461$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48462
48463fi
48464
48465# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48466for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48467		  inttypes.h stdint.h unistd.h
48468do :
48469  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48470ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48471"
48472if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48473  cat >>confdefs.h <<_ACEOF
48474#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48475_ACEOF
48476
48477fi
48478
48479done
48480
48481
48482
48483  ###############################################################################
48484  #
48485  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48486  # (The JVM can use 32 or 64 bit Java pointers but that decision
48487  # is made at runtime.)
48488  #
48489
48490  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48491    # Always specify -m flag on Solaris
48492    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48493
48494  # When we add flags to the "official" CFLAGS etc, we need to
48495  # keep track of these additions in ADDED_CFLAGS etc. These
48496  # will later be checked to make sure only controlled additions
48497  # have been made to CFLAGS etc.
48498  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48499  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48500  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48501
48502  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48503  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48504  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48505
48506  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48507  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48508  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48509
48510  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48511  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48512  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48513
48514  elif test "x$COMPILE_TYPE" = xreduced; then
48515    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48516      # Specify -m if running reduced on unix platforms
48517
48518  # When we add flags to the "official" CFLAGS etc, we need to
48519  # keep track of these additions in ADDED_CFLAGS etc. These
48520  # will later be checked to make sure only controlled additions
48521  # have been made to CFLAGS etc.
48522  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48523  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48524  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48525
48526  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48527  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48528  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48529
48530  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48531  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48532  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48533
48534  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48535  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48536  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48537
48538    fi
48539  fi
48540  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48541    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48542    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48543    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48544  fi
48545
48546  # Make compilation sanity check
48547  for ac_header in stdio.h
48548do :
48549  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48550if test "x$ac_cv_header_stdio_h" = xyes; then :
48551  cat >>confdefs.h <<_ACEOF
48552#define HAVE_STDIO_H 1
48553_ACEOF
48554
48555else
48556
48557    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48558$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48559    if test "x$COMPILE_TYPE" = xreduced; then
48560
48561  # Print a helpful message on how to acquire the necessary build dependency.
48562  # reduced is the help tag: freetype, cups, alsa etc
48563  MISSING_DEPENDENCY=reduced
48564
48565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48566    cygwin_help $MISSING_DEPENDENCY
48567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48568    msys_help $MISSING_DEPENDENCY
48569  else
48570    PKGHANDLER_COMMAND=
48571
48572    case $PKGHANDLER in
48573      apt-get)
48574        apt_help     $MISSING_DEPENDENCY ;;
48575      yum)
48576        yum_help     $MISSING_DEPENDENCY ;;
48577      port)
48578        port_help    $MISSING_DEPENDENCY ;;
48579      pkgutil)
48580        pkgutil_help $MISSING_DEPENDENCY ;;
48581      pkgadd)
48582        pkgadd_help  $MISSING_DEPENDENCY ;;
48583    esac
48584
48585    if test "x$PKGHANDLER_COMMAND" != x; then
48586      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48587    fi
48588  fi
48589
48590      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48591$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48592    elif test "x$COMPILE_TYPE" = xcross; then
48593      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48594$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48595    fi
48596    as_fn_error $? "Cannot continue." "$LINENO" 5
48597
48598fi
48599
48600done
48601
48602
48603  # The cast to long int works around a bug in the HP C Compiler
48604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48606# This bug is HP SR number 8606223364.
48607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48608$as_echo_n "checking size of int *... " >&6; }
48609if ${ac_cv_sizeof_int_p+:} false; then :
48610  $as_echo_n "(cached) " >&6
48611else
48612  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48613
48614else
48615  if test "$ac_cv_type_int_p" = yes; then
48616     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48618as_fn_error 77 "cannot compute sizeof (int *)
48619See \`config.log' for more details" "$LINENO" 5; }
48620   else
48621     ac_cv_sizeof_int_p=0
48622   fi
48623fi
48624
48625fi
48626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48627$as_echo "$ac_cv_sizeof_int_p" >&6; }
48628
48629
48630
48631cat >>confdefs.h <<_ACEOF
48632#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48633_ACEOF
48634
48635
48636
48637  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48638  if test "x$ac_cv_sizeof_int_p" = x; then
48639    # The test failed, lets stick to the assumed value.
48640    { $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
48641$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48642  else
48643    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48644
48645    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48646      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48647      # Let's try to implicitely set the compilers target architecture and retry the test
48648      { $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
48649$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;}
48650      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48651$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48652
48653  # When we add flags to the "official" CFLAGS etc, we need to
48654  # keep track of these additions in ADDED_CFLAGS etc. These
48655  # will later be checked to make sure only controlled additions
48656  # have been made to CFLAGS etc.
48657  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48658  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48659  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48660
48661  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48662  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48663  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48664
48665  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48666  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48667  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48668
48669  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48670  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48671  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48672
48673
48674      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48675      unset ac_cv_sizeof_int_p
48676      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48677      cat >>confdefs.h <<_ACEOF
48678#undef SIZEOF_INT_P
48679_ACEOF
48680
48681      # The cast to long int works around a bug in the HP C Compiler
48682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48684# This bug is HP SR number 8606223364.
48685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48686$as_echo_n "checking size of int *... " >&6; }
48687if ${ac_cv_sizeof_int_p+:} false; then :
48688  $as_echo_n "(cached) " >&6
48689else
48690  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48691
48692else
48693  if test "$ac_cv_type_int_p" = yes; then
48694     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48696as_fn_error 77 "cannot compute sizeof (int *)
48697See \`config.log' for more details" "$LINENO" 5; }
48698   else
48699     ac_cv_sizeof_int_p=0
48700   fi
48701fi
48702
48703fi
48704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48705$as_echo "$ac_cv_sizeof_int_p" >&6; }
48706
48707
48708
48709cat >>confdefs.h <<_ACEOF
48710#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48711_ACEOF
48712
48713
48714
48715      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48716
48717      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48718        { $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
48719$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;}
48720        if test "x$COMPILE_TYPE" = xreduced; then
48721
48722  # Print a helpful message on how to acquire the necessary build dependency.
48723  # reduced is the help tag: freetype, cups, alsa etc
48724  MISSING_DEPENDENCY=reduced
48725
48726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48727    cygwin_help $MISSING_DEPENDENCY
48728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48729    msys_help $MISSING_DEPENDENCY
48730  else
48731    PKGHANDLER_COMMAND=
48732
48733    case $PKGHANDLER in
48734      apt-get)
48735        apt_help     $MISSING_DEPENDENCY ;;
48736      yum)
48737        yum_help     $MISSING_DEPENDENCY ;;
48738      port)
48739        port_help    $MISSING_DEPENDENCY ;;
48740      pkgutil)
48741        pkgutil_help $MISSING_DEPENDENCY ;;
48742      pkgadd)
48743        pkgadd_help  $MISSING_DEPENDENCY ;;
48744    esac
48745
48746    if test "x$PKGHANDLER_COMMAND" != x; then
48747      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48748    fi
48749  fi
48750
48751          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48752$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48753        elif test "x$COMPILE_TYPE" = xcross; then
48754          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48755$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48756        fi
48757        as_fn_error $? "Cannot continue." "$LINENO" 5
48758      fi
48759    fi
48760  fi
48761
48762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48763$as_echo_n "checking for target address size... " >&6; }
48764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48765$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48766
48767
48768  ###############################################################################
48769  #
48770  # Is the target little of big endian?
48771  #
48772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48773$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48774if ${ac_cv_c_bigendian+:} false; then :
48775  $as_echo_n "(cached) " >&6
48776else
48777  ac_cv_c_bigendian=unknown
48778    # See if we're dealing with a universal compiler.
48779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48780/* end confdefs.h.  */
48781#ifndef __APPLE_CC__
48782	       not a universal capable compiler
48783	     #endif
48784	     typedef int dummy;
48785
48786_ACEOF
48787if ac_fn_cxx_try_compile "$LINENO"; then :
48788
48789	# Check for potential -arch flags.  It is not universal unless
48790	# there are at least two -arch flags with different values.
48791	ac_arch=
48792	ac_prev=
48793	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48794	 if test -n "$ac_prev"; then
48795	   case $ac_word in
48796	     i?86 | x86_64 | ppc | ppc64)
48797	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48798		 ac_arch=$ac_word
48799	       else
48800		 ac_cv_c_bigendian=universal
48801		 break
48802	       fi
48803	       ;;
48804	   esac
48805	   ac_prev=
48806	 elif test "x$ac_word" = "x-arch"; then
48807	   ac_prev=arch
48808	 fi
48809       done
48810fi
48811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48812    if test $ac_cv_c_bigendian = unknown; then
48813      # See if sys/param.h defines the BYTE_ORDER macro.
48814      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48815/* end confdefs.h.  */
48816#include <sys/types.h>
48817	     #include <sys/param.h>
48818
48819int
48820main ()
48821{
48822#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48823		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48824		     && LITTLE_ENDIAN)
48825	      bogus endian macros
48826	     #endif
48827
48828  ;
48829  return 0;
48830}
48831_ACEOF
48832if ac_fn_cxx_try_compile "$LINENO"; then :
48833  # It does; now see whether it defined to BIG_ENDIAN or not.
48834	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48835/* end confdefs.h.  */
48836#include <sys/types.h>
48837		#include <sys/param.h>
48838
48839int
48840main ()
48841{
48842#if BYTE_ORDER != BIG_ENDIAN
48843		 not big endian
48844		#endif
48845
48846  ;
48847  return 0;
48848}
48849_ACEOF
48850if ac_fn_cxx_try_compile "$LINENO"; then :
48851  ac_cv_c_bigendian=yes
48852else
48853  ac_cv_c_bigendian=no
48854fi
48855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48856fi
48857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48858    fi
48859    if test $ac_cv_c_bigendian = unknown; then
48860      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48862/* end confdefs.h.  */
48863#include <limits.h>
48864
48865int
48866main ()
48867{
48868#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48869	      bogus endian macros
48870	     #endif
48871
48872  ;
48873  return 0;
48874}
48875_ACEOF
48876if ac_fn_cxx_try_compile "$LINENO"; then :
48877  # It does; now see whether it defined to _BIG_ENDIAN or not.
48878	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48879/* end confdefs.h.  */
48880#include <limits.h>
48881
48882int
48883main ()
48884{
48885#ifndef _BIG_ENDIAN
48886		 not big endian
48887		#endif
48888
48889  ;
48890  return 0;
48891}
48892_ACEOF
48893if ac_fn_cxx_try_compile "$LINENO"; then :
48894  ac_cv_c_bigendian=yes
48895else
48896  ac_cv_c_bigendian=no
48897fi
48898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48899fi
48900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48901    fi
48902    if test $ac_cv_c_bigendian = unknown; then
48903      # Compile a test program.
48904      if test "$cross_compiling" = yes; then :
48905  # Try to guess by grepping values from an object file.
48906	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48907/* end confdefs.h.  */
48908short int ascii_mm[] =
48909		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48910		short int ascii_ii[] =
48911		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48912		int use_ascii (int i) {
48913		  return ascii_mm[i] + ascii_ii[i];
48914		}
48915		short int ebcdic_ii[] =
48916		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48917		short int ebcdic_mm[] =
48918		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48919		int use_ebcdic (int i) {
48920		  return ebcdic_mm[i] + ebcdic_ii[i];
48921		}
48922		extern int foo;
48923
48924int
48925main ()
48926{
48927return use_ascii (foo) == use_ebcdic (foo);
48928  ;
48929  return 0;
48930}
48931_ACEOF
48932if ac_fn_cxx_try_compile "$LINENO"; then :
48933  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48934	      ac_cv_c_bigendian=yes
48935	    fi
48936	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48937	      if test "$ac_cv_c_bigendian" = unknown; then
48938		ac_cv_c_bigendian=no
48939	      else
48940		# finding both strings is unlikely to happen, but who knows?
48941		ac_cv_c_bigendian=unknown
48942	      fi
48943	    fi
48944fi
48945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946else
48947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48948/* end confdefs.h.  */
48949$ac_includes_default
48950int
48951main ()
48952{
48953
48954	     /* Are we little or big endian?  From Harbison&Steele.  */
48955	     union
48956	     {
48957	       long int l;
48958	       char c[sizeof (long int)];
48959	     } u;
48960	     u.l = 1;
48961	     return u.c[sizeof (long int) - 1] == 1;
48962
48963  ;
48964  return 0;
48965}
48966_ACEOF
48967if ac_fn_cxx_try_run "$LINENO"; then :
48968  ac_cv_c_bigendian=no
48969else
48970  ac_cv_c_bigendian=yes
48971fi
48972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48973  conftest.$ac_objext conftest.beam conftest.$ac_ext
48974fi
48975
48976    fi
48977fi
48978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48979$as_echo "$ac_cv_c_bigendian" >&6; }
48980 case $ac_cv_c_bigendian in #(
48981   yes)
48982     ENDIAN="big";; #(
48983   no)
48984     ENDIAN="little" ;; #(
48985   universal)
48986     ENDIAN="universal_endianness"
48987     ;; #(
48988   *)
48989     ENDIAN="unknown" ;;
48990 esac
48991
48992
48993  if test "x$ENDIAN" = xuniversal_endianness; then
48994    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48995  fi
48996  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48997    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
48998  fi
48999
49000
49001# Configure flags for the tools
49002
49003  ###############################################################################
49004  #
49005  # How to compile shared libraries.
49006  #
49007
49008  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49009    PICFLAG="-fPIC"
49010    C_FLAG_REORDER=''
49011    CXX_FLAG_REORDER=''
49012
49013    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49014      # Linking is different on MacOSX
49015      if test "x$STATIC_BUILD" = xtrue; then
49016        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49017      else
49018        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49019        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49020      fi
49021      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49022      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49023      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49024      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49025    else
49026      # Default works for linux, might work on other platforms as well.
49027      SHARED_LIBRARY_FLAGS='-shared'
49028      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49029      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49030      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49031      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49032    fi
49033  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49034    C_FLAG_REORDER=''
49035    CXX_FLAG_REORDER=''
49036
49037    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49038      # Linking is different on MacOSX
49039      PICFLAG=''
49040      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49041      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49042      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49043      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49044      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49045
49046      if test "x$STATIC_BUILD" = xfalse; then
49047        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49048      fi
49049    else
49050      # Default works for linux, might work on other platforms as well.
49051      PICFLAG='-fPIC'
49052      SHARED_LIBRARY_FLAGS='-shared'
49053      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49054      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49055      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49056      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49057    fi
49058  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49059    PICFLAG="-KPIC"
49060    C_FLAG_REORDER='-xF'
49061    CXX_FLAG_REORDER='-xF'
49062    SHARED_LIBRARY_FLAGS="-G"
49063    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49064    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49065    SET_SHARED_LIBRARY_NAME='-h $1'
49066    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49067  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49068    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49069    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49070    # will have to patch this single instruction with a call to some out-of-order code which
49071    # does the load from the TOC. This is of course slow. But in that case we also would have
49072    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49073    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49074    # can be patched directly by the linker and does not require a jump to out-of-order code.
49075    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49076    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49077    # loads for accessing a global variable). But there are rumors that this may be seen as a
49078    # 'performance feature' because of improved code locality of the symbols used in a
49079    # compilation unit.
49080    PICFLAG="-qpic"
49081    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49082    C_FLAG_REORDER=''
49083    CXX_FLAG_REORDER=''
49084    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49085    SET_EXECUTABLE_ORIGIN=""
49086    SET_SHARED_LIBRARY_ORIGIN=''
49087    SET_SHARED_LIBRARY_NAME=''
49088    SET_SHARED_LIBRARY_MAPFILE=''
49089  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49090    PICFLAG=""
49091    C_FLAG_REORDER=''
49092    CXX_FLAG_REORDER=''
49093    SHARED_LIBRARY_FLAGS="-dll"
49094    SET_EXECUTABLE_ORIGIN=''
49095    SET_SHARED_LIBRARY_ORIGIN=''
49096    SET_SHARED_LIBRARY_NAME=''
49097    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49098  fi
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108  # The (cross) compiler is now configured, we can now test capabilities
49109  # of the target platform.
49110
49111
49112
49113  ###############################################################################
49114  #
49115  # Setup the opt flags for different compilers
49116  # and different operating systems.
49117  #
49118
49119  # FIXME: this was indirectly the old default, but just inherited.
49120  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49121  #   C_FLAG_DEPS="-MMD -MF"
49122  # fi
49123
49124  # Generate make dependency files
49125  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49126    C_FLAG_DEPS="-MMD -MF"
49127  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49128    C_FLAG_DEPS="-MMD -MF"
49129  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49130    C_FLAG_DEPS="-xMMD -xMF"
49131  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49132    C_FLAG_DEPS="-qmakedep=gcc -MF"
49133  fi
49134  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49135
49136
49137
49138  # Debug symbols
49139  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49140    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49141      # reduce from default "-g2" option to save space
49142      CFLAGS_DEBUG_SYMBOLS="-g1"
49143      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49144    else
49145      CFLAGS_DEBUG_SYMBOLS="-g"
49146      CXXFLAGS_DEBUG_SYMBOLS="-g"
49147    fi
49148  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49149    CFLAGS_DEBUG_SYMBOLS="-g"
49150    CXXFLAGS_DEBUG_SYMBOLS="-g"
49151  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49152    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49153    # -g0 enables debug symbols without disabling inlining.
49154    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49155  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49156    CFLAGS_DEBUG_SYMBOLS="-g"
49157    CXXFLAGS_DEBUG_SYMBOLS="-g"
49158  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49159    CFLAGS_DEBUG_SYMBOLS="-Zi"
49160    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49161  fi
49162
49163
49164
49165  # Debug symbols for JVM_CFLAGS
49166  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49167    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49168    if test "x$DEBUG_LEVEL" = xslowdebug; then
49169      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49170    else
49171      # -g0 does not disable inlining, which -g does.
49172      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49173    fi
49174  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49175    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49176  else
49177    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49178  fi
49179
49180
49181  # bounds, memory and behavior checking options
49182  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49183    case $DEBUG_LEVEL in
49184    release )
49185      # no adjustment
49186      ;;
49187    fastdebug )
49188      # no adjustment
49189      ;;
49190    slowdebug )
49191      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49192      # get's added conditionally on whether we produce debug symbols or not.
49193      # This is most likely not really correct.
49194
49195      # Add runtime stack smashing and undefined behavior checks.
49196      # Not all versions of gcc support -fstack-protector
49197      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240    # Execute function body
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289    # Execute function body
49290
49291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49292$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49293  supports=yes
49294
49295  saved_cflags="$CFLAGS"
49296  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49297  ac_ext=c
49298ac_cpp='$CPP $CPPFLAGS'
49299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49301ac_compiler_gnu=$ac_cv_c_compiler_gnu
49302
49303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49304/* end confdefs.h.  */
49305int i;
49306_ACEOF
49307if ac_fn_c_try_compile "$LINENO"; then :
49308
49309else
49310  supports=no
49311fi
49312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49313  ac_ext=cpp
49314ac_cpp='$CXXCPP $CPPFLAGS'
49315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49318
49319  CFLAGS="$saved_cflags"
49320
49321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49322$as_echo "$supports" >&6; }
49323  if test "x$supports" = "xyes" ; then
49324    :
49325    C_COMP_SUPPORTS="yes"
49326  else
49327    :
49328    C_COMP_SUPPORTS="no"
49329  fi
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389    # Execute function body
49390
49391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49392$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49393  supports=yes
49394
49395  saved_cxxflags="$CXXFLAGS"
49396  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49397  ac_ext=cpp
49398ac_cpp='$CXXCPP $CPPFLAGS'
49399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49402
49403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49404/* end confdefs.h.  */
49405int i;
49406_ACEOF
49407if ac_fn_cxx_try_compile "$LINENO"; then :
49408
49409else
49410  supports=no
49411fi
49412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49413  ac_ext=cpp
49414ac_cpp='$CXXCPP $CPPFLAGS'
49415ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49416ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49417ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49418
49419  CXXFLAGS="$saved_cxxflags"
49420
49421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49422$as_echo "$supports" >&6; }
49423  if test "x$supports" = "xyes" ; then
49424    :
49425    CXX_COMP_SUPPORTS="yes"
49426  else
49427    :
49428    CXX_COMP_SUPPORTS="no"
49429  fi
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49444$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49445  supports=no
49446  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49447
49448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49449$as_echo "$supports" >&6; }
49450  if test "x$supports" = "xyes" ; then
49451    :
49452
49453  else
49454    :
49455    STACK_PROTECTOR_CFLAG=""
49456  fi
49457
49458
49459
49460
49461
49462
49463
49464      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49465      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49466      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49467        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49468      fi
49469      ;;
49470    esac
49471  fi
49472
49473  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49474    if test "x$DEBUG_LEVEL" != xrelease; then
49475      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49476        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49477      fi
49478    fi
49479  fi
49480
49481  # Optimization levels
49482  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49483    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49484
49485    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49486      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49487      C_O_FLAG_HIGHEST_JVM="-xO4"
49488      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49489      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49490      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49491      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49492      C_O_FLAG_DEBUG_JVM=""
49493      C_O_FLAG_NONE="-xregs=no%frameptr"
49494      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49495      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49496      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49497      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49498      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49499      CXX_O_FLAG_DEBUG_JVM=""
49500      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49501      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49502        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49503        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49504      fi
49505    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49506      C_O_FLAG_HIGHEST_JVM="-xO4"
49507      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49508      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49509      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49510      C_O_FLAG_DEBUG=""
49511      C_O_FLAG_DEBUG_JVM=""
49512      C_O_FLAG_NONE=""
49513      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49514      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49515      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49516      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49517      CXX_O_FLAG_DEBUG=""
49518      CXX_O_FLAG_DEBUG_JVM=""
49519      CXX_O_FLAG_NONE=""
49520    fi
49521  else
49522    # The remaining toolchains share opt flags between CC and CXX;
49523    # setup for C and duplicate afterwards.
49524    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49525      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49526        # On MacOSX we optimize for size, something
49527        # we should do for all platforms?
49528        C_O_FLAG_HIGHEST_JVM="-Os"
49529        C_O_FLAG_HIGHEST="-Os"
49530        C_O_FLAG_HI="-Os"
49531        C_O_FLAG_NORM="-Os"
49532        C_O_FLAG_SIZE="-Os"
49533      else
49534        C_O_FLAG_HIGHEST_JVM="-O3"
49535        C_O_FLAG_HIGHEST="-O3"
49536        C_O_FLAG_HI="-O3"
49537        C_O_FLAG_NORM="-O2"
49538        C_O_FLAG_SIZE="-Os"
49539      fi
49540      C_O_FLAG_DEBUG="-O0"
49541      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49542        C_O_FLAG_DEBUG_JVM=""
49543      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49544        C_O_FLAG_DEBUG_JVM="-O0"
49545      fi
49546      C_O_FLAG_NONE="-O0"
49547    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49548      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49549        # On MacOSX we optimize for size, something
49550        # we should do for all platforms?
49551        C_O_FLAG_HIGHEST_JVM="-Os"
49552        C_O_FLAG_HIGHEST="-Os"
49553        C_O_FLAG_HI="-Os"
49554        C_O_FLAG_NORM="-Os"
49555        C_O_FLAG_SIZE="-Os"
49556      else
49557        C_O_FLAG_HIGHEST_JVM="-O3"
49558        C_O_FLAG_HIGHEST="-O3"
49559        C_O_FLAG_HI="-O3"
49560        C_O_FLAG_NORM="-O2"
49561        C_O_FLAG_SIZE="-Os"
49562      fi
49563      C_O_FLAG_DEBUG="-O0"
49564      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49565        C_O_FLAG_DEBUG_JVM=""
49566      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49567        C_O_FLAG_DEBUG_JVM="-O0"
49568      fi
49569      C_O_FLAG_NONE="-O0"
49570    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49571      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49572      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49573      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49574      C_O_FLAG_NORM="-O2"
49575      C_O_FLAG_DEBUG="-qnoopt"
49576      # FIXME: Value below not verified.
49577      C_O_FLAG_DEBUG_JVM=""
49578      C_O_FLAG_NONE="-qnoopt"
49579    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49580      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49581      C_O_FLAG_HIGHEST="-O2"
49582      C_O_FLAG_HI="-O1"
49583      C_O_FLAG_NORM="-O1"
49584      C_O_FLAG_DEBUG="-Od"
49585      C_O_FLAG_DEBUG_JVM=""
49586      C_O_FLAG_NONE="-Od"
49587      C_O_FLAG_SIZE="-Os"
49588    fi
49589    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49590    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49591    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49592    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49593    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49594    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49595    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49596    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49597  fi
49598
49599  # Adjust optimization flags according to debug level.
49600  case $DEBUG_LEVEL in
49601    release )
49602      # no adjustment
49603      ;;
49604    fastdebug )
49605      # Not quite so much optimization
49606      C_O_FLAG_HI="$C_O_FLAG_NORM"
49607      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49608      ;;
49609    slowdebug )
49610      # Disable optimization
49611      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49612      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49613      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49614      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49615      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49616      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49617      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49618      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49619      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49620      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49621      ;;
49622  esac
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642  # Special extras...
49643  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49644    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49645      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49646      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49647    fi
49648    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49649    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49650  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49651    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49652    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49653  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49654    CXXSTD_CXXFLAG="-std=gnu++98"
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697    # Execute function body
49698
49699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49700$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49701  supports=yes
49702
49703  saved_cxxflags="$CXXFLAGS"
49704  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49705  ac_ext=cpp
49706ac_cpp='$CXXCPP $CPPFLAGS'
49707ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49708ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49709ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49710
49711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49712/* end confdefs.h.  */
49713int i;
49714_ACEOF
49715if ac_fn_cxx_try_compile "$LINENO"; then :
49716
49717else
49718  supports=no
49719fi
49720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49721  ac_ext=cpp
49722ac_cpp='$CXXCPP $CPPFLAGS'
49723ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49724ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49725ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49726
49727  CXXFLAGS="$saved_cxxflags"
49728
49729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49730$as_echo "$supports" >&6; }
49731  if test "x$supports" = "xyes" ; then
49732    :
49733
49734  else
49735    :
49736    CXXSTD_CXXFLAG=""
49737  fi
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49751    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49752
49753  fi
49754  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49755    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49756    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49757  fi
49758
49759  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49760    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49761    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49762  fi
49763
49764  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49765  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49766  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49767
49768  ###############################################################################
49769  #
49770  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49771  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49772  #
49773
49774  # Setup compiler/platform specific flags into
49775  #    CFLAGS_JDK    - C Compiler flags
49776  #    CXXFLAGS_JDK  - C++ Compiler flags
49777  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49778  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49779    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49780    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49781    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49782    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49783      # Force compatibility with i586 on 32 bit intel platforms.
49784      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49785      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49786    fi
49787    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49788        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49789    case $OPENJDK_TARGET_CPU_ARCH in
49790      arm )
49791        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49792        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49793        ;;
49794      ppc )
49795        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49796        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49797        ;;
49798      s390 )
49799        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49800        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49801        ;;
49802      * )
49803        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49804        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49805        ;;
49806    esac
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861    # Execute function body
49862
49863  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49864  REFERENCE_VERSION=6
49865
49866  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49867    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49868  fi
49869
49870  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49871    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49872  fi
49873
49874  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49875  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49876
49877  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49878    :
49879
49880  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49881  # runs afoul of the more aggressive versions of these optimisations.
49882  # Notably, value range propagation now assumes that the this pointer of C++
49883  # member functions is non-null.
49884  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49885        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49886        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49887$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49888  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49889  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49890
49891  else
49892    :
49893
49894  fi
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49910    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49911
49912    # Restrict the debug information created by Clang to avoid
49913    # too big object files and speed the build up a little bit
49914    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49915    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49916    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49917      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49918        # Force compatibility with i586 on 32 bit intel platforms.
49919        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49920        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49921      fi
49922      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49923      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49924          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49925      case $OPENJDK_TARGET_CPU_ARCH in
49926        ppc )
49927          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49928          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49929          ;;
49930        * )
49931          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49932          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49933          ;;
49934      esac
49935    fi
49936  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49937    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49938    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49939    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49940      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49941    fi
49942
49943    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49944    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49945  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49946    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49947    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49948    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49949  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49950    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49951        -MD -Zc:wchar_t- -W3 -wd4800 \
49952        -DWIN32_LEAN_AND_MEAN \
49953        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49954        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49955        -DWIN32 -DIAL"
49956    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49957      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49958    else
49959      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49960    fi
49961    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49962    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49963    # studio.
49964    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49965      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49966      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49967      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49968    fi
49969  fi
49970
49971  ###############################################################################
49972
49973  # Adjust flags according to debug level.
49974  case $DEBUG_LEVEL in
49975    fastdebug | slowdebug )
49976      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49977      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49978      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49979      ;;
49980    release )
49981      ;;
49982    * )
49983      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49984      ;;
49985  esac
49986
49987  # Set some common defines. These works for all compilers, but assume
49988  # -D is universally accepted.
49989
49990  # Setup endianness
49991  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49992    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49993    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49994    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49995    #   Note: -Dmacro         is the same as    #define macro 1
49996    #         -Dmacro=        is the same as    #define macro
49997    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49998      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49999    else
50000      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50001    fi
50002  else
50003    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50004    # are defined in the system?
50005    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50006      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50007    else
50008      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50009    fi
50010  fi
50011
50012  # Setup target OS define. Use OS target name but in upper case.
50013  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50014  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50015
50016  # Setup target CPU
50017  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50018      $OPENJDK_TARGET_ADD_LP64 \
50019      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50020
50021  # Setup debug/release defines
50022  if test "x$DEBUG_LEVEL" = xrelease; then
50023    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50024    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50025      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50026    fi
50027  else
50028    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50029  fi
50030
50031  # Set some additional per-OS defines.
50032  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50033    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50034    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50035        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50036  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50037    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50038    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50039        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50040  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50041    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50042    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50043    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50044    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50045        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50046        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50047        -fno-omit-frame-pointer"
50048  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50049    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50050    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50051    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50052        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50053        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50054  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50055    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50056  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50057    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50058    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50059  fi
50060
50061  # Set some additional per-CPU defines.
50062  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50063    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50064  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50065    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50066  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50067    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50068      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50069      # fixes `relocation truncated to fit' error for gcc 4.1.
50070      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50071      # Use ppc64 instructions, but schedule for power5
50072      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50073    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50074      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50075    fi
50076  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50077    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50078      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50079      # Little endian machine uses ELFv2 ABI.
50080      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50081      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50082      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50083    fi
50084  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50085    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50086      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50087    fi
50088  fi
50089
50090  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50091    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50092  fi
50093
50094  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50095    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50096      # Solaris does not have _LP64=1 in the old build.
50097      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50098      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50099    fi
50100  fi
50101
50102  # Set JVM_CFLAGS warning handling
50103  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50104    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50105        -Wunused-value -Woverloaded-virtual"
50106
50107    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162    # Execute function body
50163
50164  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50165  REFERENCE_VERSION=4.8
50166
50167  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50168    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50169  fi
50170
50171  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50172    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50173  fi
50174
50175  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50176  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50177
50178  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50179    :
50180
50181            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50182            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50183
50184
50185  else
50186    :
50187
50188  fi
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203    fi
50204    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50205      # Non-zero builds have stricter warnings
50206      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50207    else
50208      if test "x$TOOLCHAIN_TYPE" = xclang; then
50209        # Some versions of llvm do not like -Wundef
50210        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50211      fi
50212    fi
50213  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50214    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50215        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50216  fi
50217
50218  # Additional macosx handling
50219  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50220    # Setting these parameters makes it an error to link to macosx APIs that are
50221    # newer than the given OS version and makes the linked binaries compatible
50222    # even if built on a newer version of the OS.
50223    # The expected format is X.Y.Z
50224    MACOSX_VERSION_MIN=10.7.0
50225
50226
50227    # The macro takes the version with no dots, ex: 1070
50228    # Let the flags variables get resolved in make for easier override on make
50229    # command line.
50230    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50231    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50232  fi
50233
50234  # Setup some hard coded includes
50235  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50236      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50237      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50238      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50239      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50240      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50241      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50242
50243  # The shared libraries are compiled using the picflag.
50244  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50245      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50246  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50247      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50248
50249  # Executable flags
50250  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50251  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50252
50253
50254
50255
50256
50257
50258  # Setup LDFLAGS et al.
50259  #
50260
50261  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50262    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50263    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50264    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50265    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50266      LDFLAGS_SAFESH="-safeseh"
50267      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50268      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50269      # NOTE: Old build added -machine. Probably not needed.
50270      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50271    else
50272      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50273    fi
50274  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50275      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50276      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50277        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50278        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50279    fi
50280  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50281    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50282    # We have previously set HAS_GNU_HASH if this is the case
50283    if test -n "$HAS_GNU_HASH"; then
50284      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50285      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50286      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50287    fi
50288      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50289        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50290    fi
50291    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50292      # And since we now know that the linker is gnu, then add -z defs, to forbid
50293      # undefined symbols in object files.
50294      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50295      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50296      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50297      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50298      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50299      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50300        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50301      fi
50302      case $DEBUG_LEVEL in
50303        release )
50304          # tell linker to optimize libraries.
50305          # Should this be supplied to the OSS linker as well?
50306          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50307          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50308          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50309          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50310            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50311          fi
50312          ;;
50313        slowdebug )
50314          # Hotspot always let the linker optimize
50315          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50316          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50317            # do relocations at load
50318            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50319            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50320            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50321          fi
50322          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50323            # mark relocations read only
50324            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50325            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50326            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50327          fi
50328          ;;
50329        fastdebug )
50330          # Hotspot always let the linker optimize
50331          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50332          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50333            # mark relocations read only
50334            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50335            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50336            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50337          fi
50338          ;;
50339        * )
50340          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50341          ;;
50342        esac
50343    fi
50344  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50345    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50346    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50347    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50348    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50349    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50350    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50351      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50352    fi
50353  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50354    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50355    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50356    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50357  fi
50358
50359  # Customize LDFLAGS for executables
50360
50361  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50362
50363  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50364    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50365      LDFLAGS_STACK_SIZE=1048576
50366    else
50367      LDFLAGS_STACK_SIZE=327680
50368    fi
50369    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50370  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50371    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50372  fi
50373
50374  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50375
50376  # Customize LDFLAGS for libs
50377  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50378
50379  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50380  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50381    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50382        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50383    JDKLIB_LIBS=""
50384  else
50385    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50386        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50387
50388    if test "xTARGET" = "xTARGET"; then
50389      # On some platforms (mac) the linker warns about non existing -L dirs.
50390      # For any of the variants server, client or minimal, the dir matches the
50391      # variant name. The "main" variant should be used for linking. For the
50392      # rest, the dir is just server.
50393      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50394          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50395        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50396            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50397      else
50398        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50399            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50400      fi
50401    elif test "xTARGET" = "xBUILD"; then
50402      # When building a buildjdk, it's always only the server variant
50403      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50404          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50405    fi
50406
50407    JDKLIB_LIBS="-ljava -ljvm"
50408    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50409      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50410    fi
50411
50412  fi
50413
50414LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50415
50416  # Set JVM_LIBS (per os)
50417  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50418    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50419  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50420    # FIXME: This hard-coded path is not really proper.
50421    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50422      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50423    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50424      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50425    fi
50426    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50427        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50428  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50429    JVM_LIBS="$JVM_LIBS -lm"
50430  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50431    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50432  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50433    JVM_LIBS="$JVM_LIBS -lm"
50434  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50435    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50436        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50437        wsock32.lib winmm.lib version.lib psapi.lib"
50438    fi
50439
50440  # Set JVM_ASFLAGS
50441  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50442    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50443      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50444    fi
50445  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50446    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50447  fi
50448
50449  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465  # Special extras...
50466  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50467    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50468      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50469      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50470    fi
50471    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50472    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50473  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50474    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50475    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50476  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50477    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520    # Execute function body
50521
50522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50523$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50524  supports=yes
50525
50526  saved_cxxflags="$CXXFLAGS"
50527  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50528  ac_ext=cpp
50529ac_cpp='$CXXCPP $CPPFLAGS'
50530ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50531ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50532ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50533
50534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50535/* end confdefs.h.  */
50536int i;
50537_ACEOF
50538if ac_fn_cxx_try_compile "$LINENO"; then :
50539
50540else
50541  supports=no
50542fi
50543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50544  ac_ext=cpp
50545ac_cpp='$CXXCPP $CPPFLAGS'
50546ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50547ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50548ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50549
50550  CXXFLAGS="$saved_cxxflags"
50551
50552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50553$as_echo "$supports" >&6; }
50554  if test "x$supports" = "xyes" ; then
50555    :
50556
50557  else
50558    :
50559    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50560  fi
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50574    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50575
50576  fi
50577  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50578    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50579    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50580  fi
50581
50582  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50583    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50584    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50585  fi
50586
50587  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50588  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50589  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50590
50591  ###############################################################################
50592  #
50593  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50594  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50595  #
50596
50597  # Setup compiler/platform specific flags into
50598  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50599  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50600  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50601  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50602    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50603    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50604    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50605    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50606      # Force compatibility with i586 on 32 bit intel platforms.
50607      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50608      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50609    fi
50610    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50611        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50612    case $OPENJDK_BUILD_CPU_ARCH in
50613      arm )
50614        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50615        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50616        ;;
50617      ppc )
50618        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50619        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50620        ;;
50621      s390 )
50622        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50623        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50624        ;;
50625      * )
50626        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50627        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50628        ;;
50629    esac
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684    # Execute function body
50685
50686  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50687  REFERENCE_VERSION=6
50688
50689  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50690    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50691  fi
50692
50693  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50694    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50695  fi
50696
50697  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50698  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50699
50700  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50701    :
50702
50703  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50704  # runs afoul of the more aggressive versions of these optimisations.
50705  # Notably, value range propagation now assumes that the this pointer of C++
50706  # member functions is non-null.
50707  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50708        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50709        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50710$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50711  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50712  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50713
50714  else
50715    :
50716
50717  fi
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50733    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50734
50735    # Restrict the debug information created by Clang to avoid
50736    # too big object files and speed the build up a little bit
50737    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50738    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50739    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50740      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50741        # Force compatibility with i586 on 32 bit intel platforms.
50742        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50743        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50744      fi
50745      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50746      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50747          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50748      case $OPENJDK_BUILD_CPU_ARCH in
50749        ppc )
50750          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50751          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50752          ;;
50753        * )
50754          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50755          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50756          ;;
50757      esac
50758    fi
50759  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50760    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50761    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50762    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50763      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50764    fi
50765
50766    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50767    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50768  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50769    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50770    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50771    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50772  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50773    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50774        -MD -Zc:wchar_t- -W3 -wd4800 \
50775        -DWIN32_LEAN_AND_MEAN \
50776        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50777        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50778        -DWIN32 -DIAL"
50779    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50780      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50781    else
50782      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50783    fi
50784    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50785    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50786    # studio.
50787    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50788      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50789      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50790      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50791    fi
50792  fi
50793
50794  ###############################################################################
50795
50796  # Adjust flags according to debug level.
50797  case $DEBUG_LEVEL in
50798    fastdebug | slowdebug )
50799      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50800      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50801      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50802      ;;
50803    release )
50804      ;;
50805    * )
50806      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50807      ;;
50808  esac
50809
50810  # Set some common defines. These works for all compilers, but assume
50811  # -D is universally accepted.
50812
50813  # Setup endianness
50814  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50815    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50816    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50817    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50818    #   Note: -Dmacro         is the same as    #define macro 1
50819    #         -Dmacro=        is the same as    #define macro
50820    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50821      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50822    else
50823      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50824    fi
50825  else
50826    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50827    # are defined in the system?
50828    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50829      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50830    else
50831      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50832    fi
50833  fi
50834
50835  # Setup target OS define. Use OS target name but in upper case.
50836  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50837  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50838
50839  # Setup target CPU
50840  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50841      $OPENJDK_BUILD_ADD_LP64 \
50842      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50843
50844  # Setup debug/release defines
50845  if test "x$DEBUG_LEVEL" = xrelease; then
50846    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50847    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50848      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50849    fi
50850  else
50851    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50852  fi
50853
50854  # Set some additional per-OS defines.
50855  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50856    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50857    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50858        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50859  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50860    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50861    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50862        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50863  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50864    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50865    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50866    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50867    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50868        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50869        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50870        -fno-omit-frame-pointer"
50871  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50872    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50873    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50874    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50875        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50876        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50877  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50878    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50879  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50880    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50881    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50882  fi
50883
50884  # Set some additional per-CPU defines.
50885  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50886    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50887  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50888    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50889  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50890    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50891      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50892      # fixes `relocation truncated to fit' error for gcc 4.1.
50893      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50894      # Use ppc64 instructions, but schedule for power5
50895      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50896    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50897      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50898    fi
50899  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50900    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50901      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50902      # Little endian machine uses ELFv2 ABI.
50903      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50904      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50905      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50906    fi
50907  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50908    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50909      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50910    fi
50911  fi
50912
50913  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50914    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50915  fi
50916
50917  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50918    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50919      # Solaris does not have _LP64=1 in the old build.
50920      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50921      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50922    fi
50923  fi
50924
50925  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50926  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50927    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50928        -Wunused-value -Woverloaded-virtual"
50929
50930    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985    # Execute function body
50986
50987  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50988  REFERENCE_VERSION=4.8
50989
50990  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50991    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50992  fi
50993
50994  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50995    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50996  fi
50997
50998  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50999  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51000
51001  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51002    :
51003
51004            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51005            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51006
51007
51008  else
51009    :
51010
51011  fi
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026    fi
51027    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51028      # Non-zero builds have stricter warnings
51029      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51030    else
51031      if test "x$TOOLCHAIN_TYPE" = xclang; then
51032        # Some versions of llvm do not like -Wundef
51033        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51034      fi
51035    fi
51036  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51037    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51038        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51039  fi
51040
51041  # Additional macosx handling
51042  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51043    # Setting these parameters makes it an error to link to macosx APIs that are
51044    # newer than the given OS version and makes the linked binaries compatible
51045    # even if built on a newer version of the OS.
51046    # The expected format is X.Y.Z
51047    MACOSX_VERSION_MIN=10.7.0
51048
51049
51050    # The macro takes the version with no dots, ex: 1070
51051    # Let the flags variables get resolved in make for easier override on make
51052    # command line.
51053    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51054    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51055  fi
51056
51057  # Setup some hard coded includes
51058  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51059      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51060      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51061      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51062      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51063      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51064      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51065
51066  # The shared libraries are compiled using the picflag.
51067  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51068      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51069  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51070      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51071
51072  # Executable flags
51073  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51074  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51075
51076
51077
51078
51079
51080
51081  # Setup LDFLAGS et al.
51082  #
51083
51084  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51085    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51086    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51087    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51088    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51089      LDFLAGS_SAFESH="-safeseh"
51090      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51091      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51092      # NOTE: Old build added -machine. Probably not needed.
51093      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51094    else
51095      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51096    fi
51097  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51098      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51099      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51100        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51101        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51102    fi
51103  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51104    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51105    # We have previously set HAS_GNU_HASH if this is the case
51106    if test -n "$HAS_GNU_HASH"; then
51107      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51108      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51109      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51110    fi
51111      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51112        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51113    fi
51114    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51115      # And since we now know that the linker is gnu, then add -z defs, to forbid
51116      # undefined symbols in object files.
51117      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51118      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51119      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51120      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51121      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51122      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51123        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51124      fi
51125      case $DEBUG_LEVEL in
51126        release )
51127          # tell linker to optimize libraries.
51128          # Should this be supplied to the OSS linker as well?
51129          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51130          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51131          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51132          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51133            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51134          fi
51135          ;;
51136        slowdebug )
51137          # Hotspot always let the linker optimize
51138          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51139          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51140            # do relocations at load
51141            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51142            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51143            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51144          fi
51145          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51146            # mark relocations read only
51147            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51148            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51149            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51150          fi
51151          ;;
51152        fastdebug )
51153          # Hotspot always let the linker optimize
51154          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51155          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51156            # mark relocations read only
51157            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51158            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51159            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51160          fi
51161          ;;
51162        * )
51163          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51164          ;;
51165        esac
51166    fi
51167  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51168    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51169    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51170    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51171    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51172    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51173    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51174      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51175    fi
51176  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51177    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51178    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51179    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51180  fi
51181
51182  # Customize LDFLAGS for executables
51183
51184  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51185
51186  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51187    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51188      LDFLAGS_STACK_SIZE=1048576
51189    else
51190      LDFLAGS_STACK_SIZE=327680
51191    fi
51192    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51193  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51194    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51195  fi
51196
51197  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51198
51199  # Customize LDFLAGS for libs
51200  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51201
51202  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51203  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51204    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51205        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51206    OPENJDK_BUILD_JDKLIB_LIBS=""
51207  else
51208    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51209        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51210
51211    if test "xBUILD" = "xTARGET"; then
51212      # On some platforms (mac) the linker warns about non existing -L dirs.
51213      # For any of the variants server, client or minimal, the dir matches the
51214      # variant name. The "main" variant should be used for linking. For the
51215      # rest, the dir is just server.
51216      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51217          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51218        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51219            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51220      else
51221        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51222            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51223      fi
51224    elif test "xBUILD" = "xBUILD"; then
51225      # When building a buildjdk, it's always only the server variant
51226      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51227          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51228    fi
51229
51230    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51231    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51232      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51233    fi
51234
51235  fi
51236
51237OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51238
51239  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51240  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51241    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51242  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51243    # FIXME: This hard-coded path is not really proper.
51244    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51245      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51246    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51247      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51248    fi
51249    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51250        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51251  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51252    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51253  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51254    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51255  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51256    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51257  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51258    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51259        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51260        wsock32.lib winmm.lib version.lib psapi.lib"
51261    fi
51262
51263  # Set OPENJDK_BUILD_JVM_ASFLAGS
51264  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51265    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51266      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51267    fi
51268  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51269    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51270  fi
51271
51272  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288  # Tests are only ever compiled for TARGET
51289  # Flags for compiling test libraries
51290  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51291  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51292
51293  # Flags for compiling test executables
51294  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51295  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51296
51297
51298
51299
51300
51301
51302  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51303  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51304
51305
51306
51307
51308
51309
51310  # Some Zero and Shark settings.
51311  # ZERO_ARCHFLAG tells the compiler which mode to build for
51312  case "${OPENJDK_TARGET_CPU}" in
51313    s390)
51314      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51315      ;;
51316    *)
51317      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51318  esac
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361    # Execute function body
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410    # Execute function body
51411
51412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51413$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51414  supports=yes
51415
51416  saved_cflags="$CFLAGS"
51417  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51418  ac_ext=c
51419ac_cpp='$CPP $CPPFLAGS'
51420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51422ac_compiler_gnu=$ac_cv_c_compiler_gnu
51423
51424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51425/* end confdefs.h.  */
51426int i;
51427_ACEOF
51428if ac_fn_c_try_compile "$LINENO"; then :
51429
51430else
51431  supports=no
51432fi
51433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51434  ac_ext=cpp
51435ac_cpp='$CXXCPP $CPPFLAGS'
51436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51439
51440  CFLAGS="$saved_cflags"
51441
51442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51443$as_echo "$supports" >&6; }
51444  if test "x$supports" = "xyes" ; then
51445    :
51446    C_COMP_SUPPORTS="yes"
51447  else
51448    :
51449    C_COMP_SUPPORTS="no"
51450  fi
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510    # Execute function body
51511
51512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51513$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51514  supports=yes
51515
51516  saved_cxxflags="$CXXFLAGS"
51517  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51518  ac_ext=cpp
51519ac_cpp='$CXXCPP $CPPFLAGS'
51520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51523
51524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51525/* end confdefs.h.  */
51526int i;
51527_ACEOF
51528if ac_fn_cxx_try_compile "$LINENO"; then :
51529
51530else
51531  supports=no
51532fi
51533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51534  ac_ext=cpp
51535ac_cpp='$CXXCPP $CPPFLAGS'
51536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51539
51540  CXXFLAGS="$saved_cxxflags"
51541
51542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51543$as_echo "$supports" >&6; }
51544  if test "x$supports" = "xyes" ; then
51545    :
51546    CXX_COMP_SUPPORTS="yes"
51547  else
51548    :
51549    CXX_COMP_SUPPORTS="no"
51550  fi
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51565$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51566  supports=no
51567  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51568
51569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51570$as_echo "$supports" >&6; }
51571  if test "x$supports" = "xyes" ; then
51572    :
51573
51574  else
51575    :
51576    ZERO_ARCHFLAG=""
51577  fi
51578
51579
51580
51581
51582
51583
51584
51585
51586  # Check that the compiler supports -mX (or -qX on AIX) flags
51587  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635    # Execute function body
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684    # Execute function body
51685
51686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51687$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51688  supports=yes
51689
51690  saved_cflags="$CFLAGS"
51691  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51692  ac_ext=c
51693ac_cpp='$CPP $CPPFLAGS'
51694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51696ac_compiler_gnu=$ac_cv_c_compiler_gnu
51697
51698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51699/* end confdefs.h.  */
51700int i;
51701_ACEOF
51702if ac_fn_c_try_compile "$LINENO"; then :
51703
51704else
51705  supports=no
51706fi
51707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51708  ac_ext=cpp
51709ac_cpp='$CXXCPP $CPPFLAGS'
51710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51713
51714  CFLAGS="$saved_cflags"
51715
51716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51717$as_echo "$supports" >&6; }
51718  if test "x$supports" = "xyes" ; then
51719    :
51720    C_COMP_SUPPORTS="yes"
51721  else
51722    :
51723    C_COMP_SUPPORTS="no"
51724  fi
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784    # Execute function body
51785
51786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51787$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51788  supports=yes
51789
51790  saved_cxxflags="$CXXFLAGS"
51791  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51792  ac_ext=cpp
51793ac_cpp='$CXXCPP $CPPFLAGS'
51794ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51795ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51796ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51797
51798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51799/* end confdefs.h.  */
51800int i;
51801_ACEOF
51802if ac_fn_cxx_try_compile "$LINENO"; then :
51803
51804else
51805  supports=no
51806fi
51807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51808  ac_ext=cpp
51809ac_cpp='$CXXCPP $CPPFLAGS'
51810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51813
51814  CXXFLAGS="$saved_cxxflags"
51815
51816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51817$as_echo "$supports" >&6; }
51818  if test "x$supports" = "xyes" ; then
51819    :
51820    CXX_COMP_SUPPORTS="yes"
51821  else
51822    :
51823    CXX_COMP_SUPPORTS="no"
51824  fi
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51839$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51840  supports=no
51841  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51842
51843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51844$as_echo "$supports" >&6; }
51845  if test "x$supports" = "xyes" ; then
51846    :
51847    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51848  else
51849    :
51850    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51851  fi
51852
51853
51854
51855
51856
51857
51858
51859
51860  # Check whether --enable-warnings-as-errors was given.
51861if test "${enable_warnings_as_errors+set}" = set; then :
51862  enableval=$enable_warnings_as_errors;
51863fi
51864
51865
51866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51867$as_echo_n "checking if native warnings are errors... " >&6; }
51868  if test "x$enable_warnings_as_errors" = "xyes"; then
51869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51870$as_echo "yes (explicitely set)" >&6; }
51871    WARNINGS_AS_ERRORS=true
51872  elif test "x$enable_warnings_as_errors" = "xno"; then
51873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51874$as_echo "no" >&6; }
51875    WARNINGS_AS_ERRORS=false
51876  elif test "x$enable_warnings_as_errors" = "x"; then
51877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51878$as_echo "yes (default)" >&6; }
51879    WARNINGS_AS_ERRORS=true
51880  else
51881    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51882  fi
51883
51884  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51885    # Set legacy hotspot variable
51886    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51887  else
51888    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51889  fi
51890
51891
51892
51893
51894  case "${TOOLCHAIN_TYPE}" in
51895    microsoft)
51896      DISABLE_WARNING_PREFIX="-wd"
51897      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51898      ;;
51899    solstudio)
51900      DISABLE_WARNING_PREFIX="-erroff="
51901      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51902      ;;
51903    gcc)
51904      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952    # Execute function body
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001    # Execute function body
52002
52003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52004$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52005  supports=yes
52006
52007  saved_cflags="$CFLAGS"
52008  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52009  ac_ext=c
52010ac_cpp='$CPP $CPPFLAGS'
52011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52013ac_compiler_gnu=$ac_cv_c_compiler_gnu
52014
52015  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52016/* end confdefs.h.  */
52017int i;
52018_ACEOF
52019if ac_fn_c_try_compile "$LINENO"; then :
52020
52021else
52022  supports=no
52023fi
52024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52025  ac_ext=cpp
52026ac_cpp='$CXXCPP $CPPFLAGS'
52027ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52028ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52029ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52030
52031  CFLAGS="$saved_cflags"
52032
52033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52034$as_echo "$supports" >&6; }
52035  if test "x$supports" = "xyes" ; then
52036    :
52037    C_COMP_SUPPORTS="yes"
52038  else
52039    :
52040    C_COMP_SUPPORTS="no"
52041  fi
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101    # Execute function body
52102
52103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52104$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52105  supports=yes
52106
52107  saved_cxxflags="$CXXFLAGS"
52108  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52109  ac_ext=cpp
52110ac_cpp='$CXXCPP $CPPFLAGS'
52111ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52112ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52113ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52114
52115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52116/* end confdefs.h.  */
52117int i;
52118_ACEOF
52119if ac_fn_cxx_try_compile "$LINENO"; then :
52120
52121else
52122  supports=no
52123fi
52124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52125  ac_ext=cpp
52126ac_cpp='$CXXCPP $CPPFLAGS'
52127ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52128ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52129ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52130
52131  CXXFLAGS="$saved_cxxflags"
52132
52133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52134$as_echo "$supports" >&6; }
52135  if test "x$supports" = "xyes" ; then
52136    :
52137    CXX_COMP_SUPPORTS="yes"
52138  else
52139    :
52140    CXX_COMP_SUPPORTS="no"
52141  fi
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52156$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52157  supports=no
52158  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52159
52160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52161$as_echo "$supports" >&6; }
52162  if test "x$supports" = "xyes" ; then
52163    :
52164    GCC_CAN_DISABLE_WARNINGS=true
52165  else
52166    :
52167    GCC_CAN_DISABLE_WARNINGS=false
52168
52169  fi
52170
52171
52172
52173
52174
52175
52176      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52177        DISABLE_WARNING_PREFIX="-Wno-"
52178      else
52179        DISABLE_WARNING_PREFIX=
52180      fi
52181      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52182      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52183      # CFLAGS since any target specific flags will likely not work with the
52184      # build compiler
52185      CC_OLD="$CC"
52186      CXX_OLD="$CXX"
52187      CC="$BUILD_CC"
52188      CXX="$BUILD_CXX"
52189      CFLAGS_OLD="$CFLAGS"
52190      CFLAGS=""
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238    # Execute function body
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287    # Execute function body
52288
52289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52290$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52291  supports=yes
52292
52293  saved_cflags="$CFLAGS"
52294  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52295  ac_ext=c
52296ac_cpp='$CPP $CPPFLAGS'
52297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52299ac_compiler_gnu=$ac_cv_c_compiler_gnu
52300
52301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52302/* end confdefs.h.  */
52303int i;
52304_ACEOF
52305if ac_fn_c_try_compile "$LINENO"; then :
52306
52307else
52308  supports=no
52309fi
52310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52311  ac_ext=cpp
52312ac_cpp='$CXXCPP $CPPFLAGS'
52313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52316
52317  CFLAGS="$saved_cflags"
52318
52319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52320$as_echo "$supports" >&6; }
52321  if test "x$supports" = "xyes" ; then
52322    :
52323    C_COMP_SUPPORTS="yes"
52324  else
52325    :
52326    C_COMP_SUPPORTS="no"
52327  fi
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387    # Execute function body
52388
52389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52390$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52391  supports=yes
52392
52393  saved_cxxflags="$CXXFLAGS"
52394  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52395  ac_ext=cpp
52396ac_cpp='$CXXCPP $CPPFLAGS'
52397ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52398ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52399ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52400
52401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52402/* end confdefs.h.  */
52403int i;
52404_ACEOF
52405if ac_fn_cxx_try_compile "$LINENO"; then :
52406
52407else
52408  supports=no
52409fi
52410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52411  ac_ext=cpp
52412ac_cpp='$CXXCPP $CPPFLAGS'
52413ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52414ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52415ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52416
52417  CXXFLAGS="$saved_cxxflags"
52418
52419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52420$as_echo "$supports" >&6; }
52421  if test "x$supports" = "xyes" ; then
52422    :
52423    CXX_COMP_SUPPORTS="yes"
52424  else
52425    :
52426    CXX_COMP_SUPPORTS="no"
52427  fi
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52442$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52443  supports=no
52444  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52445
52446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52447$as_echo "$supports" >&6; }
52448  if test "x$supports" = "xyes" ; then
52449    :
52450    BUILD_CC_CAN_DISABLE_WARNINGS=true
52451  else
52452    :
52453    BUILD_CC_CAN_DISABLE_WARNINGS=false
52454
52455  fi
52456
52457
52458
52459
52460
52461
52462      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52463        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52464      else
52465        BUILD_CC_DISABLE_WARNING_PREFIX=
52466      fi
52467      CC="$CC_OLD"
52468      CXX="$CXX_OLD"
52469      CFLAGS="$CFLAGS_OLD"
52470      ;;
52471    clang)
52472      DISABLE_WARNING_PREFIX="-Wno-"
52473      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52474      ;;
52475    xlc)
52476      DISABLE_WARNING_PREFIX="-qsuppress="
52477      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52478      ;;
52479  esac
52480
52481
52482
52483
52484
52485# Setup debug symbols (need objcopy from the toolchain for that)
52486
52487  #
52488  # NATIVE_DEBUG_SYMBOLS
52489  # This must be done after the toolchain is setup, since we're looking at objcopy.
52490  #
52491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52492$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52493
52494# Check whether --with-native-debug-symbols was given.
52495if test "${with_native_debug_symbols+set}" = set; then :
52496  withval=$with_native_debug_symbols;
52497        if test "x$OPENJDK_TARGET_OS" = xaix; then
52498          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52499            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52500          fi
52501        fi
52502
52503else
52504
52505        if test "x$OPENJDK_TARGET_OS" = xaix; then
52506          # AIX doesn't support 'zipped' so use 'internal' as default
52507          with_native_debug_symbols="internal"
52508        else
52509          if test "x$STATIC_BUILD" = xtrue; then
52510            with_native_debug_symbols="none"
52511          else
52512            with_native_debug_symbols="zipped"
52513          fi
52514        fi
52515
52516fi
52517
52518  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52520$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52521
52522  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52523
52524    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52525      if test "x$OBJCOPY" = x; then
52526        # enabling of enable-debug-symbols and can't find objcopy
52527        # this is an error
52528        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52529      fi
52530    fi
52531
52532    COMPILE_WITH_DEBUG_SYMBOLS=true
52533    COPY_DEBUG_SYMBOLS=true
52534    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52535
52536    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52537    DEBUG_BINARIES=false
52538    STRIP_POLICY=min_strip
52539
52540  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52541    COMPILE_WITH_DEBUG_SYMBOLS=false
52542    COPY_DEBUG_SYMBOLS=false
52543    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52544
52545    DEBUG_BINARIES=false
52546    STRIP_POLICY=no_strip
52547  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52548    COMPILE_WITH_DEBUG_SYMBOLS=true
52549    COPY_DEBUG_SYMBOLS=false
52550    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52551
52552    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52553    DEBUG_BINARIES=true
52554    STRIP_POLICY=no_strip
52555    STRIP=""
52556
52557  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52558
52559    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52560      if test "x$OBJCOPY" = x; then
52561        # enabling of enable-debug-symbols and can't find objcopy
52562        # this is an error
52563        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52564      fi
52565    fi
52566
52567    COMPILE_WITH_DEBUG_SYMBOLS=true
52568    COPY_DEBUG_SYMBOLS=true
52569    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52570
52571    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52572    DEBUG_BINARIES=false
52573    STRIP_POLICY=min_strip
52574  else
52575    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52576  fi
52577
52578  # --enable-debug-symbols is deprecated.
52579  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52580
52581  # Check whether --enable-debug-symbols was given.
52582if test "${enable_debug_symbols+set}" = set; then :
52583  enableval=$enable_debug_symbols;
52584fi
52585
52586  if test "x$enable_debug_symbols" != x; then
52587    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52588$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52589
52590    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52591      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52592$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52593    fi
52594
52595  fi
52596
52597
52598  # --enable-zip-debug-info is deprecated.
52599  # Please use --with-native-debug-symbols=zipped .
52600
52601  # Check whether --enable-zip-debug-info was given.
52602if test "${enable_zip_debug_info+set}" = set; then :
52603  enableval=$enable_zip_debug_info;
52604fi
52605
52606  if test "x$enable_zip_debug_info" != x; then
52607    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52608$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52609
52610    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52611      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52612$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52613    fi
52614
52615  fi
52616
52617
52618
52619
52620
52621
52622  # Legacy values
52623
52624
52625
52626
52627  # Check whether --enable-native-coverage was given.
52628if test "${enable_native_coverage+set}" = set; then :
52629  enableval=$enable_native_coverage;
52630fi
52631
52632  GCOV_ENABLED="false"
52633  if test "x$enable_native_coverage" = "xyes"; then
52634    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52636$as_echo_n "checking if native coverage is enabled... " >&6; }
52637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52638$as_echo "yes" >&6; }
52639      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52640      GCOV_LDFLAGS="-fprofile-arcs"
52641      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52642      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52643      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52644      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52645      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52646      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52647      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52648      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52649      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52650      GCOV_ENABLED="true"
52651    else
52652      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52653    fi
52654  elif test "x$enable_native_coverage" = "xno"; then
52655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52656$as_echo_n "checking if native coverage is enabled... " >&6; }
52657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52658$as_echo "no" >&6; }
52659  elif test "x$enable_native_coverage" != "x"; then
52660    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52661  fi
52662
52663
52664
52665
52666# Need toolchain to setup dtrace
52667
52668  # Test for dtrace dependencies
52669  # Check whether --enable-dtrace was given.
52670if test "${enable_dtrace+set}" = set; then :
52671  enableval=$enable_dtrace;
52672fi
52673
52674
52675  DTRACE_DEP_MISSING=false
52676
52677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52678$as_echo_n "checking for dtrace tool... " >&6; }
52679  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52681$as_echo "$DTRACE" >&6; }
52682  else
52683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52684$as_echo "not found, cannot build dtrace" >&6; }
52685    DTRACE_DEP_MISSING=true
52686  fi
52687
52688  for ac_header in sys/sdt.h
52689do :
52690  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52691if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52692  cat >>confdefs.h <<_ACEOF
52693#define HAVE_SYS_SDT_H 1
52694_ACEOF
52695 DTRACE_HEADERS_OK=yes
52696else
52697  DTRACE_HEADERS_OK=no
52698fi
52699
52700done
52701
52702  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52703    DTRACE_DEP_MISSING=true
52704  fi
52705
52706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52707$as_echo_n "checking if dtrace should be built... " >&6; }
52708  if test "x$enable_dtrace" = "xyes"; then
52709    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52711$as_echo "no, missing dependencies" >&6; }
52712
52713  # Print a helpful message on how to acquire the necessary build dependency.
52714  # dtrace is the help tag: freetype, cups, alsa etc
52715  MISSING_DEPENDENCY=dtrace
52716
52717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52718    cygwin_help $MISSING_DEPENDENCY
52719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52720    msys_help $MISSING_DEPENDENCY
52721  else
52722    PKGHANDLER_COMMAND=
52723
52724    case $PKGHANDLER in
52725      apt-get)
52726        apt_help     $MISSING_DEPENDENCY ;;
52727      yum)
52728        yum_help     $MISSING_DEPENDENCY ;;
52729      port)
52730        port_help    $MISSING_DEPENDENCY ;;
52731      pkgutil)
52732        pkgutil_help $MISSING_DEPENDENCY ;;
52733      pkgadd)
52734        pkgadd_help  $MISSING_DEPENDENCY ;;
52735    esac
52736
52737    if test "x$PKGHANDLER_COMMAND" != x; then
52738      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52739    fi
52740  fi
52741
52742      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52743    else
52744      INCLUDE_DTRACE=true
52745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52746$as_echo "yes, forced" >&6; }
52747    fi
52748  elif test "x$enable_dtrace" = "xno"; then
52749    INCLUDE_DTRACE=false
52750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52751$as_echo "no, forced" >&6; }
52752  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52753    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52754      INCLUDE_DTRACE=false
52755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52756$as_echo "no, missing dependencies" >&6; }
52757    else
52758      INCLUDE_DTRACE=true
52759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52760$as_echo "yes, dependencies present" >&6; }
52761    fi
52762  else
52763    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52764  fi
52765
52766
52767
52768  # The user can in some cases supply additional jvm features. For the custom
52769  # variant, this defines the entire variant.
52770
52771# Check whether --with-jvm-features was given.
52772if test "${with_jvm_features+set}" = set; then :
52773  withval=$with_jvm_features;
52774fi
52775
52776  if test "x$with_jvm_features" != x; then
52777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52778$as_echo_n "checking additional JVM features... " >&6; }
52779    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52781$as_echo "$JVM_FEATURES" >&6; }
52782  fi
52783
52784  # Verify that dependencies are met for explicitly set features.
52785  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52786    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52787  fi
52788
52789  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52790    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52791  fi
52792
52793  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52794    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52795  fi
52796
52797  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52798    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52799  fi
52800
52801  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52802    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52803  fi
52804
52805  # Turn on additional features based on other parts of configure
52806  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52807    JVM_FEATURES="$JVM_FEATURES dtrace"
52808  else
52809    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52810      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52811    fi
52812  fi
52813
52814  if test "x$STATIC_BUILD" = "xtrue"; then
52815    JVM_FEATURES="$JVM_FEATURES static-build"
52816  else
52817    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52818      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52819    fi
52820  fi
52821
52822  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52823    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52824      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52825    fi
52826  fi
52827
52828  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52829    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52830      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52831    fi
52832  fi
52833
52834  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52835  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52836      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52837      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52838    JVM_FEATURES_jvmci="jvmci"
52839  else
52840    JVM_FEATURES_jvmci=""
52841  fi
52842
52843  # All variants but minimal (and custom) get these features
52844  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52845
52846  # Enable features depending on variant.
52847  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52848  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52849  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52850  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52851  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52852  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52853  JVM_FEATURES_custom="$JVM_FEATURES"
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863  # Used for verification of Makefiles by check-jvm-feature
52864
52865
52866  # We don't support --with-jvm-interpreter anymore, use zero instead.
52867
52868
52869# Check whether --with-jvm-interpreter was given.
52870if test "${with_jvm_interpreter+set}" = set; then :
52871  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52872$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52873fi
52874
52875
52876
52877
52878  # Check whether --enable-hotspot-gtest was given.
52879if test "${enable_hotspot_gtest+set}" = set; then :
52880  enableval=$enable_hotspot_gtest;
52881fi
52882
52883
52884  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52885    GTEST_DIR_EXISTS="true"
52886  else
52887    GTEST_DIR_EXISTS="false"
52888  fi
52889
52890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52891$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52892  if test "x$enable_hotspot_gtest" = "xyes"; then
52893    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52895$as_echo "yes, forced" >&6; }
52896      BUILD_GTEST="true"
52897    else
52898      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52899    fi
52900  elif test "x$enable_hotspot_gtest" = "xno"; then
52901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52902$as_echo "no, forced" >&6; }
52903    BUILD_GTEST="false"
52904  elif test "x$enable_hotspot_gtest" = "x"; then
52905    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52907$as_echo "yes" >&6; }
52908      BUILD_GTEST="true"
52909    else
52910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52911$as_echo "no" >&6; }
52912      BUILD_GTEST="false"
52913    fi
52914  else
52915    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52916  fi
52917
52918
52919
52920
52921###############################################################################
52922#
52923# Check dependencies for external and internal libraries.
52924#
52925###############################################################################
52926
52927# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52928
52929  # When using cygwin or msys, we need a wrapper binary that renames
52930  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52931  # @files and rewrites these too! This wrapper binary is
52932  # called fixpath.
52933  FIXPATH=
52934  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52936$as_echo_n "checking if fixpath can be created... " >&6; }
52937    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52938    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52939    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52940    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52941      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52942      FIXPATH="$FIXPATH_BIN -c"
52943    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52944      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52945      # @ was chosen as separator to minimize risk of other tools messing around with it
52946      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52947          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52948      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52949      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52950    fi
52951    FIXPATH_SRC_W="$FIXPATH_SRC"
52952    FIXPATH_BIN_W="$FIXPATH_BIN"
52953
52954  unix_path="$FIXPATH_SRC_W"
52955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52956    windows_path=`$CYGPATH -m "$unix_path"`
52957    FIXPATH_SRC_W="$windows_path"
52958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52959    windows_path=`cmd //c echo $unix_path`
52960    FIXPATH_SRC_W="$windows_path"
52961  fi
52962
52963
52964  unix_path="$FIXPATH_BIN_W"
52965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52966    windows_path=`$CYGPATH -m "$unix_path"`
52967    FIXPATH_BIN_W="$windows_path"
52968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52969    windows_path=`cmd //c echo $unix_path`
52970    FIXPATH_BIN_W="$windows_path"
52971  fi
52972
52973    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52974    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52975    cd $FIXPATH_DIR
52976    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52977    cd $CURDIR
52978
52979    if test ! -x $FIXPATH_BIN; then
52980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52981$as_echo "no" >&6; }
52982      cat $FIXPATH_DIR/fixpath1.log
52983      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52984    fi
52985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52986$as_echo "yes" >&6; }
52987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52988$as_echo_n "checking if fixpath.exe works... " >&6; }
52989    cd $FIXPATH_DIR
52990    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52991        > $FIXPATH_DIR/fixpath2.log 2>&1
52992    cd $CURDIR
52993    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52995$as_echo "no" >&6; }
52996      cat $FIXPATH_DIR/fixpath2.log
52997      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52998    fi
52999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53000$as_echo "yes" >&6; }
53001
53002    FIXPATH_DETACH_FLAG="--detach"
53003  fi
53004
53005
53006
53007
53008
53009
53010  # Check if X11 is needed
53011  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53012    # No X11 support on windows or macosx
53013    NEEDS_LIB_X11=false
53014  else
53015    # All other instances need X11, even if building headless only, libawt still
53016    # needs X11 headers.
53017    NEEDS_LIB_X11=true
53018  fi
53019
53020  # Check if cups is needed
53021  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53022    # Windows have a separate print system
53023    NEEDS_LIB_CUPS=false
53024  else
53025    NEEDS_LIB_CUPS=true
53026  fi
53027
53028  # A custom hook may have set this already
53029  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53030    NEEDS_LIB_FREETYPE=true
53031  fi
53032
53033  # Check if alsa is needed
53034  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53035    NEEDS_LIB_ALSA=true
53036  else
53037    NEEDS_LIB_ALSA=false
53038  fi
53039
53040  # Check if ffi is needed
53041  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53042    NEEDS_LIB_FFI=true
53043  else
53044    NEEDS_LIB_FFI=false
53045  fi
53046
53047
53048  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53049  # dynamic build is configured on command line.
53050
53051# Check whether --with-stdc++lib was given.
53052if test "${with_stdc__lib+set}" = set; then :
53053  withval=$with_stdc__lib;
53054        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53055                && test "x$with_stdc__lib" != xdefault; then
53056          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53057        fi
53058
53059else
53060  with_stdc__lib=default
53061
53062fi
53063
53064
53065  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53066    # Test if stdc++ can be linked statically.
53067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53068$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53069    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53070    ac_ext=cpp
53071ac_cpp='$CXXCPP $CPPFLAGS'
53072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53075
53076    OLD_LIBS="$LIBS"
53077    LIBS="$STATIC_STDCXX_FLAGS"
53078    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53079/* end confdefs.h.  */
53080
53081int
53082main ()
53083{
53084return 0;
53085  ;
53086  return 0;
53087}
53088_ACEOF
53089if ac_fn_cxx_try_link "$LINENO"; then :
53090  has_static_libstdcxx=yes
53091else
53092  has_static_libstdcxx=no
53093fi
53094rm -f core conftest.err conftest.$ac_objext \
53095    conftest$ac_exeext conftest.$ac_ext
53096    LIBS="$OLD_LIBS"
53097    ac_ext=cpp
53098ac_cpp='$CXXCPP $CPPFLAGS'
53099ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53100ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53101ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53102
53103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53104$as_echo "$has_static_libstdcxx" >&6; }
53105
53106    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53107      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53108    fi
53109
53110    # If dynamic was requested, it's available since it would fail above otherwise.
53111    # If dynamic wasn't requested, go with static unless it isn't available.
53112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53113$as_echo_n "checking how to link with libstdc++... " >&6; }
53114    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53115        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53117$as_echo "dynamic" >&6; }
53118    else
53119      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53120      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53121      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53122      # just use the same setting as for the TARGET toolchain.
53123      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53125$as_echo "static" >&6; }
53126    fi
53127  fi
53128
53129  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53130  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53131    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53132  fi
53133
53134
53135
53136  # Setup Windows runtime dlls
53137  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53138
53139
53140# Check whether --with-msvcr-dll was given.
53141if test "${with_msvcr_dll+set}" = set; then :
53142  withval=$with_msvcr_dll;
53143fi
53144
53145
53146  if test "x$with_msvcr_dll" != x; then
53147    # If given explicitely by user, do not probe. If not present, fail directly.
53148
53149  DLL_NAME="$MSVCR_NAME"
53150  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53151  METHOD="--with-msvcr-dll"
53152  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53153    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53154$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53155
53156    # Need to check if the found msvcr is correct architecture
53157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53158$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53159    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53161      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53162      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53163      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53164        CORRECT_MSVCR_ARCH="PE32 executable"
53165      else
53166        CORRECT_MSVCR_ARCH="PE32+ executable"
53167      fi
53168    else
53169      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53170        CORRECT_MSVCR_ARCH=386
53171      else
53172        CORRECT_MSVCR_ARCH=x86-64
53173      fi
53174    fi
53175    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53177$as_echo "ok" >&6; }
53178      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53179
53180  # Only process if variable expands to non-empty
53181
53182  if test "x$MSVC_DLL" != x; then
53183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53184
53185  # Input might be given as Windows format, start by converting to
53186  # unix format.
53187  path="$MSVC_DLL"
53188  new_path=`$CYGPATH -u "$path"`
53189
53190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53193  # "foo.exe" is OK but "foo" is an error.
53194  #
53195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53196  # It is also a way to make sure we got the proper file name for the real test later on.
53197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53198  if test "x$test_shortpath" = x; then
53199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53200$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53201    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53202  fi
53203
53204  # Call helper function which possibly converts this using DOS-style short mode.
53205  # If so, the updated path is stored in $new_path.
53206
53207  input_path="$new_path"
53208  # Check if we need to convert this using DOS-style short mode. If the path
53209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53210  # take no chances and rewrite it.
53211  # Note: m4 eats our [], so we need to use [ and ] instead.
53212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53213  if test "x$has_forbidden_chars" != x; then
53214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53218      # Going to short mode and back again did indeed matter. Since short mode is
53219      # case insensitive, let's make it lowercase to improve readability.
53220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53221      # Now convert it back to Unix-style (cygpath)
53222      input_path=`$CYGPATH -u "$shortmode_path"`
53223      new_path="$input_path"
53224    fi
53225  fi
53226
53227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53228  if test "x$test_cygdrive_prefix" = x; then
53229    # As a simple fix, exclude /usr/bin since it's not a real path.
53230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53232      # a path prefixed by /cygdrive for fixpath to work.
53233      new_path="$CYGWIN_ROOT_PATH$input_path"
53234    fi
53235  fi
53236
53237
53238  if test "x$path" != "x$new_path"; then
53239    MSVC_DLL="$new_path"
53240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53241$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53242  fi
53243
53244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53245
53246  path="$MSVC_DLL"
53247  has_colon=`$ECHO $path | $GREP ^.:`
53248  new_path="$path"
53249  if test "x$has_colon" = x; then
53250    # Not in mixed or Windows style, start by that.
53251    new_path=`cmd //c echo $path`
53252  fi
53253
53254
53255  input_path="$new_path"
53256  # Check if we need to convert this using DOS-style short mode. If the path
53257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53258  # take no chances and rewrite it.
53259  # Note: m4 eats our [], so we need to use [ and ] instead.
53260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53261  if test "x$has_forbidden_chars" != x; then
53262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53264  fi
53265
53266
53267  windows_path="$new_path"
53268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53269    unix_path=`$CYGPATH -u "$windows_path"`
53270    new_path="$unix_path"
53271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53273    new_path="$unix_path"
53274  fi
53275
53276  if test "x$path" != "x$new_path"; then
53277    MSVC_DLL="$new_path"
53278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53279$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53280  fi
53281
53282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53284
53285    else
53286      # We're on a unix platform. Hooray! :)
53287      path="$MSVC_DLL"
53288      has_space=`$ECHO "$path" | $GREP " "`
53289      if test "x$has_space" != x; then
53290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53291$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53293      fi
53294
53295      # Use eval to expand a potential ~
53296      eval path="$path"
53297      if test ! -f "$path" && test ! -d "$path"; then
53298        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53299      fi
53300
53301      if test -d "$path"; then
53302        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53303      else
53304        dir="`$DIRNAME "$path"`"
53305        base="`$BASENAME "$path"`"
53306        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53307      fi
53308    fi
53309  fi
53310
53311      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53312$as_echo_n "checking for $DLL_NAME... " >&6; }
53313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53314$as_echo "$MSVC_DLL" >&6; }
53315    else
53316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53317$as_echo "incorrect, ignoring" >&6; }
53318      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53319$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53320    fi
53321  fi
53322
53323    if test "x$MSVC_DLL" = x; then
53324      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53325    fi
53326    MSVCR_DLL="$MSVC_DLL"
53327  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53328
53329  DLL_NAME="$MSVCR_NAME"
53330  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53331  METHOD="devkit"
53332  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53334$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53335
53336    # Need to check if the found msvcr is correct architecture
53337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53338$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53339    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53341      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53342      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53343      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53344        CORRECT_MSVCR_ARCH="PE32 executable"
53345      else
53346        CORRECT_MSVCR_ARCH="PE32+ executable"
53347      fi
53348    else
53349      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53350        CORRECT_MSVCR_ARCH=386
53351      else
53352        CORRECT_MSVCR_ARCH=x86-64
53353      fi
53354    fi
53355    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53357$as_echo "ok" >&6; }
53358      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53359
53360  # Only process if variable expands to non-empty
53361
53362  if test "x$MSVC_DLL" != x; then
53363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53364
53365  # Input might be given as Windows format, start by converting to
53366  # unix format.
53367  path="$MSVC_DLL"
53368  new_path=`$CYGPATH -u "$path"`
53369
53370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53373  # "foo.exe" is OK but "foo" is an error.
53374  #
53375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53376  # It is also a way to make sure we got the proper file name for the real test later on.
53377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53378  if test "x$test_shortpath" = x; then
53379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53380$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53381    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53382  fi
53383
53384  # Call helper function which possibly converts this using DOS-style short mode.
53385  # If so, the updated path is stored in $new_path.
53386
53387  input_path="$new_path"
53388  # Check if we need to convert this using DOS-style short mode. If the path
53389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53390  # take no chances and rewrite it.
53391  # Note: m4 eats our [], so we need to use [ and ] instead.
53392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53393  if test "x$has_forbidden_chars" != x; then
53394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53398      # Going to short mode and back again did indeed matter. Since short mode is
53399      # case insensitive, let's make it lowercase to improve readability.
53400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53401      # Now convert it back to Unix-style (cygpath)
53402      input_path=`$CYGPATH -u "$shortmode_path"`
53403      new_path="$input_path"
53404    fi
53405  fi
53406
53407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53408  if test "x$test_cygdrive_prefix" = x; then
53409    # As a simple fix, exclude /usr/bin since it's not a real path.
53410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53412      # a path prefixed by /cygdrive for fixpath to work.
53413      new_path="$CYGWIN_ROOT_PATH$input_path"
53414    fi
53415  fi
53416
53417
53418  if test "x$path" != "x$new_path"; then
53419    MSVC_DLL="$new_path"
53420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53421$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53422  fi
53423
53424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53425
53426  path="$MSVC_DLL"
53427  has_colon=`$ECHO $path | $GREP ^.:`
53428  new_path="$path"
53429  if test "x$has_colon" = x; then
53430    # Not in mixed or Windows style, start by that.
53431    new_path=`cmd //c echo $path`
53432  fi
53433
53434
53435  input_path="$new_path"
53436  # Check if we need to convert this using DOS-style short mode. If the path
53437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53438  # take no chances and rewrite it.
53439  # Note: m4 eats our [], so we need to use [ and ] instead.
53440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53441  if test "x$has_forbidden_chars" != x; then
53442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53444  fi
53445
53446
53447  windows_path="$new_path"
53448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53449    unix_path=`$CYGPATH -u "$windows_path"`
53450    new_path="$unix_path"
53451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53453    new_path="$unix_path"
53454  fi
53455
53456  if test "x$path" != "x$new_path"; then
53457    MSVC_DLL="$new_path"
53458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53459$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53460  fi
53461
53462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53464
53465    else
53466      # We're on a unix platform. Hooray! :)
53467      path="$MSVC_DLL"
53468      has_space=`$ECHO "$path" | $GREP " "`
53469      if test "x$has_space" != x; then
53470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53471$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53473      fi
53474
53475      # Use eval to expand a potential ~
53476      eval path="$path"
53477      if test ! -f "$path" && test ! -d "$path"; then
53478        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53479      fi
53480
53481      if test -d "$path"; then
53482        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53483      else
53484        dir="`$DIRNAME "$path"`"
53485        base="`$BASENAME "$path"`"
53486        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53487      fi
53488    fi
53489  fi
53490
53491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53492$as_echo_n "checking for $DLL_NAME... " >&6; }
53493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53494$as_echo "$MSVC_DLL" >&6; }
53495    else
53496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53497$as_echo "incorrect, ignoring" >&6; }
53498      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53499$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53500    fi
53501  fi
53502
53503    if test "x$MSVC_DLL" = x; then
53504      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53505    fi
53506    MSVCR_DLL="$MSVC_DLL"
53507  else
53508
53509  DLL_NAME="${MSVCR_NAME}"
53510  MSVC_DLL=
53511
53512  if test "x$MSVC_DLL" = x; then
53513    # Probe: Using well-known location from Visual Studio 10.0
53514    if test "x$VCINSTALLDIR" != x; then
53515      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53516
53517  windows_path="$CYGWIN_VC_INSTALL_DIR"
53518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53519    unix_path=`$CYGPATH -u "$windows_path"`
53520    CYGWIN_VC_INSTALL_DIR="$unix_path"
53521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53523    CYGWIN_VC_INSTALL_DIR="$unix_path"
53524  fi
53525
53526      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53527        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53528      else
53529        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53530      fi
53531      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53532
53533  DLL_NAME="$DLL_NAME"
53534  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53535  METHOD="well-known location in VCINSTALLDIR"
53536  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53537    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53538$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53539
53540    # Need to check if the found msvcr is correct architecture
53541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53542$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53543    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53545      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53546      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53547      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53548        CORRECT_MSVCR_ARCH="PE32 executable"
53549      else
53550        CORRECT_MSVCR_ARCH="PE32+ executable"
53551      fi
53552    else
53553      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53554        CORRECT_MSVCR_ARCH=386
53555      else
53556        CORRECT_MSVCR_ARCH=x86-64
53557      fi
53558    fi
53559    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53561$as_echo "ok" >&6; }
53562      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53563
53564  # Only process if variable expands to non-empty
53565
53566  if test "x$MSVC_DLL" != x; then
53567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53568
53569  # Input might be given as Windows format, start by converting to
53570  # unix format.
53571  path="$MSVC_DLL"
53572  new_path=`$CYGPATH -u "$path"`
53573
53574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53577  # "foo.exe" is OK but "foo" is an error.
53578  #
53579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53580  # It is also a way to make sure we got the proper file name for the real test later on.
53581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53582  if test "x$test_shortpath" = x; then
53583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53584$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53585    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53586  fi
53587
53588  # Call helper function which possibly converts this using DOS-style short mode.
53589  # If so, the updated path is stored in $new_path.
53590
53591  input_path="$new_path"
53592  # Check if we need to convert this using DOS-style short mode. If the path
53593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53594  # take no chances and rewrite it.
53595  # Note: m4 eats our [], so we need to use [ and ] instead.
53596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53597  if test "x$has_forbidden_chars" != x; then
53598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53602      # Going to short mode and back again did indeed matter. Since short mode is
53603      # case insensitive, let's make it lowercase to improve readability.
53604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53605      # Now convert it back to Unix-style (cygpath)
53606      input_path=`$CYGPATH -u "$shortmode_path"`
53607      new_path="$input_path"
53608    fi
53609  fi
53610
53611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53612  if test "x$test_cygdrive_prefix" = x; then
53613    # As a simple fix, exclude /usr/bin since it's not a real path.
53614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53616      # a path prefixed by /cygdrive for fixpath to work.
53617      new_path="$CYGWIN_ROOT_PATH$input_path"
53618    fi
53619  fi
53620
53621
53622  if test "x$path" != "x$new_path"; then
53623    MSVC_DLL="$new_path"
53624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53625$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53626  fi
53627
53628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53629
53630  path="$MSVC_DLL"
53631  has_colon=`$ECHO $path | $GREP ^.:`
53632  new_path="$path"
53633  if test "x$has_colon" = x; then
53634    # Not in mixed or Windows style, start by that.
53635    new_path=`cmd //c echo $path`
53636  fi
53637
53638
53639  input_path="$new_path"
53640  # Check if we need to convert this using DOS-style short mode. If the path
53641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53642  # take no chances and rewrite it.
53643  # Note: m4 eats our [], so we need to use [ and ] instead.
53644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53645  if test "x$has_forbidden_chars" != x; then
53646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53648  fi
53649
53650
53651  windows_path="$new_path"
53652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53653    unix_path=`$CYGPATH -u "$windows_path"`
53654    new_path="$unix_path"
53655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53657    new_path="$unix_path"
53658  fi
53659
53660  if test "x$path" != "x$new_path"; then
53661    MSVC_DLL="$new_path"
53662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53663$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53664  fi
53665
53666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53668
53669    else
53670      # We're on a unix platform. Hooray! :)
53671      path="$MSVC_DLL"
53672      has_space=`$ECHO "$path" | $GREP " "`
53673      if test "x$has_space" != x; then
53674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53675$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53677      fi
53678
53679      # Use eval to expand a potential ~
53680      eval path="$path"
53681      if test ! -f "$path" && test ! -d "$path"; then
53682        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53683      fi
53684
53685      if test -d "$path"; then
53686        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53687      else
53688        dir="`$DIRNAME "$path"`"
53689        base="`$BASENAME "$path"`"
53690        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53691      fi
53692    fi
53693  fi
53694
53695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53696$as_echo_n "checking for $DLL_NAME... " >&6; }
53697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53698$as_echo "$MSVC_DLL" >&6; }
53699    else
53700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53701$as_echo "incorrect, ignoring" >&6; }
53702      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53703$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53704    fi
53705  fi
53706
53707    fi
53708  fi
53709
53710  if test "x$MSVC_DLL" = x; then
53711    # Probe: Check in the Boot JDK directory.
53712    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53713
53714  DLL_NAME="$DLL_NAME"
53715  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53716  METHOD="well-known location in Boot JDK"
53717  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53718    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53719$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53720
53721    # Need to check if the found msvcr is correct architecture
53722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53723$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53724    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53726      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53727      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53728      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53729        CORRECT_MSVCR_ARCH="PE32 executable"
53730      else
53731        CORRECT_MSVCR_ARCH="PE32+ executable"
53732      fi
53733    else
53734      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53735        CORRECT_MSVCR_ARCH=386
53736      else
53737        CORRECT_MSVCR_ARCH=x86-64
53738      fi
53739    fi
53740    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53742$as_echo "ok" >&6; }
53743      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53744
53745  # Only process if variable expands to non-empty
53746
53747  if test "x$MSVC_DLL" != x; then
53748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53749
53750  # Input might be given as Windows format, start by converting to
53751  # unix format.
53752  path="$MSVC_DLL"
53753  new_path=`$CYGPATH -u "$path"`
53754
53755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53758  # "foo.exe" is OK but "foo" is an error.
53759  #
53760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53761  # It is also a way to make sure we got the proper file name for the real test later on.
53762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53763  if test "x$test_shortpath" = x; then
53764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53765$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53766    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53767  fi
53768
53769  # Call helper function which possibly converts this using DOS-style short mode.
53770  # If so, the updated path is stored in $new_path.
53771
53772  input_path="$new_path"
53773  # Check if we need to convert this using DOS-style short mode. If the path
53774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53775  # take no chances and rewrite it.
53776  # Note: m4 eats our [], so we need to use [ and ] instead.
53777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53778  if test "x$has_forbidden_chars" != x; then
53779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53783      # Going to short mode and back again did indeed matter. Since short mode is
53784      # case insensitive, let's make it lowercase to improve readability.
53785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53786      # Now convert it back to Unix-style (cygpath)
53787      input_path=`$CYGPATH -u "$shortmode_path"`
53788      new_path="$input_path"
53789    fi
53790  fi
53791
53792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53793  if test "x$test_cygdrive_prefix" = x; then
53794    # As a simple fix, exclude /usr/bin since it's not a real path.
53795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53797      # a path prefixed by /cygdrive for fixpath to work.
53798      new_path="$CYGWIN_ROOT_PATH$input_path"
53799    fi
53800  fi
53801
53802
53803  if test "x$path" != "x$new_path"; then
53804    MSVC_DLL="$new_path"
53805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53806$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53807  fi
53808
53809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53810
53811  path="$MSVC_DLL"
53812  has_colon=`$ECHO $path | $GREP ^.:`
53813  new_path="$path"
53814  if test "x$has_colon" = x; then
53815    # Not in mixed or Windows style, start by that.
53816    new_path=`cmd //c echo $path`
53817  fi
53818
53819
53820  input_path="$new_path"
53821  # Check if we need to convert this using DOS-style short mode. If the path
53822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53823  # take no chances and rewrite it.
53824  # Note: m4 eats our [], so we need to use [ and ] instead.
53825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53826  if test "x$has_forbidden_chars" != x; then
53827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53829  fi
53830
53831
53832  windows_path="$new_path"
53833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53834    unix_path=`$CYGPATH -u "$windows_path"`
53835    new_path="$unix_path"
53836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53838    new_path="$unix_path"
53839  fi
53840
53841  if test "x$path" != "x$new_path"; then
53842    MSVC_DLL="$new_path"
53843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53844$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53845  fi
53846
53847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53849
53850    else
53851      # We're on a unix platform. Hooray! :)
53852      path="$MSVC_DLL"
53853      has_space=`$ECHO "$path" | $GREP " "`
53854      if test "x$has_space" != x; then
53855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53856$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53857        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53858      fi
53859
53860      # Use eval to expand a potential ~
53861      eval path="$path"
53862      if test ! -f "$path" && test ! -d "$path"; then
53863        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53864      fi
53865
53866      if test -d "$path"; then
53867        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53868      else
53869        dir="`$DIRNAME "$path"`"
53870        base="`$BASENAME "$path"`"
53871        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53872      fi
53873    fi
53874  fi
53875
53876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53877$as_echo_n "checking for $DLL_NAME... " >&6; }
53878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53879$as_echo "$MSVC_DLL" >&6; }
53880    else
53881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53882$as_echo "incorrect, ignoring" >&6; }
53883      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53884$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53885    fi
53886  fi
53887
53888  fi
53889
53890  if test "x$MSVC_DLL" = x; then
53891    # Probe: Look in the Windows system32 directory
53892    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53893
53894  windows_path="$CYGWIN_SYSTEMROOT"
53895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53896    unix_path=`$CYGPATH -u "$windows_path"`
53897    CYGWIN_SYSTEMROOT="$unix_path"
53898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53900    CYGWIN_SYSTEMROOT="$unix_path"
53901  fi
53902
53903    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53904
53905  DLL_NAME="$DLL_NAME"
53906  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53907  METHOD="well-known location in SYSTEMROOT"
53908  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53910$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53911
53912    # Need to check if the found msvcr is correct architecture
53913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53914$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53915    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53917      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53918      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53920        CORRECT_MSVCR_ARCH="PE32 executable"
53921      else
53922        CORRECT_MSVCR_ARCH="PE32+ executable"
53923      fi
53924    else
53925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53926        CORRECT_MSVCR_ARCH=386
53927      else
53928        CORRECT_MSVCR_ARCH=x86-64
53929      fi
53930    fi
53931    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53933$as_echo "ok" >&6; }
53934      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53935
53936  # Only process if variable expands to non-empty
53937
53938  if test "x$MSVC_DLL" != x; then
53939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53940
53941  # Input might be given as Windows format, start by converting to
53942  # unix format.
53943  path="$MSVC_DLL"
53944  new_path=`$CYGPATH -u "$path"`
53945
53946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53949  # "foo.exe" is OK but "foo" is an error.
53950  #
53951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53952  # It is also a way to make sure we got the proper file name for the real test later on.
53953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53954  if test "x$test_shortpath" = x; then
53955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53956$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53957    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53958  fi
53959
53960  # Call helper function which possibly converts this using DOS-style short mode.
53961  # If so, the updated path is stored in $new_path.
53962
53963  input_path="$new_path"
53964  # Check if we need to convert this using DOS-style short mode. If the path
53965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53966  # take no chances and rewrite it.
53967  # Note: m4 eats our [], so we need to use [ and ] instead.
53968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53969  if test "x$has_forbidden_chars" != x; then
53970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53974      # Going to short mode and back again did indeed matter. Since short mode is
53975      # case insensitive, let's make it lowercase to improve readability.
53976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53977      # Now convert it back to Unix-style (cygpath)
53978      input_path=`$CYGPATH -u "$shortmode_path"`
53979      new_path="$input_path"
53980    fi
53981  fi
53982
53983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53984  if test "x$test_cygdrive_prefix" = x; then
53985    # As a simple fix, exclude /usr/bin since it's not a real path.
53986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53988      # a path prefixed by /cygdrive for fixpath to work.
53989      new_path="$CYGWIN_ROOT_PATH$input_path"
53990    fi
53991  fi
53992
53993
53994  if test "x$path" != "x$new_path"; then
53995    MSVC_DLL="$new_path"
53996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53997$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53998  fi
53999
54000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54001
54002  path="$MSVC_DLL"
54003  has_colon=`$ECHO $path | $GREP ^.:`
54004  new_path="$path"
54005  if test "x$has_colon" = x; then
54006    # Not in mixed or Windows style, start by that.
54007    new_path=`cmd //c echo $path`
54008  fi
54009
54010
54011  input_path="$new_path"
54012  # Check if we need to convert this using DOS-style short mode. If the path
54013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54014  # take no chances and rewrite it.
54015  # Note: m4 eats our [], so we need to use [ and ] instead.
54016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54017  if test "x$has_forbidden_chars" != x; then
54018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54020  fi
54021
54022
54023  windows_path="$new_path"
54024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54025    unix_path=`$CYGPATH -u "$windows_path"`
54026    new_path="$unix_path"
54027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54029    new_path="$unix_path"
54030  fi
54031
54032  if test "x$path" != "x$new_path"; then
54033    MSVC_DLL="$new_path"
54034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54035$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54036  fi
54037
54038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54040
54041    else
54042      # We're on a unix platform. Hooray! :)
54043      path="$MSVC_DLL"
54044      has_space=`$ECHO "$path" | $GREP " "`
54045      if test "x$has_space" != x; then
54046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54049      fi
54050
54051      # Use eval to expand a potential ~
54052      eval path="$path"
54053      if test ! -f "$path" && test ! -d "$path"; then
54054        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54055      fi
54056
54057      if test -d "$path"; then
54058        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54059      else
54060        dir="`$DIRNAME "$path"`"
54061        base="`$BASENAME "$path"`"
54062        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54063      fi
54064    fi
54065  fi
54066
54067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54068$as_echo_n "checking for $DLL_NAME... " >&6; }
54069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54070$as_echo "$MSVC_DLL" >&6; }
54071    else
54072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54073$as_echo "incorrect, ignoring" >&6; }
54074      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54075$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54076    fi
54077  fi
54078
54079  fi
54080
54081  if test "x$MSVC_DLL" = x; then
54082    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54083    if test "x$VS100COMNTOOLS" != x; then
54084      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54085
54086  windows_path="$CYGWIN_VS_TOOLS_DIR"
54087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54088    unix_path=`$CYGPATH -u "$windows_path"`
54089    CYGWIN_VS_TOOLS_DIR="$unix_path"
54090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54092    CYGWIN_VS_TOOLS_DIR="$unix_path"
54093  fi
54094
54095      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54096        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54097	    | $GREP -i /x64/ | $HEAD --lines 1`
54098      else
54099        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54100	    | $GREP -i /x86/ | $HEAD --lines 1`
54101      fi
54102
54103  DLL_NAME="$DLL_NAME"
54104  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54105  METHOD="search of VS100COMNTOOLS"
54106  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54108$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54109
54110    # Need to check if the found msvcr is correct architecture
54111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54112$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54113    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54115      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54116      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54118        CORRECT_MSVCR_ARCH="PE32 executable"
54119      else
54120        CORRECT_MSVCR_ARCH="PE32+ executable"
54121      fi
54122    else
54123      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54124        CORRECT_MSVCR_ARCH=386
54125      else
54126        CORRECT_MSVCR_ARCH=x86-64
54127      fi
54128    fi
54129    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54131$as_echo "ok" >&6; }
54132      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54133
54134  # Only process if variable expands to non-empty
54135
54136  if test "x$MSVC_DLL" != x; then
54137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54138
54139  # Input might be given as Windows format, start by converting to
54140  # unix format.
54141  path="$MSVC_DLL"
54142  new_path=`$CYGPATH -u "$path"`
54143
54144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54147  # "foo.exe" is OK but "foo" is an error.
54148  #
54149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54150  # It is also a way to make sure we got the proper file name for the real test later on.
54151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54152  if test "x$test_shortpath" = x; then
54153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54154$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54155    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54156  fi
54157
54158  # Call helper function which possibly converts this using DOS-style short mode.
54159  # If so, the updated path is stored in $new_path.
54160
54161  input_path="$new_path"
54162  # Check if we need to convert this using DOS-style short mode. If the path
54163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54164  # take no chances and rewrite it.
54165  # Note: m4 eats our [], so we need to use [ and ] instead.
54166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54167  if test "x$has_forbidden_chars" != x; then
54168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54172      # Going to short mode and back again did indeed matter. Since short mode is
54173      # case insensitive, let's make it lowercase to improve readability.
54174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54175      # Now convert it back to Unix-style (cygpath)
54176      input_path=`$CYGPATH -u "$shortmode_path"`
54177      new_path="$input_path"
54178    fi
54179  fi
54180
54181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54182  if test "x$test_cygdrive_prefix" = x; then
54183    # As a simple fix, exclude /usr/bin since it's not a real path.
54184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54186      # a path prefixed by /cygdrive for fixpath to work.
54187      new_path="$CYGWIN_ROOT_PATH$input_path"
54188    fi
54189  fi
54190
54191
54192  if test "x$path" != "x$new_path"; then
54193    MSVC_DLL="$new_path"
54194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54196  fi
54197
54198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54199
54200  path="$MSVC_DLL"
54201  has_colon=`$ECHO $path | $GREP ^.:`
54202  new_path="$path"
54203  if test "x$has_colon" = x; then
54204    # Not in mixed or Windows style, start by that.
54205    new_path=`cmd //c echo $path`
54206  fi
54207
54208
54209  input_path="$new_path"
54210  # Check if we need to convert this using DOS-style short mode. If the path
54211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54212  # take no chances and rewrite it.
54213  # Note: m4 eats our [], so we need to use [ and ] instead.
54214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54215  if test "x$has_forbidden_chars" != x; then
54216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54218  fi
54219
54220
54221  windows_path="$new_path"
54222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54223    unix_path=`$CYGPATH -u "$windows_path"`
54224    new_path="$unix_path"
54225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54227    new_path="$unix_path"
54228  fi
54229
54230  if test "x$path" != "x$new_path"; then
54231    MSVC_DLL="$new_path"
54232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54233$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54234  fi
54235
54236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54238
54239    else
54240      # We're on a unix platform. Hooray! :)
54241      path="$MSVC_DLL"
54242      has_space=`$ECHO "$path" | $GREP " "`
54243      if test "x$has_space" != x; then
54244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54245$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54246        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54247      fi
54248
54249      # Use eval to expand a potential ~
54250      eval path="$path"
54251      if test ! -f "$path" && test ! -d "$path"; then
54252        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54253      fi
54254
54255      if test -d "$path"; then
54256        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54257      else
54258        dir="`$DIRNAME "$path"`"
54259        base="`$BASENAME "$path"`"
54260        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54261      fi
54262    fi
54263  fi
54264
54265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54266$as_echo_n "checking for $DLL_NAME... " >&6; }
54267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54268$as_echo "$MSVC_DLL" >&6; }
54269    else
54270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54271$as_echo "incorrect, ignoring" >&6; }
54272      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54273$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54274    fi
54275  fi
54276
54277    fi
54278  fi
54279
54280  if test "x$MSVC_DLL" = x; then
54281    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54282    # (This was the original behaviour; kept since it might turn something up)
54283    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54284      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54285        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54286	    | $GREP x64 | $HEAD --lines 1`
54287      else
54288        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54289	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54290        if test "x$POSSIBLE_MSVC_DLL" = x; then
54291          # We're grasping at straws now...
54292          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54293	      | $HEAD --lines 1`
54294        fi
54295      fi
54296
54297
54298  DLL_NAME="$DLL_NAME"
54299  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54300  METHOD="search of VCINSTALLDIR"
54301  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54302    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54303$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54304
54305    # Need to check if the found msvcr is correct architecture
54306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54307$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54308    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54310      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54311      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54312      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54313        CORRECT_MSVCR_ARCH="PE32 executable"
54314      else
54315        CORRECT_MSVCR_ARCH="PE32+ executable"
54316      fi
54317    else
54318      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54319        CORRECT_MSVCR_ARCH=386
54320      else
54321        CORRECT_MSVCR_ARCH=x86-64
54322      fi
54323    fi
54324    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54326$as_echo "ok" >&6; }
54327      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54328
54329  # Only process if variable expands to non-empty
54330
54331  if test "x$MSVC_DLL" != x; then
54332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54333
54334  # Input might be given as Windows format, start by converting to
54335  # unix format.
54336  path="$MSVC_DLL"
54337  new_path=`$CYGPATH -u "$path"`
54338
54339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54342  # "foo.exe" is OK but "foo" is an error.
54343  #
54344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54345  # It is also a way to make sure we got the proper file name for the real test later on.
54346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54347  if test "x$test_shortpath" = x; then
54348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54349$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54350    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54351  fi
54352
54353  # Call helper function which possibly converts this using DOS-style short mode.
54354  # If so, the updated path is stored in $new_path.
54355
54356  input_path="$new_path"
54357  # Check if we need to convert this using DOS-style short mode. If the path
54358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54359  # take no chances and rewrite it.
54360  # Note: m4 eats our [], so we need to use [ and ] instead.
54361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54362  if test "x$has_forbidden_chars" != x; then
54363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54367      # Going to short mode and back again did indeed matter. Since short mode is
54368      # case insensitive, let's make it lowercase to improve readability.
54369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54370      # Now convert it back to Unix-style (cygpath)
54371      input_path=`$CYGPATH -u "$shortmode_path"`
54372      new_path="$input_path"
54373    fi
54374  fi
54375
54376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54377  if test "x$test_cygdrive_prefix" = x; then
54378    # As a simple fix, exclude /usr/bin since it's not a real path.
54379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54381      # a path prefixed by /cygdrive for fixpath to work.
54382      new_path="$CYGWIN_ROOT_PATH$input_path"
54383    fi
54384  fi
54385
54386
54387  if test "x$path" != "x$new_path"; then
54388    MSVC_DLL="$new_path"
54389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54390$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54391  fi
54392
54393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54394
54395  path="$MSVC_DLL"
54396  has_colon=`$ECHO $path | $GREP ^.:`
54397  new_path="$path"
54398  if test "x$has_colon" = x; then
54399    # Not in mixed or Windows style, start by that.
54400    new_path=`cmd //c echo $path`
54401  fi
54402
54403
54404  input_path="$new_path"
54405  # Check if we need to convert this using DOS-style short mode. If the path
54406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54407  # take no chances and rewrite it.
54408  # Note: m4 eats our [], so we need to use [ and ] instead.
54409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54410  if test "x$has_forbidden_chars" != x; then
54411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54413  fi
54414
54415
54416  windows_path="$new_path"
54417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54418    unix_path=`$CYGPATH -u "$windows_path"`
54419    new_path="$unix_path"
54420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54422    new_path="$unix_path"
54423  fi
54424
54425  if test "x$path" != "x$new_path"; then
54426    MSVC_DLL="$new_path"
54427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54429  fi
54430
54431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54433
54434    else
54435      # We're on a unix platform. Hooray! :)
54436      path="$MSVC_DLL"
54437      has_space=`$ECHO "$path" | $GREP " "`
54438      if test "x$has_space" != x; then
54439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54440$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54442      fi
54443
54444      # Use eval to expand a potential ~
54445      eval path="$path"
54446      if test ! -f "$path" && test ! -d "$path"; then
54447        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54448      fi
54449
54450      if test -d "$path"; then
54451        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54452      else
54453        dir="`$DIRNAME "$path"`"
54454        base="`$BASENAME "$path"`"
54455        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54456      fi
54457    fi
54458  fi
54459
54460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54461$as_echo_n "checking for $DLL_NAME... " >&6; }
54462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54463$as_echo "$MSVC_DLL" >&6; }
54464    else
54465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54466$as_echo "incorrect, ignoring" >&6; }
54467      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54468$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54469    fi
54470  fi
54471
54472    fi
54473  fi
54474
54475  if test "x$MSVC_DLL" = x; then
54476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54477$as_echo_n "checking for $DLL_NAME... " >&6; }
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54479$as_echo "no" >&6; }
54480    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54481  fi
54482
54483    MSVCR_DLL="$MSVC_DLL"
54484  fi
54485
54486
54487
54488# Check whether --with-msvcp-dll was given.
54489if test "${with_msvcp_dll+set}" = set; then :
54490  withval=$with_msvcp_dll;
54491fi
54492
54493
54494  if test "x$MSVCP_NAME" != "x"; then
54495    if test "x$with_msvcp_dll" != x; then
54496      # If given explicitely by user, do not probe. If not present, fail directly.
54497
54498  DLL_NAME="$MSVCP_NAME"
54499  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54500  METHOD="--with-msvcp-dll"
54501  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54502    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54503$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54504
54505    # Need to check if the found msvcr is correct architecture
54506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54507$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54508    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54510      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54511      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54512      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54513        CORRECT_MSVCR_ARCH="PE32 executable"
54514      else
54515        CORRECT_MSVCR_ARCH="PE32+ executable"
54516      fi
54517    else
54518      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54519        CORRECT_MSVCR_ARCH=386
54520      else
54521        CORRECT_MSVCR_ARCH=x86-64
54522      fi
54523    fi
54524    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54526$as_echo "ok" >&6; }
54527      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54528
54529  # Only process if variable expands to non-empty
54530
54531  if test "x$MSVC_DLL" != x; then
54532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54533
54534  # Input might be given as Windows format, start by converting to
54535  # unix format.
54536  path="$MSVC_DLL"
54537  new_path=`$CYGPATH -u "$path"`
54538
54539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54542  # "foo.exe" is OK but "foo" is an error.
54543  #
54544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54545  # It is also a way to make sure we got the proper file name for the real test later on.
54546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54547  if test "x$test_shortpath" = x; then
54548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54549$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54550    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54551  fi
54552
54553  # Call helper function which possibly converts this using DOS-style short mode.
54554  # If so, the updated path is stored in $new_path.
54555
54556  input_path="$new_path"
54557  # Check if we need to convert this using DOS-style short mode. If the path
54558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54559  # take no chances and rewrite it.
54560  # Note: m4 eats our [], so we need to use [ and ] instead.
54561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54562  if test "x$has_forbidden_chars" != x; then
54563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54567      # Going to short mode and back again did indeed matter. Since short mode is
54568      # case insensitive, let's make it lowercase to improve readability.
54569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54570      # Now convert it back to Unix-style (cygpath)
54571      input_path=`$CYGPATH -u "$shortmode_path"`
54572      new_path="$input_path"
54573    fi
54574  fi
54575
54576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54577  if test "x$test_cygdrive_prefix" = x; then
54578    # As a simple fix, exclude /usr/bin since it's not a real path.
54579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54581      # a path prefixed by /cygdrive for fixpath to work.
54582      new_path="$CYGWIN_ROOT_PATH$input_path"
54583    fi
54584  fi
54585
54586
54587  if test "x$path" != "x$new_path"; then
54588    MSVC_DLL="$new_path"
54589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54590$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54591  fi
54592
54593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54594
54595  path="$MSVC_DLL"
54596  has_colon=`$ECHO $path | $GREP ^.:`
54597  new_path="$path"
54598  if test "x$has_colon" = x; then
54599    # Not in mixed or Windows style, start by that.
54600    new_path=`cmd //c echo $path`
54601  fi
54602
54603
54604  input_path="$new_path"
54605  # Check if we need to convert this using DOS-style short mode. If the path
54606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54607  # take no chances and rewrite it.
54608  # Note: m4 eats our [], so we need to use [ and ] instead.
54609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54610  if test "x$has_forbidden_chars" != x; then
54611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54613  fi
54614
54615
54616  windows_path="$new_path"
54617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54618    unix_path=`$CYGPATH -u "$windows_path"`
54619    new_path="$unix_path"
54620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54622    new_path="$unix_path"
54623  fi
54624
54625  if test "x$path" != "x$new_path"; then
54626    MSVC_DLL="$new_path"
54627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54628$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54629  fi
54630
54631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54633
54634    else
54635      # We're on a unix platform. Hooray! :)
54636      path="$MSVC_DLL"
54637      has_space=`$ECHO "$path" | $GREP " "`
54638      if test "x$has_space" != x; then
54639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54640$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54642      fi
54643
54644      # Use eval to expand a potential ~
54645      eval path="$path"
54646      if test ! -f "$path" && test ! -d "$path"; then
54647        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54648      fi
54649
54650      if test -d "$path"; then
54651        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54652      else
54653        dir="`$DIRNAME "$path"`"
54654        base="`$BASENAME "$path"`"
54655        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54656      fi
54657    fi
54658  fi
54659
54660      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54661$as_echo_n "checking for $DLL_NAME... " >&6; }
54662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54663$as_echo "$MSVC_DLL" >&6; }
54664    else
54665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54666$as_echo "incorrect, ignoring" >&6; }
54667      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54668$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54669    fi
54670  fi
54671
54672      if test "x$MSVC_DLL" = x; then
54673        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54674      fi
54675      MSVCP_DLL="$MSVC_DLL"
54676    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54677
54678  DLL_NAME="$MSVCP_NAME"
54679  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54680  METHOD="devkit"
54681  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54682    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54683$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54684
54685    # Need to check if the found msvcr is correct architecture
54686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54687$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54688    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54690      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54691      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54692      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54693        CORRECT_MSVCR_ARCH="PE32 executable"
54694      else
54695        CORRECT_MSVCR_ARCH="PE32+ executable"
54696      fi
54697    else
54698      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54699        CORRECT_MSVCR_ARCH=386
54700      else
54701        CORRECT_MSVCR_ARCH=x86-64
54702      fi
54703    fi
54704    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54706$as_echo "ok" >&6; }
54707      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54708
54709  # Only process if variable expands to non-empty
54710
54711  if test "x$MSVC_DLL" != x; then
54712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54713
54714  # Input might be given as Windows format, start by converting to
54715  # unix format.
54716  path="$MSVC_DLL"
54717  new_path=`$CYGPATH -u "$path"`
54718
54719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54722  # "foo.exe" is OK but "foo" is an error.
54723  #
54724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54725  # It is also a way to make sure we got the proper file name for the real test later on.
54726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54727  if test "x$test_shortpath" = x; then
54728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54729$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54730    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54731  fi
54732
54733  # Call helper function which possibly converts this using DOS-style short mode.
54734  # If so, the updated path is stored in $new_path.
54735
54736  input_path="$new_path"
54737  # Check if we need to convert this using DOS-style short mode. If the path
54738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54739  # take no chances and rewrite it.
54740  # Note: m4 eats our [], so we need to use [ and ] instead.
54741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54742  if test "x$has_forbidden_chars" != x; then
54743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54747      # Going to short mode and back again did indeed matter. Since short mode is
54748      # case insensitive, let's make it lowercase to improve readability.
54749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54750      # Now convert it back to Unix-style (cygpath)
54751      input_path=`$CYGPATH -u "$shortmode_path"`
54752      new_path="$input_path"
54753    fi
54754  fi
54755
54756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54757  if test "x$test_cygdrive_prefix" = x; then
54758    # As a simple fix, exclude /usr/bin since it's not a real path.
54759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54761      # a path prefixed by /cygdrive for fixpath to work.
54762      new_path="$CYGWIN_ROOT_PATH$input_path"
54763    fi
54764  fi
54765
54766
54767  if test "x$path" != "x$new_path"; then
54768    MSVC_DLL="$new_path"
54769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54770$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54771  fi
54772
54773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54774
54775  path="$MSVC_DLL"
54776  has_colon=`$ECHO $path | $GREP ^.:`
54777  new_path="$path"
54778  if test "x$has_colon" = x; then
54779    # Not in mixed or Windows style, start by that.
54780    new_path=`cmd //c echo $path`
54781  fi
54782
54783
54784  input_path="$new_path"
54785  # Check if we need to convert this using DOS-style short mode. If the path
54786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54787  # take no chances and rewrite it.
54788  # Note: m4 eats our [], so we need to use [ and ] instead.
54789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54790  if test "x$has_forbidden_chars" != x; then
54791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54793  fi
54794
54795
54796  windows_path="$new_path"
54797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54798    unix_path=`$CYGPATH -u "$windows_path"`
54799    new_path="$unix_path"
54800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54802    new_path="$unix_path"
54803  fi
54804
54805  if test "x$path" != "x$new_path"; then
54806    MSVC_DLL="$new_path"
54807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54808$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54809  fi
54810
54811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54813
54814    else
54815      # We're on a unix platform. Hooray! :)
54816      path="$MSVC_DLL"
54817      has_space=`$ECHO "$path" | $GREP " "`
54818      if test "x$has_space" != x; then
54819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54820$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54822      fi
54823
54824      # Use eval to expand a potential ~
54825      eval path="$path"
54826      if test ! -f "$path" && test ! -d "$path"; then
54827        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54828      fi
54829
54830      if test -d "$path"; then
54831        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54832      else
54833        dir="`$DIRNAME "$path"`"
54834        base="`$BASENAME "$path"`"
54835        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54836      fi
54837    fi
54838  fi
54839
54840      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54841$as_echo_n "checking for $DLL_NAME... " >&6; }
54842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54843$as_echo "$MSVC_DLL" >&6; }
54844    else
54845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54846$as_echo "incorrect, ignoring" >&6; }
54847      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54848$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54849    fi
54850  fi
54851
54852      if test "x$MSVC_DLL" = x; then
54853        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54854      fi
54855      MSVCP_DLL="$MSVC_DLL"
54856    else
54857
54858  DLL_NAME="${MSVCP_NAME}"
54859  MSVC_DLL=
54860
54861  if test "x$MSVC_DLL" = x; then
54862    # Probe: Using well-known location from Visual Studio 10.0
54863    if test "x$VCINSTALLDIR" != x; then
54864      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54865
54866  windows_path="$CYGWIN_VC_INSTALL_DIR"
54867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54868    unix_path=`$CYGPATH -u "$windows_path"`
54869    CYGWIN_VC_INSTALL_DIR="$unix_path"
54870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54872    CYGWIN_VC_INSTALL_DIR="$unix_path"
54873  fi
54874
54875      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54876        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54877      else
54878        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54879      fi
54880      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54881
54882  DLL_NAME="$DLL_NAME"
54883  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54884  METHOD="well-known location in VCINSTALLDIR"
54885  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54886    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54887$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54888
54889    # Need to check if the found msvcr is correct architecture
54890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54891$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54892    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54894      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54895      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54896      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54897        CORRECT_MSVCR_ARCH="PE32 executable"
54898      else
54899        CORRECT_MSVCR_ARCH="PE32+ executable"
54900      fi
54901    else
54902      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54903        CORRECT_MSVCR_ARCH=386
54904      else
54905        CORRECT_MSVCR_ARCH=x86-64
54906      fi
54907    fi
54908    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54910$as_echo "ok" >&6; }
54911      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54912
54913  # Only process if variable expands to non-empty
54914
54915  if test "x$MSVC_DLL" != x; then
54916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54917
54918  # Input might be given as Windows format, start by converting to
54919  # unix format.
54920  path="$MSVC_DLL"
54921  new_path=`$CYGPATH -u "$path"`
54922
54923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54926  # "foo.exe" is OK but "foo" is an error.
54927  #
54928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54929  # It is also a way to make sure we got the proper file name for the real test later on.
54930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54931  if test "x$test_shortpath" = x; then
54932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54933$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54934    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54935  fi
54936
54937  # Call helper function which possibly converts this using DOS-style short mode.
54938  # If so, the updated path is stored in $new_path.
54939
54940  input_path="$new_path"
54941  # Check if we need to convert this using DOS-style short mode. If the path
54942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54943  # take no chances and rewrite it.
54944  # Note: m4 eats our [], so we need to use [ and ] instead.
54945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54946  if test "x$has_forbidden_chars" != x; then
54947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54951      # Going to short mode and back again did indeed matter. Since short mode is
54952      # case insensitive, let's make it lowercase to improve readability.
54953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54954      # Now convert it back to Unix-style (cygpath)
54955      input_path=`$CYGPATH -u "$shortmode_path"`
54956      new_path="$input_path"
54957    fi
54958  fi
54959
54960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54961  if test "x$test_cygdrive_prefix" = x; then
54962    # As a simple fix, exclude /usr/bin since it's not a real path.
54963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54965      # a path prefixed by /cygdrive for fixpath to work.
54966      new_path="$CYGWIN_ROOT_PATH$input_path"
54967    fi
54968  fi
54969
54970
54971  if test "x$path" != "x$new_path"; then
54972    MSVC_DLL="$new_path"
54973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54974$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54975  fi
54976
54977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54978
54979  path="$MSVC_DLL"
54980  has_colon=`$ECHO $path | $GREP ^.:`
54981  new_path="$path"
54982  if test "x$has_colon" = x; then
54983    # Not in mixed or Windows style, start by that.
54984    new_path=`cmd //c echo $path`
54985  fi
54986
54987
54988  input_path="$new_path"
54989  # Check if we need to convert this using DOS-style short mode. If the path
54990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54991  # take no chances and rewrite it.
54992  # Note: m4 eats our [], so we need to use [ and ] instead.
54993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54994  if test "x$has_forbidden_chars" != x; then
54995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54997  fi
54998
54999
55000  windows_path="$new_path"
55001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55002    unix_path=`$CYGPATH -u "$windows_path"`
55003    new_path="$unix_path"
55004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55006    new_path="$unix_path"
55007  fi
55008
55009  if test "x$path" != "x$new_path"; then
55010    MSVC_DLL="$new_path"
55011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55012$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55013  fi
55014
55015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55017
55018    else
55019      # We're on a unix platform. Hooray! :)
55020      path="$MSVC_DLL"
55021      has_space=`$ECHO "$path" | $GREP " "`
55022      if test "x$has_space" != x; then
55023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55024$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55026      fi
55027
55028      # Use eval to expand a potential ~
55029      eval path="$path"
55030      if test ! -f "$path" && test ! -d "$path"; then
55031        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55032      fi
55033
55034      if test -d "$path"; then
55035        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55036      else
55037        dir="`$DIRNAME "$path"`"
55038        base="`$BASENAME "$path"`"
55039        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55040      fi
55041    fi
55042  fi
55043
55044      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55045$as_echo_n "checking for $DLL_NAME... " >&6; }
55046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55047$as_echo "$MSVC_DLL" >&6; }
55048    else
55049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55050$as_echo "incorrect, ignoring" >&6; }
55051      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55052$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55053    fi
55054  fi
55055
55056    fi
55057  fi
55058
55059  if test "x$MSVC_DLL" = x; then
55060    # Probe: Check in the Boot JDK directory.
55061    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55062
55063  DLL_NAME="$DLL_NAME"
55064  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55065  METHOD="well-known location in Boot JDK"
55066  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55067    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55068$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55069
55070    # Need to check if the found msvcr is correct architecture
55071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55072$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55073    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55075      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55076      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55077      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55078        CORRECT_MSVCR_ARCH="PE32 executable"
55079      else
55080        CORRECT_MSVCR_ARCH="PE32+ executable"
55081      fi
55082    else
55083      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55084        CORRECT_MSVCR_ARCH=386
55085      else
55086        CORRECT_MSVCR_ARCH=x86-64
55087      fi
55088    fi
55089    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55091$as_echo "ok" >&6; }
55092      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55093
55094  # Only process if variable expands to non-empty
55095
55096  if test "x$MSVC_DLL" != x; then
55097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55098
55099  # Input might be given as Windows format, start by converting to
55100  # unix format.
55101  path="$MSVC_DLL"
55102  new_path=`$CYGPATH -u "$path"`
55103
55104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55107  # "foo.exe" is OK but "foo" is an error.
55108  #
55109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55110  # It is also a way to make sure we got the proper file name for the real test later on.
55111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55112  if test "x$test_shortpath" = x; then
55113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55114$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55115    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55116  fi
55117
55118  # Call helper function which possibly converts this using DOS-style short mode.
55119  # If so, the updated path is stored in $new_path.
55120
55121  input_path="$new_path"
55122  # Check if we need to convert this using DOS-style short mode. If the path
55123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55124  # take no chances and rewrite it.
55125  # Note: m4 eats our [], so we need to use [ and ] instead.
55126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55127  if test "x$has_forbidden_chars" != x; then
55128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55132      # Going to short mode and back again did indeed matter. Since short mode is
55133      # case insensitive, let's make it lowercase to improve readability.
55134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55135      # Now convert it back to Unix-style (cygpath)
55136      input_path=`$CYGPATH -u "$shortmode_path"`
55137      new_path="$input_path"
55138    fi
55139  fi
55140
55141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55142  if test "x$test_cygdrive_prefix" = x; then
55143    # As a simple fix, exclude /usr/bin since it's not a real path.
55144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55146      # a path prefixed by /cygdrive for fixpath to work.
55147      new_path="$CYGWIN_ROOT_PATH$input_path"
55148    fi
55149  fi
55150
55151
55152  if test "x$path" != "x$new_path"; then
55153    MSVC_DLL="$new_path"
55154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55155$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55156  fi
55157
55158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55159
55160  path="$MSVC_DLL"
55161  has_colon=`$ECHO $path | $GREP ^.:`
55162  new_path="$path"
55163  if test "x$has_colon" = x; then
55164    # Not in mixed or Windows style, start by that.
55165    new_path=`cmd //c echo $path`
55166  fi
55167
55168
55169  input_path="$new_path"
55170  # Check if we need to convert this using DOS-style short mode. If the path
55171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55172  # take no chances and rewrite it.
55173  # Note: m4 eats our [], so we need to use [ and ] instead.
55174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55175  if test "x$has_forbidden_chars" != x; then
55176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55178  fi
55179
55180
55181  windows_path="$new_path"
55182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55183    unix_path=`$CYGPATH -u "$windows_path"`
55184    new_path="$unix_path"
55185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55187    new_path="$unix_path"
55188  fi
55189
55190  if test "x$path" != "x$new_path"; then
55191    MSVC_DLL="$new_path"
55192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55193$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55194  fi
55195
55196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55198
55199    else
55200      # We're on a unix platform. Hooray! :)
55201      path="$MSVC_DLL"
55202      has_space=`$ECHO "$path" | $GREP " "`
55203      if test "x$has_space" != x; then
55204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55205$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55207      fi
55208
55209      # Use eval to expand a potential ~
55210      eval path="$path"
55211      if test ! -f "$path" && test ! -d "$path"; then
55212        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55213      fi
55214
55215      if test -d "$path"; then
55216        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55217      else
55218        dir="`$DIRNAME "$path"`"
55219        base="`$BASENAME "$path"`"
55220        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55221      fi
55222    fi
55223  fi
55224
55225      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55226$as_echo_n "checking for $DLL_NAME... " >&6; }
55227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55228$as_echo "$MSVC_DLL" >&6; }
55229    else
55230      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55231$as_echo "incorrect, ignoring" >&6; }
55232      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55233$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55234    fi
55235  fi
55236
55237  fi
55238
55239  if test "x$MSVC_DLL" = x; then
55240    # Probe: Look in the Windows system32 directory
55241    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55242
55243  windows_path="$CYGWIN_SYSTEMROOT"
55244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55245    unix_path=`$CYGPATH -u "$windows_path"`
55246    CYGWIN_SYSTEMROOT="$unix_path"
55247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55249    CYGWIN_SYSTEMROOT="$unix_path"
55250  fi
55251
55252    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55253
55254  DLL_NAME="$DLL_NAME"
55255  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55256  METHOD="well-known location in SYSTEMROOT"
55257  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55259$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55260
55261    # Need to check if the found msvcr is correct architecture
55262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55263$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55264    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55266      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55267      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55268      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55269        CORRECT_MSVCR_ARCH="PE32 executable"
55270      else
55271        CORRECT_MSVCR_ARCH="PE32+ executable"
55272      fi
55273    else
55274      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55275        CORRECT_MSVCR_ARCH=386
55276      else
55277        CORRECT_MSVCR_ARCH=x86-64
55278      fi
55279    fi
55280    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55282$as_echo "ok" >&6; }
55283      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55284
55285  # Only process if variable expands to non-empty
55286
55287  if test "x$MSVC_DLL" != x; then
55288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55289
55290  # Input might be given as Windows format, start by converting to
55291  # unix format.
55292  path="$MSVC_DLL"
55293  new_path=`$CYGPATH -u "$path"`
55294
55295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55298  # "foo.exe" is OK but "foo" is an error.
55299  #
55300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55301  # It is also a way to make sure we got the proper file name for the real test later on.
55302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55303  if test "x$test_shortpath" = x; then
55304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55305$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55306    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55307  fi
55308
55309  # Call helper function which possibly converts this using DOS-style short mode.
55310  # If so, the updated path is stored in $new_path.
55311
55312  input_path="$new_path"
55313  # Check if we need to convert this using DOS-style short mode. If the path
55314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55315  # take no chances and rewrite it.
55316  # Note: m4 eats our [], so we need to use [ and ] instead.
55317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55318  if test "x$has_forbidden_chars" != x; then
55319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55323      # Going to short mode and back again did indeed matter. Since short mode is
55324      # case insensitive, let's make it lowercase to improve readability.
55325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55326      # Now convert it back to Unix-style (cygpath)
55327      input_path=`$CYGPATH -u "$shortmode_path"`
55328      new_path="$input_path"
55329    fi
55330  fi
55331
55332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55333  if test "x$test_cygdrive_prefix" = x; then
55334    # As a simple fix, exclude /usr/bin since it's not a real path.
55335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55337      # a path prefixed by /cygdrive for fixpath to work.
55338      new_path="$CYGWIN_ROOT_PATH$input_path"
55339    fi
55340  fi
55341
55342
55343  if test "x$path" != "x$new_path"; then
55344    MSVC_DLL="$new_path"
55345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55346$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55347  fi
55348
55349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55350
55351  path="$MSVC_DLL"
55352  has_colon=`$ECHO $path | $GREP ^.:`
55353  new_path="$path"
55354  if test "x$has_colon" = x; then
55355    # Not in mixed or Windows style, start by that.
55356    new_path=`cmd //c echo $path`
55357  fi
55358
55359
55360  input_path="$new_path"
55361  # Check if we need to convert this using DOS-style short mode. If the path
55362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55363  # take no chances and rewrite it.
55364  # Note: m4 eats our [], so we need to use [ and ] instead.
55365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55366  if test "x$has_forbidden_chars" != x; then
55367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55369  fi
55370
55371
55372  windows_path="$new_path"
55373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55374    unix_path=`$CYGPATH -u "$windows_path"`
55375    new_path="$unix_path"
55376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55378    new_path="$unix_path"
55379  fi
55380
55381  if test "x$path" != "x$new_path"; then
55382    MSVC_DLL="$new_path"
55383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55384$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55385  fi
55386
55387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55389
55390    else
55391      # We're on a unix platform. Hooray! :)
55392      path="$MSVC_DLL"
55393      has_space=`$ECHO "$path" | $GREP " "`
55394      if test "x$has_space" != x; then
55395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55396$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55398      fi
55399
55400      # Use eval to expand a potential ~
55401      eval path="$path"
55402      if test ! -f "$path" && test ! -d "$path"; then
55403        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55404      fi
55405
55406      if test -d "$path"; then
55407        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55408      else
55409        dir="`$DIRNAME "$path"`"
55410        base="`$BASENAME "$path"`"
55411        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55412      fi
55413    fi
55414  fi
55415
55416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55417$as_echo_n "checking for $DLL_NAME... " >&6; }
55418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55419$as_echo "$MSVC_DLL" >&6; }
55420    else
55421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55422$as_echo "incorrect, ignoring" >&6; }
55423      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55424$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55425    fi
55426  fi
55427
55428  fi
55429
55430  if test "x$MSVC_DLL" = x; then
55431    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55432    if test "x$VS100COMNTOOLS" != x; then
55433      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55434
55435  windows_path="$CYGWIN_VS_TOOLS_DIR"
55436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55437    unix_path=`$CYGPATH -u "$windows_path"`
55438    CYGWIN_VS_TOOLS_DIR="$unix_path"
55439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55441    CYGWIN_VS_TOOLS_DIR="$unix_path"
55442  fi
55443
55444      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55445        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55446	    | $GREP -i /x64/ | $HEAD --lines 1`
55447      else
55448        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55449	    | $GREP -i /x86/ | $HEAD --lines 1`
55450      fi
55451
55452  DLL_NAME="$DLL_NAME"
55453  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55454  METHOD="search of VS100COMNTOOLS"
55455  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55456    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55457$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55458
55459    # Need to check if the found msvcr is correct architecture
55460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55461$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55462    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55464      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55465      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55466      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55467        CORRECT_MSVCR_ARCH="PE32 executable"
55468      else
55469        CORRECT_MSVCR_ARCH="PE32+ executable"
55470      fi
55471    else
55472      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55473        CORRECT_MSVCR_ARCH=386
55474      else
55475        CORRECT_MSVCR_ARCH=x86-64
55476      fi
55477    fi
55478    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55480$as_echo "ok" >&6; }
55481      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55482
55483  # Only process if variable expands to non-empty
55484
55485  if test "x$MSVC_DLL" != x; then
55486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55487
55488  # Input might be given as Windows format, start by converting to
55489  # unix format.
55490  path="$MSVC_DLL"
55491  new_path=`$CYGPATH -u "$path"`
55492
55493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55496  # "foo.exe" is OK but "foo" is an error.
55497  #
55498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55499  # It is also a way to make sure we got the proper file name for the real test later on.
55500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55501  if test "x$test_shortpath" = x; then
55502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55503$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55504    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55505  fi
55506
55507  # Call helper function which possibly converts this using DOS-style short mode.
55508  # If so, the updated path is stored in $new_path.
55509
55510  input_path="$new_path"
55511  # Check if we need to convert this using DOS-style short mode. If the path
55512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55513  # take no chances and rewrite it.
55514  # Note: m4 eats our [], so we need to use [ and ] instead.
55515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55516  if test "x$has_forbidden_chars" != x; then
55517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55521      # Going to short mode and back again did indeed matter. Since short mode is
55522      # case insensitive, let's make it lowercase to improve readability.
55523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55524      # Now convert it back to Unix-style (cygpath)
55525      input_path=`$CYGPATH -u "$shortmode_path"`
55526      new_path="$input_path"
55527    fi
55528  fi
55529
55530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55531  if test "x$test_cygdrive_prefix" = x; then
55532    # As a simple fix, exclude /usr/bin since it's not a real path.
55533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55535      # a path prefixed by /cygdrive for fixpath to work.
55536      new_path="$CYGWIN_ROOT_PATH$input_path"
55537    fi
55538  fi
55539
55540
55541  if test "x$path" != "x$new_path"; then
55542    MSVC_DLL="$new_path"
55543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55544$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55545  fi
55546
55547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55548
55549  path="$MSVC_DLL"
55550  has_colon=`$ECHO $path | $GREP ^.:`
55551  new_path="$path"
55552  if test "x$has_colon" = x; then
55553    # Not in mixed or Windows style, start by that.
55554    new_path=`cmd //c echo $path`
55555  fi
55556
55557
55558  input_path="$new_path"
55559  # Check if we need to convert this using DOS-style short mode. If the path
55560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55561  # take no chances and rewrite it.
55562  # Note: m4 eats our [], so we need to use [ and ] instead.
55563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55564  if test "x$has_forbidden_chars" != x; then
55565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55567  fi
55568
55569
55570  windows_path="$new_path"
55571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55572    unix_path=`$CYGPATH -u "$windows_path"`
55573    new_path="$unix_path"
55574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55576    new_path="$unix_path"
55577  fi
55578
55579  if test "x$path" != "x$new_path"; then
55580    MSVC_DLL="$new_path"
55581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55582$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55583  fi
55584
55585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55587
55588    else
55589      # We're on a unix platform. Hooray! :)
55590      path="$MSVC_DLL"
55591      has_space=`$ECHO "$path" | $GREP " "`
55592      if test "x$has_space" != x; then
55593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55594$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55595        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55596      fi
55597
55598      # Use eval to expand a potential ~
55599      eval path="$path"
55600      if test ! -f "$path" && test ! -d "$path"; then
55601        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55602      fi
55603
55604      if test -d "$path"; then
55605        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55606      else
55607        dir="`$DIRNAME "$path"`"
55608        base="`$BASENAME "$path"`"
55609        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55610      fi
55611    fi
55612  fi
55613
55614      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55615$as_echo_n "checking for $DLL_NAME... " >&6; }
55616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55617$as_echo "$MSVC_DLL" >&6; }
55618    else
55619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55620$as_echo "incorrect, ignoring" >&6; }
55621      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55622$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55623    fi
55624  fi
55625
55626    fi
55627  fi
55628
55629  if test "x$MSVC_DLL" = x; then
55630    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55631    # (This was the original behaviour; kept since it might turn something up)
55632    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55633      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55634        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55635	    | $GREP x64 | $HEAD --lines 1`
55636      else
55637        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55638	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55639        if test "x$POSSIBLE_MSVC_DLL" = x; then
55640          # We're grasping at straws now...
55641          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55642	      | $HEAD --lines 1`
55643        fi
55644      fi
55645
55646
55647  DLL_NAME="$DLL_NAME"
55648  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55649  METHOD="search of VCINSTALLDIR"
55650  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55651    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55652$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55653
55654    # Need to check if the found msvcr is correct architecture
55655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55656$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55657    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55659      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55660      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55661      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55662        CORRECT_MSVCR_ARCH="PE32 executable"
55663      else
55664        CORRECT_MSVCR_ARCH="PE32+ executable"
55665      fi
55666    else
55667      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55668        CORRECT_MSVCR_ARCH=386
55669      else
55670        CORRECT_MSVCR_ARCH=x86-64
55671      fi
55672    fi
55673    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55675$as_echo "ok" >&6; }
55676      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55677
55678  # Only process if variable expands to non-empty
55679
55680  if test "x$MSVC_DLL" != x; then
55681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55682
55683  # Input might be given as Windows format, start by converting to
55684  # unix format.
55685  path="$MSVC_DLL"
55686  new_path=`$CYGPATH -u "$path"`
55687
55688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55691  # "foo.exe" is OK but "foo" is an error.
55692  #
55693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55694  # It is also a way to make sure we got the proper file name for the real test later on.
55695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55696  if test "x$test_shortpath" = x; then
55697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55698$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55699    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55700  fi
55701
55702  # Call helper function which possibly converts this using DOS-style short mode.
55703  # If so, the updated path is stored in $new_path.
55704
55705  input_path="$new_path"
55706  # Check if we need to convert this using DOS-style short mode. If the path
55707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55708  # take no chances and rewrite it.
55709  # Note: m4 eats our [], so we need to use [ and ] instead.
55710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55711  if test "x$has_forbidden_chars" != x; then
55712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55716      # Going to short mode and back again did indeed matter. Since short mode is
55717      # case insensitive, let's make it lowercase to improve readability.
55718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55719      # Now convert it back to Unix-style (cygpath)
55720      input_path=`$CYGPATH -u "$shortmode_path"`
55721      new_path="$input_path"
55722    fi
55723  fi
55724
55725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55726  if test "x$test_cygdrive_prefix" = x; then
55727    # As a simple fix, exclude /usr/bin since it's not a real path.
55728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55730      # a path prefixed by /cygdrive for fixpath to work.
55731      new_path="$CYGWIN_ROOT_PATH$input_path"
55732    fi
55733  fi
55734
55735
55736  if test "x$path" != "x$new_path"; then
55737    MSVC_DLL="$new_path"
55738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55739$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55740  fi
55741
55742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55743
55744  path="$MSVC_DLL"
55745  has_colon=`$ECHO $path | $GREP ^.:`
55746  new_path="$path"
55747  if test "x$has_colon" = x; then
55748    # Not in mixed or Windows style, start by that.
55749    new_path=`cmd //c echo $path`
55750  fi
55751
55752
55753  input_path="$new_path"
55754  # Check if we need to convert this using DOS-style short mode. If the path
55755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55756  # take no chances and rewrite it.
55757  # Note: m4 eats our [], so we need to use [ and ] instead.
55758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55759  if test "x$has_forbidden_chars" != x; then
55760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55762  fi
55763
55764
55765  windows_path="$new_path"
55766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55767    unix_path=`$CYGPATH -u "$windows_path"`
55768    new_path="$unix_path"
55769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55771    new_path="$unix_path"
55772  fi
55773
55774  if test "x$path" != "x$new_path"; then
55775    MSVC_DLL="$new_path"
55776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55777$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55778  fi
55779
55780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55782
55783    else
55784      # We're on a unix platform. Hooray! :)
55785      path="$MSVC_DLL"
55786      has_space=`$ECHO "$path" | $GREP " "`
55787      if test "x$has_space" != x; then
55788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55789$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55791      fi
55792
55793      # Use eval to expand a potential ~
55794      eval path="$path"
55795      if test ! -f "$path" && test ! -d "$path"; then
55796        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55797      fi
55798
55799      if test -d "$path"; then
55800        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55801      else
55802        dir="`$DIRNAME "$path"`"
55803        base="`$BASENAME "$path"`"
55804        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55805      fi
55806    fi
55807  fi
55808
55809      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55810$as_echo_n "checking for $DLL_NAME... " >&6; }
55811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55812$as_echo "$MSVC_DLL" >&6; }
55813    else
55814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55815$as_echo "incorrect, ignoring" >&6; }
55816      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55817$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55818    fi
55819  fi
55820
55821    fi
55822  fi
55823
55824  if test "x$MSVC_DLL" = x; then
55825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55826$as_echo_n "checking for $DLL_NAME... " >&6; }
55827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55828$as_echo "no" >&6; }
55829    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55830  fi
55831
55832      MSVCP_DLL="$MSVC_DLL"
55833    fi
55834
55835  fi
55836
55837  fi
55838
55839
55840  if test "x$NEEDS_LIB_X11" = xfalse; then
55841    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55842      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55843$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55844    fi
55845    X_CFLAGS=
55846    X_LIBS=
55847  else
55848
55849    if test "x${with_x}" = xno; then
55850      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55851    fi
55852
55853    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55854      # The user has specified a X11 base directory. Use it for includes and
55855      # libraries, unless explicitely overridden.
55856      if test "x$x_includes" = xNONE; then
55857        x_includes="${with_x}/include"
55858      fi
55859      if test "x$x_libraries" = xNONE; then
55860        x_libraries="${with_x}/lib"
55861      fi
55862    else
55863      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55864      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55865      # --x-libraries for the sysroot, if that seems to be correct.
55866      if test "x$SYSROOT" != "x"; then
55867        if test "x$x_includes" = xNONE; then
55868          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55869            x_includes="$SYSROOT/usr/X11R6/include"
55870          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55871            x_includes="$SYSROOT/usr/include"
55872          fi
55873        fi
55874        if test "x$x_libraries" = xNONE; then
55875          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55876            x_libraries="$SYSROOT/usr/X11R6/lib"
55877          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55878            x_libraries="$SYSROOT/usr/lib64"
55879          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55880            x_libraries="$SYSROOT/usr/lib"
55881          fi
55882        fi
55883      fi
55884    fi
55885
55886    # Now let autoconf do it's magic
55887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55888$as_echo_n "checking for X... " >&6; }
55889
55890
55891# Check whether --with-x was given.
55892if test "${with_x+set}" = set; then :
55893  withval=$with_x;
55894fi
55895
55896# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55897if test "x$with_x" = xno; then
55898  # The user explicitly disabled X.
55899  have_x=disabled
55900else
55901  case $x_includes,$x_libraries in #(
55902    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55903    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55904  $as_echo_n "(cached) " >&6
55905else
55906  # One or both of the vars are not set, and there is no cached value.
55907ac_x_includes=no ac_x_libraries=no
55908rm -f -r conftest.dir
55909if mkdir conftest.dir; then
55910  cd conftest.dir
55911  cat >Imakefile <<'_ACEOF'
55912incroot:
55913	@echo incroot='${INCROOT}'
55914usrlibdir:
55915	@echo usrlibdir='${USRLIBDIR}'
55916libdir:
55917	@echo libdir='${LIBDIR}'
55918_ACEOF
55919  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55920    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55921    for ac_var in incroot usrlibdir libdir; do
55922      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55923    done
55924    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55925    for ac_extension in a so sl dylib la dll; do
55926      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55927	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55928	ac_im_usrlibdir=$ac_im_libdir; break
55929      fi
55930    done
55931    # Screen out bogus values from the imake configuration.  They are
55932    # bogus both because they are the default anyway, and because
55933    # using them would break gcc on systems where it needs fixed includes.
55934    case $ac_im_incroot in
55935	/usr/include) ac_x_includes= ;;
55936	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55937    esac
55938    case $ac_im_usrlibdir in
55939	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55940	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55941    esac
55942  fi
55943  cd ..
55944  rm -f -r conftest.dir
55945fi
55946
55947# Standard set of common directories for X headers.
55948# Check X11 before X11Rn because it is often a symlink to the current release.
55949ac_x_header_dirs='
55950/usr/X11/include
55951/usr/X11R7/include
55952/usr/X11R6/include
55953/usr/X11R5/include
55954/usr/X11R4/include
55955
55956/usr/include/X11
55957/usr/include/X11R7
55958/usr/include/X11R6
55959/usr/include/X11R5
55960/usr/include/X11R4
55961
55962/usr/local/X11/include
55963/usr/local/X11R7/include
55964/usr/local/X11R6/include
55965/usr/local/X11R5/include
55966/usr/local/X11R4/include
55967
55968/usr/local/include/X11
55969/usr/local/include/X11R7
55970/usr/local/include/X11R6
55971/usr/local/include/X11R5
55972/usr/local/include/X11R4
55973
55974/usr/X386/include
55975/usr/x386/include
55976/usr/XFree86/include/X11
55977
55978/usr/include
55979/usr/local/include
55980/usr/unsupported/include
55981/usr/athena/include
55982/usr/local/x11r5/include
55983/usr/lpp/Xamples/include
55984
55985/usr/openwin/include
55986/usr/openwin/share/include'
55987
55988if test "$ac_x_includes" = no; then
55989  # Guess where to find include files, by looking for Xlib.h.
55990  # First, try using that file with no special directory specified.
55991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55992/* end confdefs.h.  */
55993#include <X11/Xlib.h>
55994_ACEOF
55995if ac_fn_cxx_try_cpp "$LINENO"; then :
55996  # We can compile using X headers with no special include directory.
55997ac_x_includes=
55998else
55999  for ac_dir in $ac_x_header_dirs; do
56000  if test -r "$ac_dir/X11/Xlib.h"; then
56001    ac_x_includes=$ac_dir
56002    break
56003  fi
56004done
56005fi
56006rm -f conftest.err conftest.i conftest.$ac_ext
56007fi # $ac_x_includes = no
56008
56009if test "$ac_x_libraries" = no; then
56010  # Check for the libraries.
56011  # See if we find them without any special options.
56012  # Don't add to $LIBS permanently.
56013  ac_save_LIBS=$LIBS
56014  LIBS="-lX11 $LIBS"
56015  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56016/* end confdefs.h.  */
56017#include <X11/Xlib.h>
56018int
56019main ()
56020{
56021XrmInitialize ()
56022  ;
56023  return 0;
56024}
56025_ACEOF
56026if ac_fn_cxx_try_link "$LINENO"; then :
56027  LIBS=$ac_save_LIBS
56028# We can link X programs with no special library path.
56029ac_x_libraries=
56030else
56031  LIBS=$ac_save_LIBS
56032for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56033do
56034  # Don't even attempt the hair of trying to link an X program!
56035  for ac_extension in a so sl dylib la dll; do
56036    if test -r "$ac_dir/libX11.$ac_extension"; then
56037      ac_x_libraries=$ac_dir
56038      break 2
56039    fi
56040  done
56041done
56042fi
56043rm -f core conftest.err conftest.$ac_objext \
56044    conftest$ac_exeext conftest.$ac_ext
56045fi # $ac_x_libraries = no
56046
56047case $ac_x_includes,$ac_x_libraries in #(
56048  no,* | *,no | *\'*)
56049    # Didn't find X, or a directory has "'" in its name.
56050    ac_cv_have_x="have_x=no";; #(
56051  *)
56052    # Record where we found X for the cache.
56053    ac_cv_have_x="have_x=yes\
56054	ac_x_includes='$ac_x_includes'\
56055	ac_x_libraries='$ac_x_libraries'"
56056esac
56057fi
56058;; #(
56059    *) have_x=yes;;
56060  esac
56061  eval "$ac_cv_have_x"
56062fi # $with_x != no
56063
56064if test "$have_x" != yes; then
56065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56066$as_echo "$have_x" >&6; }
56067  no_x=yes
56068else
56069  # If each of the values was on the command line, it overrides each guess.
56070  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56071  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56072  # Update the cache value to reflect the command line values.
56073  ac_cv_have_x="have_x=yes\
56074	ac_x_includes='$x_includes'\
56075	ac_x_libraries='$x_libraries'"
56076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56077$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56078fi
56079
56080    if test "$no_x" = yes; then
56081  # Not all programs may use this symbol, but it does not hurt to define it.
56082
56083$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56084
56085  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56086else
56087  if test -n "$x_includes"; then
56088    X_CFLAGS="$X_CFLAGS -I$x_includes"
56089  fi
56090
56091  # It would also be nice to do this for all -L options, not just this one.
56092  if test -n "$x_libraries"; then
56093    X_LIBS="$X_LIBS -L$x_libraries"
56094    # For Solaris; some versions of Sun CC require a space after -R and
56095    # others require no space.  Words are not sufficient . . . .
56096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56097$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56098    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56099    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56100    ac_cxx_werror_flag=yes
56101    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56102/* end confdefs.h.  */
56103
56104int
56105main ()
56106{
56107
56108  ;
56109  return 0;
56110}
56111_ACEOF
56112if ac_fn_cxx_try_link "$LINENO"; then :
56113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56114$as_echo "no" >&6; }
56115       X_LIBS="$X_LIBS -R$x_libraries"
56116else
56117  LIBS="$ac_xsave_LIBS -R $x_libraries"
56118       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56119/* end confdefs.h.  */
56120
56121int
56122main ()
56123{
56124
56125  ;
56126  return 0;
56127}
56128_ACEOF
56129if ac_fn_cxx_try_link "$LINENO"; then :
56130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56131$as_echo "yes" >&6; }
56132	  X_LIBS="$X_LIBS -R $x_libraries"
56133else
56134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56135$as_echo "neither works" >&6; }
56136fi
56137rm -f core conftest.err conftest.$ac_objext \
56138    conftest$ac_exeext conftest.$ac_ext
56139fi
56140rm -f core conftest.err conftest.$ac_objext \
56141    conftest$ac_exeext conftest.$ac_ext
56142    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56143    LIBS=$ac_xsave_LIBS
56144  fi
56145
56146  # Check for system-dependent libraries X programs must link with.
56147  # Do this before checking for the system-independent R6 libraries
56148  # (-lICE), since we may need -lsocket or whatever for X linking.
56149
56150  if test "$ISC" = yes; then
56151    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56152  else
56153    # Martyn Johnson says this is needed for Ultrix, if the X
56154    # libraries were built with DECnet support.  And Karl Berry says
56155    # the Alpha needs dnet_stub (dnet does not exist).
56156    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56157    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56158/* end confdefs.h.  */
56159
56160/* Override any GCC internal prototype to avoid an error.
56161   Use char because int might match the return type of a GCC
56162   builtin and then its argument prototype would still apply.  */
56163#ifdef __cplusplus
56164extern "C"
56165#endif
56166char XOpenDisplay ();
56167int
56168main ()
56169{
56170return XOpenDisplay ();
56171  ;
56172  return 0;
56173}
56174_ACEOF
56175if ac_fn_cxx_try_link "$LINENO"; then :
56176
56177else
56178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56179$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56180if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56181  $as_echo_n "(cached) " >&6
56182else
56183  ac_check_lib_save_LIBS=$LIBS
56184LIBS="-ldnet  $LIBS"
56185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56186/* end confdefs.h.  */
56187
56188/* Override any GCC internal prototype to avoid an error.
56189   Use char because int might match the return type of a GCC
56190   builtin and then its argument prototype would still apply.  */
56191#ifdef __cplusplus
56192extern "C"
56193#endif
56194char dnet_ntoa ();
56195int
56196main ()
56197{
56198return dnet_ntoa ();
56199  ;
56200  return 0;
56201}
56202_ACEOF
56203if ac_fn_cxx_try_link "$LINENO"; then :
56204  ac_cv_lib_dnet_dnet_ntoa=yes
56205else
56206  ac_cv_lib_dnet_dnet_ntoa=no
56207fi
56208rm -f core conftest.err conftest.$ac_objext \
56209    conftest$ac_exeext conftest.$ac_ext
56210LIBS=$ac_check_lib_save_LIBS
56211fi
56212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56213$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56214if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56215  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56216fi
56217
56218    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56220$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56221if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56222  $as_echo_n "(cached) " >&6
56223else
56224  ac_check_lib_save_LIBS=$LIBS
56225LIBS="-ldnet_stub  $LIBS"
56226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56227/* end confdefs.h.  */
56228
56229/* Override any GCC internal prototype to avoid an error.
56230   Use char because int might match the return type of a GCC
56231   builtin and then its argument prototype would still apply.  */
56232#ifdef __cplusplus
56233extern "C"
56234#endif
56235char dnet_ntoa ();
56236int
56237main ()
56238{
56239return dnet_ntoa ();
56240  ;
56241  return 0;
56242}
56243_ACEOF
56244if ac_fn_cxx_try_link "$LINENO"; then :
56245  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56246else
56247  ac_cv_lib_dnet_stub_dnet_ntoa=no
56248fi
56249rm -f core conftest.err conftest.$ac_objext \
56250    conftest$ac_exeext conftest.$ac_ext
56251LIBS=$ac_check_lib_save_LIBS
56252fi
56253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56254$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56255if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56256  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56257fi
56258
56259    fi
56260fi
56261rm -f core conftest.err conftest.$ac_objext \
56262    conftest$ac_exeext conftest.$ac_ext
56263    LIBS="$ac_xsave_LIBS"
56264
56265    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56266    # to get the SysV transport functions.
56267    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56268    # needs -lnsl.
56269    # The nsl library prevents programs from opening the X display
56270    # on Irix 5.2, according to T.E. Dickey.
56271    # The functions gethostbyname, getservbyname, and inet_addr are
56272    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56273    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56274if test "x$ac_cv_func_gethostbyname" = xyes; then :
56275
56276fi
56277
56278    if test $ac_cv_func_gethostbyname = no; then
56279      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56280$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56281if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56282  $as_echo_n "(cached) " >&6
56283else
56284  ac_check_lib_save_LIBS=$LIBS
56285LIBS="-lnsl  $LIBS"
56286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56287/* end confdefs.h.  */
56288
56289/* Override any GCC internal prototype to avoid an error.
56290   Use char because int might match the return type of a GCC
56291   builtin and then its argument prototype would still apply.  */
56292#ifdef __cplusplus
56293extern "C"
56294#endif
56295char gethostbyname ();
56296int
56297main ()
56298{
56299return gethostbyname ();
56300  ;
56301  return 0;
56302}
56303_ACEOF
56304if ac_fn_cxx_try_link "$LINENO"; then :
56305  ac_cv_lib_nsl_gethostbyname=yes
56306else
56307  ac_cv_lib_nsl_gethostbyname=no
56308fi
56309rm -f core conftest.err conftest.$ac_objext \
56310    conftest$ac_exeext conftest.$ac_ext
56311LIBS=$ac_check_lib_save_LIBS
56312fi
56313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56314$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56315if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56316  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56317fi
56318
56319      if test $ac_cv_lib_nsl_gethostbyname = no; then
56320	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56321$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56322if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56323  $as_echo_n "(cached) " >&6
56324else
56325  ac_check_lib_save_LIBS=$LIBS
56326LIBS="-lbsd  $LIBS"
56327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56328/* end confdefs.h.  */
56329
56330/* Override any GCC internal prototype to avoid an error.
56331   Use char because int might match the return type of a GCC
56332   builtin and then its argument prototype would still apply.  */
56333#ifdef __cplusplus
56334extern "C"
56335#endif
56336char gethostbyname ();
56337int
56338main ()
56339{
56340return gethostbyname ();
56341  ;
56342  return 0;
56343}
56344_ACEOF
56345if ac_fn_cxx_try_link "$LINENO"; then :
56346  ac_cv_lib_bsd_gethostbyname=yes
56347else
56348  ac_cv_lib_bsd_gethostbyname=no
56349fi
56350rm -f core conftest.err conftest.$ac_objext \
56351    conftest$ac_exeext conftest.$ac_ext
56352LIBS=$ac_check_lib_save_LIBS
56353fi
56354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56355$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56356if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56357  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56358fi
56359
56360      fi
56361    fi
56362
56363    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56364    # socket/setsockopt and other routines are undefined under SCO ODT
56365    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56366    # on later versions), says Simon Leinen: it contains gethostby*
56367    # variants that don't use the name server (or something).  -lsocket
56368    # must be given before -lnsl if both are needed.  We assume that
56369    # if connect needs -lnsl, so does gethostbyname.
56370    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56371if test "x$ac_cv_func_connect" = xyes; then :
56372
56373fi
56374
56375    if test $ac_cv_func_connect = no; then
56376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56377$as_echo_n "checking for connect in -lsocket... " >&6; }
56378if ${ac_cv_lib_socket_connect+:} false; then :
56379  $as_echo_n "(cached) " >&6
56380else
56381  ac_check_lib_save_LIBS=$LIBS
56382LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56384/* end confdefs.h.  */
56385
56386/* Override any GCC internal prototype to avoid an error.
56387   Use char because int might match the return type of a GCC
56388   builtin and then its argument prototype would still apply.  */
56389#ifdef __cplusplus
56390extern "C"
56391#endif
56392char connect ();
56393int
56394main ()
56395{
56396return connect ();
56397  ;
56398  return 0;
56399}
56400_ACEOF
56401if ac_fn_cxx_try_link "$LINENO"; then :
56402  ac_cv_lib_socket_connect=yes
56403else
56404  ac_cv_lib_socket_connect=no
56405fi
56406rm -f core conftest.err conftest.$ac_objext \
56407    conftest$ac_exeext conftest.$ac_ext
56408LIBS=$ac_check_lib_save_LIBS
56409fi
56410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56411$as_echo "$ac_cv_lib_socket_connect" >&6; }
56412if test "x$ac_cv_lib_socket_connect" = xyes; then :
56413  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56414fi
56415
56416    fi
56417
56418    # Guillermo Gomez says -lposix is necessary on A/UX.
56419    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56420if test "x$ac_cv_func_remove" = xyes; then :
56421
56422fi
56423
56424    if test $ac_cv_func_remove = no; then
56425      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56426$as_echo_n "checking for remove in -lposix... " >&6; }
56427if ${ac_cv_lib_posix_remove+:} false; then :
56428  $as_echo_n "(cached) " >&6
56429else
56430  ac_check_lib_save_LIBS=$LIBS
56431LIBS="-lposix  $LIBS"
56432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56433/* end confdefs.h.  */
56434
56435/* Override any GCC internal prototype to avoid an error.
56436   Use char because int might match the return type of a GCC
56437   builtin and then its argument prototype would still apply.  */
56438#ifdef __cplusplus
56439extern "C"
56440#endif
56441char remove ();
56442int
56443main ()
56444{
56445return remove ();
56446  ;
56447  return 0;
56448}
56449_ACEOF
56450if ac_fn_cxx_try_link "$LINENO"; then :
56451  ac_cv_lib_posix_remove=yes
56452else
56453  ac_cv_lib_posix_remove=no
56454fi
56455rm -f core conftest.err conftest.$ac_objext \
56456    conftest$ac_exeext conftest.$ac_ext
56457LIBS=$ac_check_lib_save_LIBS
56458fi
56459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56460$as_echo "$ac_cv_lib_posix_remove" >&6; }
56461if test "x$ac_cv_lib_posix_remove" = xyes; then :
56462  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56463fi
56464
56465    fi
56466
56467    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56468    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56469if test "x$ac_cv_func_shmat" = xyes; then :
56470
56471fi
56472
56473    if test $ac_cv_func_shmat = no; then
56474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56475$as_echo_n "checking for shmat in -lipc... " >&6; }
56476if ${ac_cv_lib_ipc_shmat+:} false; then :
56477  $as_echo_n "(cached) " >&6
56478else
56479  ac_check_lib_save_LIBS=$LIBS
56480LIBS="-lipc  $LIBS"
56481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56482/* end confdefs.h.  */
56483
56484/* Override any GCC internal prototype to avoid an error.
56485   Use char because int might match the return type of a GCC
56486   builtin and then its argument prototype would still apply.  */
56487#ifdef __cplusplus
56488extern "C"
56489#endif
56490char shmat ();
56491int
56492main ()
56493{
56494return shmat ();
56495  ;
56496  return 0;
56497}
56498_ACEOF
56499if ac_fn_cxx_try_link "$LINENO"; then :
56500  ac_cv_lib_ipc_shmat=yes
56501else
56502  ac_cv_lib_ipc_shmat=no
56503fi
56504rm -f core conftest.err conftest.$ac_objext \
56505    conftest$ac_exeext conftest.$ac_ext
56506LIBS=$ac_check_lib_save_LIBS
56507fi
56508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56509$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56510if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56511  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56512fi
56513
56514    fi
56515  fi
56516
56517  # Check for libraries that X11R6 Xt/Xaw programs need.
56518  ac_save_LDFLAGS=$LDFLAGS
56519  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56520  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56521  # check for ICE first), but we must link in the order -lSM -lICE or
56522  # we get undefined symbols.  So assume we have SM if we have ICE.
56523  # These have to be linked with before -lX11, unlike the other
56524  # libraries we check for below, so use a different variable.
56525  # John Interrante, Karl Berry
56526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56527$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56528if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56529  $as_echo_n "(cached) " >&6
56530else
56531  ac_check_lib_save_LIBS=$LIBS
56532LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56534/* end confdefs.h.  */
56535
56536/* Override any GCC internal prototype to avoid an error.
56537   Use char because int might match the return type of a GCC
56538   builtin and then its argument prototype would still apply.  */
56539#ifdef __cplusplus
56540extern "C"
56541#endif
56542char IceConnectionNumber ();
56543int
56544main ()
56545{
56546return IceConnectionNumber ();
56547  ;
56548  return 0;
56549}
56550_ACEOF
56551if ac_fn_cxx_try_link "$LINENO"; then :
56552  ac_cv_lib_ICE_IceConnectionNumber=yes
56553else
56554  ac_cv_lib_ICE_IceConnectionNumber=no
56555fi
56556rm -f core conftest.err conftest.$ac_objext \
56557    conftest$ac_exeext conftest.$ac_ext
56558LIBS=$ac_check_lib_save_LIBS
56559fi
56560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56561$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56562if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56563  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56564fi
56565
56566  LDFLAGS=$ac_save_LDFLAGS
56567
56568fi
56569
56570
56571    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56572    # this doesn't make sense so we remove it.
56573    if test "x$COMPILE_TYPE" = xcross; then
56574      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56575    fi
56576
56577    if test "x$no_x" = xyes; then
56578
56579  # Print a helpful message on how to acquire the necessary build dependency.
56580  # x11 is the help tag: freetype, cups, alsa etc
56581  MISSING_DEPENDENCY=x11
56582
56583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56584    cygwin_help $MISSING_DEPENDENCY
56585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56586    msys_help $MISSING_DEPENDENCY
56587  else
56588    PKGHANDLER_COMMAND=
56589
56590    case $PKGHANDLER in
56591      apt-get)
56592        apt_help     $MISSING_DEPENDENCY ;;
56593      yum)
56594        yum_help     $MISSING_DEPENDENCY ;;
56595      port)
56596        port_help    $MISSING_DEPENDENCY ;;
56597      pkgutil)
56598        pkgutil_help $MISSING_DEPENDENCY ;;
56599      pkgadd)
56600        pkgadd_help  $MISSING_DEPENDENCY ;;
56601    esac
56602
56603    if test "x$PKGHANDLER_COMMAND" != x; then
56604      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56605    fi
56606  fi
56607
56608      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56609    fi
56610
56611    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56612      OPENWIN_HOME="/usr/openwin"
56613      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56614      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56615          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56616    fi
56617
56618    ac_ext=c
56619ac_cpp='$CPP $CPPFLAGS'
56620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56622ac_compiler_gnu=$ac_cv_c_compiler_gnu
56623
56624    OLD_CFLAGS="$CFLAGS"
56625    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56626
56627    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56628    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56629do :
56630  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56631ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56632          # include <X11/Xlib.h>
56633          # include <X11/Xutil.h>
56634
56635
56636"
56637if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56638  cat >>confdefs.h <<_ACEOF
56639#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56640_ACEOF
56641 X11_HEADERS_OK=yes
56642else
56643  X11_HEADERS_OK=no; break
56644fi
56645
56646done
56647
56648
56649    if test "x$X11_HEADERS_OK" = xno; then
56650
56651  # Print a helpful message on how to acquire the necessary build dependency.
56652  # x11 is the help tag: freetype, cups, alsa etc
56653  MISSING_DEPENDENCY=x11
56654
56655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56656    cygwin_help $MISSING_DEPENDENCY
56657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56658    msys_help $MISSING_DEPENDENCY
56659  else
56660    PKGHANDLER_COMMAND=
56661
56662    case $PKGHANDLER in
56663      apt-get)
56664        apt_help     $MISSING_DEPENDENCY ;;
56665      yum)
56666        yum_help     $MISSING_DEPENDENCY ;;
56667      port)
56668        port_help    $MISSING_DEPENDENCY ;;
56669      pkgutil)
56670        pkgutil_help $MISSING_DEPENDENCY ;;
56671      pkgadd)
56672        pkgadd_help  $MISSING_DEPENDENCY ;;
56673    esac
56674
56675    if test "x$PKGHANDLER_COMMAND" != x; then
56676      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56677    fi
56678  fi
56679
56680      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56681    fi
56682
56683    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56684    # defined in libawt_xawt.
56685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56686$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56687    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56688/* end confdefs.h.  */
56689#include <X11/extensions/Xrender.h>
56690int
56691main ()
56692{
56693XLinearGradient x;
56694  ;
56695  return 0;
56696}
56697_ACEOF
56698if ac_fn_c_try_compile "$LINENO"; then :
56699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56700$as_echo "yes" >&6; }
56701else
56702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56703$as_echo "no" >&6; }
56704         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56705fi
56706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56707
56708    CFLAGS="$OLD_CFLAGS"
56709    ac_ext=cpp
56710ac_cpp='$CXXCPP $CPPFLAGS'
56711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56714
56715  fi # NEEDS_LIB_X11
56716
56717
56718
56719
56720
56721
56722# Check whether --with-cups was given.
56723if test "${with_cups+set}" = set; then :
56724  withval=$with_cups;
56725fi
56726
56727
56728# Check whether --with-cups-include was given.
56729if test "${with_cups_include+set}" = set; then :
56730  withval=$with_cups_include;
56731fi
56732
56733
56734  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56735    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56736        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56737      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56738$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56739    fi
56740    CUPS_CFLAGS=
56741  else
56742    CUPS_FOUND=no
56743
56744    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56745      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56746    fi
56747
56748    if test "x${with_cups}" != x; then
56749      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56750$as_echo_n "checking for cups headers... " >&6; }
56751      if test -s "${with_cups}/include/cups/cups.h"; then
56752        CUPS_CFLAGS="-I${with_cups}/include"
56753        CUPS_FOUND=yes
56754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56755$as_echo "$CUPS_FOUND" >&6; }
56756      else
56757        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56758      fi
56759    fi
56760    if test "x${with_cups_include}" != x; then
56761      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56762$as_echo_n "checking for cups headers... " >&6; }
56763      if test -s "${with_cups_include}/cups/cups.h"; then
56764        CUPS_CFLAGS="-I${with_cups_include}"
56765        CUPS_FOUND=yes
56766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56767$as_echo "$CUPS_FOUND" >&6; }
56768      else
56769        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56770      fi
56771    fi
56772    if test "x$CUPS_FOUND" = xno; then
56773      # Are the cups headers installed in the default /usr/include location?
56774      for ac_header in cups/cups.h cups/ppd.h
56775do :
56776  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56777ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56779  cat >>confdefs.h <<_ACEOF
56780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56781_ACEOF
56782
56783          CUPS_FOUND=yes
56784          CUPS_CFLAGS=
56785          DEFAULT_CUPS=yes
56786
56787fi
56788
56789done
56790
56791    fi
56792    if test "x$CUPS_FOUND" = xno; then
56793
56794  # Print a helpful message on how to acquire the necessary build dependency.
56795  # cups is the help tag: freetype, cups, alsa etc
56796  MISSING_DEPENDENCY=cups
56797
56798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56799    cygwin_help $MISSING_DEPENDENCY
56800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56801    msys_help $MISSING_DEPENDENCY
56802  else
56803    PKGHANDLER_COMMAND=
56804
56805    case $PKGHANDLER in
56806      apt-get)
56807        apt_help     $MISSING_DEPENDENCY ;;
56808      yum)
56809        yum_help     $MISSING_DEPENDENCY ;;
56810      port)
56811        port_help    $MISSING_DEPENDENCY ;;
56812      pkgutil)
56813        pkgutil_help $MISSING_DEPENDENCY ;;
56814      pkgadd)
56815        pkgadd_help  $MISSING_DEPENDENCY ;;
56816    esac
56817
56818    if test "x$PKGHANDLER_COMMAND" != x; then
56819      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56820    fi
56821  fi
56822
56823      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56824    fi
56825  fi
56826
56827
56828
56829
56830
56831# Check whether --with-freetype was given.
56832if test "${with_freetype+set}" = set; then :
56833  withval=$with_freetype;
56834fi
56835
56836
56837# Check whether --with-freetype-include was given.
56838if test "${with_freetype_include+set}" = set; then :
56839  withval=$with_freetype_include;
56840fi
56841
56842
56843# Check whether --with-freetype-lib was given.
56844if test "${with_freetype_lib+set}" = set; then :
56845  withval=$with_freetype_lib;
56846fi
56847
56848
56849# Check whether --with-freetype-src was given.
56850if test "${with_freetype_src+set}" = set; then :
56851  withval=$with_freetype_src;
56852fi
56853
56854  # Check whether --enable-freetype-bundling was given.
56855if test "${enable_freetype_bundling+set}" = set; then :
56856  enableval=$enable_freetype_bundling;
56857fi
56858
56859
56860  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56861  FREETYPE_BASE_NAME=freetype
56862  FREETYPE_CFLAGS=
56863  FREETYPE_LIBS=
56864  FREETYPE_BUNDLE_LIB_PATH=
56865
56866  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56867    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56868        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56869        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56870        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56871      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56872$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56873    fi
56874    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56875      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56876$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56877    fi
56878  else
56879    # freetype is needed to build; go get it!
56880
56881    BUNDLE_FREETYPE="$enable_freetype_bundling"
56882
56883    if  test "x$with_freetype_src" != x; then
56884      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56885        # Try to build freetype if --with-freetype-src was given on Windows
56886
56887  FREETYPE_SRC_PATH="$with_freetype_src"
56888  BUILD_FREETYPE=yes
56889
56890  # Check if the freetype sources are acessible..
56891  if ! test -d $FREETYPE_SRC_PATH; then
56892    { $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
56893$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56894    BUILD_FREETYPE=no
56895  fi
56896  # ..and contain a vc2010 project file
56897  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56898  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56899    { $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
56900$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56901    BUILD_FREETYPE=no
56902  fi
56903  # Now check if configure found a version of 'msbuild.exe'
56904  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56905    { $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
56906$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;}
56907    BUILD_FREETYPE=no
56908  fi
56909
56910  # Ready to go..
56911  if test "x$BUILD_FREETYPE" = xyes; then
56912    # msbuild requires trailing slashes for output directories
56913    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56914    freetype_lib_path_unix="$freetype_lib_path"
56915    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56916
56917  unix_path="$vcxproj_path"
56918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56919    windows_path=`$CYGPATH -m "$unix_path"`
56920    vcxproj_path="$windows_path"
56921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56922    windows_path=`cmd //c echo $unix_path`
56923    vcxproj_path="$windows_path"
56924  fi
56925
56926
56927  unix_path="$freetype_lib_path"
56928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56929    windows_path=`$CYGPATH -m "$unix_path"`
56930    freetype_lib_path="$windows_path"
56931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56932    windows_path=`cmd //c echo $unix_path`
56933    freetype_lib_path="$windows_path"
56934  fi
56935
56936
56937  unix_path="$freetype_obj_path"
56938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56939    windows_path=`$CYGPATH -m "$unix_path"`
56940    freetype_obj_path="$windows_path"
56941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56942    windows_path=`cmd //c echo $unix_path`
56943    freetype_obj_path="$windows_path"
56944  fi
56945
56946    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56947      freetype_platform=x64
56948    else
56949      freetype_platform=win32
56950    fi
56951
56952    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56953    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56954    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56955    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56956    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56957$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56958
56959    # First we try to build the freetype.dll
56960    $ECHO -e "@echo off\n"\
56961        "$MSBUILD $vcxproj_path "\
56962        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56963        "/p:Configuration=\"Release Multithreaded\" "\
56964        "/p:Platform=$freetype_platform "\
56965        "/p:ConfigurationType=DynamicLibrary "\
56966        "/p:TargetName=freetype "\
56967        "/p:OutDir=\"$freetype_lib_path\" "\
56968        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56969    cmd /c freetype.bat
56970
56971    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56972      # If that succeeds we also build freetype.lib
56973      $ECHO -e "@echo off\n"\
56974          "$MSBUILD $vcxproj_path "\
56975          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56976          "/p:Configuration=\"Release Multithreaded\" "\
56977          "/p:Platform=$freetype_platform "\
56978          "/p:ConfigurationType=StaticLibrary "\
56979          "/p:TargetName=freetype "\
56980          "/p:OutDir=\"$freetype_lib_path\" "\
56981          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56982      cmd /c freetype.bat
56983
56984      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56985        # Once we build both, lib and dll, set freetype lib and include path appropriately
56986        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56987        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56988        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56989$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56990      else
56991        BUILD_FREETYPE=no
56992      fi
56993    else
56994      BUILD_FREETYPE=no
56995    fi
56996  fi
56997
56998        if test "x$BUILD_FREETYPE" = xyes; then
56999          # Okay, we built it. Check that it works.
57000
57001  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57002  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57003  METHOD="--with-freetype-src"
57004
57005  # Let's start with an optimistic view of the world :-)
57006  FOUND_FREETYPE=yes
57007
57008  # First look for the canonical freetype main include file ft2build.h.
57009  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57010    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57011    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57012    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57013      # Fail.
57014      FOUND_FREETYPE=no
57015    fi
57016  fi
57017
57018  if test "x$FOUND_FREETYPE" = xyes; then
57019    # Include file found, let's continue the sanity check.
57020    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57021$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57022
57023    # Reset to default value
57024    FREETYPE_BASE_NAME=freetype
57025    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57026    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57027      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57028          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57029        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57030        # for the .6 version explicitly.
57031        FREETYPE_BASE_NAME=freetype.6
57032        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57033        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57034$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57035      else
57036        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57037$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57038        FOUND_FREETYPE=no
57039      fi
57040    else
57041      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57042        # On Windows, we will need both .lib and .dll file.
57043        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57044          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57045$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57046          FOUND_FREETYPE=no
57047        fi
57048      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57049          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57050        # Found lib in isa dir, use that instead.
57051        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57052        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57053$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57054      fi
57055    fi
57056  fi
57057
57058  if test "x$FOUND_FREETYPE" = xyes; then
57059
57060  # Only process if variable expands to non-empty
57061
57062  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57064
57065  # Input might be given as Windows format, start by converting to
57066  # unix format.
57067  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57068  new_path=`$CYGPATH -u "$path"`
57069
57070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57073  # "foo.exe" is OK but "foo" is an error.
57074  #
57075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57076  # It is also a way to make sure we got the proper file name for the real test later on.
57077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57078  if test "x$test_shortpath" = x; then
57079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57081    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57082  fi
57083
57084  # Call helper function which possibly converts this using DOS-style short mode.
57085  # If so, the updated path is stored in $new_path.
57086
57087  input_path="$new_path"
57088  # Check if we need to convert this using DOS-style short mode. If the path
57089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57090  # take no chances and rewrite it.
57091  # Note: m4 eats our [], so we need to use [ and ] instead.
57092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57093  if test "x$has_forbidden_chars" != x; then
57094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57098      # Going to short mode and back again did indeed matter. Since short mode is
57099      # case insensitive, let's make it lowercase to improve readability.
57100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57101      # Now convert it back to Unix-style (cygpath)
57102      input_path=`$CYGPATH -u "$shortmode_path"`
57103      new_path="$input_path"
57104    fi
57105  fi
57106
57107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57108  if test "x$test_cygdrive_prefix" = x; then
57109    # As a simple fix, exclude /usr/bin since it's not a real path.
57110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57112      # a path prefixed by /cygdrive for fixpath to work.
57113      new_path="$CYGWIN_ROOT_PATH$input_path"
57114    fi
57115  fi
57116
57117
57118  if test "x$path" != "x$new_path"; then
57119    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57122  fi
57123
57124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57125
57126  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57127  has_colon=`$ECHO $path | $GREP ^.:`
57128  new_path="$path"
57129  if test "x$has_colon" = x; then
57130    # Not in mixed or Windows style, start by that.
57131    new_path=`cmd //c echo $path`
57132  fi
57133
57134
57135  input_path="$new_path"
57136  # Check if we need to convert this using DOS-style short mode. If the path
57137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57138  # take no chances and rewrite it.
57139  # Note: m4 eats our [], so we need to use [ and ] instead.
57140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57141  if test "x$has_forbidden_chars" != x; then
57142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57144  fi
57145
57146
57147  windows_path="$new_path"
57148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57149    unix_path=`$CYGPATH -u "$windows_path"`
57150    new_path="$unix_path"
57151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57153    new_path="$unix_path"
57154  fi
57155
57156  if test "x$path" != "x$new_path"; then
57157    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57159$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57160  fi
57161
57162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57164
57165    else
57166      # We're on a unix platform. Hooray! :)
57167      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57168      has_space=`$ECHO "$path" | $GREP " "`
57169      if test "x$has_space" != x; then
57170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57173      fi
57174
57175      # Use eval to expand a potential ~
57176      eval path="$path"
57177      if test ! -f "$path" && test ! -d "$path"; then
57178        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57179      fi
57180
57181      if test -d "$path"; then
57182        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57183      else
57184        dir="`$DIRNAME "$path"`"
57185        base="`$BASENAME "$path"`"
57186        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57187      fi
57188    fi
57189  fi
57190
57191
57192  # Only process if variable expands to non-empty
57193
57194  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57196
57197  # Input might be given as Windows format, start by converting to
57198  # unix format.
57199  path="$POTENTIAL_FREETYPE_LIB_PATH"
57200  new_path=`$CYGPATH -u "$path"`
57201
57202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57205  # "foo.exe" is OK but "foo" is an error.
57206  #
57207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57208  # It is also a way to make sure we got the proper file name for the real test later on.
57209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57210  if test "x$test_shortpath" = x; then
57211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57213    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57214  fi
57215
57216  # Call helper function which possibly converts this using DOS-style short mode.
57217  # If so, the updated path is stored in $new_path.
57218
57219  input_path="$new_path"
57220  # Check if we need to convert this using DOS-style short mode. If the path
57221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57222  # take no chances and rewrite it.
57223  # Note: m4 eats our [], so we need to use [ and ] instead.
57224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57225  if test "x$has_forbidden_chars" != x; then
57226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57230      # Going to short mode and back again did indeed matter. Since short mode is
57231      # case insensitive, let's make it lowercase to improve readability.
57232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57233      # Now convert it back to Unix-style (cygpath)
57234      input_path=`$CYGPATH -u "$shortmode_path"`
57235      new_path="$input_path"
57236    fi
57237  fi
57238
57239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57240  if test "x$test_cygdrive_prefix" = x; then
57241    # As a simple fix, exclude /usr/bin since it's not a real path.
57242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57244      # a path prefixed by /cygdrive for fixpath to work.
57245      new_path="$CYGWIN_ROOT_PATH$input_path"
57246    fi
57247  fi
57248
57249
57250  if test "x$path" != "x$new_path"; then
57251    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57254  fi
57255
57256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57257
57258  path="$POTENTIAL_FREETYPE_LIB_PATH"
57259  has_colon=`$ECHO $path | $GREP ^.:`
57260  new_path="$path"
57261  if test "x$has_colon" = x; then
57262    # Not in mixed or Windows style, start by that.
57263    new_path=`cmd //c echo $path`
57264  fi
57265
57266
57267  input_path="$new_path"
57268  # Check if we need to convert this using DOS-style short mode. If the path
57269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57270  # take no chances and rewrite it.
57271  # Note: m4 eats our [], so we need to use [ and ] instead.
57272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57273  if test "x$has_forbidden_chars" != x; then
57274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57276  fi
57277
57278
57279  windows_path="$new_path"
57280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57281    unix_path=`$CYGPATH -u "$windows_path"`
57282    new_path="$unix_path"
57283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57285    new_path="$unix_path"
57286  fi
57287
57288  if test "x$path" != "x$new_path"; then
57289    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57292  fi
57293
57294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57296
57297    else
57298      # We're on a unix platform. Hooray! :)
57299      path="$POTENTIAL_FREETYPE_LIB_PATH"
57300      has_space=`$ECHO "$path" | $GREP " "`
57301      if test "x$has_space" != x; then
57302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57305      fi
57306
57307      # Use eval to expand a potential ~
57308      eval path="$path"
57309      if test ! -f "$path" && test ! -d "$path"; then
57310        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57311      fi
57312
57313      if test -d "$path"; then
57314        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57315      else
57316        dir="`$DIRNAME "$path"`"
57317        base="`$BASENAME "$path"`"
57318        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57319      fi
57320    fi
57321  fi
57322
57323
57324    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57326$as_echo_n "checking for freetype includes... " >&6; }
57327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57328$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57329    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57331$as_echo_n "checking for freetype libraries... " >&6; }
57332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57333$as_echo "$FREETYPE_LIB_PATH" >&6; }
57334  fi
57335
57336          if test "x$FOUND_FREETYPE" != xyes; then
57337            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57338          fi
57339        else
57340          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57341$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57342          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57343        fi
57344      else
57345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57346$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57347      fi
57348    fi
57349
57350    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57351      # User has specified settings
57352
57353      if test "x$BUNDLE_FREETYPE" = x; then
57354        # If not specified, default is to bundle freetype
57355        BUNDLE_FREETYPE=yes
57356      fi
57357
57358      if test "x$with_freetype" != x; then
57359        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57360        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57361      fi
57362
57363      # Allow --with-freetype-lib and --with-freetype-include to override
57364      if test "x$with_freetype_include" != x; then
57365        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57366      fi
57367      if test "x$with_freetype_lib" != x; then
57368        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57369      fi
57370
57371      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57372        # Okay, we got it. Check that it works.
57373
57374  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57375  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57376  METHOD="--with-freetype"
57377
57378  # Let's start with an optimistic view of the world :-)
57379  FOUND_FREETYPE=yes
57380
57381  # First look for the canonical freetype main include file ft2build.h.
57382  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57383    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57384    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57385    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57386      # Fail.
57387      FOUND_FREETYPE=no
57388    fi
57389  fi
57390
57391  if test "x$FOUND_FREETYPE" = xyes; then
57392    # Include file found, let's continue the sanity check.
57393    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57394$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57395
57396    # Reset to default value
57397    FREETYPE_BASE_NAME=freetype
57398    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57399    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57400      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57401          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57402        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57403        # for the .6 version explicitly.
57404        FREETYPE_BASE_NAME=freetype.6
57405        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57406        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57407$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57408      else
57409        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57410$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57411        FOUND_FREETYPE=no
57412      fi
57413    else
57414      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57415        # On Windows, we will need both .lib and .dll file.
57416        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57417          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57418$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57419          FOUND_FREETYPE=no
57420        fi
57421      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57422          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57423        # Found lib in isa dir, use that instead.
57424        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57425        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57426$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57427      fi
57428    fi
57429  fi
57430
57431  if test "x$FOUND_FREETYPE" = xyes; then
57432
57433  # Only process if variable expands to non-empty
57434
57435  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57437
57438  # Input might be given as Windows format, start by converting to
57439  # unix format.
57440  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57441  new_path=`$CYGPATH -u "$path"`
57442
57443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57446  # "foo.exe" is OK but "foo" is an error.
57447  #
57448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57449  # It is also a way to make sure we got the proper file name for the real test later on.
57450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57451  if test "x$test_shortpath" = x; then
57452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57455  fi
57456
57457  # Call helper function which possibly converts this using DOS-style short mode.
57458  # If so, the updated path is stored in $new_path.
57459
57460  input_path="$new_path"
57461  # Check if we need to convert this using DOS-style short mode. If the path
57462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57463  # take no chances and rewrite it.
57464  # Note: m4 eats our [], so we need to use [ and ] instead.
57465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57466  if test "x$has_forbidden_chars" != x; then
57467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57471      # Going to short mode and back again did indeed matter. Since short mode is
57472      # case insensitive, let's make it lowercase to improve readability.
57473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57474      # Now convert it back to Unix-style (cygpath)
57475      input_path=`$CYGPATH -u "$shortmode_path"`
57476      new_path="$input_path"
57477    fi
57478  fi
57479
57480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57481  if test "x$test_cygdrive_prefix" = x; then
57482    # As a simple fix, exclude /usr/bin since it's not a real path.
57483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57485      # a path prefixed by /cygdrive for fixpath to work.
57486      new_path="$CYGWIN_ROOT_PATH$input_path"
57487    fi
57488  fi
57489
57490
57491  if test "x$path" != "x$new_path"; then
57492    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57495  fi
57496
57497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57498
57499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57500  has_colon=`$ECHO $path | $GREP ^.:`
57501  new_path="$path"
57502  if test "x$has_colon" = x; then
57503    # Not in mixed or Windows style, start by that.
57504    new_path=`cmd //c echo $path`
57505  fi
57506
57507
57508  input_path="$new_path"
57509  # Check if we need to convert this using DOS-style short mode. If the path
57510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57511  # take no chances and rewrite it.
57512  # Note: m4 eats our [], so we need to use [ and ] instead.
57513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57514  if test "x$has_forbidden_chars" != x; then
57515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57517  fi
57518
57519
57520  windows_path="$new_path"
57521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57522    unix_path=`$CYGPATH -u "$windows_path"`
57523    new_path="$unix_path"
57524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57526    new_path="$unix_path"
57527  fi
57528
57529  if test "x$path" != "x$new_path"; then
57530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57533  fi
57534
57535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57537
57538    else
57539      # We're on a unix platform. Hooray! :)
57540      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57541      has_space=`$ECHO "$path" | $GREP " "`
57542      if test "x$has_space" != x; then
57543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57546      fi
57547
57548      # Use eval to expand a potential ~
57549      eval path="$path"
57550      if test ! -f "$path" && test ! -d "$path"; then
57551        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57552      fi
57553
57554      if test -d "$path"; then
57555        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57556      else
57557        dir="`$DIRNAME "$path"`"
57558        base="`$BASENAME "$path"`"
57559        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57560      fi
57561    fi
57562  fi
57563
57564
57565  # Only process if variable expands to non-empty
57566
57567  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57569
57570  # Input might be given as Windows format, start by converting to
57571  # unix format.
57572  path="$POTENTIAL_FREETYPE_LIB_PATH"
57573  new_path=`$CYGPATH -u "$path"`
57574
57575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57578  # "foo.exe" is OK but "foo" is an error.
57579  #
57580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57581  # It is also a way to make sure we got the proper file name for the real test later on.
57582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57583  if test "x$test_shortpath" = x; then
57584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57586    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57587  fi
57588
57589  # Call helper function which possibly converts this using DOS-style short mode.
57590  # If so, the updated path is stored in $new_path.
57591
57592  input_path="$new_path"
57593  # Check if we need to convert this using DOS-style short mode. If the path
57594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57595  # take no chances and rewrite it.
57596  # Note: m4 eats our [], so we need to use [ and ] instead.
57597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57598  if test "x$has_forbidden_chars" != x; then
57599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57603      # Going to short mode and back again did indeed matter. Since short mode is
57604      # case insensitive, let's make it lowercase to improve readability.
57605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57606      # Now convert it back to Unix-style (cygpath)
57607      input_path=`$CYGPATH -u "$shortmode_path"`
57608      new_path="$input_path"
57609    fi
57610  fi
57611
57612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57613  if test "x$test_cygdrive_prefix" = x; then
57614    # As a simple fix, exclude /usr/bin since it's not a real path.
57615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57617      # a path prefixed by /cygdrive for fixpath to work.
57618      new_path="$CYGWIN_ROOT_PATH$input_path"
57619    fi
57620  fi
57621
57622
57623  if test "x$path" != "x$new_path"; then
57624    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57626$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57627  fi
57628
57629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57630
57631  path="$POTENTIAL_FREETYPE_LIB_PATH"
57632  has_colon=`$ECHO $path | $GREP ^.:`
57633  new_path="$path"
57634  if test "x$has_colon" = x; then
57635    # Not in mixed or Windows style, start by that.
57636    new_path=`cmd //c echo $path`
57637  fi
57638
57639
57640  input_path="$new_path"
57641  # Check if we need to convert this using DOS-style short mode. If the path
57642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57643  # take no chances and rewrite it.
57644  # Note: m4 eats our [], so we need to use [ and ] instead.
57645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57646  if test "x$has_forbidden_chars" != x; then
57647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57649  fi
57650
57651
57652  windows_path="$new_path"
57653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57654    unix_path=`$CYGPATH -u "$windows_path"`
57655    new_path="$unix_path"
57656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57658    new_path="$unix_path"
57659  fi
57660
57661  if test "x$path" != "x$new_path"; then
57662    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57665  fi
57666
57667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57669
57670    else
57671      # We're on a unix platform. Hooray! :)
57672      path="$POTENTIAL_FREETYPE_LIB_PATH"
57673      has_space=`$ECHO "$path" | $GREP " "`
57674      if test "x$has_space" != x; then
57675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57678      fi
57679
57680      # Use eval to expand a potential ~
57681      eval path="$path"
57682      if test ! -f "$path" && test ! -d "$path"; then
57683        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57684      fi
57685
57686      if test -d "$path"; then
57687        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57688      else
57689        dir="`$DIRNAME "$path"`"
57690        base="`$BASENAME "$path"`"
57691        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57692      fi
57693    fi
57694  fi
57695
57696
57697    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57699$as_echo_n "checking for freetype includes... " >&6; }
57700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57701$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57702    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57704$as_echo_n "checking for freetype libraries... " >&6; }
57705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57706$as_echo "$FREETYPE_LIB_PATH" >&6; }
57707  fi
57708
57709        if test "x$FOUND_FREETYPE" != xyes; then
57710          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57711        fi
57712      else
57713        # User specified only one of lib or include. This is an error.
57714        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57715          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57716$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57717          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57718        else
57719          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57720$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57721          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57722        fi
57723      fi
57724    else
57725      # User did not specify settings, but we need freetype. Try to locate it.
57726
57727      if test "x$BUNDLE_FREETYPE" = x; then
57728        # If not specified, default is to bundle freetype only on windows
57729        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57730          BUNDLE_FREETYPE=yes
57731        else
57732          BUNDLE_FREETYPE=no
57733        fi
57734      fi
57735
57736      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57737      if test "x$SYSROOT" = x; then
57738        if test "x$FOUND_FREETYPE" != xyes; then
57739          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57740          if test "x$PKG_CONFIG" != x; then
57741
57742pkg_failed=no
57743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57744$as_echo_n "checking for FREETYPE... " >&6; }
57745
57746if test -n "$FREETYPE_CFLAGS"; then
57747    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57748 elif test -n "$PKG_CONFIG"; then
57749    if test -n "$PKG_CONFIG" && \
57750    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57751  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57752  ac_status=$?
57753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57754  test $ac_status = 0; }; then
57755  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57756else
57757  pkg_failed=yes
57758fi
57759 else
57760    pkg_failed=untried
57761fi
57762if test -n "$FREETYPE_LIBS"; then
57763    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57764 elif test -n "$PKG_CONFIG"; then
57765    if test -n "$PKG_CONFIG" && \
57766    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57767  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57768  ac_status=$?
57769  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57770  test $ac_status = 0; }; then
57771  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57772else
57773  pkg_failed=yes
57774fi
57775 else
57776    pkg_failed=untried
57777fi
57778
57779
57780
57781if test $pkg_failed = yes; then
57782
57783if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57784        _pkg_short_errors_supported=yes
57785else
57786        _pkg_short_errors_supported=no
57787fi
57788        if test $_pkg_short_errors_supported = yes; then
57789	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57790        else
57791	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57792        fi
57793	# Put the nasty error message in config.log where it belongs
57794	echo "$FREETYPE_PKG_ERRORS" >&5
57795
57796	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57797$as_echo "no" >&6; }
57798                FOUND_FREETYPE=no
57799elif test $pkg_failed = untried; then
57800	FOUND_FREETYPE=no
57801else
57802	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57803	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57805$as_echo "yes" >&6; }
57806	FOUND_FREETYPE=yes
57807fi
57808            if test "x$FOUND_FREETYPE" = xyes; then
57809              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57810              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57811              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57812              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57813                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57814              fi
57815              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57816              if test "x$BUNDLE_FREETYPE" = xyes; then
57817                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57818$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57819                FOUND_FREETYPE=no
57820              else
57821                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57822$as_echo_n "checking for freetype... " >&6; }
57823                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57824$as_echo "yes (using pkg-config)" >&6; }
57825              fi
57826            fi
57827          fi
57828        fi
57829      fi
57830
57831      if test "x$FOUND_FREETYPE" != xyes; then
57832        # Check in well-known locations
57833        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57834          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57835
57836  windows_path="$FREETYPE_BASE_DIR"
57837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57838    unix_path=`$CYGPATH -u "$windows_path"`
57839    FREETYPE_BASE_DIR="$unix_path"
57840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57842    FREETYPE_BASE_DIR="$unix_path"
57843  fi
57844
57845
57846  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57847  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57848  METHOD="well-known location"
57849
57850  # Let's start with an optimistic view of the world :-)
57851  FOUND_FREETYPE=yes
57852
57853  # First look for the canonical freetype main include file ft2build.h.
57854  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57855    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57856    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57857    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57858      # Fail.
57859      FOUND_FREETYPE=no
57860    fi
57861  fi
57862
57863  if test "x$FOUND_FREETYPE" = xyes; then
57864    # Include file found, let's continue the sanity check.
57865    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57866$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57867
57868    # Reset to default value
57869    FREETYPE_BASE_NAME=freetype
57870    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57871    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57872      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57873          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57874        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57875        # for the .6 version explicitly.
57876        FREETYPE_BASE_NAME=freetype.6
57877        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57878        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57879$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57880      else
57881        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57882$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57883        FOUND_FREETYPE=no
57884      fi
57885    else
57886      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57887        # On Windows, we will need both .lib and .dll file.
57888        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57889          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57890$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57891          FOUND_FREETYPE=no
57892        fi
57893      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57894          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57895        # Found lib in isa dir, use that instead.
57896        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57897        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57898$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57899      fi
57900    fi
57901  fi
57902
57903  if test "x$FOUND_FREETYPE" = xyes; then
57904
57905  # Only process if variable expands to non-empty
57906
57907  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57909
57910  # Input might be given as Windows format, start by converting to
57911  # unix format.
57912  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57913  new_path=`$CYGPATH -u "$path"`
57914
57915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57918  # "foo.exe" is OK but "foo" is an error.
57919  #
57920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57921  # It is also a way to make sure we got the proper file name for the real test later on.
57922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57923  if test "x$test_shortpath" = x; then
57924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57926    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57927  fi
57928
57929  # Call helper function which possibly converts this using DOS-style short mode.
57930  # If so, the updated path is stored in $new_path.
57931
57932  input_path="$new_path"
57933  # Check if we need to convert this using DOS-style short mode. If the path
57934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57935  # take no chances and rewrite it.
57936  # Note: m4 eats our [], so we need to use [ and ] instead.
57937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57938  if test "x$has_forbidden_chars" != x; then
57939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57943      # Going to short mode and back again did indeed matter. Since short mode is
57944      # case insensitive, let's make it lowercase to improve readability.
57945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57946      # Now convert it back to Unix-style (cygpath)
57947      input_path=`$CYGPATH -u "$shortmode_path"`
57948      new_path="$input_path"
57949    fi
57950  fi
57951
57952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57953  if test "x$test_cygdrive_prefix" = x; then
57954    # As a simple fix, exclude /usr/bin since it's not a real path.
57955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57957      # a path prefixed by /cygdrive for fixpath to work.
57958      new_path="$CYGWIN_ROOT_PATH$input_path"
57959    fi
57960  fi
57961
57962
57963  if test "x$path" != "x$new_path"; then
57964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57967  fi
57968
57969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57970
57971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57972  has_colon=`$ECHO $path | $GREP ^.:`
57973  new_path="$path"
57974  if test "x$has_colon" = x; then
57975    # Not in mixed or Windows style, start by that.
57976    new_path=`cmd //c echo $path`
57977  fi
57978
57979
57980  input_path="$new_path"
57981  # Check if we need to convert this using DOS-style short mode. If the path
57982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57983  # take no chances and rewrite it.
57984  # Note: m4 eats our [], so we need to use [ and ] instead.
57985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57986  if test "x$has_forbidden_chars" != x; then
57987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57989  fi
57990
57991
57992  windows_path="$new_path"
57993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57994    unix_path=`$CYGPATH -u "$windows_path"`
57995    new_path="$unix_path"
57996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57998    new_path="$unix_path"
57999  fi
58000
58001  if test "x$path" != "x$new_path"; then
58002    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58005  fi
58006
58007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58009
58010    else
58011      # We're on a unix platform. Hooray! :)
58012      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58013      has_space=`$ECHO "$path" | $GREP " "`
58014      if test "x$has_space" != x; then
58015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58018      fi
58019
58020      # Use eval to expand a potential ~
58021      eval path="$path"
58022      if test ! -f "$path" && test ! -d "$path"; then
58023        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58024      fi
58025
58026      if test -d "$path"; then
58027        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58028      else
58029        dir="`$DIRNAME "$path"`"
58030        base="`$BASENAME "$path"`"
58031        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58032      fi
58033    fi
58034  fi
58035
58036
58037  # Only process if variable expands to non-empty
58038
58039  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58041
58042  # Input might be given as Windows format, start by converting to
58043  # unix format.
58044  path="$POTENTIAL_FREETYPE_LIB_PATH"
58045  new_path=`$CYGPATH -u "$path"`
58046
58047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58050  # "foo.exe" is OK but "foo" is an error.
58051  #
58052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58053  # It is also a way to make sure we got the proper file name for the real test later on.
58054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58055  if test "x$test_shortpath" = x; then
58056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58058    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58059  fi
58060
58061  # Call helper function which possibly converts this using DOS-style short mode.
58062  # If so, the updated path is stored in $new_path.
58063
58064  input_path="$new_path"
58065  # Check if we need to convert this using DOS-style short mode. If the path
58066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58067  # take no chances and rewrite it.
58068  # Note: m4 eats our [], so we need to use [ and ] instead.
58069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58070  if test "x$has_forbidden_chars" != x; then
58071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58075      # Going to short mode and back again did indeed matter. Since short mode is
58076      # case insensitive, let's make it lowercase to improve readability.
58077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58078      # Now convert it back to Unix-style (cygpath)
58079      input_path=`$CYGPATH -u "$shortmode_path"`
58080      new_path="$input_path"
58081    fi
58082  fi
58083
58084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58085  if test "x$test_cygdrive_prefix" = x; then
58086    # As a simple fix, exclude /usr/bin since it's not a real path.
58087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58089      # a path prefixed by /cygdrive for fixpath to work.
58090      new_path="$CYGWIN_ROOT_PATH$input_path"
58091    fi
58092  fi
58093
58094
58095  if test "x$path" != "x$new_path"; then
58096    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58099  fi
58100
58101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58102
58103  path="$POTENTIAL_FREETYPE_LIB_PATH"
58104  has_colon=`$ECHO $path | $GREP ^.:`
58105  new_path="$path"
58106  if test "x$has_colon" = x; then
58107    # Not in mixed or Windows style, start by that.
58108    new_path=`cmd //c echo $path`
58109  fi
58110
58111
58112  input_path="$new_path"
58113  # Check if we need to convert this using DOS-style short mode. If the path
58114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58115  # take no chances and rewrite it.
58116  # Note: m4 eats our [], so we need to use [ and ] instead.
58117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58118  if test "x$has_forbidden_chars" != x; then
58119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58121  fi
58122
58123
58124  windows_path="$new_path"
58125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58126    unix_path=`$CYGPATH -u "$windows_path"`
58127    new_path="$unix_path"
58128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58130    new_path="$unix_path"
58131  fi
58132
58133  if test "x$path" != "x$new_path"; then
58134    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58136$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58137  fi
58138
58139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58141
58142    else
58143      # We're on a unix platform. Hooray! :)
58144      path="$POTENTIAL_FREETYPE_LIB_PATH"
58145      has_space=`$ECHO "$path" | $GREP " "`
58146      if test "x$has_space" != x; then
58147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58150      fi
58151
58152      # Use eval to expand a potential ~
58153      eval path="$path"
58154      if test ! -f "$path" && test ! -d "$path"; then
58155        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58156      fi
58157
58158      if test -d "$path"; then
58159        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58160      else
58161        dir="`$DIRNAME "$path"`"
58162        base="`$BASENAME "$path"`"
58163        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58164      fi
58165    fi
58166  fi
58167
58168
58169    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58171$as_echo_n "checking for freetype includes... " >&6; }
58172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58173$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58174    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58176$as_echo_n "checking for freetype libraries... " >&6; }
58177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58178$as_echo "$FREETYPE_LIB_PATH" >&6; }
58179  fi
58180
58181          if test "x$FOUND_FREETYPE" != xyes; then
58182            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58183
58184  windows_path="$FREETYPE_BASE_DIR"
58185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58186    unix_path=`$CYGPATH -u "$windows_path"`
58187    FREETYPE_BASE_DIR="$unix_path"
58188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58190    FREETYPE_BASE_DIR="$unix_path"
58191  fi
58192
58193
58194  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58195  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58196  METHOD="well-known location"
58197
58198  # Let's start with an optimistic view of the world :-)
58199  FOUND_FREETYPE=yes
58200
58201  # First look for the canonical freetype main include file ft2build.h.
58202  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58203    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58204    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58205    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58206      # Fail.
58207      FOUND_FREETYPE=no
58208    fi
58209  fi
58210
58211  if test "x$FOUND_FREETYPE" = xyes; then
58212    # Include file found, let's continue the sanity check.
58213    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58214$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58215
58216    # Reset to default value
58217    FREETYPE_BASE_NAME=freetype
58218    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58219    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58220      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58221          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58222        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58223        # for the .6 version explicitly.
58224        FREETYPE_BASE_NAME=freetype.6
58225        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58226        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58227$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58228      else
58229        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58230$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58231        FOUND_FREETYPE=no
58232      fi
58233    else
58234      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58235        # On Windows, we will need both .lib and .dll file.
58236        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58237          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58238$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58239          FOUND_FREETYPE=no
58240        fi
58241      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58242          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58243        # Found lib in isa dir, use that instead.
58244        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58245        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58246$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58247      fi
58248    fi
58249  fi
58250
58251  if test "x$FOUND_FREETYPE" = xyes; then
58252
58253  # Only process if variable expands to non-empty
58254
58255  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58257
58258  # Input might be given as Windows format, start by converting to
58259  # unix format.
58260  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58261  new_path=`$CYGPATH -u "$path"`
58262
58263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58266  # "foo.exe" is OK but "foo" is an error.
58267  #
58268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58269  # It is also a way to make sure we got the proper file name for the real test later on.
58270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58271  if test "x$test_shortpath" = x; then
58272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58273$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58274    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58275  fi
58276
58277  # Call helper function which possibly converts this using DOS-style short mode.
58278  # If so, the updated path is stored in $new_path.
58279
58280  input_path="$new_path"
58281  # Check if we need to convert this using DOS-style short mode. If the path
58282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58283  # take no chances and rewrite it.
58284  # Note: m4 eats our [], so we need to use [ and ] instead.
58285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58286  if test "x$has_forbidden_chars" != x; then
58287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58291      # Going to short mode and back again did indeed matter. Since short mode is
58292      # case insensitive, let's make it lowercase to improve readability.
58293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58294      # Now convert it back to Unix-style (cygpath)
58295      input_path=`$CYGPATH -u "$shortmode_path"`
58296      new_path="$input_path"
58297    fi
58298  fi
58299
58300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58301  if test "x$test_cygdrive_prefix" = x; then
58302    # As a simple fix, exclude /usr/bin since it's not a real path.
58303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58305      # a path prefixed by /cygdrive for fixpath to work.
58306      new_path="$CYGWIN_ROOT_PATH$input_path"
58307    fi
58308  fi
58309
58310
58311  if test "x$path" != "x$new_path"; then
58312    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58314$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58315  fi
58316
58317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58318
58319  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58320  has_colon=`$ECHO $path | $GREP ^.:`
58321  new_path="$path"
58322  if test "x$has_colon" = x; then
58323    # Not in mixed or Windows style, start by that.
58324    new_path=`cmd //c echo $path`
58325  fi
58326
58327
58328  input_path="$new_path"
58329  # Check if we need to convert this using DOS-style short mode. If the path
58330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58331  # take no chances and rewrite it.
58332  # Note: m4 eats our [], so we need to use [ and ] instead.
58333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58334  if test "x$has_forbidden_chars" != x; then
58335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58337  fi
58338
58339
58340  windows_path="$new_path"
58341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58342    unix_path=`$CYGPATH -u "$windows_path"`
58343    new_path="$unix_path"
58344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58346    new_path="$unix_path"
58347  fi
58348
58349  if test "x$path" != "x$new_path"; then
58350    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58352$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58353  fi
58354
58355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58357
58358    else
58359      # We're on a unix platform. Hooray! :)
58360      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58361      has_space=`$ECHO "$path" | $GREP " "`
58362      if test "x$has_space" != x; then
58363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58364$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58366      fi
58367
58368      # Use eval to expand a potential ~
58369      eval path="$path"
58370      if test ! -f "$path" && test ! -d "$path"; then
58371        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58372      fi
58373
58374      if test -d "$path"; then
58375        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58376      else
58377        dir="`$DIRNAME "$path"`"
58378        base="`$BASENAME "$path"`"
58379        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58380      fi
58381    fi
58382  fi
58383
58384
58385  # Only process if variable expands to non-empty
58386
58387  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58389
58390  # Input might be given as Windows format, start by converting to
58391  # unix format.
58392  path="$POTENTIAL_FREETYPE_LIB_PATH"
58393  new_path=`$CYGPATH -u "$path"`
58394
58395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58398  # "foo.exe" is OK but "foo" is an error.
58399  #
58400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58401  # It is also a way to make sure we got the proper file name for the real test later on.
58402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58403  if test "x$test_shortpath" = x; then
58404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58405$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58406    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58407  fi
58408
58409  # Call helper function which possibly converts this using DOS-style short mode.
58410  # If so, the updated path is stored in $new_path.
58411
58412  input_path="$new_path"
58413  # Check if we need to convert this using DOS-style short mode. If the path
58414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58415  # take no chances and rewrite it.
58416  # Note: m4 eats our [], so we need to use [ and ] instead.
58417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58418  if test "x$has_forbidden_chars" != x; then
58419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58423      # Going to short mode and back again did indeed matter. Since short mode is
58424      # case insensitive, let's make it lowercase to improve readability.
58425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58426      # Now convert it back to Unix-style (cygpath)
58427      input_path=`$CYGPATH -u "$shortmode_path"`
58428      new_path="$input_path"
58429    fi
58430  fi
58431
58432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58433  if test "x$test_cygdrive_prefix" = x; then
58434    # As a simple fix, exclude /usr/bin since it's not a real path.
58435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58437      # a path prefixed by /cygdrive for fixpath to work.
58438      new_path="$CYGWIN_ROOT_PATH$input_path"
58439    fi
58440  fi
58441
58442
58443  if test "x$path" != "x$new_path"; then
58444    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58447  fi
58448
58449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58450
58451  path="$POTENTIAL_FREETYPE_LIB_PATH"
58452  has_colon=`$ECHO $path | $GREP ^.:`
58453  new_path="$path"
58454  if test "x$has_colon" = x; then
58455    # Not in mixed or Windows style, start by that.
58456    new_path=`cmd //c echo $path`
58457  fi
58458
58459
58460  input_path="$new_path"
58461  # Check if we need to convert this using DOS-style short mode. If the path
58462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58463  # take no chances and rewrite it.
58464  # Note: m4 eats our [], so we need to use [ and ] instead.
58465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58466  if test "x$has_forbidden_chars" != x; then
58467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58469  fi
58470
58471
58472  windows_path="$new_path"
58473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58474    unix_path=`$CYGPATH -u "$windows_path"`
58475    new_path="$unix_path"
58476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58478    new_path="$unix_path"
58479  fi
58480
58481  if test "x$path" != "x$new_path"; then
58482    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58485  fi
58486
58487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58489
58490    else
58491      # We're on a unix platform. Hooray! :)
58492      path="$POTENTIAL_FREETYPE_LIB_PATH"
58493      has_space=`$ECHO "$path" | $GREP " "`
58494      if test "x$has_space" != x; then
58495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58498      fi
58499
58500      # Use eval to expand a potential ~
58501      eval path="$path"
58502      if test ! -f "$path" && test ! -d "$path"; then
58503        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58504      fi
58505
58506      if test -d "$path"; then
58507        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58508      else
58509        dir="`$DIRNAME "$path"`"
58510        base="`$BASENAME "$path"`"
58511        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58512      fi
58513    fi
58514  fi
58515
58516
58517    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58519$as_echo_n "checking for freetype includes... " >&6; }
58520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58521$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58522    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58524$as_echo_n "checking for freetype libraries... " >&6; }
58525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58526$as_echo "$FREETYPE_LIB_PATH" >&6; }
58527  fi
58528
58529          fi
58530          if test "x$FOUND_FREETYPE" != xyes; then
58531            FREETYPE_BASE_DIR="$HOME/freetype"
58532
58533  windows_path="$FREETYPE_BASE_DIR"
58534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58535    unix_path=`$CYGPATH -u "$windows_path"`
58536    FREETYPE_BASE_DIR="$unix_path"
58537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58539    FREETYPE_BASE_DIR="$unix_path"
58540  fi
58541
58542            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58543
58544  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58545  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58546  METHOD="well-known location"
58547
58548  # Let's start with an optimistic view of the world :-)
58549  FOUND_FREETYPE=yes
58550
58551  # First look for the canonical freetype main include file ft2build.h.
58552  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58553    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58554    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58555    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58556      # Fail.
58557      FOUND_FREETYPE=no
58558    fi
58559  fi
58560
58561  if test "x$FOUND_FREETYPE" = xyes; then
58562    # Include file found, let's continue the sanity check.
58563    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58564$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58565
58566    # Reset to default value
58567    FREETYPE_BASE_NAME=freetype
58568    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58569    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58570      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58571          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58572        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58573        # for the .6 version explicitly.
58574        FREETYPE_BASE_NAME=freetype.6
58575        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58576        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58577$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58578      else
58579        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58580$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58581        FOUND_FREETYPE=no
58582      fi
58583    else
58584      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58585        # On Windows, we will need both .lib and .dll file.
58586        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58587          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58588$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58589          FOUND_FREETYPE=no
58590        fi
58591      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58592          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58593        # Found lib in isa dir, use that instead.
58594        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58595        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58596$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58597      fi
58598    fi
58599  fi
58600
58601  if test "x$FOUND_FREETYPE" = xyes; then
58602
58603  # Only process if variable expands to non-empty
58604
58605  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58607
58608  # Input might be given as Windows format, start by converting to
58609  # unix format.
58610  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58611  new_path=`$CYGPATH -u "$path"`
58612
58613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58616  # "foo.exe" is OK but "foo" is an error.
58617  #
58618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58619  # It is also a way to make sure we got the proper file name for the real test later on.
58620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58621  if test "x$test_shortpath" = x; then
58622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58624    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58625  fi
58626
58627  # Call helper function which possibly converts this using DOS-style short mode.
58628  # If so, the updated path is stored in $new_path.
58629
58630  input_path="$new_path"
58631  # Check if we need to convert this using DOS-style short mode. If the path
58632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58633  # take no chances and rewrite it.
58634  # Note: m4 eats our [], so we need to use [ and ] instead.
58635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58636  if test "x$has_forbidden_chars" != x; then
58637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58641      # Going to short mode and back again did indeed matter. Since short mode is
58642      # case insensitive, let's make it lowercase to improve readability.
58643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58644      # Now convert it back to Unix-style (cygpath)
58645      input_path=`$CYGPATH -u "$shortmode_path"`
58646      new_path="$input_path"
58647    fi
58648  fi
58649
58650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58651  if test "x$test_cygdrive_prefix" = x; then
58652    # As a simple fix, exclude /usr/bin since it's not a real path.
58653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58655      # a path prefixed by /cygdrive for fixpath to work.
58656      new_path="$CYGWIN_ROOT_PATH$input_path"
58657    fi
58658  fi
58659
58660
58661  if test "x$path" != "x$new_path"; then
58662    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58665  fi
58666
58667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58668
58669  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58670  has_colon=`$ECHO $path | $GREP ^.:`
58671  new_path="$path"
58672  if test "x$has_colon" = x; then
58673    # Not in mixed or Windows style, start by that.
58674    new_path=`cmd //c echo $path`
58675  fi
58676
58677
58678  input_path="$new_path"
58679  # Check if we need to convert this using DOS-style short mode. If the path
58680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58681  # take no chances and rewrite it.
58682  # Note: m4 eats our [], so we need to use [ and ] instead.
58683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58684  if test "x$has_forbidden_chars" != x; then
58685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58687  fi
58688
58689
58690  windows_path="$new_path"
58691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58692    unix_path=`$CYGPATH -u "$windows_path"`
58693    new_path="$unix_path"
58694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58696    new_path="$unix_path"
58697  fi
58698
58699  if test "x$path" != "x$new_path"; then
58700    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58703  fi
58704
58705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58707
58708    else
58709      # We're on a unix platform. Hooray! :)
58710      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58711      has_space=`$ECHO "$path" | $GREP " "`
58712      if test "x$has_space" != x; then
58713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58714$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58716      fi
58717
58718      # Use eval to expand a potential ~
58719      eval path="$path"
58720      if test ! -f "$path" && test ! -d "$path"; then
58721        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58722      fi
58723
58724      if test -d "$path"; then
58725        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58726      else
58727        dir="`$DIRNAME "$path"`"
58728        base="`$BASENAME "$path"`"
58729        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58730      fi
58731    fi
58732  fi
58733
58734
58735  # Only process if variable expands to non-empty
58736
58737  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58739
58740  # Input might be given as Windows format, start by converting to
58741  # unix format.
58742  path="$POTENTIAL_FREETYPE_LIB_PATH"
58743  new_path=`$CYGPATH -u "$path"`
58744
58745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58748  # "foo.exe" is OK but "foo" is an error.
58749  #
58750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58751  # It is also a way to make sure we got the proper file name for the real test later on.
58752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58753  if test "x$test_shortpath" = x; then
58754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58755$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58756    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58757  fi
58758
58759  # Call helper function which possibly converts this using DOS-style short mode.
58760  # If so, the updated path is stored in $new_path.
58761
58762  input_path="$new_path"
58763  # Check if we need to convert this using DOS-style short mode. If the path
58764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58765  # take no chances and rewrite it.
58766  # Note: m4 eats our [], so we need to use [ and ] instead.
58767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58768  if test "x$has_forbidden_chars" != x; then
58769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58773      # Going to short mode and back again did indeed matter. Since short mode is
58774      # case insensitive, let's make it lowercase to improve readability.
58775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58776      # Now convert it back to Unix-style (cygpath)
58777      input_path=`$CYGPATH -u "$shortmode_path"`
58778      new_path="$input_path"
58779    fi
58780  fi
58781
58782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58783  if test "x$test_cygdrive_prefix" = x; then
58784    # As a simple fix, exclude /usr/bin since it's not a real path.
58785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58787      # a path prefixed by /cygdrive for fixpath to work.
58788      new_path="$CYGWIN_ROOT_PATH$input_path"
58789    fi
58790  fi
58791
58792
58793  if test "x$path" != "x$new_path"; then
58794    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58796$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58797  fi
58798
58799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58800
58801  path="$POTENTIAL_FREETYPE_LIB_PATH"
58802  has_colon=`$ECHO $path | $GREP ^.:`
58803  new_path="$path"
58804  if test "x$has_colon" = x; then
58805    # Not in mixed or Windows style, start by that.
58806    new_path=`cmd //c echo $path`
58807  fi
58808
58809
58810  input_path="$new_path"
58811  # Check if we need to convert this using DOS-style short mode. If the path
58812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58813  # take no chances and rewrite it.
58814  # Note: m4 eats our [], so we need to use [ and ] instead.
58815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58816  if test "x$has_forbidden_chars" != x; then
58817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58819  fi
58820
58821
58822  windows_path="$new_path"
58823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58824    unix_path=`$CYGPATH -u "$windows_path"`
58825    new_path="$unix_path"
58826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58828    new_path="$unix_path"
58829  fi
58830
58831  if test "x$path" != "x$new_path"; then
58832    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58835  fi
58836
58837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58839
58840    else
58841      # We're on a unix platform. Hooray! :)
58842      path="$POTENTIAL_FREETYPE_LIB_PATH"
58843      has_space=`$ECHO "$path" | $GREP " "`
58844      if test "x$has_space" != x; then
58845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58846$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58848      fi
58849
58850      # Use eval to expand a potential ~
58851      eval path="$path"
58852      if test ! -f "$path" && test ! -d "$path"; then
58853        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58854      fi
58855
58856      if test -d "$path"; then
58857        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58858      else
58859        dir="`$DIRNAME "$path"`"
58860        base="`$BASENAME "$path"`"
58861        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58862      fi
58863    fi
58864  fi
58865
58866
58867    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58869$as_echo_n "checking for freetype includes... " >&6; }
58870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58871$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58872    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58874$as_echo_n "checking for freetype libraries... " >&6; }
58875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58876$as_echo "$FREETYPE_LIB_PATH" >&6; }
58877  fi
58878
58879            else
58880
58881  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58882  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58883  METHOD="well-known location"
58884
58885  # Let's start with an optimistic view of the world :-)
58886  FOUND_FREETYPE=yes
58887
58888  # First look for the canonical freetype main include file ft2build.h.
58889  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58890    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58891    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58892    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58893      # Fail.
58894      FOUND_FREETYPE=no
58895    fi
58896  fi
58897
58898  if test "x$FOUND_FREETYPE" = xyes; then
58899    # Include file found, let's continue the sanity check.
58900    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58901$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58902
58903    # Reset to default value
58904    FREETYPE_BASE_NAME=freetype
58905    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58906    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58907      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58908          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58909        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58910        # for the .6 version explicitly.
58911        FREETYPE_BASE_NAME=freetype.6
58912        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58913        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58914$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58915      else
58916        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58917$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58918        FOUND_FREETYPE=no
58919      fi
58920    else
58921      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58922        # On Windows, we will need both .lib and .dll file.
58923        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58924          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58926          FOUND_FREETYPE=no
58927        fi
58928      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58929          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58930        # Found lib in isa dir, use that instead.
58931        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58932        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58933$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58934      fi
58935    fi
58936  fi
58937
58938  if test "x$FOUND_FREETYPE" = xyes; then
58939
58940  # Only process if variable expands to non-empty
58941
58942  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58944
58945  # Input might be given as Windows format, start by converting to
58946  # unix format.
58947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58948  new_path=`$CYGPATH -u "$path"`
58949
58950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58953  # "foo.exe" is OK but "foo" is an error.
58954  #
58955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58956  # It is also a way to make sure we got the proper file name for the real test later on.
58957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58958  if test "x$test_shortpath" = x; then
58959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58961    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58962  fi
58963
58964  # Call helper function which possibly converts this using DOS-style short mode.
58965  # If so, the updated path is stored in $new_path.
58966
58967  input_path="$new_path"
58968  # Check if we need to convert this using DOS-style short mode. If the path
58969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58970  # take no chances and rewrite it.
58971  # Note: m4 eats our [], so we need to use [ and ] instead.
58972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58973  if test "x$has_forbidden_chars" != x; then
58974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58978      # Going to short mode and back again did indeed matter. Since short mode is
58979      # case insensitive, let's make it lowercase to improve readability.
58980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58981      # Now convert it back to Unix-style (cygpath)
58982      input_path=`$CYGPATH -u "$shortmode_path"`
58983      new_path="$input_path"
58984    fi
58985  fi
58986
58987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58988  if test "x$test_cygdrive_prefix" = x; then
58989    # As a simple fix, exclude /usr/bin since it's not a real path.
58990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58992      # a path prefixed by /cygdrive for fixpath to work.
58993      new_path="$CYGWIN_ROOT_PATH$input_path"
58994    fi
58995  fi
58996
58997
58998  if test "x$path" != "x$new_path"; then
58999    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59002  fi
59003
59004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59005
59006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59007  has_colon=`$ECHO $path | $GREP ^.:`
59008  new_path="$path"
59009  if test "x$has_colon" = x; then
59010    # Not in mixed or Windows style, start by that.
59011    new_path=`cmd //c echo $path`
59012  fi
59013
59014
59015  input_path="$new_path"
59016  # Check if we need to convert this using DOS-style short mode. If the path
59017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59018  # take no chances and rewrite it.
59019  # Note: m4 eats our [], so we need to use [ and ] instead.
59020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59021  if test "x$has_forbidden_chars" != x; then
59022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59024  fi
59025
59026
59027  windows_path="$new_path"
59028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59029    unix_path=`$CYGPATH -u "$windows_path"`
59030    new_path="$unix_path"
59031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59033    new_path="$unix_path"
59034  fi
59035
59036  if test "x$path" != "x$new_path"; then
59037    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59040  fi
59041
59042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59044
59045    else
59046      # We're on a unix platform. Hooray! :)
59047      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59048      has_space=`$ECHO "$path" | $GREP " "`
59049      if test "x$has_space" != x; then
59050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59053      fi
59054
59055      # Use eval to expand a potential ~
59056      eval path="$path"
59057      if test ! -f "$path" && test ! -d "$path"; then
59058        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59059      fi
59060
59061      if test -d "$path"; then
59062        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59063      else
59064        dir="`$DIRNAME "$path"`"
59065        base="`$BASENAME "$path"`"
59066        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59067      fi
59068    fi
59069  fi
59070
59071
59072  # Only process if variable expands to non-empty
59073
59074  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59076
59077  # Input might be given as Windows format, start by converting to
59078  # unix format.
59079  path="$POTENTIAL_FREETYPE_LIB_PATH"
59080  new_path=`$CYGPATH -u "$path"`
59081
59082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59085  # "foo.exe" is OK but "foo" is an error.
59086  #
59087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59088  # It is also a way to make sure we got the proper file name for the real test later on.
59089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59090  if test "x$test_shortpath" = x; then
59091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59093    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59094  fi
59095
59096  # Call helper function which possibly converts this using DOS-style short mode.
59097  # If so, the updated path is stored in $new_path.
59098
59099  input_path="$new_path"
59100  # Check if we need to convert this using DOS-style short mode. If the path
59101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59102  # take no chances and rewrite it.
59103  # Note: m4 eats our [], so we need to use [ and ] instead.
59104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59105  if test "x$has_forbidden_chars" != x; then
59106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59110      # Going to short mode and back again did indeed matter. Since short mode is
59111      # case insensitive, let's make it lowercase to improve readability.
59112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59113      # Now convert it back to Unix-style (cygpath)
59114      input_path=`$CYGPATH -u "$shortmode_path"`
59115      new_path="$input_path"
59116    fi
59117  fi
59118
59119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59120  if test "x$test_cygdrive_prefix" = x; then
59121    # As a simple fix, exclude /usr/bin since it's not a real path.
59122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59124      # a path prefixed by /cygdrive for fixpath to work.
59125      new_path="$CYGWIN_ROOT_PATH$input_path"
59126    fi
59127  fi
59128
59129
59130  if test "x$path" != "x$new_path"; then
59131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59134  fi
59135
59136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59137
59138  path="$POTENTIAL_FREETYPE_LIB_PATH"
59139  has_colon=`$ECHO $path | $GREP ^.:`
59140  new_path="$path"
59141  if test "x$has_colon" = x; then
59142    # Not in mixed or Windows style, start by that.
59143    new_path=`cmd //c echo $path`
59144  fi
59145
59146
59147  input_path="$new_path"
59148  # Check if we need to convert this using DOS-style short mode. If the path
59149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59150  # take no chances and rewrite it.
59151  # Note: m4 eats our [], so we need to use [ and ] instead.
59152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59153  if test "x$has_forbidden_chars" != x; then
59154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59156  fi
59157
59158
59159  windows_path="$new_path"
59160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59161    unix_path=`$CYGPATH -u "$windows_path"`
59162    new_path="$unix_path"
59163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59165    new_path="$unix_path"
59166  fi
59167
59168  if test "x$path" != "x$new_path"; then
59169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59172  fi
59173
59174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59176
59177    else
59178      # We're on a unix platform. Hooray! :)
59179      path="$POTENTIAL_FREETYPE_LIB_PATH"
59180      has_space=`$ECHO "$path" | $GREP " "`
59181      if test "x$has_space" != x; then
59182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59184        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59185      fi
59186
59187      # Use eval to expand a potential ~
59188      eval path="$path"
59189      if test ! -f "$path" && test ! -d "$path"; then
59190        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59191      fi
59192
59193      if test -d "$path"; then
59194        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59195      else
59196        dir="`$DIRNAME "$path"`"
59197        base="`$BASENAME "$path"`"
59198        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59199      fi
59200    fi
59201  fi
59202
59203
59204    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59206$as_echo_n "checking for freetype includes... " >&6; }
59207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59208$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59209    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59211$as_echo_n "checking for freetype libraries... " >&6; }
59212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59213$as_echo "$FREETYPE_LIB_PATH" >&6; }
59214  fi
59215
59216            fi
59217            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59218                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59219              # Source is available, as a last resort try to build freetype in default location
59220
59221  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59222  BUILD_FREETYPE=yes
59223
59224  # Check if the freetype sources are acessible..
59225  if ! test -d $FREETYPE_SRC_PATH; then
59226    { $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
59227$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59228    BUILD_FREETYPE=no
59229  fi
59230  # ..and contain a vc2010 project file
59231  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59232  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59233    { $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
59234$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59235    BUILD_FREETYPE=no
59236  fi
59237  # Now check if configure found a version of 'msbuild.exe'
59238  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59239    { $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
59240$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;}
59241    BUILD_FREETYPE=no
59242  fi
59243
59244  # Ready to go..
59245  if test "x$BUILD_FREETYPE" = xyes; then
59246    # msbuild requires trailing slashes for output directories
59247    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59248    freetype_lib_path_unix="$freetype_lib_path"
59249    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59250
59251  unix_path="$vcxproj_path"
59252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59253    windows_path=`$CYGPATH -m "$unix_path"`
59254    vcxproj_path="$windows_path"
59255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59256    windows_path=`cmd //c echo $unix_path`
59257    vcxproj_path="$windows_path"
59258  fi
59259
59260
59261  unix_path="$freetype_lib_path"
59262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59263    windows_path=`$CYGPATH -m "$unix_path"`
59264    freetype_lib_path="$windows_path"
59265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59266    windows_path=`cmd //c echo $unix_path`
59267    freetype_lib_path="$windows_path"
59268  fi
59269
59270
59271  unix_path="$freetype_obj_path"
59272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59273    windows_path=`$CYGPATH -m "$unix_path"`
59274    freetype_obj_path="$windows_path"
59275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59276    windows_path=`cmd //c echo $unix_path`
59277    freetype_obj_path="$windows_path"
59278  fi
59279
59280    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59281      freetype_platform=x64
59282    else
59283      freetype_platform=win32
59284    fi
59285
59286    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59287    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59288    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59289    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59290    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59291$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59292
59293    # First we try to build the freetype.dll
59294    $ECHO -e "@echo off\n"\
59295        "$MSBUILD $vcxproj_path "\
59296        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59297        "/p:Configuration=\"Release Multithreaded\" "\
59298        "/p:Platform=$freetype_platform "\
59299        "/p:ConfigurationType=DynamicLibrary "\
59300        "/p:TargetName=freetype "\
59301        "/p:OutDir=\"$freetype_lib_path\" "\
59302        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59303    cmd /c freetype.bat
59304
59305    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59306      # If that succeeds we also build freetype.lib
59307      $ECHO -e "@echo off\n"\
59308          "$MSBUILD $vcxproj_path "\
59309          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59310          "/p:Configuration=\"Release Multithreaded\" "\
59311          "/p:Platform=$freetype_platform "\
59312          "/p:ConfigurationType=StaticLibrary "\
59313          "/p:TargetName=freetype "\
59314          "/p:OutDir=\"$freetype_lib_path\" "\
59315          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59316      cmd /c freetype.bat
59317
59318      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59319        # Once we build both, lib and dll, set freetype lib and include path appropriately
59320        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59321        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59322        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59323$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59324      else
59325        BUILD_FREETYPE=no
59326      fi
59327    else
59328      BUILD_FREETYPE=no
59329    fi
59330  fi
59331
59332              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59333
59334  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59335  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59336  METHOD="well-known location"
59337
59338  # Let's start with an optimistic view of the world :-)
59339  FOUND_FREETYPE=yes
59340
59341  # First look for the canonical freetype main include file ft2build.h.
59342  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59343    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59344    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59345    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59346      # Fail.
59347      FOUND_FREETYPE=no
59348    fi
59349  fi
59350
59351  if test "x$FOUND_FREETYPE" = xyes; then
59352    # Include file found, let's continue the sanity check.
59353    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59354$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59355
59356    # Reset to default value
59357    FREETYPE_BASE_NAME=freetype
59358    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59359    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59360      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59361          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59362        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59363        # for the .6 version explicitly.
59364        FREETYPE_BASE_NAME=freetype.6
59365        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59366        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59367$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59368      else
59369        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59370$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59371        FOUND_FREETYPE=no
59372      fi
59373    else
59374      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59375        # On Windows, we will need both .lib and .dll file.
59376        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59377          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59378$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59379          FOUND_FREETYPE=no
59380        fi
59381      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59382          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59383        # Found lib in isa dir, use that instead.
59384        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59385        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59386$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59387      fi
59388    fi
59389  fi
59390
59391  if test "x$FOUND_FREETYPE" = xyes; then
59392
59393  # Only process if variable expands to non-empty
59394
59395  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59397
59398  # Input might be given as Windows format, start by converting to
59399  # unix format.
59400  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59401  new_path=`$CYGPATH -u "$path"`
59402
59403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59406  # "foo.exe" is OK but "foo" is an error.
59407  #
59408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59409  # It is also a way to make sure we got the proper file name for the real test later on.
59410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59411  if test "x$test_shortpath" = x; then
59412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59414    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59415  fi
59416
59417  # Call helper function which possibly converts this using DOS-style short mode.
59418  # If so, the updated path is stored in $new_path.
59419
59420  input_path="$new_path"
59421  # Check if we need to convert this using DOS-style short mode. If the path
59422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59423  # take no chances and rewrite it.
59424  # Note: m4 eats our [], so we need to use [ and ] instead.
59425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59426  if test "x$has_forbidden_chars" != x; then
59427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59431      # Going to short mode and back again did indeed matter. Since short mode is
59432      # case insensitive, let's make it lowercase to improve readability.
59433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59434      # Now convert it back to Unix-style (cygpath)
59435      input_path=`$CYGPATH -u "$shortmode_path"`
59436      new_path="$input_path"
59437    fi
59438  fi
59439
59440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59441  if test "x$test_cygdrive_prefix" = x; then
59442    # As a simple fix, exclude /usr/bin since it's not a real path.
59443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59445      # a path prefixed by /cygdrive for fixpath to work.
59446      new_path="$CYGWIN_ROOT_PATH$input_path"
59447    fi
59448  fi
59449
59450
59451  if test "x$path" != "x$new_path"; then
59452    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59455  fi
59456
59457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59458
59459  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59460  has_colon=`$ECHO $path | $GREP ^.:`
59461  new_path="$path"
59462  if test "x$has_colon" = x; then
59463    # Not in mixed or Windows style, start by that.
59464    new_path=`cmd //c echo $path`
59465  fi
59466
59467
59468  input_path="$new_path"
59469  # Check if we need to convert this using DOS-style short mode. If the path
59470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59471  # take no chances and rewrite it.
59472  # Note: m4 eats our [], so we need to use [ and ] instead.
59473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59474  if test "x$has_forbidden_chars" != x; then
59475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59477  fi
59478
59479
59480  windows_path="$new_path"
59481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59482    unix_path=`$CYGPATH -u "$windows_path"`
59483    new_path="$unix_path"
59484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59486    new_path="$unix_path"
59487  fi
59488
59489  if test "x$path" != "x$new_path"; then
59490    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59493  fi
59494
59495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59497
59498    else
59499      # We're on a unix platform. Hooray! :)
59500      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59501      has_space=`$ECHO "$path" | $GREP " "`
59502      if test "x$has_space" != x; then
59503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59506      fi
59507
59508      # Use eval to expand a potential ~
59509      eval path="$path"
59510      if test ! -f "$path" && test ! -d "$path"; then
59511        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59512      fi
59513
59514      if test -d "$path"; then
59515        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59516      else
59517        dir="`$DIRNAME "$path"`"
59518        base="`$BASENAME "$path"`"
59519        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59520      fi
59521    fi
59522  fi
59523
59524
59525  # Only process if variable expands to non-empty
59526
59527  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59529
59530  # Input might be given as Windows format, start by converting to
59531  # unix format.
59532  path="$POTENTIAL_FREETYPE_LIB_PATH"
59533  new_path=`$CYGPATH -u "$path"`
59534
59535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59538  # "foo.exe" is OK but "foo" is an error.
59539  #
59540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59541  # It is also a way to make sure we got the proper file name for the real test later on.
59542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59543  if test "x$test_shortpath" = x; then
59544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59545$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59546    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59547  fi
59548
59549  # Call helper function which possibly converts this using DOS-style short mode.
59550  # If so, the updated path is stored in $new_path.
59551
59552  input_path="$new_path"
59553  # Check if we need to convert this using DOS-style short mode. If the path
59554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59555  # take no chances and rewrite it.
59556  # Note: m4 eats our [], so we need to use [ and ] instead.
59557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59558  if test "x$has_forbidden_chars" != x; then
59559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59563      # Going to short mode and back again did indeed matter. Since short mode is
59564      # case insensitive, let's make it lowercase to improve readability.
59565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59566      # Now convert it back to Unix-style (cygpath)
59567      input_path=`$CYGPATH -u "$shortmode_path"`
59568      new_path="$input_path"
59569    fi
59570  fi
59571
59572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59573  if test "x$test_cygdrive_prefix" = x; then
59574    # As a simple fix, exclude /usr/bin since it's not a real path.
59575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59577      # a path prefixed by /cygdrive for fixpath to work.
59578      new_path="$CYGWIN_ROOT_PATH$input_path"
59579    fi
59580  fi
59581
59582
59583  if test "x$path" != "x$new_path"; then
59584    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59586$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59587  fi
59588
59589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59590
59591  path="$POTENTIAL_FREETYPE_LIB_PATH"
59592  has_colon=`$ECHO $path | $GREP ^.:`
59593  new_path="$path"
59594  if test "x$has_colon" = x; then
59595    # Not in mixed or Windows style, start by that.
59596    new_path=`cmd //c echo $path`
59597  fi
59598
59599
59600  input_path="$new_path"
59601  # Check if we need to convert this using DOS-style short mode. If the path
59602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59603  # take no chances and rewrite it.
59604  # Note: m4 eats our [], so we need to use [ and ] instead.
59605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59606  if test "x$has_forbidden_chars" != x; then
59607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59609  fi
59610
59611
59612  windows_path="$new_path"
59613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59614    unix_path=`$CYGPATH -u "$windows_path"`
59615    new_path="$unix_path"
59616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59618    new_path="$unix_path"
59619  fi
59620
59621  if test "x$path" != "x$new_path"; then
59622    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59625  fi
59626
59627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59629
59630    else
59631      # We're on a unix platform. Hooray! :)
59632      path="$POTENTIAL_FREETYPE_LIB_PATH"
59633      has_space=`$ECHO "$path" | $GREP " "`
59634      if test "x$has_space" != x; then
59635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59636$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59638      fi
59639
59640      # Use eval to expand a potential ~
59641      eval path="$path"
59642      if test ! -f "$path" && test ! -d "$path"; then
59643        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59644      fi
59645
59646      if test -d "$path"; then
59647        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59648      else
59649        dir="`$DIRNAME "$path"`"
59650        base="`$BASENAME "$path"`"
59651        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59652      fi
59653    fi
59654  fi
59655
59656
59657    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59659$as_echo_n "checking for freetype includes... " >&6; }
59660    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59661$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59662    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59664$as_echo_n "checking for freetype libraries... " >&6; }
59665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59666$as_echo "$FREETYPE_LIB_PATH" >&6; }
59667  fi
59668
59669              else
59670
59671  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59672  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59673  METHOD="well-known location"
59674
59675  # Let's start with an optimistic view of the world :-)
59676  FOUND_FREETYPE=yes
59677
59678  # First look for the canonical freetype main include file ft2build.h.
59679  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59680    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59681    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59682    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59683      # Fail.
59684      FOUND_FREETYPE=no
59685    fi
59686  fi
59687
59688  if test "x$FOUND_FREETYPE" = xyes; then
59689    # Include file found, let's continue the sanity check.
59690    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59691$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59692
59693    # Reset to default value
59694    FREETYPE_BASE_NAME=freetype
59695    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59696    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59697      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59698          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59699        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59700        # for the .6 version explicitly.
59701        FREETYPE_BASE_NAME=freetype.6
59702        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59703        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59704$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59705      else
59706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59707$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59708        FOUND_FREETYPE=no
59709      fi
59710    else
59711      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59712        # On Windows, we will need both .lib and .dll file.
59713        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59714          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59716          FOUND_FREETYPE=no
59717        fi
59718      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59720        # Found lib in isa dir, use that instead.
59721        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59722        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59723$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59724      fi
59725    fi
59726  fi
59727
59728  if test "x$FOUND_FREETYPE" = xyes; then
59729
59730  # Only process if variable expands to non-empty
59731
59732  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59734
59735  # Input might be given as Windows format, start by converting to
59736  # unix format.
59737  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59738  new_path=`$CYGPATH -u "$path"`
59739
59740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59743  # "foo.exe" is OK but "foo" is an error.
59744  #
59745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59746  # It is also a way to make sure we got the proper file name for the real test later on.
59747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59748  if test "x$test_shortpath" = x; then
59749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59752  fi
59753
59754  # Call helper function which possibly converts this using DOS-style short mode.
59755  # If so, the updated path is stored in $new_path.
59756
59757  input_path="$new_path"
59758  # Check if we need to convert this using DOS-style short mode. If the path
59759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59760  # take no chances and rewrite it.
59761  # Note: m4 eats our [], so we need to use [ and ] instead.
59762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59763  if test "x$has_forbidden_chars" != x; then
59764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59768      # Going to short mode and back again did indeed matter. Since short mode is
59769      # case insensitive, let's make it lowercase to improve readability.
59770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59771      # Now convert it back to Unix-style (cygpath)
59772      input_path=`$CYGPATH -u "$shortmode_path"`
59773      new_path="$input_path"
59774    fi
59775  fi
59776
59777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59778  if test "x$test_cygdrive_prefix" = x; then
59779    # As a simple fix, exclude /usr/bin since it's not a real path.
59780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59782      # a path prefixed by /cygdrive for fixpath to work.
59783      new_path="$CYGWIN_ROOT_PATH$input_path"
59784    fi
59785  fi
59786
59787
59788  if test "x$path" != "x$new_path"; then
59789    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59792  fi
59793
59794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59795
59796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59797  has_colon=`$ECHO $path | $GREP ^.:`
59798  new_path="$path"
59799  if test "x$has_colon" = x; then
59800    # Not in mixed or Windows style, start by that.
59801    new_path=`cmd //c echo $path`
59802  fi
59803
59804
59805  input_path="$new_path"
59806  # Check if we need to convert this using DOS-style short mode. If the path
59807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59808  # take no chances and rewrite it.
59809  # Note: m4 eats our [], so we need to use [ and ] instead.
59810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59811  if test "x$has_forbidden_chars" != x; then
59812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59814  fi
59815
59816
59817  windows_path="$new_path"
59818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59819    unix_path=`$CYGPATH -u "$windows_path"`
59820    new_path="$unix_path"
59821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59823    new_path="$unix_path"
59824  fi
59825
59826  if test "x$path" != "x$new_path"; then
59827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59830  fi
59831
59832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59834
59835    else
59836      # We're on a unix platform. Hooray! :)
59837      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59838      has_space=`$ECHO "$path" | $GREP " "`
59839      if test "x$has_space" != x; then
59840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59843      fi
59844
59845      # Use eval to expand a potential ~
59846      eval path="$path"
59847      if test ! -f "$path" && test ! -d "$path"; then
59848        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59849      fi
59850
59851      if test -d "$path"; then
59852        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59853      else
59854        dir="`$DIRNAME "$path"`"
59855        base="`$BASENAME "$path"`"
59856        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59857      fi
59858    fi
59859  fi
59860
59861
59862  # Only process if variable expands to non-empty
59863
59864  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59866
59867  # Input might be given as Windows format, start by converting to
59868  # unix format.
59869  path="$POTENTIAL_FREETYPE_LIB_PATH"
59870  new_path=`$CYGPATH -u "$path"`
59871
59872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59875  # "foo.exe" is OK but "foo" is an error.
59876  #
59877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59878  # It is also a way to make sure we got the proper file name for the real test later on.
59879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59880  if test "x$test_shortpath" = x; then
59881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59882$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59883    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59884  fi
59885
59886  # Call helper function which possibly converts this using DOS-style short mode.
59887  # If so, the updated path is stored in $new_path.
59888
59889  input_path="$new_path"
59890  # Check if we need to convert this using DOS-style short mode. If the path
59891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59892  # take no chances and rewrite it.
59893  # Note: m4 eats our [], so we need to use [ and ] instead.
59894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59895  if test "x$has_forbidden_chars" != x; then
59896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59900      # Going to short mode and back again did indeed matter. Since short mode is
59901      # case insensitive, let's make it lowercase to improve readability.
59902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59903      # Now convert it back to Unix-style (cygpath)
59904      input_path=`$CYGPATH -u "$shortmode_path"`
59905      new_path="$input_path"
59906    fi
59907  fi
59908
59909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59910  if test "x$test_cygdrive_prefix" = x; then
59911    # As a simple fix, exclude /usr/bin since it's not a real path.
59912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59914      # a path prefixed by /cygdrive for fixpath to work.
59915      new_path="$CYGWIN_ROOT_PATH$input_path"
59916    fi
59917  fi
59918
59919
59920  if test "x$path" != "x$new_path"; then
59921    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59924  fi
59925
59926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59927
59928  path="$POTENTIAL_FREETYPE_LIB_PATH"
59929  has_colon=`$ECHO $path | $GREP ^.:`
59930  new_path="$path"
59931  if test "x$has_colon" = x; then
59932    # Not in mixed or Windows style, start by that.
59933    new_path=`cmd //c echo $path`
59934  fi
59935
59936
59937  input_path="$new_path"
59938  # Check if we need to convert this using DOS-style short mode. If the path
59939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59940  # take no chances and rewrite it.
59941  # Note: m4 eats our [], so we need to use [ and ] instead.
59942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59943  if test "x$has_forbidden_chars" != x; then
59944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59946  fi
59947
59948
59949  windows_path="$new_path"
59950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59951    unix_path=`$CYGPATH -u "$windows_path"`
59952    new_path="$unix_path"
59953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59955    new_path="$unix_path"
59956  fi
59957
59958  if test "x$path" != "x$new_path"; then
59959    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59962  fi
59963
59964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59966
59967    else
59968      # We're on a unix platform. Hooray! :)
59969      path="$POTENTIAL_FREETYPE_LIB_PATH"
59970      has_space=`$ECHO "$path" | $GREP " "`
59971      if test "x$has_space" != x; then
59972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59975      fi
59976
59977      # Use eval to expand a potential ~
59978      eval path="$path"
59979      if test ! -f "$path" && test ! -d "$path"; then
59980        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59981      fi
59982
59983      if test -d "$path"; then
59984        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59985      else
59986        dir="`$DIRNAME "$path"`"
59987        base="`$BASENAME "$path"`"
59988        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59989      fi
59990    fi
59991  fi
59992
59993
59994    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59996$as_echo_n "checking for freetype includes... " >&6; }
59997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59998$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59999    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60001$as_echo_n "checking for freetype libraries... " >&6; }
60002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60003$as_echo "$FREETYPE_LIB_PATH" >&6; }
60004  fi
60005
60006              fi
60007            fi
60008          fi
60009        else
60010          FREETYPE_BASE_DIR="$SYSROOT/usr"
60011
60012  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60013  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60014  METHOD="well-known location"
60015
60016  # Let's start with an optimistic view of the world :-)
60017  FOUND_FREETYPE=yes
60018
60019  # First look for the canonical freetype main include file ft2build.h.
60020  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60021    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60022    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60023    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60024      # Fail.
60025      FOUND_FREETYPE=no
60026    fi
60027  fi
60028
60029  if test "x$FOUND_FREETYPE" = xyes; then
60030    # Include file found, let's continue the sanity check.
60031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60032$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60033
60034    # Reset to default value
60035    FREETYPE_BASE_NAME=freetype
60036    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60037    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60038      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60039          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60040        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60041        # for the .6 version explicitly.
60042        FREETYPE_BASE_NAME=freetype.6
60043        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60044        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60045$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60046      else
60047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60048$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60049        FOUND_FREETYPE=no
60050      fi
60051    else
60052      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60053        # On Windows, we will need both .lib and .dll file.
60054        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60055          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60056$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60057          FOUND_FREETYPE=no
60058        fi
60059      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60060          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60061        # Found lib in isa dir, use that instead.
60062        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60063        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60064$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60065      fi
60066    fi
60067  fi
60068
60069  if test "x$FOUND_FREETYPE" = xyes; then
60070
60071  # Only process if variable expands to non-empty
60072
60073  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60075
60076  # Input might be given as Windows format, start by converting to
60077  # unix format.
60078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60079  new_path=`$CYGPATH -u "$path"`
60080
60081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60084  # "foo.exe" is OK but "foo" is an error.
60085  #
60086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60087  # It is also a way to make sure we got the proper file name for the real test later on.
60088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60089  if test "x$test_shortpath" = x; then
60090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60093  fi
60094
60095  # Call helper function which possibly converts this using DOS-style short mode.
60096  # If so, the updated path is stored in $new_path.
60097
60098  input_path="$new_path"
60099  # Check if we need to convert this using DOS-style short mode. If the path
60100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60101  # take no chances and rewrite it.
60102  # Note: m4 eats our [], so we need to use [ and ] instead.
60103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60104  if test "x$has_forbidden_chars" != x; then
60105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60109      # Going to short mode and back again did indeed matter. Since short mode is
60110      # case insensitive, let's make it lowercase to improve readability.
60111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60112      # Now convert it back to Unix-style (cygpath)
60113      input_path=`$CYGPATH -u "$shortmode_path"`
60114      new_path="$input_path"
60115    fi
60116  fi
60117
60118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60119  if test "x$test_cygdrive_prefix" = x; then
60120    # As a simple fix, exclude /usr/bin since it's not a real path.
60121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60123      # a path prefixed by /cygdrive for fixpath to work.
60124      new_path="$CYGWIN_ROOT_PATH$input_path"
60125    fi
60126  fi
60127
60128
60129  if test "x$path" != "x$new_path"; then
60130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60133  fi
60134
60135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60136
60137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60138  has_colon=`$ECHO $path | $GREP ^.:`
60139  new_path="$path"
60140  if test "x$has_colon" = x; then
60141    # Not in mixed or Windows style, start by that.
60142    new_path=`cmd //c echo $path`
60143  fi
60144
60145
60146  input_path="$new_path"
60147  # Check if we need to convert this using DOS-style short mode. If the path
60148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60149  # take no chances and rewrite it.
60150  # Note: m4 eats our [], so we need to use [ and ] instead.
60151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60152  if test "x$has_forbidden_chars" != x; then
60153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60155  fi
60156
60157
60158  windows_path="$new_path"
60159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60160    unix_path=`$CYGPATH -u "$windows_path"`
60161    new_path="$unix_path"
60162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60164    new_path="$unix_path"
60165  fi
60166
60167  if test "x$path" != "x$new_path"; then
60168    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60171  fi
60172
60173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60175
60176    else
60177      # We're on a unix platform. Hooray! :)
60178      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60179      has_space=`$ECHO "$path" | $GREP " "`
60180      if test "x$has_space" != x; then
60181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60184      fi
60185
60186      # Use eval to expand a potential ~
60187      eval path="$path"
60188      if test ! -f "$path" && test ! -d "$path"; then
60189        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60190      fi
60191
60192      if test -d "$path"; then
60193        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60194      else
60195        dir="`$DIRNAME "$path"`"
60196        base="`$BASENAME "$path"`"
60197        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60198      fi
60199    fi
60200  fi
60201
60202
60203  # Only process if variable expands to non-empty
60204
60205  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60207
60208  # Input might be given as Windows format, start by converting to
60209  # unix format.
60210  path="$POTENTIAL_FREETYPE_LIB_PATH"
60211  new_path=`$CYGPATH -u "$path"`
60212
60213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60216  # "foo.exe" is OK but "foo" is an error.
60217  #
60218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60219  # It is also a way to make sure we got the proper file name for the real test later on.
60220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60221  if test "x$test_shortpath" = x; then
60222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60225  fi
60226
60227  # Call helper function which possibly converts this using DOS-style short mode.
60228  # If so, the updated path is stored in $new_path.
60229
60230  input_path="$new_path"
60231  # Check if we need to convert this using DOS-style short mode. If the path
60232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60233  # take no chances and rewrite it.
60234  # Note: m4 eats our [], so we need to use [ and ] instead.
60235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60236  if test "x$has_forbidden_chars" != x; then
60237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60241      # Going to short mode and back again did indeed matter. Since short mode is
60242      # case insensitive, let's make it lowercase to improve readability.
60243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60244      # Now convert it back to Unix-style (cygpath)
60245      input_path=`$CYGPATH -u "$shortmode_path"`
60246      new_path="$input_path"
60247    fi
60248  fi
60249
60250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60251  if test "x$test_cygdrive_prefix" = x; then
60252    # As a simple fix, exclude /usr/bin since it's not a real path.
60253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60255      # a path prefixed by /cygdrive for fixpath to work.
60256      new_path="$CYGWIN_ROOT_PATH$input_path"
60257    fi
60258  fi
60259
60260
60261  if test "x$path" != "x$new_path"; then
60262    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60265  fi
60266
60267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60268
60269  path="$POTENTIAL_FREETYPE_LIB_PATH"
60270  has_colon=`$ECHO $path | $GREP ^.:`
60271  new_path="$path"
60272  if test "x$has_colon" = x; then
60273    # Not in mixed or Windows style, start by that.
60274    new_path=`cmd //c echo $path`
60275  fi
60276
60277
60278  input_path="$new_path"
60279  # Check if we need to convert this using DOS-style short mode. If the path
60280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60281  # take no chances and rewrite it.
60282  # Note: m4 eats our [], so we need to use [ and ] instead.
60283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60284  if test "x$has_forbidden_chars" != x; then
60285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60287  fi
60288
60289
60290  windows_path="$new_path"
60291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60292    unix_path=`$CYGPATH -u "$windows_path"`
60293    new_path="$unix_path"
60294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60296    new_path="$unix_path"
60297  fi
60298
60299  if test "x$path" != "x$new_path"; then
60300    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60303  fi
60304
60305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60307
60308    else
60309      # We're on a unix platform. Hooray! :)
60310      path="$POTENTIAL_FREETYPE_LIB_PATH"
60311      has_space=`$ECHO "$path" | $GREP " "`
60312      if test "x$has_space" != x; then
60313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60316      fi
60317
60318      # Use eval to expand a potential ~
60319      eval path="$path"
60320      if test ! -f "$path" && test ! -d "$path"; then
60321        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60322      fi
60323
60324      if test -d "$path"; then
60325        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60326      else
60327        dir="`$DIRNAME "$path"`"
60328        base="`$BASENAME "$path"`"
60329        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60330      fi
60331    fi
60332  fi
60333
60334
60335    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60337$as_echo_n "checking for freetype includes... " >&6; }
60338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60339$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60340    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60342$as_echo_n "checking for freetype libraries... " >&6; }
60343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60344$as_echo "$FREETYPE_LIB_PATH" >&6; }
60345  fi
60346
60347
60348          if test "x$FOUND_FREETYPE" != xyes; then
60349            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60350
60351  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60352  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60353  METHOD="well-known location"
60354
60355  # Let's start with an optimistic view of the world :-)
60356  FOUND_FREETYPE=yes
60357
60358  # First look for the canonical freetype main include file ft2build.h.
60359  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60360    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60361    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60362    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60363      # Fail.
60364      FOUND_FREETYPE=no
60365    fi
60366  fi
60367
60368  if test "x$FOUND_FREETYPE" = xyes; then
60369    # Include file found, let's continue the sanity check.
60370    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60371$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60372
60373    # Reset to default value
60374    FREETYPE_BASE_NAME=freetype
60375    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60376    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60377      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60378          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60379        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60380        # for the .6 version explicitly.
60381        FREETYPE_BASE_NAME=freetype.6
60382        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60383        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60384$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60385      else
60386        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60387$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60388        FOUND_FREETYPE=no
60389      fi
60390    else
60391      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60392        # On Windows, we will need both .lib and .dll file.
60393        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60394          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60395$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60396          FOUND_FREETYPE=no
60397        fi
60398      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60399          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60400        # Found lib in isa dir, use that instead.
60401        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60402        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60403$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60404      fi
60405    fi
60406  fi
60407
60408  if test "x$FOUND_FREETYPE" = xyes; then
60409
60410  # Only process if variable expands to non-empty
60411
60412  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60414
60415  # Input might be given as Windows format, start by converting to
60416  # unix format.
60417  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60418  new_path=`$CYGPATH -u "$path"`
60419
60420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60423  # "foo.exe" is OK but "foo" is an error.
60424  #
60425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60426  # It is also a way to make sure we got the proper file name for the real test later on.
60427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60428  if test "x$test_shortpath" = x; then
60429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60430$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60431    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60432  fi
60433
60434  # Call helper function which possibly converts this using DOS-style short mode.
60435  # If so, the updated path is stored in $new_path.
60436
60437  input_path="$new_path"
60438  # Check if we need to convert this using DOS-style short mode. If the path
60439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60440  # take no chances and rewrite it.
60441  # Note: m4 eats our [], so we need to use [ and ] instead.
60442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60443  if test "x$has_forbidden_chars" != x; then
60444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60448      # Going to short mode and back again did indeed matter. Since short mode is
60449      # case insensitive, let's make it lowercase to improve readability.
60450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60451      # Now convert it back to Unix-style (cygpath)
60452      input_path=`$CYGPATH -u "$shortmode_path"`
60453      new_path="$input_path"
60454    fi
60455  fi
60456
60457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60458  if test "x$test_cygdrive_prefix" = x; then
60459    # As a simple fix, exclude /usr/bin since it's not a real path.
60460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60462      # a path prefixed by /cygdrive for fixpath to work.
60463      new_path="$CYGWIN_ROOT_PATH$input_path"
60464    fi
60465  fi
60466
60467
60468  if test "x$path" != "x$new_path"; then
60469    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60471$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60472  fi
60473
60474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60475
60476  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60477  has_colon=`$ECHO $path | $GREP ^.:`
60478  new_path="$path"
60479  if test "x$has_colon" = x; then
60480    # Not in mixed or Windows style, start by that.
60481    new_path=`cmd //c echo $path`
60482  fi
60483
60484
60485  input_path="$new_path"
60486  # Check if we need to convert this using DOS-style short mode. If the path
60487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60488  # take no chances and rewrite it.
60489  # Note: m4 eats our [], so we need to use [ and ] instead.
60490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60491  if test "x$has_forbidden_chars" != x; then
60492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60494  fi
60495
60496
60497  windows_path="$new_path"
60498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60499    unix_path=`$CYGPATH -u "$windows_path"`
60500    new_path="$unix_path"
60501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60503    new_path="$unix_path"
60504  fi
60505
60506  if test "x$path" != "x$new_path"; then
60507    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60510  fi
60511
60512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60514
60515    else
60516      # We're on a unix platform. Hooray! :)
60517      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60518      has_space=`$ECHO "$path" | $GREP " "`
60519      if test "x$has_space" != x; then
60520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60521$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60523      fi
60524
60525      # Use eval to expand a potential ~
60526      eval path="$path"
60527      if test ! -f "$path" && test ! -d "$path"; then
60528        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60529      fi
60530
60531      if test -d "$path"; then
60532        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60533      else
60534        dir="`$DIRNAME "$path"`"
60535        base="`$BASENAME "$path"`"
60536        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60537      fi
60538    fi
60539  fi
60540
60541
60542  # Only process if variable expands to non-empty
60543
60544  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60546
60547  # Input might be given as Windows format, start by converting to
60548  # unix format.
60549  path="$POTENTIAL_FREETYPE_LIB_PATH"
60550  new_path=`$CYGPATH -u "$path"`
60551
60552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60555  # "foo.exe" is OK but "foo" is an error.
60556  #
60557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60558  # It is also a way to make sure we got the proper file name for the real test later on.
60559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60560  if test "x$test_shortpath" = x; then
60561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60563    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60564  fi
60565
60566  # Call helper function which possibly converts this using DOS-style short mode.
60567  # If so, the updated path is stored in $new_path.
60568
60569  input_path="$new_path"
60570  # Check if we need to convert this using DOS-style short mode. If the path
60571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60572  # take no chances and rewrite it.
60573  # Note: m4 eats our [], so we need to use [ and ] instead.
60574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60575  if test "x$has_forbidden_chars" != x; then
60576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60580      # Going to short mode and back again did indeed matter. Since short mode is
60581      # case insensitive, let's make it lowercase to improve readability.
60582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60583      # Now convert it back to Unix-style (cygpath)
60584      input_path=`$CYGPATH -u "$shortmode_path"`
60585      new_path="$input_path"
60586    fi
60587  fi
60588
60589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60590  if test "x$test_cygdrive_prefix" = x; then
60591    # As a simple fix, exclude /usr/bin since it's not a real path.
60592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60594      # a path prefixed by /cygdrive for fixpath to work.
60595      new_path="$CYGWIN_ROOT_PATH$input_path"
60596    fi
60597  fi
60598
60599
60600  if test "x$path" != "x$new_path"; then
60601    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60604  fi
60605
60606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60607
60608  path="$POTENTIAL_FREETYPE_LIB_PATH"
60609  has_colon=`$ECHO $path | $GREP ^.:`
60610  new_path="$path"
60611  if test "x$has_colon" = x; then
60612    # Not in mixed or Windows style, start by that.
60613    new_path=`cmd //c echo $path`
60614  fi
60615
60616
60617  input_path="$new_path"
60618  # Check if we need to convert this using DOS-style short mode. If the path
60619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60620  # take no chances and rewrite it.
60621  # Note: m4 eats our [], so we need to use [ and ] instead.
60622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60623  if test "x$has_forbidden_chars" != x; then
60624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60626  fi
60627
60628
60629  windows_path="$new_path"
60630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60631    unix_path=`$CYGPATH -u "$windows_path"`
60632    new_path="$unix_path"
60633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60635    new_path="$unix_path"
60636  fi
60637
60638  if test "x$path" != "x$new_path"; then
60639    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60642  fi
60643
60644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60646
60647    else
60648      # We're on a unix platform. Hooray! :)
60649      path="$POTENTIAL_FREETYPE_LIB_PATH"
60650      has_space=`$ECHO "$path" | $GREP " "`
60651      if test "x$has_space" != x; then
60652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60655      fi
60656
60657      # Use eval to expand a potential ~
60658      eval path="$path"
60659      if test ! -f "$path" && test ! -d "$path"; then
60660        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60661      fi
60662
60663      if test -d "$path"; then
60664        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60665      else
60666        dir="`$DIRNAME "$path"`"
60667        base="`$BASENAME "$path"`"
60668        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60669      fi
60670    fi
60671  fi
60672
60673
60674    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60676$as_echo_n "checking for freetype includes... " >&6; }
60677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60678$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60679    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60681$as_echo_n "checking for freetype libraries... " >&6; }
60682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60683$as_echo "$FREETYPE_LIB_PATH" >&6; }
60684  fi
60685
60686          fi
60687
60688          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60689            if test "x$FOUND_FREETYPE" != xyes; then
60690              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60691              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60692
60693  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60694  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60695  METHOD="well-known location"
60696
60697  # Let's start with an optimistic view of the world :-)
60698  FOUND_FREETYPE=yes
60699
60700  # First look for the canonical freetype main include file ft2build.h.
60701  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60702    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60703    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60704    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60705      # Fail.
60706      FOUND_FREETYPE=no
60707    fi
60708  fi
60709
60710  if test "x$FOUND_FREETYPE" = xyes; then
60711    # Include file found, let's continue the sanity check.
60712    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60713$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60714
60715    # Reset to default value
60716    FREETYPE_BASE_NAME=freetype
60717    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60718    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60719      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60720          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60721        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60722        # for the .6 version explicitly.
60723        FREETYPE_BASE_NAME=freetype.6
60724        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60725        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60726$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60727      else
60728        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60729$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60730        FOUND_FREETYPE=no
60731      fi
60732    else
60733      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60734        # On Windows, we will need both .lib and .dll file.
60735        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60736          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60737$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60738          FOUND_FREETYPE=no
60739        fi
60740      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60741          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60742        # Found lib in isa dir, use that instead.
60743        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60744        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60745$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60746      fi
60747    fi
60748  fi
60749
60750  if test "x$FOUND_FREETYPE" = xyes; then
60751
60752  # Only process if variable expands to non-empty
60753
60754  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60756
60757  # Input might be given as Windows format, start by converting to
60758  # unix format.
60759  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60760  new_path=`$CYGPATH -u "$path"`
60761
60762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60765  # "foo.exe" is OK but "foo" is an error.
60766  #
60767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60768  # It is also a way to make sure we got the proper file name for the real test later on.
60769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60770  if test "x$test_shortpath" = x; then
60771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60773    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60774  fi
60775
60776  # Call helper function which possibly converts this using DOS-style short mode.
60777  # If so, the updated path is stored in $new_path.
60778
60779  input_path="$new_path"
60780  # Check if we need to convert this using DOS-style short mode. If the path
60781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60782  # take no chances and rewrite it.
60783  # Note: m4 eats our [], so we need to use [ and ] instead.
60784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60785  if test "x$has_forbidden_chars" != x; then
60786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60790      # Going to short mode and back again did indeed matter. Since short mode is
60791      # case insensitive, let's make it lowercase to improve readability.
60792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60793      # Now convert it back to Unix-style (cygpath)
60794      input_path=`$CYGPATH -u "$shortmode_path"`
60795      new_path="$input_path"
60796    fi
60797  fi
60798
60799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60800  if test "x$test_cygdrive_prefix" = x; then
60801    # As a simple fix, exclude /usr/bin since it's not a real path.
60802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60804      # a path prefixed by /cygdrive for fixpath to work.
60805      new_path="$CYGWIN_ROOT_PATH$input_path"
60806    fi
60807  fi
60808
60809
60810  if test "x$path" != "x$new_path"; then
60811    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60814  fi
60815
60816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60817
60818  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60819  has_colon=`$ECHO $path | $GREP ^.:`
60820  new_path="$path"
60821  if test "x$has_colon" = x; then
60822    # Not in mixed or Windows style, start by that.
60823    new_path=`cmd //c echo $path`
60824  fi
60825
60826
60827  input_path="$new_path"
60828  # Check if we need to convert this using DOS-style short mode. If the path
60829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60830  # take no chances and rewrite it.
60831  # Note: m4 eats our [], so we need to use [ and ] instead.
60832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60833  if test "x$has_forbidden_chars" != x; then
60834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60836  fi
60837
60838
60839  windows_path="$new_path"
60840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60841    unix_path=`$CYGPATH -u "$windows_path"`
60842    new_path="$unix_path"
60843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60845    new_path="$unix_path"
60846  fi
60847
60848  if test "x$path" != "x$new_path"; then
60849    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60852  fi
60853
60854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60856
60857    else
60858      # We're on a unix platform. Hooray! :)
60859      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60860      has_space=`$ECHO "$path" | $GREP " "`
60861      if test "x$has_space" != x; then
60862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60864        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60865      fi
60866
60867      # Use eval to expand a potential ~
60868      eval path="$path"
60869      if test ! -f "$path" && test ! -d "$path"; then
60870        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60871      fi
60872
60873      if test -d "$path"; then
60874        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60875      else
60876        dir="`$DIRNAME "$path"`"
60877        base="`$BASENAME "$path"`"
60878        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60879      fi
60880    fi
60881  fi
60882
60883
60884  # Only process if variable expands to non-empty
60885
60886  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60888
60889  # Input might be given as Windows format, start by converting to
60890  # unix format.
60891  path="$POTENTIAL_FREETYPE_LIB_PATH"
60892  new_path=`$CYGPATH -u "$path"`
60893
60894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60897  # "foo.exe" is OK but "foo" is an error.
60898  #
60899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60900  # It is also a way to make sure we got the proper file name for the real test later on.
60901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60902  if test "x$test_shortpath" = x; then
60903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60904$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60905    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60906  fi
60907
60908  # Call helper function which possibly converts this using DOS-style short mode.
60909  # If so, the updated path is stored in $new_path.
60910
60911  input_path="$new_path"
60912  # Check if we need to convert this using DOS-style short mode. If the path
60913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60914  # take no chances and rewrite it.
60915  # Note: m4 eats our [], so we need to use [ and ] instead.
60916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60917  if test "x$has_forbidden_chars" != x; then
60918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60922      # Going to short mode and back again did indeed matter. Since short mode is
60923      # case insensitive, let's make it lowercase to improve readability.
60924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60925      # Now convert it back to Unix-style (cygpath)
60926      input_path=`$CYGPATH -u "$shortmode_path"`
60927      new_path="$input_path"
60928    fi
60929  fi
60930
60931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60932  if test "x$test_cygdrive_prefix" = x; then
60933    # As a simple fix, exclude /usr/bin since it's not a real path.
60934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60936      # a path prefixed by /cygdrive for fixpath to work.
60937      new_path="$CYGWIN_ROOT_PATH$input_path"
60938    fi
60939  fi
60940
60941
60942  if test "x$path" != "x$new_path"; then
60943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60946  fi
60947
60948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60949
60950  path="$POTENTIAL_FREETYPE_LIB_PATH"
60951  has_colon=`$ECHO $path | $GREP ^.:`
60952  new_path="$path"
60953  if test "x$has_colon" = x; then
60954    # Not in mixed or Windows style, start by that.
60955    new_path=`cmd //c echo $path`
60956  fi
60957
60958
60959  input_path="$new_path"
60960  # Check if we need to convert this using DOS-style short mode. If the path
60961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60962  # take no chances and rewrite it.
60963  # Note: m4 eats our [], so we need to use [ and ] instead.
60964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60965  if test "x$has_forbidden_chars" != x; then
60966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60968  fi
60969
60970
60971  windows_path="$new_path"
60972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60973    unix_path=`$CYGPATH -u "$windows_path"`
60974    new_path="$unix_path"
60975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60977    new_path="$unix_path"
60978  fi
60979
60980  if test "x$path" != "x$new_path"; then
60981    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60983$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60984  fi
60985
60986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60988
60989    else
60990      # We're on a unix platform. Hooray! :)
60991      path="$POTENTIAL_FREETYPE_LIB_PATH"
60992      has_space=`$ECHO "$path" | $GREP " "`
60993      if test "x$has_space" != x; then
60994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60997      fi
60998
60999      # Use eval to expand a potential ~
61000      eval path="$path"
61001      if test ! -f "$path" && test ! -d "$path"; then
61002        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61003      fi
61004
61005      if test -d "$path"; then
61006        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61007      else
61008        dir="`$DIRNAME "$path"`"
61009        base="`$BASENAME "$path"`"
61010        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61011      fi
61012    fi
61013  fi
61014
61015
61016    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61018$as_echo_n "checking for freetype includes... " >&6; }
61019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61020$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61021    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61023$as_echo_n "checking for freetype libraries... " >&6; }
61024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61025$as_echo "$FREETYPE_LIB_PATH" >&6; }
61026  fi
61027
61028            fi
61029          fi
61030
61031          if test "x$FOUND_FREETYPE" != xyes; then
61032            FREETYPE_BASE_DIR="$SYSROOT/usr"
61033            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61034
61035  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61036  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61037  METHOD="well-known location"
61038
61039  # Let's start with an optimistic view of the world :-)
61040  FOUND_FREETYPE=yes
61041
61042  # First look for the canonical freetype main include file ft2build.h.
61043  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61044    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61045    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61046    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61047      # Fail.
61048      FOUND_FREETYPE=no
61049    fi
61050  fi
61051
61052  if test "x$FOUND_FREETYPE" = xyes; then
61053    # Include file found, let's continue the sanity check.
61054    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61055$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61056
61057    # Reset to default value
61058    FREETYPE_BASE_NAME=freetype
61059    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61060    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61061      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61063        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61064        # for the .6 version explicitly.
61065        FREETYPE_BASE_NAME=freetype.6
61066        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61067        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61068$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61069      else
61070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61071$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61072        FOUND_FREETYPE=no
61073      fi
61074    else
61075      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61076        # On Windows, we will need both .lib and .dll file.
61077        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61078          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61080          FOUND_FREETYPE=no
61081        fi
61082      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61084        # Found lib in isa dir, use that instead.
61085        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61086        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61087$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61088      fi
61089    fi
61090  fi
61091
61092  if test "x$FOUND_FREETYPE" = xyes; then
61093
61094  # Only process if variable expands to non-empty
61095
61096  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61098
61099  # Input might be given as Windows format, start by converting to
61100  # unix format.
61101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61102  new_path=`$CYGPATH -u "$path"`
61103
61104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61107  # "foo.exe" is OK but "foo" is an error.
61108  #
61109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61110  # It is also a way to make sure we got the proper file name for the real test later on.
61111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61112  if test "x$test_shortpath" = x; then
61113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61116  fi
61117
61118  # Call helper function which possibly converts this using DOS-style short mode.
61119  # If so, the updated path is stored in $new_path.
61120
61121  input_path="$new_path"
61122  # Check if we need to convert this using DOS-style short mode. If the path
61123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61124  # take no chances and rewrite it.
61125  # Note: m4 eats our [], so we need to use [ and ] instead.
61126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61127  if test "x$has_forbidden_chars" != x; then
61128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61132      # Going to short mode and back again did indeed matter. Since short mode is
61133      # case insensitive, let's make it lowercase to improve readability.
61134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61135      # Now convert it back to Unix-style (cygpath)
61136      input_path=`$CYGPATH -u "$shortmode_path"`
61137      new_path="$input_path"
61138    fi
61139  fi
61140
61141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61142  if test "x$test_cygdrive_prefix" = x; then
61143    # As a simple fix, exclude /usr/bin since it's not a real path.
61144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61146      # a path prefixed by /cygdrive for fixpath to work.
61147      new_path="$CYGWIN_ROOT_PATH$input_path"
61148    fi
61149  fi
61150
61151
61152  if test "x$path" != "x$new_path"; then
61153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61156  fi
61157
61158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61159
61160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61161  has_colon=`$ECHO $path | $GREP ^.:`
61162  new_path="$path"
61163  if test "x$has_colon" = x; then
61164    # Not in mixed or Windows style, start by that.
61165    new_path=`cmd //c echo $path`
61166  fi
61167
61168
61169  input_path="$new_path"
61170  # Check if we need to convert this using DOS-style short mode. If the path
61171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61172  # take no chances and rewrite it.
61173  # Note: m4 eats our [], so we need to use [ and ] instead.
61174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61175  if test "x$has_forbidden_chars" != x; then
61176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61178  fi
61179
61180
61181  windows_path="$new_path"
61182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61183    unix_path=`$CYGPATH -u "$windows_path"`
61184    new_path="$unix_path"
61185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61187    new_path="$unix_path"
61188  fi
61189
61190  if test "x$path" != "x$new_path"; then
61191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61194  fi
61195
61196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61198
61199    else
61200      # We're on a unix platform. Hooray! :)
61201      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61202      has_space=`$ECHO "$path" | $GREP " "`
61203      if test "x$has_space" != x; then
61204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61207      fi
61208
61209      # Use eval to expand a potential ~
61210      eval path="$path"
61211      if test ! -f "$path" && test ! -d "$path"; then
61212        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61213      fi
61214
61215      if test -d "$path"; then
61216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61217      else
61218        dir="`$DIRNAME "$path"`"
61219        base="`$BASENAME "$path"`"
61220        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61221      fi
61222    fi
61223  fi
61224
61225
61226  # Only process if variable expands to non-empty
61227
61228  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61230
61231  # Input might be given as Windows format, start by converting to
61232  # unix format.
61233  path="$POTENTIAL_FREETYPE_LIB_PATH"
61234  new_path=`$CYGPATH -u "$path"`
61235
61236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61239  # "foo.exe" is OK but "foo" is an error.
61240  #
61241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61242  # It is also a way to make sure we got the proper file name for the real test later on.
61243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61244  if test "x$test_shortpath" = x; then
61245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61247    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61248  fi
61249
61250  # Call helper function which possibly converts this using DOS-style short mode.
61251  # If so, the updated path is stored in $new_path.
61252
61253  input_path="$new_path"
61254  # Check if we need to convert this using DOS-style short mode. If the path
61255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61256  # take no chances and rewrite it.
61257  # Note: m4 eats our [], so we need to use [ and ] instead.
61258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61259  if test "x$has_forbidden_chars" != x; then
61260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61264      # Going to short mode and back again did indeed matter. Since short mode is
61265      # case insensitive, let's make it lowercase to improve readability.
61266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61267      # Now convert it back to Unix-style (cygpath)
61268      input_path=`$CYGPATH -u "$shortmode_path"`
61269      new_path="$input_path"
61270    fi
61271  fi
61272
61273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61274  if test "x$test_cygdrive_prefix" = x; then
61275    # As a simple fix, exclude /usr/bin since it's not a real path.
61276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61278      # a path prefixed by /cygdrive for fixpath to work.
61279      new_path="$CYGWIN_ROOT_PATH$input_path"
61280    fi
61281  fi
61282
61283
61284  if test "x$path" != "x$new_path"; then
61285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61288  fi
61289
61290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61291
61292  path="$POTENTIAL_FREETYPE_LIB_PATH"
61293  has_colon=`$ECHO $path | $GREP ^.:`
61294  new_path="$path"
61295  if test "x$has_colon" = x; then
61296    # Not in mixed or Windows style, start by that.
61297    new_path=`cmd //c echo $path`
61298  fi
61299
61300
61301  input_path="$new_path"
61302  # Check if we need to convert this using DOS-style short mode. If the path
61303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61304  # take no chances and rewrite it.
61305  # Note: m4 eats our [], so we need to use [ and ] instead.
61306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61307  if test "x$has_forbidden_chars" != x; then
61308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61310  fi
61311
61312
61313  windows_path="$new_path"
61314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61315    unix_path=`$CYGPATH -u "$windows_path"`
61316    new_path="$unix_path"
61317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61319    new_path="$unix_path"
61320  fi
61321
61322  if test "x$path" != "x$new_path"; then
61323    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61326  fi
61327
61328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61330
61331    else
61332      # We're on a unix platform. Hooray! :)
61333      path="$POTENTIAL_FREETYPE_LIB_PATH"
61334      has_space=`$ECHO "$path" | $GREP " "`
61335      if test "x$has_space" != x; then
61336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61339      fi
61340
61341      # Use eval to expand a potential ~
61342      eval path="$path"
61343      if test ! -f "$path" && test ! -d "$path"; then
61344        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61345      fi
61346
61347      if test -d "$path"; then
61348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61349      else
61350        dir="`$DIRNAME "$path"`"
61351        base="`$BASENAME "$path"`"
61352        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61353      fi
61354    fi
61355  fi
61356
61357
61358    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61360$as_echo_n "checking for freetype includes... " >&6; }
61361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61362$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61363    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61365$as_echo_n "checking for freetype libraries... " >&6; }
61366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61367$as_echo "$FREETYPE_LIB_PATH" >&6; }
61368  fi
61369
61370            else
61371
61372  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61373  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61374  METHOD="well-known location"
61375
61376  # Let's start with an optimistic view of the world :-)
61377  FOUND_FREETYPE=yes
61378
61379  # First look for the canonical freetype main include file ft2build.h.
61380  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61381    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61382    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61383    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61384      # Fail.
61385      FOUND_FREETYPE=no
61386    fi
61387  fi
61388
61389  if test "x$FOUND_FREETYPE" = xyes; then
61390    # Include file found, let's continue the sanity check.
61391    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61392$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61393
61394    # Reset to default value
61395    FREETYPE_BASE_NAME=freetype
61396    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61397    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61398      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61399          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61400        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61401        # for the .6 version explicitly.
61402        FREETYPE_BASE_NAME=freetype.6
61403        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61404        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61405$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61406      else
61407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61408$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61409        FOUND_FREETYPE=no
61410      fi
61411    else
61412      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61413        # On Windows, we will need both .lib and .dll file.
61414        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61415          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61417          FOUND_FREETYPE=no
61418        fi
61419      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61420          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61421        # Found lib in isa dir, use that instead.
61422        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61423        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61424$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61425      fi
61426    fi
61427  fi
61428
61429  if test "x$FOUND_FREETYPE" = xyes; then
61430
61431  # Only process if variable expands to non-empty
61432
61433  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61435
61436  # Input might be given as Windows format, start by converting to
61437  # unix format.
61438  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61439  new_path=`$CYGPATH -u "$path"`
61440
61441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61444  # "foo.exe" is OK but "foo" is an error.
61445  #
61446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61447  # It is also a way to make sure we got the proper file name for the real test later on.
61448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61449  if test "x$test_shortpath" = x; then
61450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61453  fi
61454
61455  # Call helper function which possibly converts this using DOS-style short mode.
61456  # If so, the updated path is stored in $new_path.
61457
61458  input_path="$new_path"
61459  # Check if we need to convert this using DOS-style short mode. If the path
61460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61461  # take no chances and rewrite it.
61462  # Note: m4 eats our [], so we need to use [ and ] instead.
61463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61464  if test "x$has_forbidden_chars" != x; then
61465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61469      # Going to short mode and back again did indeed matter. Since short mode is
61470      # case insensitive, let's make it lowercase to improve readability.
61471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61472      # Now convert it back to Unix-style (cygpath)
61473      input_path=`$CYGPATH -u "$shortmode_path"`
61474      new_path="$input_path"
61475    fi
61476  fi
61477
61478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61479  if test "x$test_cygdrive_prefix" = x; then
61480    # As a simple fix, exclude /usr/bin since it's not a real path.
61481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61483      # a path prefixed by /cygdrive for fixpath to work.
61484      new_path="$CYGWIN_ROOT_PATH$input_path"
61485    fi
61486  fi
61487
61488
61489  if test "x$path" != "x$new_path"; then
61490    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61493  fi
61494
61495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61496
61497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61498  has_colon=`$ECHO $path | $GREP ^.:`
61499  new_path="$path"
61500  if test "x$has_colon" = x; then
61501    # Not in mixed or Windows style, start by that.
61502    new_path=`cmd //c echo $path`
61503  fi
61504
61505
61506  input_path="$new_path"
61507  # Check if we need to convert this using DOS-style short mode. If the path
61508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61509  # take no chances and rewrite it.
61510  # Note: m4 eats our [], so we need to use [ and ] instead.
61511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61512  if test "x$has_forbidden_chars" != x; then
61513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61515  fi
61516
61517
61518  windows_path="$new_path"
61519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61520    unix_path=`$CYGPATH -u "$windows_path"`
61521    new_path="$unix_path"
61522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61524    new_path="$unix_path"
61525  fi
61526
61527  if test "x$path" != "x$new_path"; then
61528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61531  fi
61532
61533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61535
61536    else
61537      # We're on a unix platform. Hooray! :)
61538      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61539      has_space=`$ECHO "$path" | $GREP " "`
61540      if test "x$has_space" != x; then
61541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61544      fi
61545
61546      # Use eval to expand a potential ~
61547      eval path="$path"
61548      if test ! -f "$path" && test ! -d "$path"; then
61549        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61550      fi
61551
61552      if test -d "$path"; then
61553        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61554      else
61555        dir="`$DIRNAME "$path"`"
61556        base="`$BASENAME "$path"`"
61557        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61558      fi
61559    fi
61560  fi
61561
61562
61563  # Only process if variable expands to non-empty
61564
61565  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61567
61568  # Input might be given as Windows format, start by converting to
61569  # unix format.
61570  path="$POTENTIAL_FREETYPE_LIB_PATH"
61571  new_path=`$CYGPATH -u "$path"`
61572
61573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61576  # "foo.exe" is OK but "foo" is an error.
61577  #
61578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61579  # It is also a way to make sure we got the proper file name for the real test later on.
61580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61581  if test "x$test_shortpath" = x; then
61582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61584    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61585  fi
61586
61587  # Call helper function which possibly converts this using DOS-style short mode.
61588  # If so, the updated path is stored in $new_path.
61589
61590  input_path="$new_path"
61591  # Check if we need to convert this using DOS-style short mode. If the path
61592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61593  # take no chances and rewrite it.
61594  # Note: m4 eats our [], so we need to use [ and ] instead.
61595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61596  if test "x$has_forbidden_chars" != x; then
61597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61601      # Going to short mode and back again did indeed matter. Since short mode is
61602      # case insensitive, let's make it lowercase to improve readability.
61603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61604      # Now convert it back to Unix-style (cygpath)
61605      input_path=`$CYGPATH -u "$shortmode_path"`
61606      new_path="$input_path"
61607    fi
61608  fi
61609
61610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61611  if test "x$test_cygdrive_prefix" = x; then
61612    # As a simple fix, exclude /usr/bin since it's not a real path.
61613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61615      # a path prefixed by /cygdrive for fixpath to work.
61616      new_path="$CYGWIN_ROOT_PATH$input_path"
61617    fi
61618  fi
61619
61620
61621  if test "x$path" != "x$new_path"; then
61622    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61625  fi
61626
61627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61628
61629  path="$POTENTIAL_FREETYPE_LIB_PATH"
61630  has_colon=`$ECHO $path | $GREP ^.:`
61631  new_path="$path"
61632  if test "x$has_colon" = x; then
61633    # Not in mixed or Windows style, start by that.
61634    new_path=`cmd //c echo $path`
61635  fi
61636
61637
61638  input_path="$new_path"
61639  # Check if we need to convert this using DOS-style short mode. If the path
61640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61641  # take no chances and rewrite it.
61642  # Note: m4 eats our [], so we need to use [ and ] instead.
61643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61644  if test "x$has_forbidden_chars" != x; then
61645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61647  fi
61648
61649
61650  windows_path="$new_path"
61651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61652    unix_path=`$CYGPATH -u "$windows_path"`
61653    new_path="$unix_path"
61654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61656    new_path="$unix_path"
61657  fi
61658
61659  if test "x$path" != "x$new_path"; then
61660    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61663  fi
61664
61665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61667
61668    else
61669      # We're on a unix platform. Hooray! :)
61670      path="$POTENTIAL_FREETYPE_LIB_PATH"
61671      has_space=`$ECHO "$path" | $GREP " "`
61672      if test "x$has_space" != x; then
61673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61676      fi
61677
61678      # Use eval to expand a potential ~
61679      eval path="$path"
61680      if test ! -f "$path" && test ! -d "$path"; then
61681        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61682      fi
61683
61684      if test -d "$path"; then
61685        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61686      else
61687        dir="`$DIRNAME "$path"`"
61688        base="`$BASENAME "$path"`"
61689        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61690      fi
61691    fi
61692  fi
61693
61694
61695    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61697$as_echo_n "checking for freetype includes... " >&6; }
61698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61699$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61700    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61702$as_echo_n "checking for freetype libraries... " >&6; }
61703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61704$as_echo "$FREETYPE_LIB_PATH" >&6; }
61705  fi
61706
61707              if test "x$FOUND_FREETYPE" != xyes; then
61708
61709  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61710  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61711  METHOD="well-known location"
61712
61713  # Let's start with an optimistic view of the world :-)
61714  FOUND_FREETYPE=yes
61715
61716  # First look for the canonical freetype main include file ft2build.h.
61717  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61718    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61719    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61720    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61721      # Fail.
61722      FOUND_FREETYPE=no
61723    fi
61724  fi
61725
61726  if test "x$FOUND_FREETYPE" = xyes; then
61727    # Include file found, let's continue the sanity check.
61728    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61729$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61730
61731    # Reset to default value
61732    FREETYPE_BASE_NAME=freetype
61733    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61734    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61735      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61737        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61738        # for the .6 version explicitly.
61739        FREETYPE_BASE_NAME=freetype.6
61740        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61741        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61742$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61743      else
61744        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61745$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61746        FOUND_FREETYPE=no
61747      fi
61748    else
61749      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61750        # On Windows, we will need both .lib and .dll file.
61751        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61752          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61754          FOUND_FREETYPE=no
61755        fi
61756      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61758        # Found lib in isa dir, use that instead.
61759        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61760        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61761$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61762      fi
61763    fi
61764  fi
61765
61766  if test "x$FOUND_FREETYPE" = xyes; then
61767
61768  # Only process if variable expands to non-empty
61769
61770  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61772
61773  # Input might be given as Windows format, start by converting to
61774  # unix format.
61775  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61776  new_path=`$CYGPATH -u "$path"`
61777
61778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61781  # "foo.exe" is OK but "foo" is an error.
61782  #
61783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61784  # It is also a way to make sure we got the proper file name for the real test later on.
61785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61786  if test "x$test_shortpath" = x; then
61787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61788$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61789    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61790  fi
61791
61792  # Call helper function which possibly converts this using DOS-style short mode.
61793  # If so, the updated path is stored in $new_path.
61794
61795  input_path="$new_path"
61796  # Check if we need to convert this using DOS-style short mode. If the path
61797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61798  # take no chances and rewrite it.
61799  # Note: m4 eats our [], so we need to use [ and ] instead.
61800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61801  if test "x$has_forbidden_chars" != x; then
61802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61806      # Going to short mode and back again did indeed matter. Since short mode is
61807      # case insensitive, let's make it lowercase to improve readability.
61808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61809      # Now convert it back to Unix-style (cygpath)
61810      input_path=`$CYGPATH -u "$shortmode_path"`
61811      new_path="$input_path"
61812    fi
61813  fi
61814
61815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61816  if test "x$test_cygdrive_prefix" = x; then
61817    # As a simple fix, exclude /usr/bin since it's not a real path.
61818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61820      # a path prefixed by /cygdrive for fixpath to work.
61821      new_path="$CYGWIN_ROOT_PATH$input_path"
61822    fi
61823  fi
61824
61825
61826  if test "x$path" != "x$new_path"; then
61827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61830  fi
61831
61832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61833
61834  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61835  has_colon=`$ECHO $path | $GREP ^.:`
61836  new_path="$path"
61837  if test "x$has_colon" = x; then
61838    # Not in mixed or Windows style, start by that.
61839    new_path=`cmd //c echo $path`
61840  fi
61841
61842
61843  input_path="$new_path"
61844  # Check if we need to convert this using DOS-style short mode. If the path
61845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61846  # take no chances and rewrite it.
61847  # Note: m4 eats our [], so we need to use [ and ] instead.
61848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61849  if test "x$has_forbidden_chars" != x; then
61850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61852  fi
61853
61854
61855  windows_path="$new_path"
61856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61857    unix_path=`$CYGPATH -u "$windows_path"`
61858    new_path="$unix_path"
61859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61861    new_path="$unix_path"
61862  fi
61863
61864  if test "x$path" != "x$new_path"; then
61865    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61868  fi
61869
61870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61872
61873    else
61874      # We're on a unix platform. Hooray! :)
61875      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61876      has_space=`$ECHO "$path" | $GREP " "`
61877      if test "x$has_space" != x; then
61878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61881      fi
61882
61883      # Use eval to expand a potential ~
61884      eval path="$path"
61885      if test ! -f "$path" && test ! -d "$path"; then
61886        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61887      fi
61888
61889      if test -d "$path"; then
61890        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61891      else
61892        dir="`$DIRNAME "$path"`"
61893        base="`$BASENAME "$path"`"
61894        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61895      fi
61896    fi
61897  fi
61898
61899
61900  # Only process if variable expands to non-empty
61901
61902  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61904
61905  # Input might be given as Windows format, start by converting to
61906  # unix format.
61907  path="$POTENTIAL_FREETYPE_LIB_PATH"
61908  new_path=`$CYGPATH -u "$path"`
61909
61910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61913  # "foo.exe" is OK but "foo" is an error.
61914  #
61915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61916  # It is also a way to make sure we got the proper file name for the real test later on.
61917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61918  if test "x$test_shortpath" = x; then
61919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61921    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61922  fi
61923
61924  # Call helper function which possibly converts this using DOS-style short mode.
61925  # If so, the updated path is stored in $new_path.
61926
61927  input_path="$new_path"
61928  # Check if we need to convert this using DOS-style short mode. If the path
61929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61930  # take no chances and rewrite it.
61931  # Note: m4 eats our [], so we need to use [ and ] instead.
61932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61933  if test "x$has_forbidden_chars" != x; then
61934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61938      # Going to short mode and back again did indeed matter. Since short mode is
61939      # case insensitive, let's make it lowercase to improve readability.
61940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61941      # Now convert it back to Unix-style (cygpath)
61942      input_path=`$CYGPATH -u "$shortmode_path"`
61943      new_path="$input_path"
61944    fi
61945  fi
61946
61947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61948  if test "x$test_cygdrive_prefix" = x; then
61949    # As a simple fix, exclude /usr/bin since it's not a real path.
61950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61952      # a path prefixed by /cygdrive for fixpath to work.
61953      new_path="$CYGWIN_ROOT_PATH$input_path"
61954    fi
61955  fi
61956
61957
61958  if test "x$path" != "x$new_path"; then
61959    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61962  fi
61963
61964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61965
61966  path="$POTENTIAL_FREETYPE_LIB_PATH"
61967  has_colon=`$ECHO $path | $GREP ^.:`
61968  new_path="$path"
61969  if test "x$has_colon" = x; then
61970    # Not in mixed or Windows style, start by that.
61971    new_path=`cmd //c echo $path`
61972  fi
61973
61974
61975  input_path="$new_path"
61976  # Check if we need to convert this using DOS-style short mode. If the path
61977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61978  # take no chances and rewrite it.
61979  # Note: m4 eats our [], so we need to use [ and ] instead.
61980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61981  if test "x$has_forbidden_chars" != x; then
61982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61984  fi
61985
61986
61987  windows_path="$new_path"
61988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61989    unix_path=`$CYGPATH -u "$windows_path"`
61990    new_path="$unix_path"
61991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61993    new_path="$unix_path"
61994  fi
61995
61996  if test "x$path" != "x$new_path"; then
61997    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62000  fi
62001
62002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62004
62005    else
62006      # We're on a unix platform. Hooray! :)
62007      path="$POTENTIAL_FREETYPE_LIB_PATH"
62008      has_space=`$ECHO "$path" | $GREP " "`
62009      if test "x$has_space" != x; then
62010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62013      fi
62014
62015      # Use eval to expand a potential ~
62016      eval path="$path"
62017      if test ! -f "$path" && test ! -d "$path"; then
62018        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62019      fi
62020
62021      if test -d "$path"; then
62022        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62023      else
62024        dir="`$DIRNAME "$path"`"
62025        base="`$BASENAME "$path"`"
62026        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62027      fi
62028    fi
62029  fi
62030
62031
62032    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62034$as_echo_n "checking for freetype includes... " >&6; }
62035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62036$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62037    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62039$as_echo_n "checking for freetype libraries... " >&6; }
62040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62041$as_echo "$FREETYPE_LIB_PATH" >&6; }
62042  fi
62043
62044              fi
62045            fi
62046          fi
62047        fi
62048      fi # end check in well-known locations
62049
62050      if test "x$FOUND_FREETYPE" != xyes; then
62051
62052  # Print a helpful message on how to acquire the necessary build dependency.
62053  # freetype is the help tag: freetype, cups, alsa etc
62054  MISSING_DEPENDENCY=freetype
62055
62056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62057    cygwin_help $MISSING_DEPENDENCY
62058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62059    msys_help $MISSING_DEPENDENCY
62060  else
62061    PKGHANDLER_COMMAND=
62062
62063    case $PKGHANDLER in
62064      apt-get)
62065        apt_help     $MISSING_DEPENDENCY ;;
62066      yum)
62067        yum_help     $MISSING_DEPENDENCY ;;
62068      port)
62069        port_help    $MISSING_DEPENDENCY ;;
62070      pkgutil)
62071        pkgutil_help $MISSING_DEPENDENCY ;;
62072      pkgadd)
62073        pkgadd_help  $MISSING_DEPENDENCY ;;
62074    esac
62075
62076    if test "x$PKGHANDLER_COMMAND" != x; then
62077      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62078    fi
62079  fi
62080
62081        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62082      fi
62083    fi # end user specified settings
62084
62085    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62086    if test "x$FREETYPE_CFLAGS" = x; then
62087
62088  # Only process if variable expands to non-empty
62089
62090  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62092
62093  # Input might be given as Windows format, start by converting to
62094  # unix format.
62095  path="$FREETYPE_INCLUDE_PATH"
62096  new_path=`$CYGPATH -u "$path"`
62097
62098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62101  # "foo.exe" is OK but "foo" is an error.
62102  #
62103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62104  # It is also a way to make sure we got the proper file name for the real test later on.
62105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62106  if test "x$test_shortpath" = x; then
62107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62108$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62109    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62110  fi
62111
62112  # Call helper function which possibly converts this using DOS-style short mode.
62113  # If so, the updated path is stored in $new_path.
62114
62115  input_path="$new_path"
62116  # Check if we need to convert this using DOS-style short mode. If the path
62117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62118  # take no chances and rewrite it.
62119  # Note: m4 eats our [], so we need to use [ and ] instead.
62120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62121  if test "x$has_forbidden_chars" != x; then
62122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62126      # Going to short mode and back again did indeed matter. Since short mode is
62127      # case insensitive, let's make it lowercase to improve readability.
62128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62129      # Now convert it back to Unix-style (cygpath)
62130      input_path=`$CYGPATH -u "$shortmode_path"`
62131      new_path="$input_path"
62132    fi
62133  fi
62134
62135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62136  if test "x$test_cygdrive_prefix" = x; then
62137    # As a simple fix, exclude /usr/bin since it's not a real path.
62138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62140      # a path prefixed by /cygdrive for fixpath to work.
62141      new_path="$CYGWIN_ROOT_PATH$input_path"
62142    fi
62143  fi
62144
62145
62146  if test "x$path" != "x$new_path"; then
62147    FREETYPE_INCLUDE_PATH="$new_path"
62148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62149$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62150  fi
62151
62152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62153
62154  path="$FREETYPE_INCLUDE_PATH"
62155  has_colon=`$ECHO $path | $GREP ^.:`
62156  new_path="$path"
62157  if test "x$has_colon" = x; then
62158    # Not in mixed or Windows style, start by that.
62159    new_path=`cmd //c echo $path`
62160  fi
62161
62162
62163  input_path="$new_path"
62164  # Check if we need to convert this using DOS-style short mode. If the path
62165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62166  # take no chances and rewrite it.
62167  # Note: m4 eats our [], so we need to use [ and ] instead.
62168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62169  if test "x$has_forbidden_chars" != x; then
62170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62172  fi
62173
62174
62175  windows_path="$new_path"
62176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62177    unix_path=`$CYGPATH -u "$windows_path"`
62178    new_path="$unix_path"
62179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62181    new_path="$unix_path"
62182  fi
62183
62184  if test "x$path" != "x$new_path"; then
62185    FREETYPE_INCLUDE_PATH="$new_path"
62186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62187$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62188  fi
62189
62190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62192
62193    else
62194      # We're on a unix platform. Hooray! :)
62195      path="$FREETYPE_INCLUDE_PATH"
62196      has_space=`$ECHO "$path" | $GREP " "`
62197      if test "x$has_space" != x; then
62198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62199$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62201      fi
62202
62203      # Use eval to expand a potential ~
62204      eval path="$path"
62205      if test ! -f "$path" && test ! -d "$path"; then
62206        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62207      fi
62208
62209      if test -d "$path"; then
62210        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62211      else
62212        dir="`$DIRNAME "$path"`"
62213        base="`$BASENAME "$path"`"
62214        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62215      fi
62216    fi
62217  fi
62218
62219      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62220        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62221      else
62222        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62223      fi
62224    fi
62225
62226    if test "x$FREETYPE_LIBS" = x; then
62227
62228  # Only process if variable expands to non-empty
62229
62230  if test "x$FREETYPE_LIB_PATH" != x; then
62231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62232
62233  # Input might be given as Windows format, start by converting to
62234  # unix format.
62235  path="$FREETYPE_LIB_PATH"
62236  new_path=`$CYGPATH -u "$path"`
62237
62238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62241  # "foo.exe" is OK but "foo" is an error.
62242  #
62243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62244  # It is also a way to make sure we got the proper file name for the real test later on.
62245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62246  if test "x$test_shortpath" = x; then
62247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62248$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62249    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62250  fi
62251
62252  # Call helper function which possibly converts this using DOS-style short mode.
62253  # If so, the updated path is stored in $new_path.
62254
62255  input_path="$new_path"
62256  # Check if we need to convert this using DOS-style short mode. If the path
62257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62258  # take no chances and rewrite it.
62259  # Note: m4 eats our [], so we need to use [ and ] instead.
62260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62261  if test "x$has_forbidden_chars" != x; then
62262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62266      # Going to short mode and back again did indeed matter. Since short mode is
62267      # case insensitive, let's make it lowercase to improve readability.
62268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62269      # Now convert it back to Unix-style (cygpath)
62270      input_path=`$CYGPATH -u "$shortmode_path"`
62271      new_path="$input_path"
62272    fi
62273  fi
62274
62275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62276  if test "x$test_cygdrive_prefix" = x; then
62277    # As a simple fix, exclude /usr/bin since it's not a real path.
62278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62280      # a path prefixed by /cygdrive for fixpath to work.
62281      new_path="$CYGWIN_ROOT_PATH$input_path"
62282    fi
62283  fi
62284
62285
62286  if test "x$path" != "x$new_path"; then
62287    FREETYPE_LIB_PATH="$new_path"
62288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62289$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62290  fi
62291
62292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62293
62294  path="$FREETYPE_LIB_PATH"
62295  has_colon=`$ECHO $path | $GREP ^.:`
62296  new_path="$path"
62297  if test "x$has_colon" = x; then
62298    # Not in mixed or Windows style, start by that.
62299    new_path=`cmd //c echo $path`
62300  fi
62301
62302
62303  input_path="$new_path"
62304  # Check if we need to convert this using DOS-style short mode. If the path
62305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62306  # take no chances and rewrite it.
62307  # Note: m4 eats our [], so we need to use [ and ] instead.
62308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62309  if test "x$has_forbidden_chars" != x; then
62310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62312  fi
62313
62314
62315  windows_path="$new_path"
62316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62317    unix_path=`$CYGPATH -u "$windows_path"`
62318    new_path="$unix_path"
62319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62321    new_path="$unix_path"
62322  fi
62323
62324  if test "x$path" != "x$new_path"; then
62325    FREETYPE_LIB_PATH="$new_path"
62326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62327$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62328  fi
62329
62330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62332
62333    else
62334      # We're on a unix platform. Hooray! :)
62335      path="$FREETYPE_LIB_PATH"
62336      has_space=`$ECHO "$path" | $GREP " "`
62337      if test "x$has_space" != x; then
62338        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62339$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62340        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62341      fi
62342
62343      # Use eval to expand a potential ~
62344      eval path="$path"
62345      if test ! -f "$path" && test ! -d "$path"; then
62346        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62347      fi
62348
62349      if test -d "$path"; then
62350        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62351      else
62352        dir="`$DIRNAME "$path"`"
62353        base="`$BASENAME "$path"`"
62354        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62355      fi
62356    fi
62357  fi
62358
62359      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62360        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62361      else
62362        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62363      fi
62364    fi
62365
62366    # Try to compile it
62367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62368$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62369    ac_ext=cpp
62370ac_cpp='$CXXCPP $CPPFLAGS'
62371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62374
62375    PREV_CXXCFLAGS="$CXXFLAGS"
62376    PREV_LIBS="$LIBS"
62377    PREV_CXX="$CXX"
62378    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62379    LIBS="$LIBS $FREETYPE_LIBS"
62380    CXX="$FIXPATH $CXX"
62381    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62382/* end confdefs.h.  */
62383
62384          #include<ft2build.h>
62385          #include FT_FREETYPE_H
62386          int main () {
62387            FT_Init_FreeType(NULL);
62388            return 0;
62389          }
62390
62391_ACEOF
62392if ac_fn_cxx_try_link "$LINENO"; then :
62393
62394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62395$as_echo "yes" >&6; }
62396
62397else
62398
62399          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62400$as_echo "no" >&6; }
62401          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62402$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62403          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62404$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62405
62406
62407  # Print a helpful message on how to acquire the necessary build dependency.
62408  # freetype is the help tag: freetype, cups, alsa etc
62409  MISSING_DEPENDENCY=freetype
62410
62411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62412    cygwin_help $MISSING_DEPENDENCY
62413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62414    msys_help $MISSING_DEPENDENCY
62415  else
62416    PKGHANDLER_COMMAND=
62417
62418    case $PKGHANDLER in
62419      apt-get)
62420        apt_help     $MISSING_DEPENDENCY ;;
62421      yum)
62422        yum_help     $MISSING_DEPENDENCY ;;
62423      port)
62424        port_help    $MISSING_DEPENDENCY ;;
62425      pkgutil)
62426        pkgutil_help $MISSING_DEPENDENCY ;;
62427      pkgadd)
62428        pkgadd_help  $MISSING_DEPENDENCY ;;
62429    esac
62430
62431    if test "x$PKGHANDLER_COMMAND" != x; then
62432      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62433    fi
62434  fi
62435
62436
62437          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62438
62439
62440fi
62441rm -f core conftest.err conftest.$ac_objext \
62442    conftest$ac_exeext conftest.$ac_ext
62443    CXXCFLAGS="$PREV_CXXFLAGS"
62444    LIBS="$PREV_LIBS"
62445    CXX="$PREV_CXX"
62446    ac_ext=cpp
62447ac_cpp='$CXXCPP $CPPFLAGS'
62448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62451
62452
62453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62454$as_echo_n "checking if we should bundle freetype... " >&6; }
62455    if test "x$BUNDLE_FREETYPE" = xyes; then
62456      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62457    fi
62458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62459$as_echo "$BUNDLE_FREETYPE" >&6; }
62460
62461  fi # end freetype needed
62462
62463
62464
62465
62466
62467
62468
62469# Check whether --with-alsa was given.
62470if test "${with_alsa+set}" = set; then :
62471  withval=$with_alsa;
62472fi
62473
62474
62475# Check whether --with-alsa-include was given.
62476if test "${with_alsa_include+set}" = set; then :
62477  withval=$with_alsa_include;
62478fi
62479
62480
62481# Check whether --with-alsa-lib was given.
62482if test "${with_alsa_lib+set}" = set; then :
62483  withval=$with_alsa_lib;
62484fi
62485
62486
62487  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62488    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62489        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62490        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62491      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62492$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62493    fi
62494    ALSA_CFLAGS=
62495    ALSA_LIBS=
62496  else
62497    ALSA_FOUND=no
62498
62499    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62500      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62501    fi
62502
62503    if test "x${with_alsa}" != x; then
62504      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62505      ALSA_CFLAGS="-I${with_alsa}/include"
62506      ALSA_FOUND=yes
62507    fi
62508    if test "x${with_alsa_include}" != x; then
62509      ALSA_CFLAGS="-I${with_alsa_include}"
62510      ALSA_FOUND=yes
62511    fi
62512    if test "x${with_alsa_lib}" != x; then
62513      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62514      ALSA_FOUND=yes
62515    fi
62516    # Do not try pkg-config if we have a sysroot set.
62517    if test "x$SYSROOT" = x; then
62518      if test "x$ALSA_FOUND" = xno; then
62519
62520pkg_failed=no
62521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62522$as_echo_n "checking for ALSA... " >&6; }
62523
62524if test -n "$ALSA_CFLAGS"; then
62525    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62526 elif test -n "$PKG_CONFIG"; then
62527    if test -n "$PKG_CONFIG" && \
62528    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62529  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62530  ac_status=$?
62531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62532  test $ac_status = 0; }; then
62533  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62534else
62535  pkg_failed=yes
62536fi
62537 else
62538    pkg_failed=untried
62539fi
62540if test -n "$ALSA_LIBS"; then
62541    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62542 elif test -n "$PKG_CONFIG"; then
62543    if test -n "$PKG_CONFIG" && \
62544    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62545  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62546  ac_status=$?
62547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62548  test $ac_status = 0; }; then
62549  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62550else
62551  pkg_failed=yes
62552fi
62553 else
62554    pkg_failed=untried
62555fi
62556
62557
62558
62559if test $pkg_failed = yes; then
62560
62561if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62562        _pkg_short_errors_supported=yes
62563else
62564        _pkg_short_errors_supported=no
62565fi
62566        if test $_pkg_short_errors_supported = yes; then
62567	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62568        else
62569	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62570        fi
62571	# Put the nasty error message in config.log where it belongs
62572	echo "$ALSA_PKG_ERRORS" >&5
62573
62574	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62575$as_echo "no" >&6; }
62576                ALSA_FOUND=no
62577elif test $pkg_failed = untried; then
62578	ALSA_FOUND=no
62579else
62580	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62581	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62583$as_echo "yes" >&6; }
62584	ALSA_FOUND=yes
62585fi
62586      fi
62587    fi
62588    if test "x$ALSA_FOUND" = xno; then
62589      for ac_header in alsa/asoundlib.h
62590do :
62591  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62592if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62593  cat >>confdefs.h <<_ACEOF
62594#define HAVE_ALSA_ASOUNDLIB_H 1
62595_ACEOF
62596
62597            ALSA_FOUND=yes
62598            ALSA_CFLAGS=-Iignoreme
62599            ALSA_LIBS=-lasound
62600            DEFAULT_ALSA=yes
62601
62602else
62603  ALSA_FOUND=no
62604
62605fi
62606
62607done
62608
62609    fi
62610    if test "x$ALSA_FOUND" = xno; then
62611
62612  # Print a helpful message on how to acquire the necessary build dependency.
62613  # alsa is the help tag: freetype, cups, alsa etc
62614  MISSING_DEPENDENCY=alsa
62615
62616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62617    cygwin_help $MISSING_DEPENDENCY
62618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62619    msys_help $MISSING_DEPENDENCY
62620  else
62621    PKGHANDLER_COMMAND=
62622
62623    case $PKGHANDLER in
62624      apt-get)
62625        apt_help     $MISSING_DEPENDENCY ;;
62626      yum)
62627        yum_help     $MISSING_DEPENDENCY ;;
62628      port)
62629        port_help    $MISSING_DEPENDENCY ;;
62630      pkgutil)
62631        pkgutil_help $MISSING_DEPENDENCY ;;
62632      pkgadd)
62633        pkgadd_help  $MISSING_DEPENDENCY ;;
62634    esac
62635
62636    if test "x$PKGHANDLER_COMMAND" != x; then
62637      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62638    fi
62639  fi
62640
62641      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62642    fi
62643  fi
62644
62645
62646
62647
62648
62649
62650# Check whether --with-libffi was given.
62651if test "${with_libffi+set}" = set; then :
62652  withval=$with_libffi;
62653fi
62654
62655
62656# Check whether --with-libffi-include was given.
62657if test "${with_libffi_include+set}" = set; then :
62658  withval=$with_libffi_include;
62659fi
62660
62661
62662# Check whether --with-libffi-lib was given.
62663if test "${with_libffi_lib+set}" = set; then :
62664  withval=$with_libffi_lib;
62665fi
62666
62667
62668  if test "x$NEEDS_LIB_FFI" = xfalse; then
62669    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62670        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62671        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62672      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62673$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62674    fi
62675    LIBFFI_CFLAGS=
62676    LIBFFI_LIBS=
62677  else
62678    LIBFFI_FOUND=no
62679
62680    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62681      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62682    fi
62683
62684    if test "x${with_libffi}" != x; then
62685      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62686      LIBFFI_CFLAGS="-I${with_libffi}/include"
62687      LIBFFI_FOUND=yes
62688    fi
62689    if test "x${with_libffi_include}" != x; then
62690      LIBFFI_CFLAGS="-I${with_libffi_include}"
62691      LIBFFI_FOUND=yes
62692    fi
62693    if test "x${with_libffi_lib}" != x; then
62694      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62695      LIBFFI_FOUND=yes
62696    fi
62697    # Do not try pkg-config if we have a sysroot set.
62698    if test "x$SYSROOT" = x; then
62699      if test "x$LIBFFI_FOUND" = xno; then
62700        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62701
62702pkg_failed=no
62703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62704$as_echo_n "checking for LIBFFI... " >&6; }
62705
62706if test -n "$LIBFFI_CFLAGS"; then
62707    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62708 elif test -n "$PKG_CONFIG"; then
62709    if test -n "$PKG_CONFIG" && \
62710    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62711  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62712  ac_status=$?
62713  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62714  test $ac_status = 0; }; then
62715  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62716else
62717  pkg_failed=yes
62718fi
62719 else
62720    pkg_failed=untried
62721fi
62722if test -n "$LIBFFI_LIBS"; then
62723    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62724 elif test -n "$PKG_CONFIG"; then
62725    if test -n "$PKG_CONFIG" && \
62726    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62727  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62728  ac_status=$?
62729  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62730  test $ac_status = 0; }; then
62731  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62732else
62733  pkg_failed=yes
62734fi
62735 else
62736    pkg_failed=untried
62737fi
62738
62739
62740
62741if test $pkg_failed = yes; then
62742
62743if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62744        _pkg_short_errors_supported=yes
62745else
62746        _pkg_short_errors_supported=no
62747fi
62748        if test $_pkg_short_errors_supported = yes; then
62749	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62750        else
62751	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62752        fi
62753	# Put the nasty error message in config.log where it belongs
62754	echo "$LIBFFI_PKG_ERRORS" >&5
62755
62756	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62757$as_echo "no" >&6; }
62758                LIBFFI_FOUND=no
62759elif test $pkg_failed = untried; then
62760	LIBFFI_FOUND=no
62761else
62762	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62763	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62765$as_echo "yes" >&6; }
62766	LIBFFI_FOUND=yes
62767fi
62768      fi
62769    fi
62770    if test "x$LIBFFI_FOUND" = xno; then
62771      for ac_header in ffi.h
62772do :
62773  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62774if test "x$ac_cv_header_ffi_h" = xyes; then :
62775  cat >>confdefs.h <<_ACEOF
62776#define HAVE_FFI_H 1
62777_ACEOF
62778
62779            LIBFFI_FOUND=yes
62780            LIBFFI_CFLAGS=
62781            LIBFFI_LIBS=-lffi
62782
62783else
62784  LIBFFI_FOUND=no
62785
62786fi
62787
62788done
62789
62790    fi
62791    if test "x$LIBFFI_FOUND" = xno; then
62792
62793  # Print a helpful message on how to acquire the necessary build dependency.
62794  # ffi is the help tag: freetype, cups, alsa etc
62795  MISSING_DEPENDENCY=ffi
62796
62797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62798    cygwin_help $MISSING_DEPENDENCY
62799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62800    msys_help $MISSING_DEPENDENCY
62801  else
62802    PKGHANDLER_COMMAND=
62803
62804    case $PKGHANDLER in
62805      apt-get)
62806        apt_help     $MISSING_DEPENDENCY ;;
62807      yum)
62808        yum_help     $MISSING_DEPENDENCY ;;
62809      port)
62810        port_help    $MISSING_DEPENDENCY ;;
62811      pkgutil)
62812        pkgutil_help $MISSING_DEPENDENCY ;;
62813      pkgadd)
62814        pkgadd_help  $MISSING_DEPENDENCY ;;
62815    esac
62816
62817    if test "x$PKGHANDLER_COMMAND" != x; then
62818      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62819    fi
62820  fi
62821
62822      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62823    fi
62824
62825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62826$as_echo_n "checking if libffi works... " >&6; }
62827    ac_ext=c
62828ac_cpp='$CPP $CPPFLAGS'
62829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62831ac_compiler_gnu=$ac_cv_c_compiler_gnu
62832
62833    OLD_CFLAGS="$CFLAGS"
62834    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62835    OLD_LIBS="$LIBS"
62836    LIBS="$LIBS $LIBFFI_LIBS"
62837    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62838/* end confdefs.h.  */
62839#include <ffi.h>
62840int
62841main ()
62842{
62843
62844          ffi_call(NULL, NULL, NULL, NULL);
62845          return 0;
62846
62847  ;
62848  return 0;
62849}
62850_ACEOF
62851if ac_fn_c_try_link "$LINENO"; then :
62852  LIBFFI_WORKS=yes
62853else
62854  LIBFFI_WORKS=no
62855
62856fi
62857rm -f core conftest.err conftest.$ac_objext \
62858    conftest$ac_exeext conftest.$ac_ext
62859    CFLAGS="$OLD_CFLAGS"
62860    LIBS="$OLD_LIBS"
62861    ac_ext=cpp
62862ac_cpp='$CXXCPP $CPPFLAGS'
62863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62866
62867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62868$as_echo "$LIBFFI_WORKS" >&6; }
62869
62870    if test "x$LIBFFI_WORKS" = xno; then
62871
62872  # Print a helpful message on how to acquire the necessary build dependency.
62873  # ffi is the help tag: freetype, cups, alsa etc
62874  MISSING_DEPENDENCY=ffi
62875
62876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62877    cygwin_help $MISSING_DEPENDENCY
62878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62879    msys_help $MISSING_DEPENDENCY
62880  else
62881    PKGHANDLER_COMMAND=
62882
62883    case $PKGHANDLER in
62884      apt-get)
62885        apt_help     $MISSING_DEPENDENCY ;;
62886      yum)
62887        yum_help     $MISSING_DEPENDENCY ;;
62888      port)
62889        port_help    $MISSING_DEPENDENCY ;;
62890      pkgutil)
62891        pkgutil_help $MISSING_DEPENDENCY ;;
62892      pkgadd)
62893        pkgadd_help  $MISSING_DEPENDENCY ;;
62894    esac
62895
62896    if test "x$PKGHANDLER_COMMAND" != x; then
62897      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62898    fi
62899  fi
62900
62901      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62902    fi
62903  fi
62904
62905
62906
62907
62908
62909  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62910    # Extract the first word of "llvm-config", so it can be a program name with args.
62911set dummy llvm-config; ac_word=$2
62912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62913$as_echo_n "checking for $ac_word... " >&6; }
62914if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62915  $as_echo_n "(cached) " >&6
62916else
62917  if test -n "$LLVM_CONFIG"; then
62918  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62919else
62920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62921for as_dir in $PATH
62922do
62923  IFS=$as_save_IFS
62924  test -z "$as_dir" && as_dir=.
62925    for ac_exec_ext in '' $ac_executable_extensions; do
62926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62927    ac_cv_prog_LLVM_CONFIG="llvm-config"
62928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62929    break 2
62930  fi
62931done
62932  done
62933IFS=$as_save_IFS
62934
62935fi
62936fi
62937LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62938if test -n "$LLVM_CONFIG"; then
62939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62940$as_echo "$LLVM_CONFIG" >&6; }
62941else
62942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62943$as_echo "no" >&6; }
62944fi
62945
62946
62947
62948    if test "x$LLVM_CONFIG" != xllvm-config; then
62949      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62950    fi
62951
62952    llvm_components="jit mcjit engine nativecodegen native"
62953    unset LLVM_CFLAGS
62954    for flag in $("$LLVM_CONFIG" --cxxflags); do
62955      if echo "${flag}" | grep -q '^-[ID]'; then
62956        if test "${flag}" != "-D_DEBUG" ; then
62957          if test "${LLVM_CFLAGS}" != "" ; then
62958            LLVM_CFLAGS="${LLVM_CFLAGS} "
62959          fi
62960          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62961        fi
62962      fi
62963    done
62964    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62965    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62966
62967    unset LLVM_LDFLAGS
62968    for flag in $("${LLVM_CONFIG}" --ldflags); do
62969      if echo "${flag}" | grep -q '^-L'; then
62970        if test "${LLVM_LDFLAGS}" != ""; then
62971          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62972        fi
62973        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62974      fi
62975    done
62976
62977    unset LLVM_LIBS
62978    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
62979      if echo "${flag}" | grep -q '^-l'; then
62980        if test "${LLVM_LIBS}" != ""; then
62981          LLVM_LIBS="${LLVM_LIBS} "
62982        fi
62983        LLVM_LIBS="${LLVM_LIBS}${flag}"
62984      fi
62985    done
62986
62987    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
62988    # always properly detect -ltinfo
62989    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
62990
62991
62992
62993
62994  fi
62995
62996
62997
62998# Check whether --with-libjpeg was given.
62999if test "${with_libjpeg+set}" = set; then :
63000  withval=$with_libjpeg;
63001fi
63002
63003
63004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63005$as_echo_n "checking for which libjpeg to use... " >&6; }
63006  # default is bundled
63007  DEFAULT_LIBJPEG=bundled
63008  # if user didn't specify, use DEFAULT_LIBJPEG
63009  if test "x${with_libjpeg}" = "x"; then
63010    with_libjpeg=${DEFAULT_LIBJPEG}
63011  fi
63012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63013$as_echo "${with_libjpeg}" >&6; }
63014
63015  if test "x${with_libjpeg}" = "xbundled"; then
63016    USE_EXTERNAL_LIBJPEG=false
63017  elif test "x${with_libjpeg}" = "xsystem"; then
63018    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63019if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63020
63021else
63022   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63023fi
63024
63025
63026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63027$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63028if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63029  $as_echo_n "(cached) " >&6
63030else
63031  ac_check_lib_save_LIBS=$LIBS
63032LIBS="-ljpeg  $LIBS"
63033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63034/* end confdefs.h.  */
63035
63036/* Override any GCC internal prototype to avoid an error.
63037   Use char because int might match the return type of a GCC
63038   builtin and then its argument prototype would still apply.  */
63039#ifdef __cplusplus
63040extern "C"
63041#endif
63042char jpeg_CreateDecompress ();
63043int
63044main ()
63045{
63046return jpeg_CreateDecompress ();
63047  ;
63048  return 0;
63049}
63050_ACEOF
63051if ac_fn_cxx_try_link "$LINENO"; then :
63052  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63053else
63054  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63055fi
63056rm -f core conftest.err conftest.$ac_objext \
63057    conftest$ac_exeext conftest.$ac_ext
63058LIBS=$ac_check_lib_save_LIBS
63059fi
63060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63061$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63062if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63063  cat >>confdefs.h <<_ACEOF
63064#define HAVE_LIBJPEG 1
63065_ACEOF
63066
63067  LIBS="-ljpeg $LIBS"
63068
63069else
63070   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63071fi
63072
63073
63074    USE_EXTERNAL_LIBJPEG=true
63075  else
63076    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63077  fi
63078
63079
63080
63081
63082
63083# Check whether --with-giflib was given.
63084if test "${with_giflib+set}" = set; then :
63085  withval=$with_giflib;
63086fi
63087
63088
63089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63090$as_echo_n "checking for which giflib to use... " >&6; }
63091  # default is bundled
63092  DEFAULT_GIFLIB=bundled
63093  # if user didn't specify, use DEFAULT_GIFLIB
63094  if test "x${with_giflib}" = "x"; then
63095    with_giflib=${DEFAULT_GIFLIB}
63096  fi
63097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63098$as_echo "${with_giflib}" >&6; }
63099
63100  if test "x${with_giflib}" = "xbundled"; then
63101    USE_EXTERNAL_LIBGIF=false
63102  elif test "x${with_giflib}" = "xsystem"; then
63103    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63104if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63105
63106else
63107   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63108fi
63109
63110
63111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63112$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63113if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63114  $as_echo_n "(cached) " >&6
63115else
63116  ac_check_lib_save_LIBS=$LIBS
63117LIBS="-lgif  $LIBS"
63118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63119/* end confdefs.h.  */
63120
63121/* Override any GCC internal prototype to avoid an error.
63122   Use char because int might match the return type of a GCC
63123   builtin and then its argument prototype would still apply.  */
63124#ifdef __cplusplus
63125extern "C"
63126#endif
63127char DGifGetCode ();
63128int
63129main ()
63130{
63131return DGifGetCode ();
63132  ;
63133  return 0;
63134}
63135_ACEOF
63136if ac_fn_cxx_try_link "$LINENO"; then :
63137  ac_cv_lib_gif_DGifGetCode=yes
63138else
63139  ac_cv_lib_gif_DGifGetCode=no
63140fi
63141rm -f core conftest.err conftest.$ac_objext \
63142    conftest$ac_exeext conftest.$ac_ext
63143LIBS=$ac_check_lib_save_LIBS
63144fi
63145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63146$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63147if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63148  cat >>confdefs.h <<_ACEOF
63149#define HAVE_LIBGIF 1
63150_ACEOF
63151
63152  LIBS="-lgif $LIBS"
63153
63154else
63155   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63156fi
63157
63158
63159    USE_EXTERNAL_LIBGIF=true
63160  else
63161    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63162  fi
63163
63164
63165
63166
63167
63168# Check whether --with-libpng was given.
63169if test "${with_libpng+set}" = set; then :
63170  withval=$with_libpng;
63171fi
63172
63173
63174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63175$as_echo_n "checking for which libpng to use... " >&6; }
63176
63177  # default is bundled
63178  DEFAULT_LIBPNG=bundled
63179  # if user didn't specify, use DEFAULT_LIBPNG
63180  if test "x${with_libpng}" = "x"; then
63181      with_libpng=${DEFAULT_LIBPNG}
63182  fi
63183
63184  if test "x${with_libpng}" = "xbundled"; then
63185      USE_EXTERNAL_LIBPNG=false
63186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63187$as_echo "bundled" >&6; }
63188  elif test "x${with_libpng}" = "xsystem"; then
63189
63190pkg_failed=no
63191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63192$as_echo_n "checking for PNG... " >&6; }
63193
63194if test -n "$PNG_CFLAGS"; then
63195    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63196 elif test -n "$PKG_CONFIG"; then
63197    if test -n "$PKG_CONFIG" && \
63198    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63199  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63200  ac_status=$?
63201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63202  test $ac_status = 0; }; then
63203  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63204else
63205  pkg_failed=yes
63206fi
63207 else
63208    pkg_failed=untried
63209fi
63210if test -n "$PNG_LIBS"; then
63211    pkg_cv_PNG_LIBS="$PNG_LIBS"
63212 elif test -n "$PKG_CONFIG"; then
63213    if test -n "$PKG_CONFIG" && \
63214    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63215  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63216  ac_status=$?
63217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63218  test $ac_status = 0; }; then
63219  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63220else
63221  pkg_failed=yes
63222fi
63223 else
63224    pkg_failed=untried
63225fi
63226
63227
63228
63229if test $pkg_failed = yes; then
63230
63231if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63232        _pkg_short_errors_supported=yes
63233else
63234        _pkg_short_errors_supported=no
63235fi
63236        if test $_pkg_short_errors_supported = yes; then
63237	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63238        else
63239	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63240        fi
63241	# Put the nasty error message in config.log where it belongs
63242	echo "$PNG_PKG_ERRORS" >&5
63243
63244	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63245$as_echo "no" >&6; }
63246                 LIBPNG_FOUND=no
63247elif test $pkg_failed = untried; then
63248	 LIBPNG_FOUND=no
63249else
63250	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63251	PNG_LIBS=$pkg_cv_PNG_LIBS
63252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63253$as_echo "yes" >&6; }
63254	 LIBPNG_FOUND=yes
63255fi
63256      if test "x${LIBPNG_FOUND}" = "xyes"; then
63257          USE_EXTERNAL_LIBPNG=true
63258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63259$as_echo "system" >&6; }
63260      else
63261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63262$as_echo "system not found" >&6; }
63263          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63264      fi
63265  else
63266      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63267  fi
63268
63269
63270
63271
63272
63273# Check whether --with-zlib was given.
63274if test "${with_zlib+set}" = set; then :
63275  withval=$with_zlib;
63276fi
63277
63278
63279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63280$as_echo_n "checking for compress in -lz... " >&6; }
63281if ${ac_cv_lib_z_compress+:} false; then :
63282  $as_echo_n "(cached) " >&6
63283else
63284  ac_check_lib_save_LIBS=$LIBS
63285LIBS="-lz  $LIBS"
63286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63287/* end confdefs.h.  */
63288
63289/* Override any GCC internal prototype to avoid an error.
63290   Use char because int might match the return type of a GCC
63291   builtin and then its argument prototype would still apply.  */
63292#ifdef __cplusplus
63293extern "C"
63294#endif
63295char compress ();
63296int
63297main ()
63298{
63299return compress ();
63300  ;
63301  return 0;
63302}
63303_ACEOF
63304if ac_fn_cxx_try_link "$LINENO"; then :
63305  ac_cv_lib_z_compress=yes
63306else
63307  ac_cv_lib_z_compress=no
63308fi
63309rm -f core conftest.err conftest.$ac_objext \
63310    conftest$ac_exeext conftest.$ac_ext
63311LIBS=$ac_check_lib_save_LIBS
63312fi
63313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63314$as_echo "$ac_cv_lib_z_compress" >&6; }
63315if test "x$ac_cv_lib_z_compress" = xyes; then :
63316   ZLIB_FOUND=yes
63317else
63318   ZLIB_FOUND=no
63319fi
63320
63321
63322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63323$as_echo_n "checking for which zlib to use... " >&6; }
63324
63325  DEFAULT_ZLIB=system
63326  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63327    # On windows default is bundled...on others default is system
63328    DEFAULT_ZLIB=bundled
63329  fi
63330
63331  if test "x${ZLIB_FOUND}" != "xyes"; then
63332    # If we don't find any system...set default to bundled
63333    DEFAULT_ZLIB=bundled
63334  fi
63335
63336  # If user didn't specify, use DEFAULT_ZLIB
63337  if test "x${with_zlib}" = "x"; then
63338    with_zlib=${DEFAULT_ZLIB}
63339  fi
63340
63341  if test "x${with_zlib}" = "xbundled"; then
63342    USE_EXTERNAL_LIBZ=false
63343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63344$as_echo "bundled" >&6; }
63345  elif test "x${with_zlib}" = "xsystem"; then
63346    if test "x${ZLIB_FOUND}" = "xyes"; then
63347      USE_EXTERNAL_LIBZ=true
63348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63349$as_echo "system" >&6; }
63350    else
63351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63352$as_echo "system not found" >&6; }
63353      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63354    fi
63355  else
63356    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63357  fi
63358
63359
63360
63361
63362
63363# Check whether --with-lcms was given.
63364if test "${with_lcms+set}" = set; then :
63365  withval=$with_lcms;
63366fi
63367
63368
63369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63370$as_echo_n "checking for which lcms to use... " >&6; }
63371
63372  DEFAULT_LCMS=bundled
63373  # If user didn't specify, use DEFAULT_LCMS
63374  if test "x${with_lcms}" = "x"; then
63375      with_lcms=${DEFAULT_LCMS}
63376  fi
63377
63378  if test "x${with_lcms}" = "xbundled"; then
63379    USE_EXTERNAL_LCMS=false
63380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63381$as_echo "bundled" >&6; }
63382  elif test "x${with_lcms}" = "xsystem"; then
63383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63384$as_echo "system" >&6; }
63385
63386pkg_failed=no
63387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63388$as_echo_n "checking for LCMS... " >&6; }
63389
63390if test -n "$LCMS_CFLAGS"; then
63391    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63392 elif test -n "$PKG_CONFIG"; then
63393    if test -n "$PKG_CONFIG" && \
63394    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63395  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63396  ac_status=$?
63397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63398  test $ac_status = 0; }; then
63399  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63400else
63401  pkg_failed=yes
63402fi
63403 else
63404    pkg_failed=untried
63405fi
63406if test -n "$LCMS_LIBS"; then
63407    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63408 elif test -n "$PKG_CONFIG"; then
63409    if test -n "$PKG_CONFIG" && \
63410    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63411  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63412  ac_status=$?
63413  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63414  test $ac_status = 0; }; then
63415  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63416else
63417  pkg_failed=yes
63418fi
63419 else
63420    pkg_failed=untried
63421fi
63422
63423
63424
63425if test $pkg_failed = yes; then
63426
63427if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63428        _pkg_short_errors_supported=yes
63429else
63430        _pkg_short_errors_supported=no
63431fi
63432        if test $_pkg_short_errors_supported = yes; then
63433	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63434        else
63435	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63436        fi
63437	# Put the nasty error message in config.log where it belongs
63438	echo "$LCMS_PKG_ERRORS" >&5
63439
63440	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63441$as_echo "no" >&6; }
63442                LCMS_FOUND=no
63443elif test $pkg_failed = untried; then
63444	LCMS_FOUND=no
63445else
63446	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63447	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63449$as_echo "yes" >&6; }
63450	LCMS_FOUND=yes
63451fi
63452    if test "x${LCMS_FOUND}" = "xyes"; then
63453      USE_EXTERNAL_LCMS=true
63454    else
63455      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63456    fi
63457  else
63458    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63459  fi
63460
63461
63462
63463
63464
63465
63466
63467
63468
63469
63470
63471  # Setup libm (the maths library)
63472  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63474$as_echo_n "checking for cos in -lm... " >&6; }
63475if ${ac_cv_lib_m_cos+:} false; then :
63476  $as_echo_n "(cached) " >&6
63477else
63478  ac_check_lib_save_LIBS=$LIBS
63479LIBS="-lm  $LIBS"
63480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63481/* end confdefs.h.  */
63482
63483/* Override any GCC internal prototype to avoid an error.
63484   Use char because int might match the return type of a GCC
63485   builtin and then its argument prototype would still apply.  */
63486#ifdef __cplusplus
63487extern "C"
63488#endif
63489char cos ();
63490int
63491main ()
63492{
63493return cos ();
63494  ;
63495  return 0;
63496}
63497_ACEOF
63498if ac_fn_cxx_try_link "$LINENO"; then :
63499  ac_cv_lib_m_cos=yes
63500else
63501  ac_cv_lib_m_cos=no
63502fi
63503rm -f core conftest.err conftest.$ac_objext \
63504    conftest$ac_exeext conftest.$ac_ext
63505LIBS=$ac_check_lib_save_LIBS
63506fi
63507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63508$as_echo "$ac_cv_lib_m_cos" >&6; }
63509if test "x$ac_cv_lib_m_cos" = xyes; then :
63510  cat >>confdefs.h <<_ACEOF
63511#define HAVE_LIBM 1
63512_ACEOF
63513
63514  LIBS="-lm $LIBS"
63515
63516else
63517
63518        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63519$as_echo "$as_me: Maths library was not found" >&6;}
63520
63521fi
63522
63523    LIBM="-lm"
63524  else
63525    LIBM=""
63526  fi
63527
63528
63529  # Setup libdl (for dynamic library loading)
63530  save_LIBS="$LIBS"
63531  LIBS=""
63532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63533$as_echo_n "checking for dlopen in -ldl... " >&6; }
63534if ${ac_cv_lib_dl_dlopen+:} false; then :
63535  $as_echo_n "(cached) " >&6
63536else
63537  ac_check_lib_save_LIBS=$LIBS
63538LIBS="-ldl  $LIBS"
63539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63540/* end confdefs.h.  */
63541
63542/* Override any GCC internal prototype to avoid an error.
63543   Use char because int might match the return type of a GCC
63544   builtin and then its argument prototype would still apply.  */
63545#ifdef __cplusplus
63546extern "C"
63547#endif
63548char dlopen ();
63549int
63550main ()
63551{
63552return dlopen ();
63553  ;
63554  return 0;
63555}
63556_ACEOF
63557if ac_fn_cxx_try_link "$LINENO"; then :
63558  ac_cv_lib_dl_dlopen=yes
63559else
63560  ac_cv_lib_dl_dlopen=no
63561fi
63562rm -f core conftest.err conftest.$ac_objext \
63563    conftest$ac_exeext conftest.$ac_ext
63564LIBS=$ac_check_lib_save_LIBS
63565fi
63566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63567$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63568if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63569  cat >>confdefs.h <<_ACEOF
63570#define HAVE_LIBDL 1
63571_ACEOF
63572
63573  LIBS="-ldl $LIBS"
63574
63575fi
63576
63577  LIBDL="$LIBS"
63578
63579  LIBS="$save_LIBS"
63580
63581  # Deprecated libraries, keep the flags for backwards compatibility
63582  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63583
63584
63585# Check whether --with-dxsdk was given.
63586if test "${with_dxsdk+set}" = set; then :
63587  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63588$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63589fi
63590
63591
63592
63593
63594# Check whether --with-dxsdk-lib was given.
63595if test "${with_dxsdk_lib+set}" = set; then :
63596  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63597$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63598fi
63599
63600
63601
63602
63603# Check whether --with-dxsdk-include was given.
63604if test "${with_dxsdk_include+set}" = set; then :
63605  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63606$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63607fi
63608
63609
63610  fi
63611
63612  # Control if libzip can use mmap. Available for purposes of overriding.
63613  LIBZIP_CAN_USE_MMAP=true
63614
63615
63616
63617  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63618    # Find the root of the Solaris Studio installation from the compiler path
63619    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63620    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63622$as_echo_n "checking for libstlport.so.1... " >&6; }
63623    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63624      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63625      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63626    fi
63627    if test -f "$STLPORT_LIB"; then
63628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63629$as_echo "yes, $STLPORT_LIB" >&6; }
63630
63631  # Only process if variable expands to non-empty
63632
63633  if test "x$STLPORT_LIB" != x; then
63634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63635
63636  # Input might be given as Windows format, start by converting to
63637  # unix format.
63638  path="$STLPORT_LIB"
63639  new_path=`$CYGPATH -u "$path"`
63640
63641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63644  # "foo.exe" is OK but "foo" is an error.
63645  #
63646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63647  # It is also a way to make sure we got the proper file name for the real test later on.
63648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63649  if test "x$test_shortpath" = x; then
63650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63651$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63652    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63653  fi
63654
63655  # Call helper function which possibly converts this using DOS-style short mode.
63656  # If so, the updated path is stored in $new_path.
63657
63658  input_path="$new_path"
63659  # Check if we need to convert this using DOS-style short mode. If the path
63660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63661  # take no chances and rewrite it.
63662  # Note: m4 eats our [], so we need to use [ and ] instead.
63663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63664  if test "x$has_forbidden_chars" != x; then
63665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63669      # Going to short mode and back again did indeed matter. Since short mode is
63670      # case insensitive, let's make it lowercase to improve readability.
63671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63672      # Now convert it back to Unix-style (cygpath)
63673      input_path=`$CYGPATH -u "$shortmode_path"`
63674      new_path="$input_path"
63675    fi
63676  fi
63677
63678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63679  if test "x$test_cygdrive_prefix" = x; then
63680    # As a simple fix, exclude /usr/bin since it's not a real path.
63681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63683      # a path prefixed by /cygdrive for fixpath to work.
63684      new_path="$CYGWIN_ROOT_PATH$input_path"
63685    fi
63686  fi
63687
63688
63689  if test "x$path" != "x$new_path"; then
63690    STLPORT_LIB="$new_path"
63691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63692$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63693  fi
63694
63695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63696
63697  path="$STLPORT_LIB"
63698  has_colon=`$ECHO $path | $GREP ^.:`
63699  new_path="$path"
63700  if test "x$has_colon" = x; then
63701    # Not in mixed or Windows style, start by that.
63702    new_path=`cmd //c echo $path`
63703  fi
63704
63705
63706  input_path="$new_path"
63707  # Check if we need to convert this using DOS-style short mode. If the path
63708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63709  # take no chances and rewrite it.
63710  # Note: m4 eats our [], so we need to use [ and ] instead.
63711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63712  if test "x$has_forbidden_chars" != x; then
63713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63715  fi
63716
63717
63718  windows_path="$new_path"
63719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63720    unix_path=`$CYGPATH -u "$windows_path"`
63721    new_path="$unix_path"
63722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63724    new_path="$unix_path"
63725  fi
63726
63727  if test "x$path" != "x$new_path"; then
63728    STLPORT_LIB="$new_path"
63729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63730$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63731  fi
63732
63733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63735
63736    else
63737      # We're on a unix platform. Hooray! :)
63738      path="$STLPORT_LIB"
63739      has_space=`$ECHO "$path" | $GREP " "`
63740      if test "x$has_space" != x; then
63741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63742$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63743        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63744      fi
63745
63746      # Use eval to expand a potential ~
63747      eval path="$path"
63748      if test ! -f "$path" && test ! -d "$path"; then
63749        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63750      fi
63751
63752      if test -d "$path"; then
63753        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63754      else
63755        dir="`$DIRNAME "$path"`"
63756        base="`$BASENAME "$path"`"
63757        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63758      fi
63759    fi
63760  fi
63761
63762    else
63763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63764$as_echo "no, not found at $STLPORT_LIB" >&6; }
63765      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63766    fi
63767
63768  fi
63769
63770
63771
63772
63773
63774
63775
63776
63777
63778
63779
63780
63781
63782
63783###############################################################################
63784#
63785# We need to do some final tweaking, when everything else is done.
63786#
63787###############################################################################
63788
63789
63790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63791$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63792
63793  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63794    ENABLE_INTREE_EC=yes
63795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63796$as_echo "yes" >&6; }
63797  else
63798    ENABLE_INTREE_EC=no
63799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63800$as_echo "no" >&6; }
63801  fi
63802
63803
63804
63805
63806  # Check whether --enable-jtreg-failure-handler was given.
63807if test "${enable_jtreg_failure_handler+set}" = set; then :
63808  enableval=$enable_jtreg_failure_handler;
63809fi
63810
63811
63812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63813$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63814
63815  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63816    if test "x$JT_HOME" = "x"; then
63817      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63818    else
63819      BUILD_FAILURE_HANDLER=true
63820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63821$as_echo "yes, forced" >&6; }
63822    fi
63823  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63824    BUILD_FAILURE_HANDLER=false
63825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63826$as_echo "no, forced" >&6; }
63827  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63828      || test "x$enable_jtreg_failure_handler" = "x"; then
63829    if test "x$JT_HOME" = "x"; then
63830      BUILD_FAILURE_HANDLER=false
63831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63832$as_echo "no, missing jtreg" >&6; }
63833    else
63834      BUILD_FAILURE_HANDLER=true
63835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63836$as_echo "yes, jtreg present" >&6; }
63837    fi
63838  else
63839    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63840  fi
63841
63842
63843
63844
63845  # Check whether --enable-generate-classlist was given.
63846if test "${enable_generate_classlist+set}" = set; then :
63847  enableval=$enable_generate_classlist;
63848fi
63849
63850
63851  # Check if it's likely that it's possible to generate the classlist. Depending
63852  # on exact jvm configuration it could be possible anyway.
63853  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63854    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63855  else
63856    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63857  fi
63858
63859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63860$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63861  if test "x$enable_generate_classlist" = "xyes"; then
63862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63863$as_echo "yes, forced" >&6; }
63864    ENABLE_GENERATE_CLASSLIST="true"
63865    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63866      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63867$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63868    fi
63869  elif test "x$enable_generate_classlist" = "xno"; then
63870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63871$as_echo "no, forced" >&6; }
63872    ENABLE_GENERATE_CLASSLIST="false"
63873  elif test "x$enable_generate_classlist" = "x"; then
63874    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63876$as_echo "yes" >&6; }
63877      ENABLE_GENERATE_CLASSLIST="true"
63878    else
63879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63880$as_echo "no" >&6; }
63881      ENABLE_GENERATE_CLASSLIST="false"
63882    fi
63883  else
63884    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63885  fi
63886
63887
63888
63889
63890###############################################################################
63891#
63892# Configure parts of the build that only affect the build performance,
63893# not the result.
63894#
63895###############################################################################
63896
63897
63898  # How many cores do we have on this build system?
63899
63900# Check whether --with-num-cores was given.
63901if test "${with_num_cores+set}" = set; then :
63902  withval=$with_num_cores;
63903fi
63904
63905  if test "x$with_num_cores" = x; then
63906    # The number of cores were not specified, try to probe them.
63907
63908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63909$as_echo_n "checking for number of cores... " >&6; }
63910  NUM_CORES=1
63911  FOUND_CORES=no
63912
63913  if test -f /proc/cpuinfo; then
63914    # Looks like a Linux (or cygwin) system
63915    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63916    FOUND_CORES=yes
63917  elif test -x /usr/sbin/psrinfo; then
63918    # Looks like a Solaris system
63919    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63920    FOUND_CORES=yes
63921  elif test -x /usr/sbin/sysctl; then
63922    # Looks like a MacOSX system
63923    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63924    FOUND_CORES=yes
63925  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63926    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63927    FOUND_CORES=yes
63928  elif test -n "$NUMBER_OF_PROCESSORS"; then
63929    # On windows, look in the env
63930    NUM_CORES=$NUMBER_OF_PROCESSORS
63931    FOUND_CORES=yes
63932  fi
63933
63934  if test "x$FOUND_CORES" = xyes; then
63935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63936$as_echo "$NUM_CORES" >&6; }
63937  else
63938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63939$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63940    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63941$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63942  fi
63943
63944  else
63945    NUM_CORES=$with_num_cores
63946  fi
63947
63948
63949
63950  # How much memory do we have on this build system?
63951
63952# Check whether --with-memory-size was given.
63953if test "${with_memory_size+set}" = set; then :
63954  withval=$with_memory_size;
63955fi
63956
63957  if test "x$with_memory_size" = x; then
63958    # The memory size was not specified, try to probe it.
63959
63960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63961$as_echo_n "checking for memory size... " >&6; }
63962  # Default to 1024 MB
63963  MEMORY_SIZE=1024
63964  FOUND_MEM=no
63965
63966  if test -f /proc/meminfo; then
63967    # Looks like a Linux (or cygwin) system
63968    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63969    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63970    FOUND_MEM=yes
63971  elif test -x /usr/sbin/prtconf; then
63972    # Looks like a Solaris or AIX system
63973    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63974    FOUND_MEM=yes
63975  elif test -x /usr/sbin/sysctl; then
63976    # Looks like a MacOSX system
63977    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63978    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63979    FOUND_MEM=yes
63980  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63981    # Windows, but without cygwin
63982    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63983    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63984    FOUND_MEM=yes
63985  fi
63986
63987  if test "x$FOUND_MEM" = xyes; then
63988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63989$as_echo "$MEMORY_SIZE MB" >&6; }
63990  else
63991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63992$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63993    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63994$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63995  fi
63996
63997  else
63998    MEMORY_SIZE=$with_memory_size
63999  fi
64000
64001
64002
64003  # Provide a decent default number of parallel jobs for make depending on
64004  # number of cores, amount of memory and machine architecture.
64005
64006# Check whether --with-jobs was given.
64007if test "${with_jobs+set}" = set; then :
64008  withval=$with_jobs;
64009fi
64010
64011  if test "x$with_jobs" = x; then
64012    # Number of jobs was not specified, calculate.
64013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64014$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64015    # Approximate memory in GB.
64016    memory_gb=`expr $MEMORY_SIZE / 1024`
64017    # Pick the lowest of memory in gb and number of cores.
64018    if test "$memory_gb" -lt "$NUM_CORES"; then
64019      JOBS="$memory_gb"
64020    else
64021      JOBS="$NUM_CORES"
64022    fi
64023    if test "$JOBS" -eq "0"; then
64024      JOBS=1
64025    fi
64026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64027$as_echo "$JOBS" >&6; }
64028  else
64029    JOBS=$with_jobs
64030  fi
64031
64032
64033
64034  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64035
64036# Check whether --with-test-jobs was given.
64037if test "${with_test_jobs+set}" = set; then :
64038  withval=$with_test_jobs;
64039fi
64040
64041  if test "x$with_test_jobs" = x; then
64042      TEST_JOBS=0
64043  else
64044      TEST_JOBS=$with_test_jobs
64045  fi
64046
64047
64048
64049# Setup arguments for the boot jdk (after cores and memory have been setup)
64050
64051  ##############################################################################
64052  #
64053  # Specify jvm options for anything that is run with the Boot JDK.
64054  # Not all JVM:s accept the same arguments on the command line.
64055  #
64056
64057# Check whether --with-boot-jdk-jvmargs was given.
64058if test "${with_boot_jdk_jvmargs+set}" = set; then :
64059  withval=$with_boot_jdk_jvmargs;
64060fi
64061
64062
64063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64064$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64065
64066  # Disable special log output when a debug build is used as Boot JDK...
64067
64068  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64069  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64070  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64071  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64072  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64073  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64074    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64075    JVM_ARG_OK=true
64076  else
64077    $ECHO "Arg failed:" >&5
64078    $ECHO "$OUTPUT" >&5
64079    JVM_ARG_OK=false
64080  fi
64081
64082
64083  # Force en-US environment
64084
64085  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64086  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64087  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64088  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64089  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64091    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64092    JVM_ARG_OK=true
64093  else
64094    $ECHO "Arg failed:" >&5
64095    $ECHO "$OUTPUT" >&5
64096    JVM_ARG_OK=false
64097  fi
64098
64099
64100  # Apply user provided options.
64101
64102  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64103  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64104  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64105  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64106  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64107  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64108    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64109    JVM_ARG_OK=true
64110  else
64111    $ECHO "Arg failed:" >&5
64112    $ECHO "$OUTPUT" >&5
64113    JVM_ARG_OK=false
64114  fi
64115
64116
64117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64118$as_echo "$boot_jdk_jvmargs" >&6; }
64119
64120  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64121  JAVA_FLAGS=$boot_jdk_jvmargs
64122
64123
64124
64125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64126$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64127
64128  # Starting amount of heap memory.
64129
64130  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64131  $ECHO "Command: $JAVA -Xms64M -version" >&5
64132  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64133  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64134  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64135  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64136    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64137    JVM_ARG_OK=true
64138  else
64139    $ECHO "Arg failed:" >&5
64140    $ECHO "$OUTPUT" >&5
64141    JVM_ARG_OK=false
64142  fi
64143
64144  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64145
64146  # Maximum amount of heap memory and stack size.
64147  JVM_HEAP_LIMIT_32="1024"
64148  # Running a 64 bit JVM allows for and requires a bigger heap
64149  JVM_HEAP_LIMIT_64="1600"
64150  STACK_SIZE_32=768
64151  STACK_SIZE_64=1536
64152  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64153  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64154    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64155  fi
64156  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64157    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64158  fi
64159  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64160    JVM_HEAP_LIMIT_32=512
64161    JVM_HEAP_LIMIT_64=512
64162  fi
64163
64164  if test "x$BOOT_JDK_BITS" = "x32"; then
64165    STACK_SIZE=$STACK_SIZE_32
64166    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64167  else
64168    STACK_SIZE=$STACK_SIZE_64
64169    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64170  fi
64171
64172  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64173  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64174  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64175  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64176  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64177  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64178    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64179    JVM_ARG_OK=true
64180  else
64181    $ECHO "Arg failed:" >&5
64182    $ECHO "$OUTPUT" >&5
64183    JVM_ARG_OK=false
64184  fi
64185
64186
64187  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64188  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64189  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64190  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64191  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64192  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64193    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64194    JVM_ARG_OK=true
64195  else
64196    $ECHO "Arg failed:" >&5
64197    $ECHO "$OUTPUT" >&5
64198    JVM_ARG_OK=false
64199  fi
64200
64201
64202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64203$as_echo "$boot_jdk_jvmargs_big" >&6; }
64204
64205  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64206
64207
64208  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64209    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64210    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64211  else
64212    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64213    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64214  fi
64215  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64216  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64218$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64220$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64221
64222
64223  # By default, the main javac compilations use big
64224  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64225
64226
64227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64228$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64229
64230  # Use serial gc for small short lived tools if possible
64231
64232  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64233  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64234  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64235  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64236  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64237  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64238    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64239    JVM_ARG_OK=true
64240  else
64241    $ECHO "Arg failed:" >&5
64242    $ECHO "$OUTPUT" >&5
64243    JVM_ARG_OK=false
64244  fi
64245
64246
64247  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64248  $ECHO "Command: $JAVA -Xms32M -version" >&5
64249  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64250  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64251  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64252  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64253    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64254    JVM_ARG_OK=true
64255  else
64256    $ECHO "Arg failed:" >&5
64257    $ECHO "$OUTPUT" >&5
64258    JVM_ARG_OK=false
64259  fi
64260
64261
64262  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64263  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64264  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64265  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64266  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64267  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64268    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64269    JVM_ARG_OK=true
64270  else
64271    $ECHO "Arg failed:" >&5
64272    $ECHO "$OUTPUT" >&5
64273    JVM_ARG_OK=false
64274  fi
64275
64276
64277  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64278  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64279  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64280  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64281  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64282  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64283    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64284    JVM_ARG_OK=true
64285  else
64286    $ECHO "Arg failed:" >&5
64287    $ECHO "$OUTPUT" >&5
64288    JVM_ARG_OK=false
64289  fi
64290
64291
64292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64293$as_echo "$boot_jdk_jvmargs_small" >&6; }
64294
64295  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64296
64297
64298  JAVA_TOOL_FLAGS_SMALL=""
64299  for f in $JAVA_FLAGS_SMALL; do
64300    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64301  done
64302
64303
64304
64305# Setup smart javac (after cores and memory have been setup)
64306
64307
64308# Check whether --with-sjavac-server-java was given.
64309if test "${with_sjavac_server_java+set}" = set; then :
64310  withval=$with_sjavac_server_java;
64311fi
64312
64313
64314  if test "x$with_sjavac_server_java" != x; then
64315    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64316    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64317    if test "x$FOUND_VERSION" = x; then
64318      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64319    fi
64320  else
64321    SJAVAC_SERVER_JAVA="$JAVA"
64322  fi
64323
64324
64325  if test "$MEMORY_SIZE" -gt "3000"; then
64326
64327  $ECHO "Check if jvm arg is ok: -d64" >&5
64328  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64329  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64330  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64331  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64333    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64334    JVM_ARG_OK=true
64335  else
64336    $ECHO "Arg failed:" >&5
64337    $ECHO "$OUTPUT" >&5
64338    JVM_ARG_OK=false
64339  fi
64340
64341    if test "$JVM_ARG_OK" = true; then
64342      JVM_64BIT=true
64343      JVM_ARG_OK=false
64344    fi
64345  fi
64346
64347  MX_VALUE=`expr $MEMORY_SIZE / 2`
64348  if test "$JVM_64BIT" = true; then
64349    # Set ms lower than mx since more than one instance of the server might
64350    # get launched at the same time before they figure out which instance won.
64351    MS_VALUE=512
64352    if test "$MX_VALUE" -gt "2048"; then
64353      MX_VALUE=2048
64354    fi
64355  else
64356    MS_VALUE=256
64357    if test "$MX_VALUE" -gt "1500"; then
64358      MX_VALUE=1500
64359    fi
64360  fi
64361  if test "$MX_VALUE" -lt "512"; then
64362    MX_VALUE=512
64363  fi
64364
64365  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64366  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64367  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64368  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64369  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64370  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64371    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64372    JVM_ARG_OK=true
64373  else
64374    $ECHO "Arg failed:" >&5
64375    $ECHO "$OUTPUT" >&5
64376    JVM_ARG_OK=false
64377  fi
64378
64379
64380
64381  # Check whether --enable-sjavac was given.
64382if test "${enable_sjavac+set}" = set; then :
64383  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64384else
64385  ENABLE_SJAVAC="no"
64386fi
64387
64388  if test "x$JVM_ARG_OK" = "xfalse"; then
64389    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64390$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64391    ENABLE_SJAVAC="no"
64392  fi
64393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64394$as_echo_n "checking whether to use sjavac... " >&6; }
64395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64396$as_echo "$ENABLE_SJAVAC" >&6; }
64397
64398
64399  # Check whether --enable-javac-server was given.
64400if test "${enable_javac_server+set}" = set; then :
64401  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64402else
64403  ENABLE_JAVAC_SERVER="yes"
64404fi
64405
64406  if test "x$JVM_ARG_OK" = "xfalse"; then
64407    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64408$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64409    ENABLE_JAVAC_SERVER="no"
64410  fi
64411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64412$as_echo_n "checking whether to use javac server... " >&6; }
64413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64414$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64415
64416
64417  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64418    # When using a server javac, the small client instances do not need much
64419    # resources.
64420    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64421  fi
64422
64423
64424# Setup use of icecc if requested
64425
64426  # Check whether --enable-icecc was given.
64427if test "${enable_icecc+set}" = set; then :
64428  enableval=$enable_icecc;
64429fi
64430
64431
64432  if test "x${enable_icecc}" = "xyes"; then
64433
64434
64435
64436  # Publish this variable in the help.
64437
64438
64439  if [ -z "${ICECC_CMD+x}" ]; then
64440    # The variable is not set by user, try to locate tool using the code snippet
64441    for ac_prog in icecc
64442do
64443  # Extract the first word of "$ac_prog", so it can be a program name with args.
64444set dummy $ac_prog; ac_word=$2
64445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64446$as_echo_n "checking for $ac_word... " >&6; }
64447if ${ac_cv_path_ICECC_CMD+:} false; then :
64448  $as_echo_n "(cached) " >&6
64449else
64450  case $ICECC_CMD in
64451  [\\/]* | ?:[\\/]*)
64452  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64453  ;;
64454  *)
64455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64456for as_dir in $PATH
64457do
64458  IFS=$as_save_IFS
64459  test -z "$as_dir" && as_dir=.
64460    for ac_exec_ext in '' $ac_executable_extensions; do
64461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64462    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64464    break 2
64465  fi
64466done
64467  done
64468IFS=$as_save_IFS
64469
64470  ;;
64471esac
64472fi
64473ICECC_CMD=$ac_cv_path_ICECC_CMD
64474if test -n "$ICECC_CMD"; then
64475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64476$as_echo "$ICECC_CMD" >&6; }
64477else
64478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64479$as_echo "no" >&6; }
64480fi
64481
64482
64483  test -n "$ICECC_CMD" && break
64484done
64485
64486  else
64487    # The variable is set, but is it from the command line or the environment?
64488
64489    # Try to remove the string !ICECC_CMD! from our list.
64490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64492      # If it failed, the variable was not from the command line. Ignore it,
64493      # but warn the user (except for BASH, which is always set by the calling BASH).
64494      if test "xICECC_CMD" != xBASH; then
64495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64496$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64497      fi
64498      # Try to locate tool using the code snippet
64499      for ac_prog in icecc
64500do
64501  # Extract the first word of "$ac_prog", so it can be a program name with args.
64502set dummy $ac_prog; ac_word=$2
64503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64504$as_echo_n "checking for $ac_word... " >&6; }
64505if ${ac_cv_path_ICECC_CMD+:} false; then :
64506  $as_echo_n "(cached) " >&6
64507else
64508  case $ICECC_CMD in
64509  [\\/]* | ?:[\\/]*)
64510  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64511  ;;
64512  *)
64513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64514for as_dir in $PATH
64515do
64516  IFS=$as_save_IFS
64517  test -z "$as_dir" && as_dir=.
64518    for ac_exec_ext in '' $ac_executable_extensions; do
64519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64520    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64522    break 2
64523  fi
64524done
64525  done
64526IFS=$as_save_IFS
64527
64528  ;;
64529esac
64530fi
64531ICECC_CMD=$ac_cv_path_ICECC_CMD
64532if test -n "$ICECC_CMD"; then
64533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64534$as_echo "$ICECC_CMD" >&6; }
64535else
64536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64537$as_echo "no" >&6; }
64538fi
64539
64540
64541  test -n "$ICECC_CMD" && break
64542done
64543
64544    else
64545      # If it succeeded, then it was overridden by the user. We will use it
64546      # for the tool.
64547
64548      # First remove it from the list of overridden variables, so we can test
64549      # for unknown variables in the end.
64550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64551
64552      # Check if we try to supply an empty value
64553      if test "x$ICECC_CMD" = x; then
64554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64555$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64557$as_echo_n "checking for ICECC_CMD... " >&6; }
64558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64559$as_echo "disabled" >&6; }
64560      else
64561        # Check if the provided tool contains a complete path.
64562        tool_specified="$ICECC_CMD"
64563        tool_basename="${tool_specified##*/}"
64564        if test "x$tool_basename" = "x$tool_specified"; then
64565          # A command without a complete path is provided, search $PATH.
64566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64567$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64568          # Extract the first word of "$tool_basename", so it can be a program name with args.
64569set dummy $tool_basename; ac_word=$2
64570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64571$as_echo_n "checking for $ac_word... " >&6; }
64572if ${ac_cv_path_ICECC_CMD+:} false; then :
64573  $as_echo_n "(cached) " >&6
64574else
64575  case $ICECC_CMD in
64576  [\\/]* | ?:[\\/]*)
64577  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64578  ;;
64579  *)
64580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64581for as_dir in $PATH
64582do
64583  IFS=$as_save_IFS
64584  test -z "$as_dir" && as_dir=.
64585    for ac_exec_ext in '' $ac_executable_extensions; do
64586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64587    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64589    break 2
64590  fi
64591done
64592  done
64593IFS=$as_save_IFS
64594
64595  ;;
64596esac
64597fi
64598ICECC_CMD=$ac_cv_path_ICECC_CMD
64599if test -n "$ICECC_CMD"; then
64600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64601$as_echo "$ICECC_CMD" >&6; }
64602else
64603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64604$as_echo "no" >&6; }
64605fi
64606
64607
64608          if test "x$ICECC_CMD" = x; then
64609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64610          fi
64611        else
64612          # Otherwise we believe it is a complete path. Use it as it is.
64613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64614$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64616$as_echo_n "checking for ICECC_CMD... " >&6; }
64617          if test ! -x "$tool_specified"; then
64618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64619$as_echo "not found" >&6; }
64620            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64621          fi
64622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64623$as_echo "$tool_specified" >&6; }
64624        fi
64625      fi
64626    fi
64627
64628  fi
64629
64630
64631
64632  if test "x$ICECC_CMD" = x; then
64633    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64634  fi
64635
64636
64637    old_path="$PATH"
64638
64639    # Look for icecc-create-env in some known places
64640    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64641
64642
64643
64644  # Publish this variable in the help.
64645
64646
64647  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64648    # The variable is not set by user, try to locate tool using the code snippet
64649    for ac_prog in icecc-create-env
64650do
64651  # Extract the first word of "$ac_prog", so it can be a program name with args.
64652set dummy $ac_prog; ac_word=$2
64653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64654$as_echo_n "checking for $ac_word... " >&6; }
64655if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64656  $as_echo_n "(cached) " >&6
64657else
64658  case $ICECC_CREATE_ENV in
64659  [\\/]* | ?:[\\/]*)
64660  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64661  ;;
64662  *)
64663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64664for as_dir in $PATH
64665do
64666  IFS=$as_save_IFS
64667  test -z "$as_dir" && as_dir=.
64668    for ac_exec_ext in '' $ac_executable_extensions; do
64669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64670    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64672    break 2
64673  fi
64674done
64675  done
64676IFS=$as_save_IFS
64677
64678  ;;
64679esac
64680fi
64681ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64682if test -n "$ICECC_CREATE_ENV"; then
64683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64684$as_echo "$ICECC_CREATE_ENV" >&6; }
64685else
64686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64687$as_echo "no" >&6; }
64688fi
64689
64690
64691  test -n "$ICECC_CREATE_ENV" && break
64692done
64693
64694  else
64695    # The variable is set, but is it from the command line or the environment?
64696
64697    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64700      # If it failed, the variable was not from the command line. Ignore it,
64701      # but warn the user (except for BASH, which is always set by the calling BASH).
64702      if test "xICECC_CREATE_ENV" != xBASH; then
64703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64704$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64705      fi
64706      # Try to locate tool using the code snippet
64707      for ac_prog in icecc-create-env
64708do
64709  # Extract the first word of "$ac_prog", so it can be a program name with args.
64710set dummy $ac_prog; ac_word=$2
64711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64712$as_echo_n "checking for $ac_word... " >&6; }
64713if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64714  $as_echo_n "(cached) " >&6
64715else
64716  case $ICECC_CREATE_ENV in
64717  [\\/]* | ?:[\\/]*)
64718  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64719  ;;
64720  *)
64721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64722for as_dir in $PATH
64723do
64724  IFS=$as_save_IFS
64725  test -z "$as_dir" && as_dir=.
64726    for ac_exec_ext in '' $ac_executable_extensions; do
64727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64728    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64730    break 2
64731  fi
64732done
64733  done
64734IFS=$as_save_IFS
64735
64736  ;;
64737esac
64738fi
64739ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64740if test -n "$ICECC_CREATE_ENV"; then
64741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64742$as_echo "$ICECC_CREATE_ENV" >&6; }
64743else
64744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64745$as_echo "no" >&6; }
64746fi
64747
64748
64749  test -n "$ICECC_CREATE_ENV" && break
64750done
64751
64752    else
64753      # If it succeeded, then it was overridden by the user. We will use it
64754      # for the tool.
64755
64756      # First remove it from the list of overridden variables, so we can test
64757      # for unknown variables in the end.
64758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64759
64760      # Check if we try to supply an empty value
64761      if test "x$ICECC_CREATE_ENV" = x; then
64762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64763$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64765$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64767$as_echo "disabled" >&6; }
64768      else
64769        # Check if the provided tool contains a complete path.
64770        tool_specified="$ICECC_CREATE_ENV"
64771        tool_basename="${tool_specified##*/}"
64772        if test "x$tool_basename" = "x$tool_specified"; then
64773          # A command without a complete path is provided, search $PATH.
64774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64775$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64776          # Extract the first word of "$tool_basename", so it can be a program name with args.
64777set dummy $tool_basename; ac_word=$2
64778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64779$as_echo_n "checking for $ac_word... " >&6; }
64780if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64781  $as_echo_n "(cached) " >&6
64782else
64783  case $ICECC_CREATE_ENV in
64784  [\\/]* | ?:[\\/]*)
64785  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64786  ;;
64787  *)
64788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64789for as_dir in $PATH
64790do
64791  IFS=$as_save_IFS
64792  test -z "$as_dir" && as_dir=.
64793    for ac_exec_ext in '' $ac_executable_extensions; do
64794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64795    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64797    break 2
64798  fi
64799done
64800  done
64801IFS=$as_save_IFS
64802
64803  ;;
64804esac
64805fi
64806ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64807if test -n "$ICECC_CREATE_ENV"; then
64808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64809$as_echo "$ICECC_CREATE_ENV" >&6; }
64810else
64811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64812$as_echo "no" >&6; }
64813fi
64814
64815
64816          if test "x$ICECC_CREATE_ENV" = x; then
64817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64818          fi
64819        else
64820          # Otherwise we believe it is a complete path. Use it as it is.
64821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64822$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64824$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64825          if test ! -x "$tool_specified"; then
64826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64827$as_echo "not found" >&6; }
64828            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64829          fi
64830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64831$as_echo "$tool_specified" >&6; }
64832        fi
64833      fi
64834    fi
64835
64836  fi
64837
64838
64839
64840  if test "x$ICECC_CREATE_ENV" = x; then
64841    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64842  fi
64843
64844
64845    # Use icecc-create-env to create a minimal compilation environment that can
64846    # be sent to the other hosts in the icecream cluster.
64847    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64848    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64849    # Older versions of icecc does not have the --gcc parameter
64850    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64851      icecc_gcc_arg="--gcc"
64852    fi
64853    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64854
64855  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64856      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64857          ${icecc_create_env_log} 2>&1 )
64858  if test "$?" != "0"; then
64859    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64860$as_echo "$as_me: icecc-create-env output:" >&6;}
64861    cat \
64862          ${icecc_create_env_log}
64863    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64864  fi
64865
64866    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64867      # For clang, the icecc compilerwrapper is needed. It usually resides next
64868      # to icecc-create-env.
64869
64870
64871
64872  # Publish this variable in the help.
64873
64874
64875  if [ -z "${ICECC_WRAPPER+x}" ]; then
64876    # The variable is not set by user, try to locate tool using the code snippet
64877    for ac_prog in compilerwrapper
64878do
64879  # Extract the first word of "$ac_prog", so it can be a program name with args.
64880set dummy $ac_prog; ac_word=$2
64881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64882$as_echo_n "checking for $ac_word... " >&6; }
64883if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64884  $as_echo_n "(cached) " >&6
64885else
64886  case $ICECC_WRAPPER in
64887  [\\/]* | ?:[\\/]*)
64888  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64889  ;;
64890  *)
64891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64892for as_dir in $PATH
64893do
64894  IFS=$as_save_IFS
64895  test -z "$as_dir" && as_dir=.
64896    for ac_exec_ext in '' $ac_executable_extensions; do
64897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64898    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64900    break 2
64901  fi
64902done
64903  done
64904IFS=$as_save_IFS
64905
64906  ;;
64907esac
64908fi
64909ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64910if test -n "$ICECC_WRAPPER"; then
64911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64912$as_echo "$ICECC_WRAPPER" >&6; }
64913else
64914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64915$as_echo "no" >&6; }
64916fi
64917
64918
64919  test -n "$ICECC_WRAPPER" && break
64920done
64921
64922  else
64923    # The variable is set, but is it from the command line or the environment?
64924
64925    # Try to remove the string !ICECC_WRAPPER! from our list.
64926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64928      # If it failed, the variable was not from the command line. Ignore it,
64929      # but warn the user (except for BASH, which is always set by the calling BASH).
64930      if test "xICECC_WRAPPER" != xBASH; then
64931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64932$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64933      fi
64934      # Try to locate tool using the code snippet
64935      for ac_prog in compilerwrapper
64936do
64937  # Extract the first word of "$ac_prog", so it can be a program name with args.
64938set dummy $ac_prog; ac_word=$2
64939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64940$as_echo_n "checking for $ac_word... " >&6; }
64941if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64942  $as_echo_n "(cached) " >&6
64943else
64944  case $ICECC_WRAPPER in
64945  [\\/]* | ?:[\\/]*)
64946  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64947  ;;
64948  *)
64949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64950for as_dir in $PATH
64951do
64952  IFS=$as_save_IFS
64953  test -z "$as_dir" && as_dir=.
64954    for ac_exec_ext in '' $ac_executable_extensions; do
64955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64956    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64958    break 2
64959  fi
64960done
64961  done
64962IFS=$as_save_IFS
64963
64964  ;;
64965esac
64966fi
64967ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64968if test -n "$ICECC_WRAPPER"; then
64969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64970$as_echo "$ICECC_WRAPPER" >&6; }
64971else
64972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64973$as_echo "no" >&6; }
64974fi
64975
64976
64977  test -n "$ICECC_WRAPPER" && break
64978done
64979
64980    else
64981      # If it succeeded, then it was overridden by the user. We will use it
64982      # for the tool.
64983
64984      # First remove it from the list of overridden variables, so we can test
64985      # for unknown variables in the end.
64986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64987
64988      # Check if we try to supply an empty value
64989      if test "x$ICECC_WRAPPER" = x; then
64990        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64991$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64993$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64995$as_echo "disabled" >&6; }
64996      else
64997        # Check if the provided tool contains a complete path.
64998        tool_specified="$ICECC_WRAPPER"
64999        tool_basename="${tool_specified##*/}"
65000        if test "x$tool_basename" = "x$tool_specified"; then
65001          # A command without a complete path is provided, search $PATH.
65002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65003$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65004          # Extract the first word of "$tool_basename", so it can be a program name with args.
65005set dummy $tool_basename; ac_word=$2
65006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65007$as_echo_n "checking for $ac_word... " >&6; }
65008if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65009  $as_echo_n "(cached) " >&6
65010else
65011  case $ICECC_WRAPPER in
65012  [\\/]* | ?:[\\/]*)
65013  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65014  ;;
65015  *)
65016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65017for as_dir in $PATH
65018do
65019  IFS=$as_save_IFS
65020  test -z "$as_dir" && as_dir=.
65021    for ac_exec_ext in '' $ac_executable_extensions; do
65022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65023    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65025    break 2
65026  fi
65027done
65028  done
65029IFS=$as_save_IFS
65030
65031  ;;
65032esac
65033fi
65034ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65035if test -n "$ICECC_WRAPPER"; then
65036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65037$as_echo "$ICECC_WRAPPER" >&6; }
65038else
65039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65040$as_echo "no" >&6; }
65041fi
65042
65043
65044          if test "x$ICECC_WRAPPER" = x; then
65045            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65046          fi
65047        else
65048          # Otherwise we believe it is a complete path. Use it as it is.
65049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65050$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65051          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65052$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65053          if test ! -x "$tool_specified"; then
65054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65055$as_echo "not found" >&6; }
65056            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65057          fi
65058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65059$as_echo "$tool_specified" >&6; }
65060        fi
65061      fi
65062    fi
65063
65064  fi
65065
65066
65067
65068  if test "x$ICECC_WRAPPER" = x; then
65069    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65070  fi
65071
65072
65073
65074  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65075      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65076  if test "$?" != "0"; then
65077    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65078$as_echo "$as_me: icecc-create-env output:" >&6;}
65079    cat ${icecc_create_env_log}
65080    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65081  fi
65082
65083    else
65084      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65085    fi
65086    PATH="$old_path"
65087    # The bundle with the compiler gets a name based on checksums. Parse log file
65088    # to find it.
65089    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65090    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65091    if test ! -f ${ICECC_ENV_BUNDLE}; then
65092      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65093    fi
65094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65095$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65097$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65098    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65099
65100    if test "x${COMPILE_TYPE}" = "xcross"; then
65101      # If cross compiling, create a separate env package for the build compiler
65102      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65103      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65104      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65105
65106  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65107      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65108            ${icecc_create_env_log_build} 2>&1 )
65109  if test "$?" != "0"; then
65110    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65111$as_echo "$as_me: icecc-create-env output:" >&6;}
65112    cat \
65113            ${icecc_create_env_log_build}
65114    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65115  fi
65116
65117      elif test "x${BUILD_CC##*/}" = "xclang"; then
65118
65119  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65120      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65121  if test "$?" != "0"; then
65122    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65123$as_echo "$as_me: icecc-create-env output:" >&6;}
65124    cat ${icecc_create_env_log_build}
65125    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65126  fi
65127
65128      else
65129        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65130      fi
65131      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65132      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65133      if test ! -f ${ICECC_ENV_BUNDLE}; then
65134        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65135      fi
65136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65137$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65139$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65140      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65141          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65142    else
65143      BUILD_ICECC="${ICECC}"
65144    fi
65145
65146
65147  fi
65148
65149
65150# Can the C/C++ compiler use precompiled headers?
65151
65152
65153  ###############################################################################
65154  #
65155  # Can the C/C++ compiler use precompiled headers?
65156  #
65157  # Check whether --enable-precompiled-headers was given.
65158if test "${enable_precompiled_headers+set}" = set; then :
65159  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65160else
65161  ENABLE_PRECOMPH=yes
65162fi
65163
65164
65165  USE_PRECOMPILED_HEADER=1
65166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65167$as_echo_n "checking If precompiled header is enabled... " >&6; }
65168  if test "x$ENABLE_PRECOMPH" = xno; then
65169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65170$as_echo "no, forced" >&6; }
65171    USE_PRECOMPILED_HEADER=0
65172  elif test "x$ICECC" != "x"; then
65173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65174$as_echo "no, does not work effectively with icecc" >&6; }
65175    USE_PRECOMPILED_HEADER=0
65176  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65178$as_echo "no, does not work with Solaris Studio" >&6; }
65179    USE_PRECOMPILED_HEADER=0
65180  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65182$as_echo "no, does not work with xlc" >&6; }
65183    USE_PRECOMPILED_HEADER=0
65184  else
65185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65186$as_echo "yes" >&6; }
65187  fi
65188
65189  if test "x$ENABLE_PRECOMPH" = xyes; then
65190    # Check that the compiler actually supports precomp headers.
65191    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65192      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65193$as_echo_n "checking that precompiled headers work... " >&6; }
65194      echo "int alfa();" > conftest.h
65195      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65196      if test ! -f conftest.hpp.gch; then
65197        USE_PRECOMPILED_HEADER=0
65198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65199$as_echo "no" >&6; }
65200      else
65201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65202$as_echo "yes" >&6; }
65203      fi
65204      $RM conftest.h conftest.hpp.gch
65205    fi
65206  fi
65207
65208
65209
65210
65211# Setup use of ccache, if available
65212
65213  # Check whether --enable-ccache was given.
65214if test "${enable_ccache+set}" = set; then :
65215  enableval=$enable_ccache;
65216fi
65217
65218
65219  CCACHE_STATUS=
65220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65221$as_echo_n "checking is ccache enabled... " >&6; }
65222  if test "x$enable_ccache" = xyes; then
65223    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65225$as_echo "yes" >&6; }
65226      OLD_PATH="$PATH"
65227      if test "x$TOOLCHAIN_PATH" != x; then
65228        PATH=$TOOLCHAIN_PATH:$PATH
65229      fi
65230
65231
65232
65233  # Publish this variable in the help.
65234
65235
65236  if [ -z "${CCACHE+x}" ]; then
65237    # The variable is not set by user, try to locate tool using the code snippet
65238    for ac_prog in ccache
65239do
65240  # Extract the first word of "$ac_prog", so it can be a program name with args.
65241set dummy $ac_prog; ac_word=$2
65242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65243$as_echo_n "checking for $ac_word... " >&6; }
65244if ${ac_cv_path_CCACHE+:} false; then :
65245  $as_echo_n "(cached) " >&6
65246else
65247  case $CCACHE in
65248  [\\/]* | ?:[\\/]*)
65249  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65250  ;;
65251  *)
65252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65253for as_dir in $PATH
65254do
65255  IFS=$as_save_IFS
65256  test -z "$as_dir" && as_dir=.
65257    for ac_exec_ext in '' $ac_executable_extensions; do
65258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65259    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65261    break 2
65262  fi
65263done
65264  done
65265IFS=$as_save_IFS
65266
65267  ;;
65268esac
65269fi
65270CCACHE=$ac_cv_path_CCACHE
65271if test -n "$CCACHE"; then
65272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65273$as_echo "$CCACHE" >&6; }
65274else
65275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65276$as_echo "no" >&6; }
65277fi
65278
65279
65280  test -n "$CCACHE" && break
65281done
65282
65283  else
65284    # The variable is set, but is it from the command line or the environment?
65285
65286    # Try to remove the string !CCACHE! from our list.
65287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65289      # If it failed, the variable was not from the command line. Ignore it,
65290      # but warn the user (except for BASH, which is always set by the calling BASH).
65291      if test "xCCACHE" != xBASH; then
65292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65293$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65294      fi
65295      # Try to locate tool using the code snippet
65296      for ac_prog in ccache
65297do
65298  # Extract the first word of "$ac_prog", so it can be a program name with args.
65299set dummy $ac_prog; ac_word=$2
65300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65301$as_echo_n "checking for $ac_word... " >&6; }
65302if ${ac_cv_path_CCACHE+:} false; then :
65303  $as_echo_n "(cached) " >&6
65304else
65305  case $CCACHE in
65306  [\\/]* | ?:[\\/]*)
65307  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65308  ;;
65309  *)
65310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65311for as_dir in $PATH
65312do
65313  IFS=$as_save_IFS
65314  test -z "$as_dir" && as_dir=.
65315    for ac_exec_ext in '' $ac_executable_extensions; do
65316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65317    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65319    break 2
65320  fi
65321done
65322  done
65323IFS=$as_save_IFS
65324
65325  ;;
65326esac
65327fi
65328CCACHE=$ac_cv_path_CCACHE
65329if test -n "$CCACHE"; then
65330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65331$as_echo "$CCACHE" >&6; }
65332else
65333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65334$as_echo "no" >&6; }
65335fi
65336
65337
65338  test -n "$CCACHE" && break
65339done
65340
65341    else
65342      # If it succeeded, then it was overridden by the user. We will use it
65343      # for the tool.
65344
65345      # First remove it from the list of overridden variables, so we can test
65346      # for unknown variables in the end.
65347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65348
65349      # Check if we try to supply an empty value
65350      if test "x$CCACHE" = x; then
65351        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65352$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65353        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65354$as_echo_n "checking for CCACHE... " >&6; }
65355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65356$as_echo "disabled" >&6; }
65357      else
65358        # Check if the provided tool contains a complete path.
65359        tool_specified="$CCACHE"
65360        tool_basename="${tool_specified##*/}"
65361        if test "x$tool_basename" = "x$tool_specified"; then
65362          # A command without a complete path is provided, search $PATH.
65363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65364$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65365          # Extract the first word of "$tool_basename", so it can be a program name with args.
65366set dummy $tool_basename; ac_word=$2
65367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65368$as_echo_n "checking for $ac_word... " >&6; }
65369if ${ac_cv_path_CCACHE+:} false; then :
65370  $as_echo_n "(cached) " >&6
65371else
65372  case $CCACHE in
65373  [\\/]* | ?:[\\/]*)
65374  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65375  ;;
65376  *)
65377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65378for as_dir in $PATH
65379do
65380  IFS=$as_save_IFS
65381  test -z "$as_dir" && as_dir=.
65382    for ac_exec_ext in '' $ac_executable_extensions; do
65383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65384    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65386    break 2
65387  fi
65388done
65389  done
65390IFS=$as_save_IFS
65391
65392  ;;
65393esac
65394fi
65395CCACHE=$ac_cv_path_CCACHE
65396if test -n "$CCACHE"; then
65397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65398$as_echo "$CCACHE" >&6; }
65399else
65400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65401$as_echo "no" >&6; }
65402fi
65403
65404
65405          if test "x$CCACHE" = x; then
65406            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65407          fi
65408        else
65409          # Otherwise we believe it is a complete path. Use it as it is.
65410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65411$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65412          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65413$as_echo_n "checking for CCACHE... " >&6; }
65414          if test ! -x "$tool_specified"; then
65415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65416$as_echo "not found" >&6; }
65417            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65418          fi
65419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65420$as_echo "$tool_specified" >&6; }
65421        fi
65422      fi
65423    fi
65424
65425  fi
65426
65427
65428
65429  if test "x$CCACHE" = x; then
65430    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65431  fi
65432
65433
65434      PATH="$OLD_PATH"
65435      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65436      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65437    else
65438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65439$as_echo "no" >&6; }
65440      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65441$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65442    fi
65443  elif test "x$enable_ccache" = xno; then
65444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65445$as_echo "no, explicitly disabled" >&6; }
65446    CCACHE_STATUS="Disabled"
65447  elif test "x$enable_ccache" = x; then
65448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65449$as_echo "no" >&6; }
65450  else
65451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65452$as_echo "unknown" >&6; }
65453    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65454  fi
65455
65456
65457
65458# Check whether --with-ccache-dir was given.
65459if test "${with_ccache_dir+set}" = set; then :
65460  withval=$with_ccache_dir;
65461fi
65462
65463
65464  if test "x$with_ccache_dir" != x; then
65465    # When using a non home ccache directory, assume the use is to share ccache files
65466    # with other users. Thus change the umask.
65467    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65468    if test "x$CCACHE" = x; then
65469      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65470$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65471    fi
65472  fi
65473
65474  if test "x$CCACHE" != x; then
65475
65476  if test "x$CCACHE" != x; then
65477    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65478      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65479          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65480      if test "x$HAS_BAD_CCACHE" != "x"; then
65481        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65482      fi
65483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65484$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65485      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65486      PUSHED_FLAGS="$CXXFLAGS"
65487      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65488      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65489/* end confdefs.h.  */
65490
65491int
65492main ()
65493{
65494
65495  ;
65496  return 0;
65497}
65498_ACEOF
65499if ac_fn_cxx_try_compile "$LINENO"; then :
65500  CC_KNOWS_CCACHE_TRICK=yes
65501else
65502  CC_KNOWS_CCACHE_TRICK=no
65503fi
65504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65505      CXXFLAGS="$PUSHED_FLAGS"
65506      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65508$as_echo "yes" >&6; }
65509        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65510
65511        CCACHE_SLOPPINESS=pch_defines,time_macros
65512      else
65513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65514$as_echo "no" >&6; }
65515        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65516      fi
65517    fi
65518
65519    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65520        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65521
65522    if test "x$SET_CCACHE_DIR" != x; then
65523      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65524      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65525    fi
65526  fi
65527
65528  fi
65529
65530
65531###############################################################################
65532#
65533# And now the finish...
65534#
65535###############################################################################
65536
65537# Check for some common pitfalls
65538
65539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65540    file_to_test="$SRC_ROOT/LICENSE"
65541    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65542      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
65543    fi
65544  fi
65545
65546
65547  # Did user specify any unknown variables?
65548
65549  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65550    # Replace the separating ! with spaces before presenting for end user.
65551    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65552    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65553$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65554  fi
65555
65556
65557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65558$as_echo_n "checking if build directory is on local disk... " >&6; }
65559
65560  # df -l lists only local disks; if the given directory is not found then
65561  # a non-zero exit code is given
65562  if test "x$DF" = x; then
65563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65564      # msys does not have df; use Windows "net use" instead.
65565      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65566      if test "x$IS_NETWORK_DISK" = x; then
65567        OUTPUT_DIR_IS_LOCAL="yes"
65568      else
65569        OUTPUT_DIR_IS_LOCAL="no"
65570      fi
65571    else
65572      # No df here, say it's local
65573      OUTPUT_DIR_IS_LOCAL="yes"
65574    fi
65575  else
65576    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65577      OUTPUT_DIR_IS_LOCAL="yes"
65578    else
65579      OUTPUT_DIR_IS_LOCAL="no"
65580    fi
65581  fi
65582
65583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65584$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65585
65586
65587
65588  # Check if the user has any old-style ALT_ variables set.
65589  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65590
65591  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65592  # Since we can't properly handle the dependencies for this, warn the user about the situation
65593  if test -e $OUTPUT_ROOT/spec.gmk; then
65594    IS_RECONFIGURE=yes
65595  else
65596    IS_RECONFIGURE=no
65597  fi
65598
65599
65600# At the end, call the custom hook. (Dummy macro if no custom sources available)
65601
65602
65603# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65604
65605  # Keep feature lists sorted and free of duplicates
65606  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65607  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65608  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65609  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65610  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65611  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65612  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65613
65614  # Validate features
65615  for variant in $JVM_VARIANTS; do
65616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65617$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65618    features_var_name=JVM_FEATURES_$variant
65619    JVM_FEATURES_TO_TEST=${!features_var_name}
65620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65621$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65622    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65623    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65624    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65625    if test "x$INVALID_FEATURES" != x; then
65626      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65627    fi
65628  done
65629
65630
65631# We're messing a bit with internal autoconf variables to put the config.status
65632# in the output directory instead of the current directory.
65633CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65634
65635# Create the actual output files. Now the main work of configure is done.
65636cat >confcache <<\_ACEOF
65637# This file is a shell script that caches the results of configure
65638# tests run on this system so they can be shared between configure
65639# scripts and configure runs, see configure's option --config-cache.
65640# It is not useful on other systems.  If it contains results you don't
65641# want to keep, you may remove or edit it.
65642#
65643# config.status only pays attention to the cache file if you give it
65644# the --recheck option to rerun configure.
65645#
65646# `ac_cv_env_foo' variables (set or unset) will be overridden when
65647# loading this file, other *unset* `ac_cv_foo' will be assigned the
65648# following values.
65649
65650_ACEOF
65651
65652# The following way of writing the cache mishandles newlines in values,
65653# but we know of no workaround that is simple, portable, and efficient.
65654# So, we kill variables containing newlines.
65655# Ultrix sh set writes to stderr and can't be redirected directly,
65656# and sets the high bit in the cache file unless we assign to the vars.
65657(
65658  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65659    eval ac_val=\$$ac_var
65660    case $ac_val in #(
65661    *${as_nl}*)
65662      case $ac_var in #(
65663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65665      esac
65666      case $ac_var in #(
65667      _ | IFS | as_nl) ;; #(
65668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65669      *) { eval $ac_var=; unset $ac_var;} ;;
65670      esac ;;
65671    esac
65672  done
65673
65674  (set) 2>&1 |
65675    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65676    *${as_nl}ac_space=\ *)
65677      # `set' does not quote correctly, so add quotes: double-quote
65678      # substitution turns \\\\ into \\, and sed turns \\ into \.
65679      sed -n \
65680	"s/'/'\\\\''/g;
65681	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65682      ;; #(
65683    *)
65684      # `set' quotes correctly as required by POSIX, so do not add quotes.
65685      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65686      ;;
65687    esac |
65688    sort
65689) |
65690  sed '
65691     /^ac_cv_env_/b end
65692     t clear
65693     :clear
65694     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65695     t end
65696     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65697     :end' >>confcache
65698if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65699  if test -w "$cache_file"; then
65700    if test "x$cache_file" != "x/dev/null"; then
65701      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65702$as_echo "$as_me: updating cache $cache_file" >&6;}
65703      if test ! -f "$cache_file" || test -h "$cache_file"; then
65704	cat confcache >"$cache_file"
65705      else
65706        case $cache_file in #(
65707        */* | ?:*)
65708	  mv -f confcache "$cache_file"$$ &&
65709	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65710        *)
65711	  mv -f confcache "$cache_file" ;;
65712	esac
65713      fi
65714    fi
65715  else
65716    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65717$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65718  fi
65719fi
65720rm -f confcache
65721
65722test "x$prefix" = xNONE && prefix=$ac_default_prefix
65723# Let make expand exec_prefix.
65724test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65725
65726# Transform confdefs.h into DEFS.
65727# Protect against shell expansion while executing Makefile rules.
65728# Protect against Makefile macro expansion.
65729#
65730# If the first sed substitution is executed (which looks for macros that
65731# take arguments), then branch to the quote section.  Otherwise,
65732# look for a macro that doesn't take arguments.
65733ac_script='
65734:mline
65735/\\$/{
65736 N
65737 s,\\\n,,
65738 b mline
65739}
65740t clear
65741:clear
65742s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65743t quote
65744s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65745t quote
65746b any
65747:quote
65748s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65749s/\[/\\&/g
65750s/\]/\\&/g
65751s/\$/$$/g
65752H
65753:any
65754${
65755	g
65756	s/^\n//
65757	s/\n/ /g
65758	p
65759}
65760'
65761DEFS=`sed -n "$ac_script" confdefs.h`
65762
65763
65764ac_libobjs=
65765ac_ltlibobjs=
65766U=
65767for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65768  # 1. Remove the extension, and $U if already installed.
65769  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65770  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65771  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65772  #    will be set to the directory where LIBOBJS objects are built.
65773  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65774  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65775done
65776LIBOBJS=$ac_libobjs
65777
65778LTLIBOBJS=$ac_ltlibobjs
65779
65780
65781
65782: "${CONFIG_STATUS=./config.status}"
65783ac_write_fail=0
65784ac_clean_files_save=$ac_clean_files
65785ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65786{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65787$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65788as_write_fail=0
65789cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65790#! $SHELL
65791# Generated by $as_me.
65792# Run this file to recreate the current configuration.
65793# Compiler output produced by configure, useful for debugging
65794# configure, is in config.log if it exists.
65795
65796debug=false
65797ac_cs_recheck=false
65798ac_cs_silent=false
65799
65800SHELL=\${CONFIG_SHELL-$SHELL}
65801export SHELL
65802_ASEOF
65803cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65804## -------------------- ##
65805## M4sh Initialization. ##
65806## -------------------- ##
65807
65808# Be more Bourne compatible
65809DUALCASE=1; export DUALCASE # for MKS sh
65810if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65811  emulate sh
65812  NULLCMD=:
65813  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65814  # is contrary to our usage.  Disable this feature.
65815  alias -g '${1+"$@"}'='"$@"'
65816  setopt NO_GLOB_SUBST
65817else
65818  case `(set -o) 2>/dev/null` in #(
65819  *posix*) :
65820    set -o posix ;; #(
65821  *) :
65822     ;;
65823esac
65824fi
65825
65826
65827as_nl='
65828'
65829export as_nl
65830# Printing a long string crashes Solaris 7 /usr/bin/printf.
65831as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65832as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65833as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65834# Prefer a ksh shell builtin over an external printf program on Solaris,
65835# but without wasting forks for bash or zsh.
65836if test -z "$BASH_VERSION$ZSH_VERSION" \
65837    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65838  as_echo='print -r --'
65839  as_echo_n='print -rn --'
65840elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65841  as_echo='printf %s\n'
65842  as_echo_n='printf %s'
65843else
65844  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65845    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65846    as_echo_n='/usr/ucb/echo -n'
65847  else
65848    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65849    as_echo_n_body='eval
65850      arg=$1;
65851      case $arg in #(
65852      *"$as_nl"*)
65853	expr "X$arg" : "X\\(.*\\)$as_nl";
65854	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65855      esac;
65856      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65857    '
65858    export as_echo_n_body
65859    as_echo_n='sh -c $as_echo_n_body as_echo'
65860  fi
65861  export as_echo_body
65862  as_echo='sh -c $as_echo_body as_echo'
65863fi
65864
65865# The user is always right.
65866if test "${PATH_SEPARATOR+set}" != set; then
65867  PATH_SEPARATOR=:
65868  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65869    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65870      PATH_SEPARATOR=';'
65871  }
65872fi
65873
65874
65875# IFS
65876# We need space, tab and new line, in precisely that order.  Quoting is
65877# there to prevent editors from complaining about space-tab.
65878# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65879# splitting by setting IFS to empty value.)
65880IFS=" ""	$as_nl"
65881
65882# Find who we are.  Look in the path if we contain no directory separator.
65883as_myself=
65884case $0 in #((
65885  *[\\/]* ) as_myself=$0 ;;
65886  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65887for as_dir in $PATH
65888do
65889  IFS=$as_save_IFS
65890  test -z "$as_dir" && as_dir=.
65891    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65892  done
65893IFS=$as_save_IFS
65894
65895     ;;
65896esac
65897# We did not find ourselves, most probably we were run as `sh COMMAND'
65898# in which case we are not to be found in the path.
65899if test "x$as_myself" = x; then
65900  as_myself=$0
65901fi
65902if test ! -f "$as_myself"; then
65903  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65904  exit 1
65905fi
65906
65907# Unset variables that we do not need and which cause bugs (e.g. in
65908# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65909# suppresses any "Segmentation fault" message there.  '((' could
65910# trigger a bug in pdksh 5.2.14.
65911for as_var in BASH_ENV ENV MAIL MAILPATH
65912do eval test x\${$as_var+set} = xset \
65913  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65914done
65915PS1='$ '
65916PS2='> '
65917PS4='+ '
65918
65919# NLS nuisances.
65920LC_ALL=C
65921export LC_ALL
65922LANGUAGE=C
65923export LANGUAGE
65924
65925# CDPATH.
65926(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65927
65928
65929# as_fn_error STATUS ERROR [LINENO LOG_FD]
65930# ----------------------------------------
65931# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65932# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65933# script with STATUS, using 1 if that was 0.
65934as_fn_error ()
65935{
65936  as_status=$1; test $as_status -eq 0 && as_status=1
65937  if test "$4"; then
65938    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65939    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65940  fi
65941  $as_echo "$as_me: error: $2" >&2
65942  as_fn_exit $as_status
65943} # as_fn_error
65944
65945
65946# as_fn_set_status STATUS
65947# -----------------------
65948# Set $? to STATUS, without forking.
65949as_fn_set_status ()
65950{
65951  return $1
65952} # as_fn_set_status
65953
65954# as_fn_exit STATUS
65955# -----------------
65956# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65957as_fn_exit ()
65958{
65959  set +e
65960  as_fn_set_status $1
65961  exit $1
65962} # as_fn_exit
65963
65964# as_fn_unset VAR
65965# ---------------
65966# Portably unset VAR.
65967as_fn_unset ()
65968{
65969  { eval $1=; unset $1;}
65970}
65971as_unset=as_fn_unset
65972# as_fn_append VAR VALUE
65973# ----------------------
65974# Append the text in VALUE to the end of the definition contained in VAR. Take
65975# advantage of any shell optimizations that allow amortized linear growth over
65976# repeated appends, instead of the typical quadratic growth present in naive
65977# implementations.
65978if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65979  eval 'as_fn_append ()
65980  {
65981    eval $1+=\$2
65982  }'
65983else
65984  as_fn_append ()
65985  {
65986    eval $1=\$$1\$2
65987  }
65988fi # as_fn_append
65989
65990# as_fn_arith ARG...
65991# ------------------
65992# Perform arithmetic evaluation on the ARGs, and store the result in the
65993# global $as_val. Take advantage of shells that can avoid forks. The arguments
65994# must be portable across $(()) and expr.
65995if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65996  eval 'as_fn_arith ()
65997  {
65998    as_val=$(( $* ))
65999  }'
66000else
66001  as_fn_arith ()
66002  {
66003    as_val=`expr "$@" || test $? -eq 1`
66004  }
66005fi # as_fn_arith
66006
66007
66008if expr a : '\(a\)' >/dev/null 2>&1 &&
66009   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66010  as_expr=expr
66011else
66012  as_expr=false
66013fi
66014
66015if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66016  as_basename=basename
66017else
66018  as_basename=false
66019fi
66020
66021if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66022  as_dirname=dirname
66023else
66024  as_dirname=false
66025fi
66026
66027as_me=`$as_basename -- "$0" ||
66028$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66029	 X"$0" : 'X\(//\)$' \| \
66030	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66031$as_echo X/"$0" |
66032    sed '/^.*\/\([^/][^/]*\)\/*$/{
66033	    s//\1/
66034	    q
66035	  }
66036	  /^X\/\(\/\/\)$/{
66037	    s//\1/
66038	    q
66039	  }
66040	  /^X\/\(\/\).*/{
66041	    s//\1/
66042	    q
66043	  }
66044	  s/.*/./; q'`
66045
66046# Avoid depending upon Character Ranges.
66047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66050as_cr_digits='0123456789'
66051as_cr_alnum=$as_cr_Letters$as_cr_digits
66052
66053ECHO_C= ECHO_N= ECHO_T=
66054case `echo -n x` in #(((((
66055-n*)
66056  case `echo 'xy\c'` in
66057  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66058  xy)  ECHO_C='\c';;
66059  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66060       ECHO_T='	';;
66061  esac;;
66062*)
66063  ECHO_N='-n';;
66064esac
66065
66066rm -f conf$$ conf$$.exe conf$$.file
66067if test -d conf$$.dir; then
66068  rm -f conf$$.dir/conf$$.file
66069else
66070  rm -f conf$$.dir
66071  mkdir conf$$.dir 2>/dev/null
66072fi
66073if (echo >conf$$.file) 2>/dev/null; then
66074  if ln -s conf$$.file conf$$ 2>/dev/null; then
66075    as_ln_s='ln -s'
66076    # ... but there are two gotchas:
66077    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66078    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66079    # In both cases, we have to default to `cp -pR'.
66080    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66081      as_ln_s='cp -pR'
66082  elif ln conf$$.file conf$$ 2>/dev/null; then
66083    as_ln_s=ln
66084  else
66085    as_ln_s='cp -pR'
66086  fi
66087else
66088  as_ln_s='cp -pR'
66089fi
66090rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66091rmdir conf$$.dir 2>/dev/null
66092
66093
66094# as_fn_mkdir_p
66095# -------------
66096# Create "$as_dir" as a directory, including parents if necessary.
66097as_fn_mkdir_p ()
66098{
66099
66100  case $as_dir in #(
66101  -*) as_dir=./$as_dir;;
66102  esac
66103  test -d "$as_dir" || eval $as_mkdir_p || {
66104    as_dirs=
66105    while :; do
66106      case $as_dir in #(
66107      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66108      *) as_qdir=$as_dir;;
66109      esac
66110      as_dirs="'$as_qdir' $as_dirs"
66111      as_dir=`$as_dirname -- "$as_dir" ||
66112$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66113	 X"$as_dir" : 'X\(//\)[^/]' \| \
66114	 X"$as_dir" : 'X\(//\)$' \| \
66115	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66116$as_echo X"$as_dir" |
66117    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66118	    s//\1/
66119	    q
66120	  }
66121	  /^X\(\/\/\)[^/].*/{
66122	    s//\1/
66123	    q
66124	  }
66125	  /^X\(\/\/\)$/{
66126	    s//\1/
66127	    q
66128	  }
66129	  /^X\(\/\).*/{
66130	    s//\1/
66131	    q
66132	  }
66133	  s/.*/./; q'`
66134      test -d "$as_dir" && break
66135    done
66136    test -z "$as_dirs" || eval "mkdir $as_dirs"
66137  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66138
66139
66140} # as_fn_mkdir_p
66141if mkdir -p . 2>/dev/null; then
66142  as_mkdir_p='mkdir -p "$as_dir"'
66143else
66144  test -d ./-p && rmdir ./-p
66145  as_mkdir_p=false
66146fi
66147
66148
66149# as_fn_executable_p FILE
66150# -----------------------
66151# Test if FILE is an executable regular file.
66152as_fn_executable_p ()
66153{
66154  test -f "$1" && test -x "$1"
66155} # as_fn_executable_p
66156as_test_x='test -x'
66157as_executable_p=as_fn_executable_p
66158
66159# Sed expression to map a string onto a valid CPP name.
66160as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66161
66162# Sed expression to map a string onto a valid variable name.
66163as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66164
66165
66166exec 6>&1
66167## ----------------------------------- ##
66168## Main body of $CONFIG_STATUS script. ##
66169## ----------------------------------- ##
66170_ASEOF
66171test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66172
66173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66174# Save the log message, to keep $0 and so on meaningful, and to
66175# report actual input values of CONFIG_FILES etc. instead of their
66176# values after options handling.
66177ac_log="
66178This file was extended by OpenJDK $as_me jdk9, which was
66179generated by GNU Autoconf 2.69.  Invocation command line was
66180
66181  CONFIG_FILES    = $CONFIG_FILES
66182  CONFIG_HEADERS  = $CONFIG_HEADERS
66183  CONFIG_LINKS    = $CONFIG_LINKS
66184  CONFIG_COMMANDS = $CONFIG_COMMANDS
66185  $ $0 $@
66186
66187on `(hostname || uname -n) 2>/dev/null | sed 1q`
66188"
66189
66190_ACEOF
66191
66192case $ac_config_files in *"
66193"*) set x $ac_config_files; shift; ac_config_files=$*;;
66194esac
66195
66196
66197
66198cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66199# Files that config.status was made for.
66200config_files="$ac_config_files"
66201
66202_ACEOF
66203
66204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66205ac_cs_usage="\
66206\`$as_me' instantiates files and other configuration actions
66207from templates according to the current configuration.  Unless the files
66208and actions are specified as TAGs, all are instantiated by default.
66209
66210Usage: $0 [OPTION]... [TAG]...
66211
66212  -h, --help       print this help, then exit
66213  -V, --version    print version number and configuration settings, then exit
66214      --config     print configuration, then exit
66215  -q, --quiet, --silent
66216                   do not print progress messages
66217  -d, --debug      don't remove temporary files
66218      --recheck    update $as_me by reconfiguring in the same conditions
66219      --file=FILE[:TEMPLATE]
66220                   instantiate the configuration file FILE
66221
66222Configuration files:
66223$config_files
66224
66225Report bugs to <build-dev@openjdk.java.net>.
66226OpenJDK home page: <http://openjdk.java.net>."
66227
66228_ACEOF
66229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66230ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66231ac_cs_version="\\
66232OpenJDK config.status jdk9
66233configured by $0, generated by GNU Autoconf 2.69,
66234  with options \\"\$ac_cs_config\\"
66235
66236Copyright (C) 2012 Free Software Foundation, Inc.
66237This config.status script is free software; the Free Software Foundation
66238gives unlimited permission to copy, distribute and modify it."
66239
66240ac_pwd='$ac_pwd'
66241srcdir='$srcdir'
66242AWK='$AWK'
66243test -n "\$AWK" || AWK=awk
66244_ACEOF
66245
66246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66247# The default lists apply if the user does not specify any file.
66248ac_need_defaults=:
66249while test $# != 0
66250do
66251  case $1 in
66252  --*=?*)
66253    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66254    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66255    ac_shift=:
66256    ;;
66257  --*=)
66258    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66259    ac_optarg=
66260    ac_shift=:
66261    ;;
66262  *)
66263    ac_option=$1
66264    ac_optarg=$2
66265    ac_shift=shift
66266    ;;
66267  esac
66268
66269  case $ac_option in
66270  # Handling of the options.
66271  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66272    ac_cs_recheck=: ;;
66273  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66274    $as_echo "$ac_cs_version"; exit ;;
66275  --config | --confi | --conf | --con | --co | --c )
66276    $as_echo "$ac_cs_config"; exit ;;
66277  --debug | --debu | --deb | --de | --d | -d )
66278    debug=: ;;
66279  --file | --fil | --fi | --f )
66280    $ac_shift
66281    case $ac_optarg in
66282    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66283    '') as_fn_error $? "missing file argument" ;;
66284    esac
66285    as_fn_append CONFIG_FILES " '$ac_optarg'"
66286    ac_need_defaults=false;;
66287  --he | --h |  --help | --hel | -h )
66288    $as_echo "$ac_cs_usage"; exit ;;
66289  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66290  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66291    ac_cs_silent=: ;;
66292
66293  # This is an error.
66294  -*) as_fn_error $? "unrecognized option: \`$1'
66295Try \`$0 --help' for more information." ;;
66296
66297  *) as_fn_append ac_config_targets " $1"
66298     ac_need_defaults=false ;;
66299
66300  esac
66301  shift
66302done
66303
66304ac_configure_extra_args=
66305
66306if $ac_cs_silent; then
66307  exec 6>/dev/null
66308  ac_configure_extra_args="$ac_configure_extra_args --silent"
66309fi
66310
66311_ACEOF
66312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66313if \$ac_cs_recheck; then
66314  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66315  shift
66316  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66317  CONFIG_SHELL='$SHELL'
66318  export CONFIG_SHELL
66319  exec "\$@"
66320fi
66321
66322_ACEOF
66323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66324exec 5>>config.log
66325{
66326  echo
66327  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66328## Running $as_me. ##
66329_ASBOX
66330  $as_echo "$ac_log"
66331} >&5
66332
66333_ACEOF
66334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66335_ACEOF
66336
66337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66338
66339# Handling of arguments.
66340for ac_config_target in $ac_config_targets
66341do
66342  case $ac_config_target in
66343    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66344    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66345    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66346    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66347    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66348
66349  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66350  esac
66351done
66352
66353
66354# If the user did not use the arguments to specify the items to instantiate,
66355# then the envvar interface is used.  Set only those that are not.
66356# We use the long form for the default assignment because of an extremely
66357# bizarre bug on SunOS 4.1.3.
66358if $ac_need_defaults; then
66359  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66360fi
66361
66362# Have a temporary directory for convenience.  Make it in the build tree
66363# simply because there is no reason against having it here, and in addition,
66364# creating and moving files from /tmp can sometimes cause problems.
66365# Hook for its removal unless debugging.
66366# Note that there is a small window in which the directory will not be cleaned:
66367# after its creation but before its name has been assigned to `$tmp'.
66368$debug ||
66369{
66370  tmp= ac_tmp=
66371  trap 'exit_status=$?
66372  : "${ac_tmp:=$tmp}"
66373  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66374' 0
66375  trap 'as_fn_exit 1' 1 2 13 15
66376}
66377# Create a (secure) tmp directory for tmp files.
66378
66379{
66380  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66381  test -d "$tmp"
66382}  ||
66383{
66384  tmp=./conf$$-$RANDOM
66385  (umask 077 && mkdir "$tmp")
66386} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66387ac_tmp=$tmp
66388
66389# Set up the scripts for CONFIG_FILES section.
66390# No need to generate them if there are no CONFIG_FILES.
66391# This happens for instance with `./config.status config.h'.
66392if test -n "$CONFIG_FILES"; then
66393
66394
66395ac_cr=`echo X | tr X '\015'`
66396# On cygwin, bash can eat \r inside `` if the user requested igncr.
66397# But we know of no other shell where ac_cr would be empty at this
66398# point, so we can use a bashism as a fallback.
66399if test "x$ac_cr" = x; then
66400  eval ac_cr=\$\'\\r\'
66401fi
66402ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66403if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66404  ac_cs_awk_cr='\\r'
66405else
66406  ac_cs_awk_cr=$ac_cr
66407fi
66408
66409echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66410_ACEOF
66411
66412
66413{
66414  echo "cat >conf$$subs.awk <<_ACEOF" &&
66415  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66416  echo "_ACEOF"
66417} >conf$$subs.sh ||
66418  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66419ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66420ac_delim='%!_!# '
66421for ac_last_try in false false false false false :; do
66422  . ./conf$$subs.sh ||
66423    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66424
66425  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66426  if test $ac_delim_n = $ac_delim_num; then
66427    break
66428  elif $ac_last_try; then
66429    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66430  else
66431    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66432  fi
66433done
66434rm -f conf$$subs.sh
66435
66436cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66437cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66438_ACEOF
66439sed -n '
66440h
66441s/^/S["/; s/!.*/"]=/
66442p
66443g
66444s/^[^!]*!//
66445:repl
66446t repl
66447s/'"$ac_delim"'$//
66448t delim
66449:nl
66450h
66451s/\(.\{148\}\)..*/\1/
66452t more1
66453s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66454p
66455n
66456b repl
66457:more1
66458s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66459p
66460g
66461s/.\{148\}//
66462t nl
66463:delim
66464h
66465s/\(.\{148\}\)..*/\1/
66466t more2
66467s/["\\]/\\&/g; s/^/"/; s/$/"/
66468p
66469b
66470:more2
66471s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66472p
66473g
66474s/.\{148\}//
66475t delim
66476' <conf$$subs.awk | sed '
66477/^[^""]/{
66478  N
66479  s/\n//
66480}
66481' >>$CONFIG_STATUS || ac_write_fail=1
66482rm -f conf$$subs.awk
66483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66484_ACAWK
66485cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66486  for (key in S) S_is_set[key] = 1
66487  FS = ""
66488
66489}
66490{
66491  line = $ 0
66492  nfields = split(line, field, "@")
66493  substed = 0
66494  len = length(field[1])
66495  for (i = 2; i < nfields; i++) {
66496    key = field[i]
66497    keylen = length(key)
66498    if (S_is_set[key]) {
66499      value = S[key]
66500      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66501      len += length(value) + length(field[++i])
66502      substed = 1
66503    } else
66504      len += 1 + keylen
66505  }
66506
66507  print line
66508}
66509
66510_ACAWK
66511_ACEOF
66512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66513if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66514  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66515else
66516  cat
66517fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66518  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66519_ACEOF
66520
66521# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66522# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66523# trailing colons and then remove the whole line if VPATH becomes empty
66524# (actually we leave an empty line to preserve line numbers).
66525if test "x$srcdir" = x.; then
66526  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66527h
66528s///
66529s/^/:/
66530s/[	 ]*$/:/
66531s/:\$(srcdir):/:/g
66532s/:\${srcdir}:/:/g
66533s/:@srcdir@:/:/g
66534s/^:*//
66535s/:*$//
66536x
66537s/\(=[	 ]*\).*/\1/
66538G
66539s/\n//
66540s/^[^=]*=[	 ]*$//
66541}'
66542fi
66543
66544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66545fi # test -n "$CONFIG_FILES"
66546
66547
66548eval set X "  :F $CONFIG_FILES      "
66549shift
66550for ac_tag
66551do
66552  case $ac_tag in
66553  :[FHLC]) ac_mode=$ac_tag; continue;;
66554  esac
66555  case $ac_mode$ac_tag in
66556  :[FHL]*:*);;
66557  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66558  :[FH]-) ac_tag=-:-;;
66559  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66560  esac
66561  ac_save_IFS=$IFS
66562  IFS=:
66563  set x $ac_tag
66564  IFS=$ac_save_IFS
66565  shift
66566  ac_file=$1
66567  shift
66568
66569  case $ac_mode in
66570  :L) ac_source=$1;;
66571  :[FH])
66572    ac_file_inputs=
66573    for ac_f
66574    do
66575      case $ac_f in
66576      -) ac_f="$ac_tmp/stdin";;
66577      *) # Look for the file first in the build tree, then in the source tree
66578	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66579	 # because $ac_f cannot contain `:'.
66580	 test -f "$ac_f" ||
66581	   case $ac_f in
66582	   [\\/$]*) false;;
66583	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66584	   esac ||
66585	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66586      esac
66587      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66588      as_fn_append ac_file_inputs " '$ac_f'"
66589    done
66590
66591    # Let's still pretend it is `configure' which instantiates (i.e., don't
66592    # use $as_me), people would be surprised to read:
66593    #    /* config.h.  Generated by config.status.  */
66594    configure_input='Generated from '`
66595	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66596	`' by configure.'
66597    if test x"$ac_file" != x-; then
66598      configure_input="$ac_file.  $configure_input"
66599      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66600$as_echo "$as_me: creating $ac_file" >&6;}
66601    fi
66602    # Neutralize special characters interpreted by sed in replacement strings.
66603    case $configure_input in #(
66604    *\&* | *\|* | *\\* )
66605       ac_sed_conf_input=`$as_echo "$configure_input" |
66606       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66607    *) ac_sed_conf_input=$configure_input;;
66608    esac
66609
66610    case $ac_tag in
66611    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66612      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66613    esac
66614    ;;
66615  esac
66616
66617  ac_dir=`$as_dirname -- "$ac_file" ||
66618$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66619	 X"$ac_file" : 'X\(//\)[^/]' \| \
66620	 X"$ac_file" : 'X\(//\)$' \| \
66621	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66622$as_echo X"$ac_file" |
66623    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66624	    s//\1/
66625	    q
66626	  }
66627	  /^X\(\/\/\)[^/].*/{
66628	    s//\1/
66629	    q
66630	  }
66631	  /^X\(\/\/\)$/{
66632	    s//\1/
66633	    q
66634	  }
66635	  /^X\(\/\).*/{
66636	    s//\1/
66637	    q
66638	  }
66639	  s/.*/./; q'`
66640  as_dir="$ac_dir"; as_fn_mkdir_p
66641  ac_builddir=.
66642
66643case "$ac_dir" in
66644.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66645*)
66646  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66647  # A ".." for each directory in $ac_dir_suffix.
66648  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66649  case $ac_top_builddir_sub in
66650  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66651  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66652  esac ;;
66653esac
66654ac_abs_top_builddir=$ac_pwd
66655ac_abs_builddir=$ac_pwd$ac_dir_suffix
66656# for backward compatibility:
66657ac_top_builddir=$ac_top_build_prefix
66658
66659case $srcdir in
66660  .)  # We are building in place.
66661    ac_srcdir=.
66662    ac_top_srcdir=$ac_top_builddir_sub
66663    ac_abs_top_srcdir=$ac_pwd ;;
66664  [\\/]* | ?:[\\/]* )  # Absolute name.
66665    ac_srcdir=$srcdir$ac_dir_suffix;
66666    ac_top_srcdir=$srcdir
66667    ac_abs_top_srcdir=$srcdir ;;
66668  *) # Relative name.
66669    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66670    ac_top_srcdir=$ac_top_build_prefix$srcdir
66671    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66672esac
66673ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66674
66675
66676  case $ac_mode in
66677  :F)
66678  #
66679  # CONFIG_FILE
66680  #
66681
66682_ACEOF
66683
66684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66685# If the template does not know about datarootdir, expand it.
66686# FIXME: This hack should be removed a few years after 2.60.
66687ac_datarootdir_hack=; ac_datarootdir_seen=
66688ac_sed_dataroot='
66689/datarootdir/ {
66690  p
66691  q
66692}
66693/@datadir@/p
66694/@docdir@/p
66695/@infodir@/p
66696/@localedir@/p
66697/@mandir@/p'
66698case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66699*datarootdir*) ac_datarootdir_seen=yes;;
66700*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66701  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66702$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66703_ACEOF
66704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66705  ac_datarootdir_hack='
66706  s&@datadir@&$datadir&g
66707  s&@docdir@&$docdir&g
66708  s&@infodir@&$infodir&g
66709  s&@localedir@&$localedir&g
66710  s&@mandir@&$mandir&g
66711  s&\\\${datarootdir}&$datarootdir&g' ;;
66712esac
66713_ACEOF
66714
66715# Neutralize VPATH when `$srcdir' = `.'.
66716# Shell code in configure.ac might set extrasub.
66717# FIXME: do we really want to maintain this feature?
66718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66719ac_sed_extra="$ac_vpsub
66720$extrasub
66721_ACEOF
66722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66723:t
66724/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66725s|@configure_input@|$ac_sed_conf_input|;t t
66726s&@top_builddir@&$ac_top_builddir_sub&;t t
66727s&@top_build_prefix@&$ac_top_build_prefix&;t t
66728s&@srcdir@&$ac_srcdir&;t t
66729s&@abs_srcdir@&$ac_abs_srcdir&;t t
66730s&@top_srcdir@&$ac_top_srcdir&;t t
66731s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66732s&@builddir@&$ac_builddir&;t t
66733s&@abs_builddir@&$ac_abs_builddir&;t t
66734s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66735$ac_datarootdir_hack
66736"
66737eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66738  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66739
66740test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66741  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66742  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66743      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66744  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66745which seems to be undefined.  Please make sure it is defined" >&5
66746$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66747which seems to be undefined.  Please make sure it is defined" >&2;}
66748
66749  rm -f "$ac_tmp/stdin"
66750  case $ac_file in
66751  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66752  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66753  esac \
66754  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66755 ;;
66756
66757
66758
66759  esac
66760
66761done # for ac_tag
66762
66763
66764as_fn_exit 0
66765_ACEOF
66766ac_clean_files=$ac_clean_files_save
66767
66768test $ac_write_fail = 0 ||
66769  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66770
66771
66772# configure is writing to config.log, and then calls config.status.
66773# config.status does its own redirection, appending to config.log.
66774# Unfortunately, on DOS this fails, as config.log is still kept open
66775# by configure, so config.status won't be able to write to it; its
66776# output is simply discarded.  So we exec the FD to /dev/null,
66777# effectively closing config.log, so it can be properly (re)opened and
66778# appended to by config.status.  When coming back to configure, we
66779# need to make the FD available again.
66780if test "$no_create" != yes; then
66781  ac_cs_success=:
66782  ac_config_status_args=
66783  test "$silent" = yes &&
66784    ac_config_status_args="$ac_config_status_args --quiet"
66785  exec 5>/dev/null
66786  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66787  exec 5>>config.log
66788  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66789  # would make configure fail if this is the last instruction.
66790  $ac_cs_success || as_fn_exit 1
66791fi
66792if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66793  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66794$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66795fi
66796
66797
66798# After AC_OUTPUT, we need to do final work
66799
66800
66801  # Try to move config.log (generated by autoconf) to the configure-support directory.
66802  if test -e ./config.log; then
66803    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66804  fi
66805
66806  # Rotate our log file (configure.log)
66807  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66808    $RM -f "$OUTPUT_ROOT/configure.log.old"
66809  fi
66810  if test -e "$OUTPUT_ROOT/configure.log"; then
66811    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66812  fi
66813
66814  # Move configure.log from current directory to the build output root
66815  if test -e ./configure.log; then
66816    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66817  fi
66818
66819  # Make the compare script executable
66820  $CHMOD +x $OUTPUT_ROOT/compare.sh
66821
66822
66823# Finally output some useful information to the user
66824
66825  # Finally output some useful information to the user
66826
66827  printf "\n"
66828  printf "====================================================\n"
66829  if test "x$no_create" != "xyes"; then
66830    if test "x$IS_RECONFIGURE" != "xyes"; then
66831      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66832    else
66833      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66834    fi
66835  else
66836    if test "x$IS_RECONFIGURE" != "xyes"; then
66837      printf "A configuration has been successfully checked but not created\n"
66838    else
66839      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66840    fi
66841  fi
66842  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66843    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66844  else
66845    printf "using default settings.\n"
66846  fi
66847
66848  printf "\n"
66849  printf "Configuration summary:\n"
66850  printf "* Debug level:    $DEBUG_LEVEL\n"
66851  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66852  printf "* JDK variant:    $JDK_VARIANT\n"
66853  printf "* JVM variants:   $JVM_VARIANTS\n"
66854  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66855  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66856
66857  printf "\n"
66858  printf "Tools summary:\n"
66859  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66860    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66861  fi
66862  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66863  if test "x$TOOLCHAIN_VERSION" != "x"; then
66864    print_version=" $TOOLCHAIN_VERSION"
66865  fi
66866  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66867  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66868  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66869
66870  printf "\n"
66871  printf "Build performance summary:\n"
66872  printf "* Cores to use:   $JOBS\n"
66873  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66874  if test "x$CCACHE_STATUS" != "x"; then
66875    printf "* ccache status:  $CCACHE_STATUS\n"
66876  fi
66877  printf "\n"
66878
66879  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66880    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66881    printf "will result in longer build times.\n"
66882    printf "\n"
66883  fi
66884
66885  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66886    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66887    printf "These are not respected, and will be ignored. It is recommended\n"
66888    printf "that you clean your environment. The following variables are set:\n"
66889    printf "$FOUND_ALT_VARIABLES\n"
66890    printf "\n"
66891  fi
66892
66893  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66894    printf "WARNING: Your build output directory is not on a local disk.\n"
66895    printf "This will severely degrade build performance!\n"
66896    printf "It is recommended that you create an output directory on a local disk,\n"
66897    printf "and run the configure script again from that directory.\n"
66898    printf "\n"
66899  fi
66900
66901  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66902    printf "WARNING: The result of this configuration has overridden an older\n"
66903    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66904    printf "proper build. Failure to do so might result in strange build problems.\n"
66905    printf "\n"
66906  fi
66907
66908  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66909    printf "WARNING: The result of this configuration was not saved.\n"
66910    printf "You should run without '--no-create | -n' to create the configuration.\n"
66911    printf "\n"
66912  fi
66913
66914
66915
66916  # Locate config.log.
66917  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66918    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66919  elif test -e "./config.log"; then
66920    CONFIG_LOG_PATH="."
66921  fi
66922
66923  if test -e "$CONFIG_LOG_PATH/config.log"; then
66924    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66925    if test $? -eq 0; then
66926      printf "The following warnings were produced. Repeated here for convenience:\n"
66927      # We must quote sed expression (using []) to stop m4 from eating the [].
66928      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66929      printf "\n"
66930    fi
66931  fi
66932
66933